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: Single vote system and Top Rated page MOD  (Read 3168 times)

0 Members and 1 Guest are viewing this topic.

TeraS

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 17
  • Lost but trying really hard...
    • Succubus.net
Single vote system and Top Rated page MOD
« on: June 29, 2009, 03:56:31 pm »

I found in the forum this thread on converting the standard 5 star voting system to a single vote.

http://forum.coppermine-gallery.net/index.php/topic,54319.0.html

That is fine and I can see that the 5 vote system is replaced by a single vote button.

Here is my question...

How would you change the Top Rated page to display the Top Rated images based on the number of votes given per image and not the previous score of 5?

My gallery is at: succubus.net/gallery and I am running 1.4.25 with the lipstik theme...

Thank you in advance!


Tera
Logged

Nibbler

  • Guest
Re: Single vote system and Top Rated page MOD
« Reply #1 on: June 29, 2009, 04:24:28 pm »

Edit include/functions.inc.php, find

Code: [Select]
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND votes >= '{$CONFIG['min_votes_for_rating']}' $META_ALBUM_SET ORDER BY pic_rating DESC, votes DESC, pid DESC $limit";

Change to

Code: [Select]
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND votes >= '{$CONFIG['min_votes_for_rating']}' $META_ALBUM_SET ORDER BY votes DESC, pid DESC $limit";
Logged

TeraS

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 17
  • Lost but trying really hard...
    • Succubus.net
Re: Single vote system and Top Rated page MOD
« Reply #2 on: June 29, 2009, 04:52:51 pm »

<huggles>

Thank you so very very much!

I will try that this afternoon!


Tera
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.