aboutsummaryrefslogtreecommitdiffstats
path: root/category.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-02-23 02:30:19 +0000
committerrvelices <rv-github@modusoptimus.com>2006-02-23 02:30:19 +0000
commit34538a62f4ac8bc6db41580058fdd040abaa3183 (patch)
treefdde1ecefd0ec41f20d3d5e2d1bcc87357d3e493 /category.php
parentfe8fbac3cf9af0464d2b0990c88631ff9fd803ac (diff)
new calendar completely integrated
git-svn-id: http://piwigo.org/svn/trunk@1051 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'category.php')
-rw-r--r--category.php56
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 .= '&amp;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 .= '&amp;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'] );