PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro Bug Reports (http://www.photopost.com/forum/photopost-pro-bug-reports/)
-   -   Sorting does not work in contests (http://www.photopost.com/forum/photopost-pro-bug-reports/140329-sorting-does-not-work-contests.html)

jdougher June 21st, 2009 08:01 AM

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.

Chuck S June 21st, 2009 08:33 AM

The sort is purposely locked in a contest to MOST POPULAR. Thats how the developer has it coded in showgallery.php

jdougher June 21st, 2009 08:36 AM

Quote:

Originally Posted by Chuck S (Post 1248993)
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?

Chuck S June 21st, 2009 08:39 AM

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.

drare August 20th, 2009 06:02 AM

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

Chuck S August 20th, 2009 09:02 AM

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.

drare August 29th, 2009 12:45 PM

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

jdougher August 29th, 2009 12:53 PM

Quote:

Originally Posted by drare (Post 1251959)
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!

Chuck S August 29th, 2009 01:30 PM

How about this in showgallery add in bold

Code:

Content visible to verified customers only.

drare August 29th, 2009 02:13 PM

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

Chuck S August 29th, 2009 02:29 PM

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.

drare August 29th, 2009 02:37 PM

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.

Chuck S August 29th, 2009 02:50 PM

Also try adding this in bold

Code:

Content visible to verified customers only.

drare August 29th, 2009 02:54 PM

Chuck, that's the bug fixed!!!!!!!!!!

This is working, great, superb!!

Our day is again great! It works! The missing piece is found.
Gerard

Chuck S August 29th, 2009 03:38 PM

Glad it works for you have a good weekend

drare August 29th, 2009 04:15 PM

Have a great weekend too.

Chuck S August 29th, 2009 05:32 PM

I am gonna try ;)

jdougher August 30th, 2009 06:21 PM

Quote:

Originally Posted by Chuck S (Post 1251969)
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?

Chuck S August 30th, 2009 06:23 PM

Make the changes in post 9 and 13. try it out

Michael P September 1st, 2009 06:07 PM

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.


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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97