Single vote system and Top Rated page MOD Single vote system and Top Rated page MOD
 

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

Single vote system and Top Rated page MOD

Started by TeraS, June 29, 2009, 03:56:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TeraS

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

Nibbler

Edit include/functions.inc.php, find


$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


$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";

TeraS

<huggles>

Thank you so very very much!

I will try that this afternoon!


Tera