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

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

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