forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: Juanito on June 08, 2005, 04:52:02 pm

Title: Top Rated sorted by # of votes
Post by: Juanito on June 08, 2005, 04:52:02 pm
i tried searching the forums for this, but no luck. i'm trying to sort the Top Rated page by the highest number of votes to the lowest, instead of by the highest rated to lowest rated. any help is appreciated. thanks!
Title: Re: Top Rated sorted by # of votes
Post by: Nibbler on June 08, 2005, 04:55:17 pm
open functions.inc.php, search for toprated, change the ordering in the query from

Code: [Select]
ORDER BY ROUND((pic_rating+1)/2000) DESC, votes DESC, filename
to

Code: [Select]
ORDER BY votes DESC, filename
Title: Re: Top Rated sorted by # of votes
Post by: Juanito on June 09, 2005, 10:40:06 pm
thanx so much! works like a charm. wasn't expecting such a fast reply. thanks again!