Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Toprated images uploaded within last 24 hours  (Read 3879 times)

0 Members and 1 Guest are viewing this topic.

plancast

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Toprated images uploaded within last 24 hours
« on: February 09, 2015, 12:48:29 pm »

Hi,

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

Many thanks,

Chris
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Toprated images uploaded within last 24 hours
« Reply #1 on: February 09, 2015, 03:32:20 pm »

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

Logged

plancast

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Toprated images uploaded within last 24 hours
« Reply #2 on: February 09, 2015, 04:46:31 pm »

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

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Toprated images uploaded within last 24 hours
« Reply #3 on: February 09, 2015, 08:20:25 pm »

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.
Logged

netb

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 82
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.