Sorry for my English.
Hello "Jan", my name is Arthur, I from Russia (hockey, bears, Red Square ).
I want that you have added my solution in the following version Phoca Gallery, because I consider it as perfect addition for this gallery.
GO ...
1) Edit file "www\administrator\language\en-GB\en-GB.com_phocagallery.ini" ADD
Code: Select all
#2.7.1 Beta
COUNT ASC = Vote count Ascending
COUNT DESC = Vote count Descending
AVERAGE ASC = Vote average Ascending
AVERAGE DESC = Vote average Descending
function getOrderingString ($ordering) - added 4 new case ( 11,12, 13 ,14)
In the line №47 add code:
Code: Select all
case 11:
$orderingOutput = 'count ASC';
break;
case 12:
$orderingOutput = 'count DESC';
break;
case 13:
$orderingOutput = 'average ASC';
break;
case 14:
$orderingOutput = 'average DESC';
break;
In the line №426 add new options for (param name="category_ordering"):
Code: Select all
<option value="11">Count ASC</option>
<option value="12">Count DESC</option>
<option value="13">Average ASC</option>
<option value="14">Average DESC</option>
In the line №112 add new variable name "votes" and add check on rating ordering:
Code: Select all
$votes=' ORDER BY cc.';
switch ($categoryOrdering) {
case 'count ASC':
$votes=' ORDER BY r.';
break;
case 'count DESC':
$votes=' ORDER BY r.';
break;
case 'average ASC':
$votes=' ORDER BY r.';
break;
case 'average DESC':
$votes=' ORDER BY r.';
break;
default:
$votes=' ORDER BY cc.';
}
replace this code
Code: Select all
. ' ORDER BY cc.'.$categoryOrdering;
Code: Select all
.$votes.$categoryOrdering;
It is possible to do for images too.