![]() |
Sorting does not work in contests For some time now, we've been unable to sort contest galleries by number of votes. We can make the selection to sort by "rating," but nothing is then sorted that way. Why is this? Thanks. |
The sort is purposely locked in a contest to MOST POPULAR. Thats how the developer has it coded in showgallery.php |
Quote:
|
If voting is disabled or ended the catsort is definatley MOST POPULAR yes. I can clearly show you an example If voting is enabled then the sort order is random. |
Chuck, I really think this is not only the problem of the starter of this topic, we have contests now also, I really would like to sort it by most votes, not random or most viewed. But, if I do understand correctly, when voting ends, the sorting method is most popular, so most votes en we are clearly can see the winnar with most votes, if so I have said nothing ;-) Thow it would be very nice to set sorting also to most popular, can this be changed in the code? i don't mind changing it, because this is what we want. To avoid repeating this question, maybe a note in the program telling the admin this, just a thought. Gerard |
It is like this If your running a contest it is sorted by this basically if a contest is open the sort is random. If you end the contest it is set to MOST POPULAR which is the highest rating. Code: Content visible to verified customers only. |
Chuck, I just ended a vote on a category, the cat sort is Most Popular in de admin setting, the database says sort order "4" (which is Most populair I thought) but still random sorting, no sorting by highest votes. Checked the code and is the same! I even modified the code above to have all options 4, still random?? Is there a difference in rating style or voting style for sorting photo's? Gerard |
Quote:
|
How about this in showgallery add in bold Code: Content visible to verified customers only. |
Chuck, sorry not working, I now have all options in the if statement to $sortby = "b" and $catsortorder = 4 I've checked the database fields also and this is what is says: sortorder = 4, take votes = 2, votes = 0, ismember = 0 I had set a moderator to the voting categorie, but stil nothing happens than randomly thumbs. Can it be the template "showgallery.tmpl" has a flaw, a minor bug? Something is also done in misc.php at least according to the template, can this be something? what is the b in $sortby = "b" stands for? does this do anything to interfere with the sorting? My settings (not working): Code: Content visible to verified customers only.Gerard |
No the php file controls the sort and I dont see what I posted why it would not work for you. Here is what is in the showgallery.php file Code: Content visible to verified customers only.Thus if voting has ended your sort is hard coded to most popular. |
Chuck, I do understand what you are saying, and everthing, including the sort order in de admin panel is set to most popular and al the code does still not result in a correct sorting to most popular. I'm not a database wizzard, and the problem is not only by me, but for sorting method 4 this is wat de dbase says: sortID:4 Name: Most Popular Code: ORDER BY disporder,rating DESC, views DESC Should be right, otherwise this was not set like this, but I'm trying everthing to get this working. |
Also try adding this in bold Code: Content visible to verified customers only. |
Chuck, that's the bug fixed!!!!!!!!!! This is working, great, superb!! Our day is again great! It works! The missing piece is found. Gerard |
Glad it works for you have a good weekend |
Have a great weekend too. |
I am gonna try ;) |
Quote:
And if this is a bug, can the affected file just be updated? |
Make the changes in post 9 and 13. try it out |
Chuck, your changes in 9 mean the sorting code never changes... Code: Content visible to verified customers only.It's suppose to be random when voting is enabled. |
| All times are GMT -5. The time now is 03:58 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0