View Single Post
Old August 12th, 2004, 11:01 PM   #1
ghinton
Member
Verified Customer
 
Join Date: Feb 2004
Posts: 117
Highest Rated/Most Popular

I am in the process of implementing a contest section to my site. It is my understanding that the Highest Rated/Most Popular sites are calculated based on the rating first and then the number of views of the photo second. Is there a way to add a third option? What I would like it to be able to also to take into consideration is the number of votes for a photo. For example:
If photo 1 has been view 100 times, and has been only voted for once and received a 10, but photo 2 has been viewed 99 times and has a score of 10 as well, but 25 people have voted for this one. The way the system is now, photo 1 would be rated above photo 2 because of the 1 additional view, but I don't think this is very accurate as the more people who give something a consistant vote is a better indicator than just one or two, so even though less people have viewed photo 1, it would appear that it is a more popular photo than photo 2.
Is there a way for it to take into consideration the number of people who have voted and then have as a third "line of defense" the number of views, so that way the system would say allright... photo 1 has a score of 9.5 and has 10 vote and has been viewed by 100 people. Photo 2 has a score of 10 and has 10 votes and has been viewed by 100 people as well. Photo 3 has a score of 9.5 and has 25 votes and has also been viewed by 100 people. Photo 4 has a score of 10 and has 10 votes and has been viewed by 75 people. In this case the ratings would fall in the following order:
1st - Photo 2
2nd - Photo 4
3rd - Photo 3
4th - Photo 1

I know it comes from this query:

$query = "SELECT cat,id,title,rating FROM {$Globals['pp_db_prefix']}photos ORDER BY rating DESC,views DESC LIMIT {$Globals['mostpoppal']}";

but is it possible to add in to take into consideration for the number of votes?
ghinton is offline   Reply With Quote