From d39db9aaaf43eaedd634a7a5b7d06bcb69d41152 Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 11 Sep 2008 21:40:00 +0000 Subject: feature 169 added: ability to manually sort images inside a category. A dedicated screen let the administrator sort the images (pur HTML, no JavaScript yet). The "rank" sort order is available only for a category without flat mode. New database column image_category.rank. git-svn-id: http://piwigo.org/svn/trunk@2517 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_category.inc.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/functions_category.inc.php') diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 0bca0897a..92e9cf229 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -257,15 +257,21 @@ SELECT galleries_url // returns an array of image orders available for users/visitors function get_category_preferred_image_orders() { - global $conf; + global $conf, $page; + return array( array(l10n('default_sort'), '', true), array(l10n('Average rate'), 'average_rate DESC', $conf['rate']), array(l10n('most_visited_cat'), 'hit DESC', true), array(l10n('Creation date'), 'date_creation DESC', true), array(l10n('Post date'), 'date_available DESC', true), - array(l10n('File name'), 'file ASC', true) - ); + array(l10n('File name'), 'file ASC', true), + array( + l10n('Rank'), + 'rank ASC', + ('categories' == $page['section'] and !isset($page['flat'])) + ) + ); } function display_select_categories($categories, -- cgit v1.2.3