forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: TeraS on June 29, 2009, 03:56:31 pm

Title: Single vote system and Top Rated page MOD
Post by: TeraS 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
Title: Re: Single vote system and Top Rated page MOD
Post by: Nibbler 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";
Title: Re: Single vote system and Top Rated page MOD
Post by: TeraS on June 29, 2009, 04:52:51 pm
<huggles>

Thank you so very very much!

I will try that this afternoon!


Tera