Member
Member
vpas   2012-05-09, 11:33
#1

Just wondering how the top rated rankings are worked out. I use the zpMinimal theme on my site, with the front page set to use the top-rated image.

Looking at the stats, I can see that the top-rated image is one that has received a single 5 vote, yet there are others that have received more 5 votes and only 5* votes. That suggests that those photos should be top of the list, as they are liked by more people.

Administrator
Administrator
acrylian   2012-05-09, 11:42
#2

"Toprated" is measued by the average value images.total_value/images.total_votes currently. Done via a db query within the statistics plugin.

Member
Member
vpas   2012-05-09, 13:11
#3

OK, that makes sense. What is the sorting order for when 2 or more images have the same result?

As 5/1 = 20/4 = 5000/1000.

Administrator
Administrator
acrylian   2012-05-09, 13:17
#4

Well, random I would say. The code currently does not differ. 5 stars by one vote or 5 stars by 5 votes is the same average rating naturally. Those calculation is directly done in a db query.

Member
Member
vpas   2012-05-09, 15:32
#5

Certainly not random.

As per the stats page, I've over 10 photos rated with an average of 5*, but they are listed in the same way each time I refresh the page.

Though I accept that this may be down to the caching, the photo that has been "top rated" and therefore shown as the main image on the zpMinimal entry page has remained the same every since I moved to that theme.

Additionally, with the same data on my LAMP system at home, the same image is shown on the front page also.

Administrator
Administrator
acrylian   2012-05-09, 15:56
#6

Ok, randomly was not technically exact. Actually I have to admit I don't know how MySQL sorts things if they all have the same value.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.