 | |  | | | Photopost Pro Bug Reports Post post installation PhotoPost Pro problems here. |
June 21st, 2009, 08:01 AM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Feb 2007
Posts: 316
| 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.
|
| |
June 21st, 2009, 08:33 AM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,696
|
The sort is purposely locked in a contest to MOST POPULAR. Thats how the developer has it coded in showgallery.php
|
| |
June 21st, 2009, 08:36 AM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Feb 2007
Posts: 316
| Quote:
Originally Posted by Chuck S The sort is purposely locked in a contest to MOST POPULAR. Thats how the developer has it coded in showgallery.php | I guess what I'm trying to tell you is that it doesn't work this way, in fact. "Most popular" equals "most votes," right? It doesn't sort by most votes. Why not?
|
| |
June 21st, 2009, 08:39 AM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,696
|
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.
|
| |
August 20th, 2009, 06:02 AM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Feb 2009 Location: Holland
Posts: 116
|
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
|
| |
August 20th, 2009, 09:02 AM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,696
|
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.
|
| |
August 29th, 2009, 12:45 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Feb 2009 Location: Holland
Posts: 116
|
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
|
| |
August 29th, 2009, 12:53 PM
|
#8 (permalink)
| | Member Verified Customer
Join Date: Feb 2007
Posts: 316
| Quote:
Originally Posted by drare 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??
| Exactly what happens!
|
| |
August 29th, 2009, 01:30 PM
|
#9 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,696
|
How about this in showgallery add in bold Code: Content visible to verified customers only.
|
| |
August 29th, 2009, 02:13 PM
|
#10 (permalink)
| | Member Verified Customer
Join Date: Feb 2009 Location: Holland
Posts: 116
|
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.
Is this correct?: if ( !$sortby ) the "!"
Gerard
Last edited by drare; August 29th, 2009 at 02:27 PM.
|
| |
August 29th, 2009, 02:29 PM
|
#11 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,696
|
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.
Now automaticallly it is already set to sort most popular and the code I gave simply also adds a protectional conditional saying if takevotes is 2 then sort is most popular.
Thus if voting has ended your sort is hard coded to most popular.
|
| |
August 29th, 2009, 02:37 PM
|
#12 (permalink)
| | Member Verified Customer
Join Date: Feb 2009 Location: Holland
Posts: 116
|
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.
Last edited by drare; August 29th, 2009 at 02:49 PM.
|
| |
August 29th, 2009, 02:50 PM
|
#13 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,696
|
Also try adding this in bold Code: Content visible to verified customers only.
|
| |
August 29th, 2009, 02:54 PM
|
#14 (permalink)
| | Member Verified Customer
Join Date: Feb 2009 Location: Holland
Posts: 116
|
Chuck, that's the bug fixed!!!!!!!!!!
This is working, great, superb!!
Our day is again great! It works! The missing piece is found.
Gerard
|
| |
August 29th, 2009, 03:38 PM
|
#15 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,696
|
Glad it works for you have a good weekend
|
| |
August 29th, 2009, 04:15 PM
|
#16 (permalink)
| | Member Verified Customer
Join Date: Feb 2009 Location: Holland
Posts: 116
|
Have a great weekend too.
|
| |
August 29th, 2009, 05:32 PM
|
#17 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,696
|
I am gonna try |
| |
August 30th, 2009, 06:21 PM
|
#18 (permalink)
| | Member Verified Customer
Join Date: Feb 2007
Posts: 316
| Quote:
Originally Posted by Chuck S Glad it works for you have a good weekend | Do I have to read all the fixes in this thread to know what to do? What, finally, is the fix?
And if this is a bug, can the affected file just be updated?
|
| |
August 30th, 2009, 06:23 PM
|
#19 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,696
|
Make the changes in post 9 and 13. try it out
|
| |
September 1st, 2009, 06:07 PM
|
#20 (permalink)
| | PhotoPost Developer Verified Customer
Join Date: Jan 2002
Posts: 11,834
|
Chuck, your changes in 9 mean the sorting code never changes... Code: Content visible to verified customers only.
What's the point of the conditional then?
It's suppose to be random when voting is enabled.
__________________ Please do not PM me for support or sales questions. Thank you for your understanding. |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 07:08 PM. | |