Changeset 1047
- Timestamp:
- Feb 20, 2006, 5:39:37 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/category.php
r1036 r1047 78 78 } 79 79 80 if ( isset($page['cat'])80 if ( isset($page['cat_nb_images']) 81 81 and $page['cat_nb_images'] > $user['nb_image_page']) 82 82 { 83 83 // $nav_url is used to create the navigation bar 84 $nav_url = PHPWG_ROOT_PATH.'category.php?cat='.$page['cat']; 84 $nav_url = PHPWG_ROOT_PATH.'category.php?'; 85 if ( isset($page['cat']) ) 86 { 87 $nav_url .= 'cat='.$page['cat'].'&'; 88 } 85 89 86 90 switch ($page['cat']) … … 88 92 case 'search': 89 93 { 90 $nav_url.= ' &search='.$_GET['search'];94 $nav_url.= 'search='.$_GET['search'].'&'; 91 95 break; 92 96 } 93 97 case 'list': 94 98 { 95 $nav_url.= ' &list='.$_GET['list'];99 $nav_url.= 'list='.$_GET['list'].'&'; 96 100 break; 97 101 } 102 } 103 if ( isset($_GET['calendar']) ) 104 { 105 $nav_url.= 'calendar='.$_GET['calendar']; 106 } 107 else 108 { 109 $nav_url = preg_replace('/&$/', '', $nav_url); 98 110 } 99 111 … … 144 156 145 157 $icon_recent = get_icon(date('Y-m-d')); 158 159 $calendar_view_link = PHPWG_ROOT_PATH.'category.php' 160 .get_query_string_diff(array('start','calendar')); 161 if ( ! isset($_GET['calendar']) ) 162 { 163 $calendar_view_link .= (empty($_GET)? '?':'&' ) . 'calendar='; 164 } 146 165 147 166 $template->assign_vars( … … 181 200 'U_LOGOUT' => PHPWG_ROOT_PATH.'category.php?act=logout', 182 201 'U_ADMIN'=> PHPWG_ROOT_PATH.'admin.php', 183 'U_PROFILE'=> PHPWG_ROOT_PATH.'profile.php' 202 'U_PROFILE'=> PHPWG_ROOT_PATH.'profile.php', 203 'U_CALENDAR' => $calendar_view_link 184 204 ) 185 205 ); … … 353 373 354 374 //------------------------------------------------------ main part : thumbnails 355 include(PHPWG_ROOT_PATH.$page['thumbnails_include']); 375 if ( isset($page['thumbnails_include']) ) 376 { 377 include(PHPWG_ROOT_PATH.$page['thumbnails_include']); 378 } 356 379 //------------------------------------------------------- category informations 380 if ( $page['navigation_bar'] != '' 381 or ( isset( $page['comment'] ) and $page['comment'] != '' ) ) 382 { 383 $template->assign_block_vars('cat_infos',array()); 384 } 385 // navigation bar 386 if ( $page['navigation_bar'] != '' ) 387 { 388 $template->assign_block_vars( 389 'cat_infos.navigation', 390 array('NAV_BAR' => $page['navigation_bar']) 391 ); 392 } 357 393 if ( isset ( $page['cat'] ) ) 358 394 { … … 367 403 'upload', 368 404 array('U_UPLOAD'=> $url ) 369 );370 }371 372 if ( $page['navigation_bar'] != ''373 or ( isset( $page['comment'] ) and $page['comment'] != '' ) )374 {375 $template->assign_block_vars('cat_infos',array());376 }377 378 // navigation bar379 if ( $page['navigation_bar'] != '' )380 {381 $template->assign_block_vars(382 'cat_infos.navigation',383 array('NAV_BAR' => $page['navigation_bar'])384 405 ); 385 406 } -
trunk/include/category_default.inc.php
r1036 r1047 81 81 } 82 82 // url link on picture.php page 83 $url_link = PHPWG_ROOT_PATH.'picture.php?cat='.$page['cat']; 84 $url_link.= '&image_id='.$row['id']; 83 $url_link = PHPWG_ROOT_PATH.'picture.php?'; 84 if ( isset($page['cat']) ) 85 { 86 $url_link .= 'cat='.$page['cat'].'&'; 87 } 88 $url_link.= 'image_id='.$row['id']; 85 89 if ($page['cat'] == 'search') 86 90 { … … 90 94 { 91 95 $url_link.= '&list='.$_GET['list']; 96 } 97 if ( isset($_GET['calendar']) ) 98 { 99 $url_link.= '&calendar='.$_GET['calendar']; 92 100 } 93 101 -
trunk/include/section_init.inc.php
r1041 r1047 94 94 } 95 95 96 // $page['nb_image_page'] is the number of picture to display on this page 97 // By default, it is the same as the $user['nb_image_page'] 98 $page['nb_image_page'] = $user['nb_image_page']; 96 99 97 100 if (isset($page['cat'])) 98 101 { 99 // $page['nb_image_page'] is the number of picture to display on this page100 // By default, it is the same as the $user['nb_image_page']101 $page['nb_image_page'] = $user['nb_image_page'];102 103 102 if ($page['cat'] != 'most_visited' and $page['cat'] != 'best_rated') 104 103 { … … 398 397 $page['thumbnails_include'] = 'include/category_subcats.inc.php'; 399 398 } 399 400 if ( isset($_GET['calendar']) ) 401 { 402 include_once( PHPWG_ROOT_PATH.'include/functions_calendar.inc.php' ); 403 initialize_calendar(); 404 } 405 400 406 ?> -
trunk/template/yoga/category.tpl
r1031 r1047 131 131 </li> 132 132 <!-- END preferred_image_order --> 133 <a href="{U_CALENDAR}">Toggle calendar</a> 133 134 </ul> 134 135 … … 140 141 <div class="navigationBar">{calendar.YEARS_NAV_BAR}</div> 141 142 <div class="navigationBar">{calendar.MONTHS_NAV_BAR}</div> 143 <!-- END calendar --> 144 145 <!-- BEGIN calendar --> 146 <!-- BEGIN navbar --> 147 <div class="navigationBar">{calendar.navbar.BAR}</div> 148 <!-- END navbar --> 142 149 <!-- END calendar --> 143 150
Note: See TracChangeset
for help on using the changeset viewer.