Is there anyway to get the Most Viewed images, but not have them be randomly displayed and instead from highest viewed to lowest viewed?
Thanks,
Quote from: die2nite on July 09, 2007, 01:57:50 AM
Is there anyway to get the Most Viewed images, but not have them be randomly displayed and instead from highest viewed to lowest viewed?
Thanks,
That may be in the next version... That is a tough one to work out. Not programmatically but theory wise?
Lets say you have 100 pictures or varying views. From which subset should the random be picked? See the problem?
Well let's say you have the following file set with the views following it.
File 1 - 7 Views
File 2 - 11 Views
File 3 - 7 Views
File 4 - 9 Views
File 5 - 2 Views
Then it should display like this:
File 2
File 4
File 1
File 3
File 5
But since Files 1 and 3 have the same views it could do one of the following to choose which one to show first: make it random for just those two, so positions three and four in the list would be random, or just put the first one the script encounters in the database in position three and the other one in position four. Personally I would prefer the second way, just so users wouldn't be confused about why they keep interchanging.
The reason I'm asking for this is begin I'm putting a section on my site for the "Most Popular Files" and I want them to be measured by the views and in descending order so users will immediately know what is the most popular file.
Thanks for the quick response vuud
Quote from: die2nite on July 09, 2007, 05:24:20 AM
Well let's say you have the following file set with the views following it.
File 1 - 7 Views
File 2 - 11 Views
File 3 - 7 Views
File 4 - 9 Views
File 5 - 2 Views
Then it should display like this:
File 2
File 4
File 1
File 3
File 5
But since Files 1 and 3 have the same views it could do one of the following to choose which one to show first: make it random for just those two, so positions three and four in the list would be random, or just put the first one the script encounters in the database in position three and the other one in position four. Personally I would prefer the second way, just so users wouldn't be confused about why they keep interchanging.
The reason I'm asking for this is begin I'm putting a section on my site for the "Most Popular Files" and I want them to be measured by the views and in descending order so users will immediately know what is the most popular file.
Thanks for the quick response vuud
Ah sorry, I read it quick and thought you wanted the random.
Yeah, I think that is actually in the works. Thing is what to do if they are all 0 views? I plan on letting the query run and have mysql do whatever it does in that instance :D
Check the next dev release when it comes out.
Awesome, thanks vuud!