diff options
Diffstat (limited to '')
-rw-r--r-- | category.php | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/category.php b/category.php index 4150a97c6..07d15a95c 100644 --- a/category.php +++ b/category.php @@ -300,7 +300,7 @@ $template->assign_block_vars( $template->assign_block_vars( 'special_cat', array( - 'URL' => PHPWG_ROOT_PATH.'category.php?cat=calendar', + 'URL' => PHPWG_ROOT_PATH.'category.php?calendar=m-c', 'TITLE' => $lang['calendar_hint'], 'NAME' => $lang['calendar'] )); @@ -400,6 +400,35 @@ if ( $page['navigation_bar'] != '' ) array('NAV_BAR' => $page['navigation_bar']) ); } + +if ($page['cat_nb_images']>0 and + ( !isset($page['cat']) + or ($page['cat'] != 'most_visited' and $page['cat'] != 'best_rated') ) + ) +{ + // image order + $template->assign_block_vars( 'preferred_image_order', array() ); + + $order_idx = isset($_COOKIE['pwg_image_order']) ? + $_COOKIE['pwg_image_order'] : 0; + + $orders = get_category_preferred_image_orders(); + for ( $i = 0; $i < count($orders); $i++) + { + if ($orders[$i][2]) + { + $url = PHPWG_ROOT_PATH.'category.php' + .get_query_string_diff(array('image_order')); + $url .= '&image_order='.$i; + $template->assign_block_vars( 'preferred_image_order.order', array( + 'DISPLAY' => $orders[$i][0], + 'URL' => $url, + 'SELECTED_OPTION' => ($order_idx==$i ? 'SELECTED' : '' ), + ) ); + } + } +} + if ( isset ( $page['cat'] ) ) { // upload a picture in the category @@ -422,31 +451,6 @@ if ( isset ( $page['cat'] ) ) array('COMMENTS' => $page['comment']) ); } - if ($page['cat_nb_images']>0 and - $page['cat'] != 'most_visited' and $page['cat'] != 'best_rated') - { - // image order - $template->assign_block_vars( 'preferred_image_order', array() ); - - $order_idx = isset($_COOKIE['pwg_image_order']) ? - $_COOKIE['pwg_image_order'] : 0; - - $orders = get_category_preferred_image_orders(); - for ( $i = 0; $i < count($orders); $i++) - { - if ($orders[$i][2]) - { - $url = PHPWG_ROOT_PATH.'category.php' - .get_query_string_diff(array('image_order')); - $url .= '&image_order='.$i; - $template->assign_block_vars( 'preferred_image_order.order', array( - 'DISPLAY' => $orders[$i][0], - 'URL' => $url, - 'SELECTED_OPTION' => ($order_idx==$i ? 'SELECTED' : '' ), - ) ); - } - } - } } //------------------------------------------------------------ log informations pwg_log( 'category', $page['title'] ); |