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

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

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.