Sorting by number of votes and rate at a time?

Phoca Gallery - image gallery extension
ankoch
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 20 Sep 2010, 14:19

Sorting by number of votes and rate at a time?

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
ankoch
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 20 Sep 2010, 14:19

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

Post by ankoch »

And how to do it, tell me please.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
ankoch
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 20 Sep 2010, 14:19

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

Post 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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Hi, added to feature request list.

Jan
If you find Phoca extensions useful, please support the project
ankoch
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 20 Sep 2010, 14:19

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

Post by ankoch »

Thanks, be to wait until a new version of Phoca Gallery from this functional.
Post Reply