Toprated images uploaded within last 24 hours Toprated images uploaded within last 24 hours
 

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

Main Menu

Toprated images uploaded within last 24 hours

Started by plancast, February 09, 2015, 12:48:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

plancast

Hi,

Is there a way I can add another "Toprated" section of highest rated images uploaded within the last 24 hours?

Many thanks,

Chris

allvip

Every album thumbnails page has a sort order button: by date, by title etc.
That can be added even for Top rated thumbnails.
Would that be OK?

The problem is that I do not remember were I saw that on the forum.
Maybe this:  Hidden features plugin for cpg1.5.x http://forum.coppermine-gallery.net/index.php/topic,77314.0.html


plancast

Hi Allvip,

Thanks for getting back to me.  I need to know where to put for instance in functions.inc.php there is:

        $query = "SELECT COUNT(*)
                FROM {$CONFIG['TABLE_PICTURES']} AS r
                INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = r.aid
                $RESTRICTEDWHERE
                AND approved = 'YES'
                AND r.votes >= '{$CONFIG['min_votes_for_rating']}'";

Can I put somewhere a "WHERE ctime < 24hours" sort of command.

I really hope I have made sense.

Thanks,

Chris


ΑndrĂ©

I suggest to create a new meta album via a plugin, so you don't need to edit core files after each upgrade. Have a look at this plugin to get an idea how it works, or simply extend the plugin to your needs.

But you'll have an issue with such a meta album. Imagine a user currently browses your custom meta album with pictures that where uploaded almost 24 hours ago. While viewing the album, some of the pictures can get "too old" and your visitors probably get a weird error message if they try to open such an image. To be honest, I haven't checked that yet, but I worked a lot with meta albums some years ago and I think I got something like that while playing around with the meta album feature.