Page 1 of 1

Sorting by number of votes and rate at a time?

Posted: 24 Oct 2010, 18:35
by ankoch
Firstly, thanks for the components, it is the best :twisted:

And the question.

I use the Phoca Gallery 2.7.5. Organized on the basis of its photo contest. I can organize pictures into categories based on the number of votes or by the highest rate. However, if the average score is the same, the photos are distributed in the order they were added. Can I make pictures sorted by the highest rate and the number of votes at a time?
For example, there are three photos:
(1) first add photo has 3 votes and the average rate - 4
(2) The second picture was added with 7 votes and the average rate - 4
(3) The third added photo has 2 votes and the average rate - 5
Now, if you order by number of votes, then we obtain the following order: (2), (1), (3)
If you order by highest rate, then we obtain the following: (3), (1), (2)
And I would like to order photos were derived in the following order: (3), (2), (1)

How can this be implemented?

Thanks.

Re: Sorting by number of votes and rate at a time?

Posted: 31 Oct 2010, 16:31
by Jan
Hi, then the sql query needs to be customized in the code, in the model of category view, you will set the ordering arguments to fit your needs.

Jan

Re: Sorting by number of votes and rate at a time?

Posted: 01 Nov 2010, 12:49
by ankoch
And how to do it, tell me please.

Re: Sorting by number of votes and rate at a time?

Posted: 01 Nov 2010, 15:12
by Jan
Hi, I didn't do such modification yet, so I don't know the exact proccess of what should be done :-( so cannot give any detailed advice there :-(

Jan

Re: Sorting by number of votes and rate at a time?

Posted: 02 Nov 2010, 12:55
by ankoch
Jan, thanks for replay,

However, it is quite logical and essential function, is not it?
Do you plan to add it to the next version of the Phoca Gallery?

Re: Sorting by number of votes and rate at a time?

Posted: 06 Nov 2010, 21:33
by Jan
Hi, added to feature request list.

Jan

Re: Sorting by number of votes and rate at a time?

Posted: 09 Nov 2010, 14:28
by ankoch
Thanks, be to wait until a new version of Phoca Gallery from this functional.