Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2 3   Go Down

Author Topic: Hot pictures plugin for cpg1.5.x  (Read 40052 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Hot pictures plugin for cpg1.5.x
« on: March 30, 2012, 02:27:40 pm »

Set pictures as 'hot' for x days and display them in a meta album 'hotpics'.

This plugin is the result of a freelance request by altenae. Just install the plugin as described in the Coppermine docs. By default it will add 3 buttons to the intermediate page view for the administrator. In codebase.php you can change those buttons
Code: [Select]
$buttons = array(1, 2, 3); // each number will create a button 'Hot for x days'and also determine, which user groups will see the buttons
Code: [Select]
$groups = array(1); // enter the group IDs which should be allowed to set pictures as 'hot'(there's no web configuration interface available).
« Last Edit: October 04, 2013, 11:50:49 am by Αndré »
Logged

Deus

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 153
    • DJ-Daz
Re: Hot pictures plugin for cpg1.5.x
« Reply #1 on: September 14, 2012, 09:55:20 pm »

what is a meta album?
How do I set one up?

Logged
https://daz-stuff.uk
DJ tutorials, E-Bikes, Movies and videogames.
(https://daz-stuff.uk/daz/signature.png)

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Hot pictures plugin for cpg1.5.x
« Reply #2 on: September 14, 2012, 10:19:31 pm »

what is a meta album?
How do I set one up?

This plugin creates a extra album =  'hotpics'  which you can get to display by adding it to the breadcrumbs list.

Config > Album list view > scroll down to, "The content of the main page"  and add it to the breadcrumb list, example,

breadcrumb/slider/catlist/alblist/hotpics/toprateda/random,2/lastup,2/onlinestats  etc.

You can also add more meta albums by using the More meta albums plugin, http://forum.coppermine-gallery.net/index.php/topic,63706.0.html
« Last Edit: September 14, 2012, 10:41:03 pm by lurkalot »
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Deus

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 153
    • DJ-Daz
Re: Hot pictures plugin for cpg1.5.x
« Reply #3 on: September 14, 2012, 10:38:07 pm »

Brilliant, thanks Lurkalot, that had me scratching my head a bit.
Logged
https://daz-stuff.uk
DJ tutorials, E-Bikes, Movies and videogames.
(https://daz-stuff.uk/daz/signature.png)

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Hot pictures plugin for cpg1.5.x
« Reply #4 on: September 25, 2013, 03:28:04 pm »

Critical error
There was an error while processing a database query

I disabled the plugin and tryed to enabled it back but I get this error.

I proabibly did not removed the hot pictures before disabling it.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Hot pictures plugin for cpg1.5.x
« Reply #5 on: September 25, 2013, 03:50:01 pm »

To know what the problem is you need to detail the full error message. This can be done by enabling debug.

You can disable the plugin via phpmyadmin, you can also enable debug there. Details of how to do this can be found in the docs and in numerous threads in the forums.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Hot pictures plugin for cpg1.5.x
« Reply #6 on: September 25, 2013, 04:01:26 pm »

Critical error

There was an error while processing a database query.
While executing query 'ALTER IGNORE TABLE cpg_pictures ADD hot_expire int(11) default '0'' in plugins/hot_pictures/codebase.php on line 180

mySQL error: Duplicate column name 'hot_expire'

File: /home/allvip/public_html/allvip.us/gallery/include/functions.inc.php - Line: 272
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Hot pictures plugin for cpg1.5.x
« Reply #7 on: September 25, 2013, 04:17:29 pm »

I can not disable the plugin via phpmyadmin because is not in the  cpg_plugins table and his does not have his own table like cpg_plugin_xfeeds
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Hot pictures plugin for cpg1.5.x
« Reply #8 on: September 25, 2013, 04:19:22 pm »

I would like to remove all the database of this plugin and do a fresf install of hot pictures plgin but can not find it in phpMyAdmin
Logged

Niecher

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 191
Re: Hot pictures plugin for cpg1.5.x
« Reply #9 on: September 26, 2013, 12:38:33 pm »

Hello allvip,

I have the same problem as you, then:

1º.- within the structure of the table "cpg_pictures" manually delete the column "hot_expire".

2º.- edit codebabe.php

find:
Code: [Select]
// Add new column
$thisplugin->add_action('plugin_install', 'hot_pictures_install');
function hot_pictures_install() {
    global $CONFIG;
    cpg_db_query("ALTER IGNORE TABLE {$CONFIG['TABLE_PICTURES']} ADD hot_expire int(11) default '0'");
    return true;
}

and replace:
Code: [Select]
// Add new column
$thisplugin->add_action('plugin_install', 'hot_pictures_install');
function hot_pictures_install() {
    global $CONFIG;
    cpg_db_query("ALTER TABLE {$CONFIG['TABLE_PICTURES']} ADD hot_expire int(11) default '0'");
    return true;
}

// Remove new column
$thisplugin->add_action('plugin_uninstall', 'hot_pictures_uninstall');
function hot_pictures_uninstall() {
    global $CONFIG;
    cpg_db_query("ALTER TABLE {$CONFIG['TABLE_PICTURES']} DROP hot_expire");
    return true;
}

Regards.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Hot pictures plugin for cpg1.5.x
« Reply #10 on: September 26, 2013, 01:51:07 pm »

I already deleted hot expire.
thanks for the code.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Hot pictures plugin for cpg1.5.x
« Reply #11 on: September 26, 2013, 02:44:38 pm »

to delete a colum from a table with phpMyAdmin:

click the coppermine database - left sidebar of phpMyAdmin
click table cpg15x_pictures
click SQL button at top of the page
click Clear
paste in the box :

ALTER TABLE cpg15x_pictures
DROP COLUMN hot_expire

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Hot pictures plugin for cpg1.5.x
« Reply #12 on: September 27, 2013, 08:51:09 pm »

Seems that
Quote
ALTER IGNORE ...
doesn't work as expected. Which MySQL version is installed on your server?
Logged

Niecher

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 191
Re: Hot pictures plugin for cpg1.5.x
« Reply #13 on: September 27, 2013, 10:57:25 pm »

Hello André,

Quote
version 5.1.68

Regards.
« Last Edit: September 28, 2013, 02:24:49 am by Niecher »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Hot pictures plugin for cpg1.5.x
« Reply #14 on: October 01, 2013, 04:20:17 pm »

Confirmed on my testbed. Seems that I misunderstood IGNORE in this context. Will release a new plugin version soon.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Hot pictures plugin for cpg1.5.x
« Reply #15 on: October 04, 2013, 11:51:10 am »

Plugin version 1.5 attached to initial post.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: Hot pictures plugin for cpg1.5.x
« Reply #16 on: October 24, 2013, 05:03:36 am »

Quote from: Andre
By default it will add 3 buttons to the intermediate page view for the administrator.

There don't seem to be any new buttons in intermediate page.  I put it in the breadcrumb, and the empty block shows up everywhere.  But I don't see any new buttons, anywhere.

Should I go into the codebase.php file and edit something?  If so, please tell me what.  Otherwise ???

My gallery:  http://inkscapecommunity.com/ic_gallery/index.php

Thanks for your help   :)
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: Hot pictures plugin for cpg1.5.x
« Reply #17 on: October 27, 2013, 04:59:19 am »

Unistalled for now.  Let me know if you want me to help troubleshoot and I will re-install it.   :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Hot pictures plugin for cpg1.5.x
« Reply #18 on: October 29, 2013, 04:15:35 pm »

Please test if it works with the curve theme: http://inkscapecommunity.com/ic_gallery/index.php?theme=curve
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: Hot pictures plugin for cpg1.5.x
« Reply #19 on: October 31, 2013, 07:59:42 am »

Ok, I re-installed it, but still don't see the new buttons, not even in Curve theme.  Let me put it in the breadcrumbs....  Hhm, still no new buttons.  I have several themes available.  Should I check them all?
Logged
Pages: [1] 2 3   Go Up
 

Page created in 0.027 seconds with 20 queries.