Changeset 2231
- Timestamp:
- Mar 1, 2008, 2:12:07 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/calendar_base.class.php
r2101 r2231 2 2 // +-----------------------------------------------------------------------+ 3 3 // | PhpWebGallery - a PHP based picture gallery | 4 // | Copyright (C) 2003-200 7PhpWebGallery Team - http://phpwebgallery.net |4 // | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net | 5 5 // +-----------------------------------------------------------------------+ 6 6 // | file : $Id$ … … 36 36 var $calendar_levels; 37 37 38 var $has_nav_bar;39 40 38 /** 41 39 * Initialize the calendar … … 54 52 } 55 53 $this->inner_sql = $inner_sql; 56 $this->has_nav_bar = false;57 54 } 58 55 … … 263 260 ); 264 261 265 $template->a ssign_block_vars(266 'c alendar.navbar',262 $template->append( 263 'chronology_navigation_bars', 267 264 array( 268 ' BAR' => $nav_bar,265 'CONTENT' => $nav_bar, 269 266 ) 270 267 ); 271 $this->has_nav_bar = true;272 268 } 273 269 … … 312 308 $current_rank = $upper_items_rank[$current]; 313 309 314 if (!$this->has_nav_bar and 315 ($current_rank>0 or $current_rank < count($upper_items)-1 ) ) 316 { 317 $template->assign_block_vars( 'calendar.navbar', array() ); 318 } 319 310 $tpl_var = array(); 311 320 312 if ( $current_rank>0 ) 321 313 { // has previous 322 314 $prev = $upper_items[$current_rank-1]; 323 315 $chronology_date = explode('-', $prev); 324 $template->assign_block_vars( 325 'calendar.navbar.prev', 316 $tpl_var['previous'] = 326 317 array( 327 318 'LABEL' => $this->get_date_nice_name($prev), … … 329 320 array('chronology_date'=>$chronology_date), array('start') 330 321 ) 331 )332 322 ); 333 323 } 324 334 325 if ( $current_rank < count($upper_items)-1 ) 335 326 { // has next 336 327 $next = $upper_items[$current_rank+1]; 337 328 $chronology_date = explode('-', $next); 338 $template->assign_block_vars( 339 'calendar.navbar.next', 329 $tpl_var['next'] = 340 330 array( 341 331 'LABEL' => $this->get_date_nice_name($next), … … 343 333 array('chronology_date'=>$chronology_date), array('start') 344 334 ) 345 )346 335 ); 336 } 337 338 if ( !empty($tpl_var) ) 339 { 340 $existing = & $template->get_template_vars('chronology_navigation_bars'); 341 if ( !empty($existing) ) 342 { 343 $existing[ sizeof($existing)-1 ] = 344 array_merge( $existing[ sizeof($existing)-1 ], $tpl_var); 345 } 346 else 347 { 348 $template->append( 'chronology_navigation_bars', $tpl_var ); 349 } 347 350 } 348 351 } -
trunk/include/calendar_monthly.class.php
r2101 r2231 72 72 if ($view_type==CAL_VIEW_CALENDAR) 73 73 { 74 global $template; 75 $tpl_var = array(); 74 76 if ( count($page['chronology_date'])==0 ) 75 77 {//case A: no year given - display all years+months 76 if ($this->build_global_calendar()) 78 if ($this->build_global_calendar($tpl_var)) 79 { 80 $template->assign('chronology_calendar', $tpl_var); 77 81 return true; 82 } 78 83 } 79 84 80 85 if ( count($page['chronology_date'])==1 ) 81 86 {//case B: year given - display all days in given year 82 if ($this->build_year_calendar()) 83 { 87 if ($this->build_year_calendar($tpl_var)) 88 { 89 $template->assign('chronology_calendar', $tpl_var); 84 90 $this->build_nav_bar(CYEAR); // years 85 91 return true; … … 89 95 if ( count($page['chronology_date'])==2 ) 90 96 {//case C: year+month given - display a nice month calendar 91 $this->build_month_calendar(); 92 //$this->build_nav_bar(CYEAR); // years 93 //$this->build_nav_bar(CMONTH); // month 97 if ( $this->build_month_calendar($tpl_var) ) 98 { 99 $template->assign('chronology_calendar', $tpl_var); 100 } 94 101 $this->build_next_prev(); 95 102 return true; … … 99 106 if ($view_type==CAL_VIEW_LIST or count($page['chronology_date'])==3) 100 107 { 101 $has_nav_bar = false;102 108 if ( count($page['chronology_date'])==0 ) 103 109 { … … 214 220 } 215 221 216 function build_global_calendar( )222 function build_global_calendar(&$tpl_var) 217 223 { 218 224 global $page; … … 247 253 } 248 254 249 global $lang , $template;255 global $lang; 250 256 foreach ( $items as $year=>$year_data) 251 257 { … … 253 259 $url = duplicate_index_url( array('chronology_date'=>$chronology_date) ); 254 260 255 $nav_bar = '<span class="calCalHead"><a href="'.$url.'">'.$year.'</a>'; 256 $nav_bar .= ' ('.$year_data['nb_images'].')'; 257 $nav_bar .= '</span><br>'; 258 259 $nav_bar .= $this->get_nav_bar_from_items( $chronology_date, 261 $nav_bar = $this->get_nav_bar_from_items( $chronology_date, 260 262 $year_data['children'], 'calCal', false, false, $lang['month'] ); 261 263 262 $template->assign_block_vars( 'calendar.calbar', 263 array( 'BAR' => $nav_bar) 264 ); 264 $tpl_var['calendar_bars'][] = 265 array( 266 'U_HEAD' => $url, 267 'NB_IMAGES' => $year_data['nb_images'], 268 'HEAD_LABEL' => $year, 269 'NAV_BAR' => $nav_bar, 270 ); 265 271 } 266 272 return true; 267 273 } 268 274 269 function build_year_calendar( )275 function build_year_calendar(&$tpl_var) 270 276 { 271 277 global $page; … … 297 303 return false; 298 304 } 299 global $lang , $template;305 global $lang; 300 306 foreach ( $items as $month=>$month_data) 301 307 { … … 303 309 $url = duplicate_index_url( array('chronology_date'=>$chronology_date) ); 304 310 305 $nav_bar = '<span class="calCalHead"><a href="'.$url.'">'; 306 $nav_bar .= $lang['month'][$month].'</a>'; 307 $nav_bar .= ' ('.$month_data['nb_images'].')'; 308 $nav_bar .= '</span><br>'; 309 310 $nav_bar .= $this->get_nav_bar_from_items( $chronology_date, 311 $nav_bar = $this->get_nav_bar_from_items( $chronology_date, 311 312 $month_data['children'], 'calCal', false ); 312 313 313 $template->assign_block_vars( 'calendar.calbar', 314 array( 'BAR' => $nav_bar) 315 ); 314 $tpl_var['calendar_bars'][] = 315 array( 316 'U_HEAD' => $url, 317 'NB_IMAGES' => $month_data['nb_images'], 318 'HEAD_LABEL' => $lang['month'][$month], 319 'NAV_BAR' => $nav_bar, 320 ); 316 321 } 317 322 return true; … … 319 324 } 320 325 321 function build_month_calendar( )326 function build_month_calendar(&$tpl_var) 322 327 { 323 328 global $page; … … 359 364 } 360 365 361 global $lang, $ template, $conf;366 global $lang, $conf; 362 367 363 368 if ( !empty($items) … … 390 395 $cell_height = $conf['calendar_month_cell_height']; 391 396 392 $template->set_filenames( 393 array( 394 'month_calendar'=>'month_calendar.tpl', 395 ) 396 ); 397 398 $template->assign_block_vars('calendar.thumbnails', 399 array( 400 'WIDTH'=>$cell_width, 401 'HEIGHT'=>$cell_height, 402 ) 403 ); 404 405 //fill the heading with day names 406 $template->assign_block_vars('calendar.thumbnails.head', array()); 407 foreach( $wday_labels as $d => $label) 408 { 409 $template->assign_block_vars('calendar.thumbnails.head.col', 410 array('LABEL'=>$label) 411 ); 412 } 413 414 $template->assign_block_vars('calendar.thumbnails.row', array()); 397 $tpl_weeks = array(); 398 $tpl_crt_week = array(); 415 399 416 400 //fill the empty days in the week before first day of this month 417 401 for ($i=0; $i<$first_day_dow; $i++) 418 402 { 419 $t emplate->assign_block_vars('calendar.thumbnails.row.col', array());420 $template->assign_block_vars('calendar.thumbnails.row.col.blank', array());421 } 403 $tpl_crt_week[] = array(); 404 } 405 422 406 for ( $day = 1; 423 407 $day <= $this->get_all_days_in_month( … … 429 413 if ($dow==0 and $day!=1) 430 414 { 431 $template->assign_block_vars('calendar.thumbnails.row', array()); 432 } 433 $template->assign_block_vars('calendar.thumbnails.row.col', array()); 415 $tpl_weeks[] = $tpl_crt_week; // add finished week to week list 416 $tpl_crt_week = array(); // start new week 417 } 418 434 419 if ( !isset($items[$day]) ) 435 { 436 $template->assign_block_vars('calendar.thumbnails.row.col.empty', 437 array('LABEL'=>$day)); 420 {// empty day 421 $tpl_crt_week[] = 422 array( 423 'DAY' => $day 424 ); 438 425 } 439 426 else 440 427 { 441 /* // first try to guess thumbnail size 442 if ( !empty($items[$day]['width']) ) 443 { 444 $tn_size = get_picture_size( 445 $items[$day]['width'], $items[$day]['height'], 446 $conf['tn_width'], $conf['tn_height'] ); 447 } 448 else*/ 449 {// item not an image (tn is either mime type or an image) 450 $thumb = get_thumbnail_path($items[$day]); 451 $tn_size = @getimagesize($thumb); 452 } 428 $thumb = get_thumbnail_path($items[$day]); 429 $tn_size = @getimagesize($thumb); 430 453 431 $tn_width = $tn_size[0]; 454 432 $tn_height = $tn_size[1]; … … 460 438 $ratio_h = $tn_height/$cell_height; 461 439 462 463 440 $pos_top=$pos_left=0; 464 $img_width=$img_height=''; 441 $css_style = ''; 442 465 443 if ( $ratio_w>1 and $ratio_h>1) 466 444 {// cell completely smaller than the thumbnail so we will let the browser … … 468 446 if ($ratio_w > $ratio_h ) 469 447 {// thumbnail ratio compared to cell -> wide format 470 $ img_height = 'height="'.$cell_height.'"';448 $css_style = 'height:'.$cell_height.'px;'; 471 449 $browser_img_width = $cell_height*$tn_width/$tn_height; 472 450 $pos_left = ($browser_img_width-$cell_width)/2; … … 474 452 else 475 453 { 476 $ img_width = 'width="'.$cell_width.'"';454 $css_style = 'width:'.$cell_width.'px;'; 477 455 $browser_img_height = $cell_width*$tn_height/$tn_width; 478 456 $pos_top = ($browser_img_height-$cell_height)/2; … … 485 463 } 486 464 487 $css_style = '';488 465 if ( round($pos_left)!=0) 489 466 { … … 506 483 $alt = $wday_labels[$dow] . ' ' . $day. 507 484 ' ('.sprintf("%d ".l10n('pictures'), $items[$day]['nb_images']).')'; 508 $template->assign_block_vars('calendar.thumbnails.row.col.full', 509 array( 510 'LABEL' => $day, 511 'IMAGE' => $items[$day]['tn_url'], 512 'U_IMG_LINK'=> $url, 513 'STYLE' => $css_style, 514 'IMG_WIDTH' => $img_width, 515 'IMG_HEIGHT'=> $img_height, 516 'IMAGE_ALT' => $alt, 517 ) 485 486 $tpl_crt_week[] = 487 array( 488 'DAY' => $day, 489 'IMAGE' => $items[$day]['tn_url'], 490 'U_IMG_LINK'=> $url, 491 'IMAGE_STYLE' => $css_style, 492 'IMAGE_ALT' => $alt, 518 493 ); 519 494 } … … 522 497 while ( $dow<6 ) 523 498 { 524 $template->assign_block_vars('calendar.thumbnails.row.col', array()); 525 $template->assign_block_vars('calendar.thumbnails.row.col.blank', array()); 499 $tpl_crt_week[] = array(); 526 500 $dow++; 527 501 } 528 $template->assign_var_from_handle('MONTH_CALENDAR', 'month_calendar'); 529 } 530 else 531 { 532 $template->assign_block_vars('thumbnails', array()); 533 $template->assign_block_vars('thumbnails.line', array()); 534 foreach ( $items as $day=>$data) 535 { 536 $url = duplicate_index_url( 537 array( 538 'chronology_date' => 539 array( 540 $page['chronology_date'][CYEAR], 541 $page['chronology_date'][CMONTH], 542 $day 543 ) 544 ) 545 ); 546 547 $thumbnail_title = $lang['day'][$data['dow']] . ' ' . $day; 548 $name = $thumbnail_title .' ('.$data['nb_images'].')'; 549 550 $template->assign_block_vars( 551 'thumbnails.line.thumbnail', 552 array( 553 'IMAGE'=>$data['tn_url'], 554 'IMAGE_ALT'=>$data['file'], 555 'IMAGE_TITLE'=>$thumbnail_title, 556 'U_IMG_LINK'=>$url 557 ) 502 $tpl_weeks[] = $tpl_crt_week; 503 504 $tpl_var['month_view'] = 505 array( 506 'CELL_WIDTH' => $cell_width, 507 'CELL_HEIGHT' => $cell_height, 508 'wday_labels' => $wday_labels, 509 'weeks' => $tpl_weeks, 558 510 ); 559 $template->assign_block_vars(560 'thumbnails.line.thumbnail.category_name',561 array(562 'NAME' => $name563 )564 );565 }566 511 } 567 512 -
trunk/include/category_cats.inc.php
r2201 r2231 3 3 // | PhpWebGallery - a PHP based picture gallery | 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 // | Copyright (C) 2003-200 7PhpWebGallery Team - http://phpwebgallery.net |5 // | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | file : $Id$ … … 234 234 $icon_ts = get_icon($category['max_date_last'], $category['is_child_date_last']); 235 235 236 $template->assign_block_vars( 237 'categories.category', 236 $tpl_var = 238 237 array( 239 'SRC' => $thumbnail_src_of[$category['representative_picture_id']], 238 'ID' => $category['id'], 239 'TN_SRC' => $thumbnail_src_of[$category['representative_picture_id']], 240 240 'ALT' => $category['name'], 241 'TITLE' => l10n('hint_category'),242 241 'ICON' => $icon_ts, 243 242 … … 261 260 'subcatify_category_description')), 262 261 'NAME' => $name, 263 ) 264 ); 262 ); 265 263 266 264 if ($conf['display_fromto']) … … 287 285 ); 288 286 } 289 290 $template->assign_block_vars( 291 'categories.category.dates', 292 array( 293 'INFO' => $info, 294 ) 295 ); 287 $tpl_var['INFO_DATES'] = $info; 296 288 } 297 289 } 298 } 290 }//fromto 291 292 $template->append( 'category_thumbnails', $tpl_var); 293 299 294 300 295 //plugins need to add/modify sth in this loop ? -
trunk/include/functions_calendar.inc.php
r1900 r2231 201 201 $must_show_list = false; 202 202 } 203 204 $page['comment'] = ''; 205 $template->assign('FILE_CHRONOLOGY_VIEW', 'month_calendar.tpl'); 203 206 204 207 foreach ($styles as $style => $style_data) … … 208 211 if ( $style_data['view_calendar'] or $view != CAL_VIEW_CALENDAR) 209 212 { 210 $selected = '';213 $selected = false; 211 214 212 215 if ($style!=$cal_style) … … 232 235 if ($style==$cal_style and $view==$page['chronology_view'] ) 233 236 { 234 $selected = 'SELECTED';237 $selected = true; 235 238 } 236 239 237 $template->a ssign_block_vars(238 'c alendar.views.view',240 $template->append( 241 'chronology_views', 239 242 array( 240 243 'VALUE' => $url, … … 252 255 .$fields[$page['chronology_field']]['label'].'</a>'; 253 256 $calendar_title.= $calendar->get_display_name(); 254 $template-> merge_block_vars('calendar',257 $template->assign('chronology', 255 258 array( 256 259 'TITLE' => $calendar_title -
trunk/include/menubar.inc.php
r2201 r2231 3 3 // | PhpWebGallery - a PHP based picture gallery | 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 // | Copyright (C) 2003-200 7PhpWebGallery Team - http://phpwebgallery.net |5 // | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | file : $Id$ … … 37 37 trigger_action('loc_begin_menubar'); 38 38 39 $template->assign _vars(39 $template->assign( 40 40 array( 41 41 'NB_PICTURE' => $user['nb_total_images'], 42 'USERNAME' => $user['username'],43 42 'MENU_CATEGORIES_CONTENT' => get_categories_menu(), 44 'F_IDENTIFY' => get_root_url().'identification.php',45 43 'U_CATEGORIES' => make_index_url(array('section' => 'categories')), 46 'U_REGISTER' => get_root_url().'register.php',47 44 'U_LOST_PASSWORD' => get_root_url().'password.php', 48 'U_LOGOUT' => get_root_url().'?act=logout',49 'U_ADMIN'=> get_root_url().'admin.php',50 'U_PROFILE'=> get_root_url().'profile.php',51 45 ) 52 46 ); … … 60 54 } 61 55 62 if 56 if 63 57 ( 64 58 (!isset($url_data['eval_visible'])) … … 67 61 ) 68 62 { 69 $template->assign_block_vars( 70 'links.link', 71 array( 63 $tpl_var = array( 72 64 'URL' => $url, 73 65 'LABEL' => $url_data['label'] 74 )75 66 ); 67 76 68 if (!isset($url_data['new_window']) or $url_data['new_window']) 77 69 { 78 $template->assign_block_vars( 79 'links.link.new_window', 70 $tpl_var['new_window'] = 80 71 array( 81 'name' => (isset($url_data['nw_name']) ? $url_data['nw_name'] : ''), 82 'features' => (isset($url_data['nw_features']) ? $url_data['nw_features'] : '') 83 ) 72 'NAME' => (isset($url_data['nw_name']) ? $url_data['nw_name'] : ''), 73 'FEATURES' => (isset($url_data['nw_features']) ? $url_data['nw_features'] : '') 84 74 ); 85 75 } 76 $template->append('links', $tpl_var); 86 77 } 87 78 } … … 92 83 if ($filter['enabled']) 93 84 { 94 $template->assign_block_vars( 95 'stop_filter', 96 array( 97 'URL' => add_url_params(make_index_url(array()), array('filter' => 'stop')) 98 ) 85 $template->assign( 86 'U_STOP_FILTER', 87 add_url_params(make_index_url(array()), array('filter' => 'stop')) 99 88 ); 100 89 } 101 90 else 102 91 { 103 $template->assign_block_vars( 104 'start_filter', 105 array( 106 'URL' => add_url_params(make_index_url(array()), array('filter' => 'start-recent-'.$user['recent_period'])) 107 ) 92 $template->assign( 93 'U_START_FILTER', 94 add_url_params(make_index_url(array()), array('filter' => 'start-recent-'.$user['recent_period'])) 108 95 ); 109 96 } … … 111 98 112 99 //------------------------------------------------------------------------ tags 113 if ('tags' == $page['section'])100 if ('tags' == @$page['section']) 114 101 { 115 102 // display tags associated to currently tagged items, less current tags … … 125 112 foreach ($tags as $tag) 126 113 { 127 $template->a ssign_block_vars(128 ' tags.tag',114 $template->append( 115 'related_tags', 129 116 array( 130 'U RL' => make_index_url(117 'U_TAG' => make_index_url( 131 118 array( 132 119 'tags' => array($tag) … … 136 123 'NAME' => $tag['name'], 137 124 138 'TITLE' => l10n('See pictures linked to this tag only'), 139 140 'CLASS' => 'tagLevel'.$tag['level'] 125 'CLASS' => 'tagLevel'.$tag['level'], 126 127 'add' => array( 128 129 'URL' => make_index_url( 130 array( 131 'tags' => array_merge( 132 $page['tags'], 133 array($tag) 134 ) 135 ) 136 ), 137 'COUNTER' => $tag['counter'], 138 ) 141 139 ) 142 140 ); 143 144 $template->assign_block_vars(145 'tags.tag.add',146 array(147 'URL' => make_index_url(148 array(149 'tags' => array_merge(150 $page['tags'],151 array($tag)152 )153 )154 ),155 'TITLE' => l10n_dec(156 '%d picture are also linked to current tags',157 '%d pictures are also linked to current tags',158 $tag['counter']),159 )160 );161 162 141 } 163 142 } … … 166 145 if ( !is_a_guest() ) 167 146 { 168 $template->assign_block_vars('username', array()); 169 170 $template->assign_block_vars( 171 'special_cat', 147 $template->append( 148 'special_categories', 172 149 array( 173 150 'URL' => make_index_url(array('section' => 'favorites')), … … 177 154 } 178 155 // most visited 179 $template->a ssign_block_vars(180 'special_cat ',156 $template->append( 157 'special_categories', 181 158 array( 182 159 'URL' => make_index_url(array('section' => 'most_visited')), … … 187 164 if ($conf['rate']) 188 165 { 189 $template->a ssign_block_vars(190 'special_cat ',166 $template->append( 167 'special_categories', 191 168 array( 192 169 'URL' => make_index_url(array('section' => 'best_rated')), … … 197 174 } 198 175 // random 199 $template->a ssign_block_vars(200 'special_cat ',176 $template->append( 177 'special_categories', 201 178 array( 202 179 'URL' => get_root_url().'random.php', … … 207 184 208 185 // recent pics 209 $template->a ssign_block_vars(210 'special_cat ',186 $template->append( 187 'special_categories', 211 188 array( 212 189 'URL' => make_index_url(array('section' => 'recent_pics')), … … 215 192 )); 216 193 // recent cats 217 $template->a ssign_block_vars(218 'special_cat ',194 $template->append( 195 'special_categories', 219 196 array( 220 197 'URL' => make_index_url(array('section' => 'recent_cats')), … … 224 201 225 202 // calendar 226 $template->a ssign_block_vars(227 'special_cat ',203 $template->append( 204 'special_categories', 228 205 array( 229 206 'URL' => … … 245 222 if (is_a_guest()) 246 223 { 247 $template->assign _block_vars('login', array());248 249 $template->assign_block_vars('quickconnect', array());250 if ($conf['authorize_remembering'])251 {252 $template->assign_block_vars('quickconnect.remember_me', array());253 } 224 $template->assign( 225 array( 226 'U_IDENTIFY' => get_root_url().'identification.php', 227 'AUTHORIZE_REMEMBERING' => $conf['authorize_remembering'] 228 ) 229 ); 230 254 231 if ($conf['allow_user_registration']) 255 232 { 256 $template->assign_block_vars('register', array()); 257 $template->assign_block_vars('quickconnect.register', array()); 233 $template->assign( 'U_REGISTER', get_root_url().'register.php'); 258 234 } 259 235 } 260 236 else 261 237 { 262 $template->assign _block_vars('hello', array());238 $template->assign('USERNAME', $user['username']); 263 239 264 240 if (is_autorize_status(ACCESS_CLASSIC)) 265 241 { 266 $template->assign _block_vars('profile', array());242 $template->assign('U_PROFILE', get_root_url().'profile.php'); 267 243 } 268 244 … … 271 247 if (!$conf['apache_authentication']) 272 248 { 273 $template->assign _block_vars('logout', array());249 $template->assign('U_LOGOUT', get_root_url().'?act=logout'); 274 250 } 275 251 276 252 if (is_admin()) 277 253 { 278 $template->assign _block_vars('admin', array());254 $template->assign('U_ADMIN', get_root_url().'admin.php'); 279 255 } 280 256 } 281 257 282 258 // tags link 283 $template->a ssign_block_vars(284 'summar y',259 $template->append( 260 'summaries', 285 261 array( 286 262 'TITLE' => l10n('See available tags'), … … 291 267 292 268 // search link 293 $template->a ssign_block_vars(294 'summar y',269 $template->append( 270 'summaries', 295 271 array( 296 272 'TITLE'=>l10n('hint_search'), … … 300 276 ) 301 277 ); 302 $template->assign_block_vars( 'summary.quick_search', array() );303 278 304 279 // comments link 305 $template->a ssign_block_vars(306 'summar y',280 $template->append( 281 'summaries', 307 282 array( 308 283 'TITLE'=>l10n('hint_comments'), … … 313 288 314 289 // about link 315 $template->a ssign_block_vars(316 'summar y',290 $template->append( 291 'summaries', 317 292 array( 318 293 'TITLE' => l10n('about_page_title'), … … 323 298 324 299 // notification 325 $template->a ssign_block_vars(326 'summar y',300 $template->append( 301 'summaries', 327 302 array( 328 303 'TITLE'=>l10n('RSS feed'), … … 336 311 { // upload a picture in the category 337 312 $url = get_root_url().'upload.php?cat='.$page['category']['id']; 338 $template->assign_block_vars( 339 'upload', 340 array( 341 'U_UPLOAD'=> $url 342 ) 343 ); 313 $template->assign('U_UPLOAD', $url); 344 314 } 345 315 -
trunk/include/page_tail.php
r2227 r2231 45 45 //------------------------------------------------------------- generation time 46 46 $debug_vars = array(); 47 48 if ($conf['show_queries']) 49 { 50 $debug_vars = array_merge($debug_vars, array('QUERIES_LIST' => $debug) ); 51 } 52 47 53 if ($conf['show_gt']) 48 54 { 49 $time = get_elapsed_time($t2, get_moment());50 51 55 if (!isset($page['count_queries'])) 52 56 { … … 54 58 $page['queries_time'] = 0; 55 59 } 60 $time = get_elapsed_time($t2, get_moment()); 56 61 57 62 $debug_vars = array_merge($debug_vars, … … 62 67 } 63 68 64 if ($conf['show_queries'])65 {66 $debug_vars = array_merge($debug_vars, array('QUERIES_LIST' => $debug) );67 }68 69 69 $template->assign('debug', $debug_vars ); 70 70 … … 73 73 // Generate the page 74 74 // 75 $template->pparse('tail'); 75 $template->parse('tail'); 76 $template->p(); 76 77 ?> -
trunk/include/smarty/libs/Smarty.class.php
r2216 r2231 1058 1058 // var non-existant, return valid reference 1059 1059 $_tmp = null; 1060 return $_tmp; 1060 return $_tmp; 1061 1061 } 1062 1062 } … … 1117 1117 { 1118 1118 static $_cache_info = array(); 1119 1119 1120 1120 $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting) 1121 1121 ? $this->error_reporting : error_reporting() & ~E_NOTICE); … … 1293 1293 if ($display) { 1294 1294 if (isset($_smarty_results)) { echo $_smarty_results; } 1295 } 1296 1297 if ($this->debugging) { 1298 // capture time for debugging info 1299 $_params = array(); 1300 require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); 1301 $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time); 1302 } 1303 1304 if ($display) { 1295 1305 if ($this->debugging) { 1296 1306 // capture time for debugging info 1297 1307 $_params = array(); 1298 require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');1299 $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time);1300 1308 require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php'); 1301 1309 echo smarty_core_display_debug_console($_params, $this); … … 1933 1941 return eval($code); 1934 1942 } 1935 1943 1936 1944 /** 1937 1945 * Extracts the filter name from the given callback 1938 * 1946 * 1939 1947 * @param callback $function 1940 1948 * @return string … … 1951 1959 } 1952 1960 } 1953 1961 1954 1962 /**#@-*/ 1955 1963 -
trunk/include/template.class.php
r2217 r2231 224 224 function parse($handle, $return=false) 225 225 { 226 return $this->_pparse_or_parse($handle, $return, false);227 }228 229 /**230 * Load the file for the handle, eventually compile the file and run the compiled231 * code. This will print out the results of executing the template.232 */233 function pparse($handle)234 {235 $this->_pparse_or_parse($handle, false, true);236 }237 238 239 /*private*/ function _pparse_or_parse($handle, $return, $immediate_display)240 {241 226 if ( !isset($this->files[$handle]) ) 242 227 { … … 254 239 if ($is_new) 255 240 { 256 $this->smarty->assign( 'pwg_root', get_root_url() ); //deprecated257 241 $this->smarty->assign( 'ROOT_URL', get_root_url() ); 258 if ($immediate_display) 259 $this->p(); 260 $v = $this->smarty->fetch($this->files[$handle], null, null, $immediate_display ? true : false); 261 if ($immediate_display) 262 return; 242 $v = $this->smarty->fetch($this->files[$handle], null, null, false); 263 243 } 264 244 else … … 267 247 $v = $this->_old->parse($handle, true); 268 248 } 269 if ($return==false) 270 { 271 $this->output .= $v; 272 } 273 return $v; 274 } 275 276 /** flushes current output */ 277 function p() 278 { 249 if ($return) 250 { 251 return $v; 252 } 253 $this->output .= $v; 254 } 255 256 /** 257 * Load the file for the handle, eventually compile the file and run the compiled 258 * code. This will print out the results of executing the template. 259 */ 260 function pparse($handle) 261 { 262 $this->parse($handle, false); 279 263 echo $this->output; 280 264 $this->output=''; 265 266 } 267 268 269 /** flushes the output */ 270 function p() 271 { 272 $start = get_moment(); 273 274 echo $this->output; 275 $this->output=''; 276 277 if ($this->smarty->debugging) 278 { 279 global $t2; 280 $this->smarty->assign( 281 array( 282 'AAAA_DEBUG_OUTPUT_TIME__' => get_elapsed_time($start, get_moment()), 283 'AAAA_DEBUG_TOTAL_TIME__' => get_elapsed_time($t2, get_moment()) 284 ) 285 ); 286 require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php'); 287 echo smarty_core_display_debug_console(null, $this->smarty); 288 } 281 289 } 282 290 … … 314 322 { 315 323 $this->smarty->append( $tpl_var, $value, $merge ); 324 } 325 326 /** see smarty get_template_vars http://www.smarty.net/manual/en/api.get_template_vars.php */ 327 function &get_template_vars($name=null) 328 { 329 return $this->smarty->get_template_vars( $name ); 316 330 } 317 331 -
trunk/index.php
r2218 r2231 104 104 $template_title.= ' ['.count($page['items']).']'; 105 105 } 106 $template->assign _var('TITLE', $template_title);106 $template->assign('TITLE', $template_title); 107 107 108 108 if (isset($page['flat']) or isset($page['chronology_field'])) 109 109 { 110 $template->assign_block_vars( 111 'mode_normal', 112 array( 113 'URL' => duplicate_index_url( array(), array('chronology_field', 'start', 'flat') ) 114 ) 110 $template->assign( 111 'U_MODE_NORMAL', 112 duplicate_index_url( array(), array('chronology_field', 'start', 'flat') ) 115 113 ); 116 114 } … … 118 116 if (!isset($page['flat']) and 'categories' == $page['section']) 119 117 { 120 $template->assign_block_vars( 121 'flat', 122 array( 123 'URL' => duplicate_index_url(array('flat' => ''), array('start', 'chronology_field')) 124 ) 118 $template->assign( 119 'U_MODE_FLAT', 120 duplicate_index_url(array('flat' => ''), array('start', 'chronology_field')) 125 121 ); 126 122 } … … 134 130 'chronology_view' => 'list', 135 131 ); 136 $template->assign_block_vars( 137 'mode_created', 138 array( 139 'URL' => duplicate_index_url( $chronology_params, array('start', 'flat') ) 140 ) 132 $template->assign( 133 'U_MODE_CREATED', 134 duplicate_index_url( $chronology_params, array('start', 'flat') ) 141 135 ); 142 136 143 137 $chronology_params['chronology_field'] = 'posted'; 144 $template->assign_block_vars( 145 'mode_posted', 146 array( 147 'URL' => duplicate_index_url( $chronology_params, array('start', 'flat') ) 148 ) 138 $template->assign( 139 'U_MODE_POSTED', 140 duplicate_index_url( $chronology_params, array('start', 'flat') ) 149 141 ); 150 142 } … … 163 155 array('chronology_date', 'start', 'flat') 164 156 ); 165 $template->assign _block_vars(166 'mode_'.$chronology_field,167 array('URL' => $url )157 $template->assign( 158 'U_MODE_'.strtoupper($chronology_field), 159 $url 168 160 ); 169 161 } … … 173 165 if ('search' == $page['section']) 174 166 { 175 $template->assign_block_vars( 176 'search_rules', 177 array( 178 'URL' => get_root_url().'search_rules.php?search_id='.$page['search'], 179 ) 167 $template->assign( 168 'U_SEARCH_RULES', 169 get_root_url().'search_rules.php?search_id='.$page['search'] 180 170 ); 181 171 } … … 183 173 if (isset($page['category']) and is_admin()) 184 174 { 185 $template->assign_block_vars( 186 'edit', 187 array( 188 'URL' => 189 get_root_url().'admin.php?page=cat_modify' 175 $template->assign( 176 'U_EDIT', 177 get_root_url().'admin.php?page=cat_modify' 190 178 .'&cat_id='.$page['category']['id'] 191 )192 179 ); 193 180 } … … 195 182 if (is_admin() and !empty($page['items'])) 196 183 { 197 $template->assign_block_vars( 198 'caddie', 199 array( 200 'URL' => 201 add_url_params(duplicate_index_url(), array('caddie'=>1) ) 202 ) 184 $template->assign( 185 'U_CADDIE', 186 add_url_params(duplicate_index_url(), array('caddie'=>1) ) 203 187 ); 204 188 } … … 207 191 !isset($page['chronology_field']) and isset($page['qsearch_details']) ) 208 192 { 209 $template->assign _var('QUERY_SEARCH',193 $template->assign('QUERY_SEARCH', 210 194 htmlspecialchars($page['qsearch_details']['q']) ); 211 195 … … 221 205 $hints[] = get_cat_display_name( array($cat) ); 222 206 } 223 $template->assign_block_vars( 'category_search_results', 224 array( 225 'CONTENT' => implode(' — ', $hints) 226 ) 227 ); 207 $template->assign( 'category_search_results', $hints); 228 208 } 229 209 … … 240 220 .'</a>'; 241 221 } 242 $template->assign_block_vars( 'tag_search_results', 243 array( 244 'CONTENT' => implode(' — ', $hints) 245 ) 246 ); 222 $template->assign( 'tag_search_results', $hints); 247 223 } 248 224 } … … 273 249 else 274 250 { 275 $template->assign_block_vars( 276 'slideshow', array('URL' => $page['cat_slideshow_url'])); 251 $template->assign('U_SLIDESHOW', $page['cat_slideshow_url']); 277 252 } 278 253 } 279 254 280 255 // navigation bar 281 if ($page['navigation_bar'] != '') 282 { 283 $template->assign_block_vars( 284 'cat_infos.navigation', 285 array( 286 'NAV_BAR' => $page['navigation_bar'], 287 ) 288 ); 289 } 256 $template->assign( 'NAV_BAR', $page['navigation_bar'] ); 290 257 291 258 if ( count($page['items']) > 0 … … 294 261 { 295 262 // image order 296 $template->assign_block_vars( 'preferred_image_order', array() );297 298 263 $order_idx = pwg_get_session_var( 'image_order', 0 ); 299 264 … … 303 268 if ($orders[$i][2]) 304 269 { 305 $template->a ssign_block_vars(306 ' preferred_image_order.order',270 $template->append( 271 'image_orders', 307 272 array( 308 273 'DISPLAY' => $orders[$i][0], 309 274 'URL' => add_url_params( duplicate_index_url(), array('image_order'=>$i) ), 310 'SELECTED _OPTION' => ($order_idx==$i ? 'SELECTED' : ''),275 'SELECTED' => ($order_idx==$i ? true:false), 311 276 ) 312 277 ); … … 318 283 if (isset($page['comment']) and $page['comment'] != '') 319 284 { 320 $template->assign_block_vars( 321 'cat_infos.comment', 322 array( 323 'COMMENTS' => $page['comment'] 324 ) 325 ); 285 $template->assign('CONTENT_DESCRIPTION', $page['comment'] ); 326 286 } 327 287 //------------------------------------------------------------ log informations … … 330 290 include(PHPWG_ROOT_PATH.'include/page_header.php'); 331 291 trigger_action('loc_end_index'); 332 $template->p arse('index');292 $template->pparse('index'); 333 293 include(PHPWG_ROOT_PATH.'include/page_tail.php'); 334 294 ?> -
trunk/template/yoga/index.tpl
r2222 r2231 1 <!-- DEV TAG: not smarty migrated --> 2 <!-- $Id$ --> 3 {MENUBAR} 1 {* $Id$ *} 2 {$MENUBAR} 4 3 <div id="content"> 5 4 <div class="titrePage"> 6 5 <ul class="categoryActions"> 7 6 <li> </li> 8 <!-- BEGIN preferred_image_order -->7 {if !empty($image_orders) } 9 8 <li> 10 { lang:Sort order}:9 {'Sort order'|@translate}: 11 10 <select onchange="document.location = this.options[this.selectedIndex].value;"> 12 <!-- BEGIN order -->13 <option value="{ preferred_image_order.order.URL}" {preferred_image_order.order.SELECTED_OPTION}>{preferred_image_order.order.DISPLAY}</option>14 <!-- END order -->11 {foreach from=$image_orders item=image_order } 12 <option value="{$image_order.URL}"{if $image_order.SELECTED} selected="selected"{/if}}>{$image_order.DISPLAY}</option> 13 {/foreach} 15 14 </select> 16 15 </li> 17 <!-- END preferred_image_order -->16 {/if} 18 17 19 <!-- BEGIN caddie -->20 <li><a href="{ caddie.URL}" title="{lang:add to caddie}"><img src="{pwg_root}{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a></li>21 <!-- END caddie -->18 {if isset($U_CADDIE) } 19 <li><a href="{$U_CADDIE}" title="{'add to caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"/></a></li> 20 {/if} 22 21 23 <!-- BEGIN edit -->24 <li><a href="{ edit.URL}" title="{lang:edit category informations}"><img src="{pwg_root}{themeconf:icon_dir}/category_edit.png" class="button" alt="{lang:edit}"/></a></li>25 <!-- END edit -->22 {if isset($U_EDIT) } 23 <li><a href="{$U_EDIT}" title="{'edit category informations'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"/></a></li> 24 {/if} 26 25 27 <!-- BEGIN search_rules -->28 <li><a href="{ search_rules.URL}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{lang:Search rules}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/search_rules.png" class="button" alt="(?)"></a></li>29 <!-- END search_rules -->26 {if isset($U_SEARCH_RULES) } 27 <li><a href="{$U_SEARCH_RULES}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{'Search rules'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/search_rules.png" class="button" alt="(?)"></a></li> 28 {/if} 30 29 31 <!-- BEGIN slideshow -->32 <li><a href="{ slideshow.URL}" title="{lang:slideshow}"><img src="{pwg_root}{themeconf:icon_dir}/slideshow.png" class="button" alt="{lang:slideshow}"/></a></li>33 <!-- END slideshow -->30 {if isset($U_SLIDESHOW) } 31 <li><a href="{$U_SLIDESHOW}" title="{'slideshow'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/slideshow.png" class="button" alt="{'slideshow'|@translate}"/></a></li> 32 {/if} 34 33 35 <!-- BEGIN mode_normal -->36 <li><a href="{ mode_normal.URL}" title="{lang:mode_normal_hint}"><img src="{pwg_root}{themeconf:icon_dir}/normal_mode.png" class="button" alt="{lang:mode_normal_hint}"></a></li>37 <!-- END mode_normal -->34 {if isset($U_MODE_FLAT) } 35 <li><a href="{$U_MODE_FLAT}" title="{'mode_flat_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/flat.png" class="button" alt="{'mode_flat_hint'|@translate}"></a></li> 36 {/if} 38 37 39 <!-- BEGIN flat -->40 <li><a href="{ flat.URL}" title="{lang:mode_flat_hint}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/flat.png" class="button" alt="{lang:mode_flat_hint}"></a></li>41 <!-- END flat -->38 {if isset($U_MODE_NORMAL) } 39 <li><a href="{$U_MODE_NORMAL}" title="{'mode_normal_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/normal_mode.png" class="button" alt="{'mode_normal_hint'|@translate}"></a></li> 40 {/if} 42 41 43 <!-- BEGIN mode_posted --> 44 <li><a href="{mode_posted.URL}" title="{lang:mode_posted_hint}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/calendar.png" class="button" alt="{lang:mode_posted_hint}"></a></li> 45 <!-- END mode_posted --> 46 <!-- BEGIN mode_created --> 47 <li><a href="{mode_created.URL}" title="{lang:mode_created_hint}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/calendar_created.png" class="button" alt="{lang:mode_created_hint}"></a></li> 48 <!-- END mode_created --> 49 {PLUGIN_INDEX_ACTIONS} 42 {if isset($U_MODE_POSTED) } 43 <li><a href="{$U_MODE_POSTED}" title="{'mode_posted_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar.png" class="button" alt="{'mode_posted_hint'|@translate}"></a></li> 44 {/if} 45 46 {if isset($U_MODE_CREATED) } 47 <li><a href="{$U_MODE_CREATED}" title="{'mode_created_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar_created.png" class="button" alt="{'mode_created_hint'|@translate}"></a></li> 48 {/if} 49 50 {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if} 50 51 </ul> 51 52 52 <h2>{ TITLE}</h2>53 <!-- BEGIN calendar --> 54 <!-- BEGIN views -->55 <div class="calendarViews">{ lang:calendar_view}:53 <h2>{$TITLE}</h2> 54 55 {if isset($chronology_views) } 56 <div class="calendarViews">{'calendar_view'|@translate}: 56 57 <select onchange="document.location = this.options[this.selectedIndex].value;"> 57 <!-- BEGIN view -->58 <option value="{ calendar.views.view.VALUE}" {calendar.views.view.SELECTED}>{calendar.views.view.CONTENT}</option>59 <!-- END view -->58 {foreach from=$chronology_views item=view} 59 <option value="{$view.VALUE}"{if $view.SELECTED} selected="selected"{/if}}>{$view.CONTENT}</option> 60 {/foreach} 60 61 </select> 61 62 </div> 62 <!-- END views --> 63 <!-- END calendar --> 63 {/if} 64 64 65 <!-- BEGIN calendar -->66 <h2>{ calendar.TITLE}</h2>67 <!-- END calendar -->65 {if isset($chronology.TITLE) } 66 <h2>{$chronology.TITLE}</h2> 67 {/if} 68 68 69 69 </div> <!-- titrePage --> 70 70 71 { PLUGIN_INDEX_CONTENT_BEGIN}71 {if !empty($PLUGIN_INDEX_CONTENT_END)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if} 72 72 73 <!-- BEGIN category_search_results --> 74 <div style="font-size:16px;text-align:left;margin:10px">{lang:Category results for} <strong>{QUERY_SEARCH}</strong> : <em><strong>{category_search_results.CONTENT}</strong></em></div> 75 <!-- END category_search_results --> 76 <!-- BEGIN tag_search_results --> 77 <div style="font-size:16px;text-align:left;margin:10px">{lang:Tag results for} <strong>{QUERY_SEARCH}</strong> : <em><strong>{tag_search_results.CONTENT}</strong></em></div> 78 <!-- END tag_search_results --> 73 {if !empty($category_search_results) } 74 <div style="font-size:16px;text-align:left;margin:10px">{'Category results for'|@translate} <strong>{$QUERY_SEARCH}</strong> : 75 <em><strong> 76 {foreach from=$category_search_results item=res name=res_loop} 77 {if !$smarty.foreach.res_loop.first} — {/if} 78 {$res} 79 {/foreach} 80 </strong></em> 81 </div> 82 {/if} 83 84 {if !empty($tag_search_results) } 85 <div style="font-size:16px;text-align:left;margin:10px">{'Tag results for'|@translate} <strong>{$QUERY_SEARCH}</strong> : 86 <em><strong> 87 {foreach from=$tag_search_results item=res name=res_loop} 88 {if !$smarty.foreach.res_loop.first} — {/if} 89 {$res} 90 {/foreach} 91 </strong></em> 92 </div> 93 {/if} 94 95 {if isset($FILE_CHRONOLOGY_VIEW) } 96 {include file=$FILE_CHRONOLOGY_VIEW} 97 {/if} 98 99 {if !empty($CATEGORIES) }{$CATEGORIES}{/if} 100 {if !empty($THUMBNAILS) }{$THUMBNAILS}{/if} 79 101 80 102 81 <!-- BEGIN calendar --> 82 <!-- BEGIN navbar --> 83 <div class="calendarBar"> 84 <!-- BEGIN prev --> 85 <div style="float:left">« <a href="{calendar.navbar.prev.URL}">{calendar.navbar.prev.LABEL}</a></div> 86 <!-- END prev --> 87 <!-- BEGIN next --> 88 <div style="float:right"><a href="{calendar.navbar.next.URL}">{calendar.navbar.next.LABEL}</a> »</div> 89 <!-- END next --> 90 {calendar.navbar.BAR} 103 {if !empty($NAV_BAR) } 104 <div class="navigationBar"> 105 {$NAV_BAR} 91 106 </div> 92 <!-- END navbar --> 107 {/if} 93 108 94 <!-- BEGIN calbar --> 95 <div class="calendarCalBar">{calendar.calbar.BAR}</div> 96 <!-- END calbar --> 97 <!-- END calendar --> 98 99 {MONTH_CALENDAR} 100 {CATEGORIES} 101 {THUMBNAILS} 102 103 <!-- BEGIN cat_infos --> 104 <!-- BEGIN navigation --> 105 <div class="navigationBar"> 106 {cat_infos.navigation.NAV_BAR} 109 {if !empty($CONTENT_DESCRIPTION) } 110 <div class="additional_info"> 111 {$CONTENT_DESCRIPTION} 107 112 </div> 108 <!-- END navigation --> 109 <!-- BEGIN comment --> 110 <div class="additional_info">{cat_infos.comment.COMMENTS}</div> 111 <!-- END comment --> 112 <!-- END cat_infos --> 113 {/if} 113 114 114 115 115 { PLUGIN_INDEX_CONTENT_END}116 {if !empty($PLUGIN_INDEX_CONTENT_END) }{$PLUGIN_INDEX_CONTENT_END}{/if} 116 117 </div> <!-- content --> -
trunk/template/yoga/mainpage_categories.tpl
r2222 r2231 1 <!-- DEV TAG: not smarty migrated --> 2 <!-- BEGIN categories --> 3 <!-- $Id$ --> 1 {* $Id$ *} 2 4 3 <ul class="thumbnailCategories"> 5 <!-- BEGIN category -->4 {foreach from=$category_thumbnails item=cat} 6 5 <li> 7 6 <div class="thumbnailCategory"> 8 7 <div class="illustration"> 9 <a href="{ categories.category.URL}">10 <img src="{ categories.category.SRC}" alt="{categories.category.ALT}" title="{categories.category.TITLE}">8 <a href="{$cat.URL}"> 9 <img src="{$cat.TN_SRC}" alt="{$cat.ALT}" title="{'hint_category'|@translate}"> 11 10 </a> 12 11 </div> 13 12 <div class="description"> 14 13 <h3> 15 <a href="{ categories.category.URL}">{categories.category.NAME}</a>16 { categories.category.ICON}14 <a href="{$cat.URL}">{$cat.NAME}</a> 15 {$cat.ICON} 17 16 </h3> 18 <!-- BEGIN dates -->19 <p>{ categories.category.dates.INFO}</p>20 <!-- END dates -->21 <p>{ categories.category.CAPTION_NB_IMAGES} </p>22 <p>{ categories.category.DESCRIPTION} </p>17 {if isset($cat.INFO_DATES) } 18 <p>{$cat.INFO_DATES}</p> 19 {/if} 20 <p>{$cat.CAPTION_NB_IMAGES}</p> 21 <p>{$cat.DESCRIPTION}</p> 23 22 </div> 24 23 </div> 25 24 </li> 26 <!-- END category -->25 {/foreach} 27 26 </ul> 28 <!-- END categories --> 27 -
trunk/template/yoga/menubar.tpl
r2222 r2231 1 <!-- DEV TAG: not smarty migrated --> 2 <!-- $Id$ --> 1 {* $Id$ *} 2 3 3 <div id="menubar"> 4 <!-- BEGIN links --> 4 {if not empty($links)} 5 5 <dl id="mbLinks"> 6 <dt>{lang:Links}</dt> 7 <dd> 8 <ul> 9 <!-- BEGIN link --> 10 <li> 11 <a href="{links.link.URL}" 12 <!-- BEGIN new_window --> 13 onclick="window.open(this.href, 14 '{links.link.new_window.name}', 15 '{links.link.new_window.features}' 16 ); return false;" 17 <!-- END new_window --> 18 >{links.link.LABEL} 19 </a> 20 </li> 21 <!-- END link --> 22 </ul> 6 <dt>{'Links'|@translate}</dt> 7 <dd> 8 <ul> 9 {foreach from=$links item=link} 10 <li> 11 <a href="{$link.URL}" 12 {if isset($link.new_window) }onclick="window.open(this.href, '{$link.new_window.NAME|@escape:'javascript'}','{$link.new_window.FEATURES|@escape:'javascript'}'); return false;"{/if} 13 > 14 {$link.LABEL} 15 </a> 16 </li> 17 {/foreach}{*links*} 18 </ul> 19 </dd> 20 </dl> 21 {/if}{*links*} 22 23 {if isset($U_START_FILTER)} 24 <a href="{$U_START_FILTER}" title="{'start_filter_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_filter.png" class="button" alt="{'start_filter_hint'|@translate}"></a> 25 {/if} 26 {if isset($U_STOP_FILTER)} 27 <a href="{$U_STOP_FILTER}" title="{'stop_filter_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_filter.png" class="button" alt="{'stop_filter_hint'|@translate}"></a> 28 {/if} 29 30 <dl id="mbCategories"> 31 <dt><a href="{$U_CATEGORIES}">{'Categories'|@translate}</a></dt> 32 <dd> 33 {$MENU_CATEGORIES_CONTENT} 34 {if isset($U_UPLOAD)} 35 <ul><li> 36 <a href="{$U_UPLOAD}">{'upload_picture'|@translate}</a> 37 </li></ul> 38 {/if} 39 <p class="totalImages">{$NB_PICTURE} {'total'|@translate}</p> 23 40 </dd> 24 41 </dl> 25 <!-- END links -->26 <!-- BEGIN start_filter -->27 <a href="{start_filter.URL}" title="{lang:start_filter_hint}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/start_filter.png" class="button" alt="{lang:start_filter_hint}"></a>28 <!-- END start_filter -->29 <!-- BEGIN stop_filter -->30 <a href="{stop_filter.URL}" title="{lang:stop_filter_hint}"><img src="{pwg_root}{themeconf:icon_dir}/stop_filter.png" class="button" alt="{lang:stop_filter_hint}"></a>31 <!-- END stop_filter -->32 <dl id="mbCategories">33 <dt><a href="{U_CATEGORIES}">{lang:Categories}</a></dt>34 <dd>35 {MENU_CATEGORIES_CONTENT}36 <!-- BEGIN upload -->37 <ul><li>38 <a href="{upload.U_UPLOAD}">{lang:upload_picture}</a>39 </li></ul>40 <!-- END upload -->41 <p class="totalImages">{NB_PICTURE} {lang:total}</p>42 </dd>43 42 43 44 {if not empty($related_tags)} 45 <dl id="mbTags"> 46 <dt>{'Related tags'|@translate}</dt> 47 <dd> 48 <ul id="menuTagCloud"> 49 {foreach from=$related_tags item=tag} 50 <li> 51 {if !empty($tag.add) } 52 <a href="{$tag.add.URL}" 53 title="{$pwg->l10n_dec('%d picture are also linked to current tags', '%d pictures are also linked to current tags', $tag.add.COUNTER)}" 54 rel="nofollow"> 55 <img src="{$ROOT_URL}{$themeconf.icon_dir}/add_tag.png" alt="+" /> 56 </a> 57 {/if} 58 <a href="{$tag.U_TAG}" class="{$tag.CLASS}" title="{'See pictures linked to this tag only'|@translate}">{$tag.NAME}</a> 59 </li> 60 {/foreach} 61 </ul> 62 </dd> 63 </dl> 64 {/if} 65 66 67 <dl id="mbSpecial"> 68 <dt>{'special_categories'|@translate}</dt> 69 <dd> 70 <ul> 71 {foreach from=$special_categories item=cat} 72 <li><a href="{$cat.URL}" title="{$cat.TITLE}" {if isset($cat.REL)}{$cat.REL}{/if}>{$cat.NAME}</a></li> 73 {/foreach} 74 </ul> 75 </dd> 44 76 </dl> 45 77 46 <!-- BEGIN tags --> 47 <dl id="mbTags"> 48 <dt>{lang:Related tags}</dt> 49 <dd> 50 <ul id="menuTagCloud"> 51 <!-- BEGIN tag --> 52 <li> 53 <!-- BEGIN add --> 54 <a href="{tags.tag.add.URL}" title="{tags.tag.add.TITLE}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/add_tag.png" alt="+"></a> 55 <!-- END add --> 56 <a href="{tags.tag.URL}" class="{tags.tag.CLASS}" title="{tags.tag.TITLE}">{tags.tag.NAME}</a> 57 </li> 58 <!-- END tag --> 59 </ul> 60 </dd> 78 79 <dl id="mbMenu"> 80 <dt>{'title_menu'|@translate}</dt> 81 <dd> 82 <form action="{$ROOT_URL}qsearch.php" method="get" id="quicksearch"> 83 <p> 84 <input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" /> 85 </p> 86 </form> 87 <script type="text/javascript">var qsearch_prompt="{'qsearch'|@translate|@escape:'javascript'}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script> 88 89 <ul> 90 {foreach from=$summaries item=sum} 91 <li><a href="{$sum.U_SUMMARY}" title="{$sum.TITLE}" {if isset($sum.REL)}{$sum.REL}{/if}>{$sum.NAME}</a></li> 92 {/foreach} 93 </ul> 94 </dd> 61 95 </dl> 62 <!-- END tags -->63 96 64 <dl id="mbSpecial">65 <dt>{lang:special_categories}</dt>66 <dd>67 <ul>68 <!-- BEGIN special_cat -->69 <li><a href="{special_cat.URL}" title="{special_cat.TITLE}" {special_cat.REL}>{special_cat.NAME}</a></li>70 <!-- END special_cat -->71 </ul>72 </dd>73 </dl>74 <dl id="mbMenu">75 <dt>{lang:title_menu}</dt>76 <dd>77 <!-- BEGIN summary -->78 <!-- BEGIN quick_search -->79 <form action="{pwg_root}qsearch.php" method="get" id="quicksearch">80 <p>81 <input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" />82 </p>83 </form>84 <script type="text/javascript">var qsearch_prompt="{lang:qsearch}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>85 <!-- END quick_search -->86 <!-- END summary -->87 <ul>88 <!-- BEGIN summary -->89 <li><a href="{summary.U_SUMMARY}" title="{summary.TITLE}" {summary.REL}>{summary.NAME}</a></li>90 <!-- END summary -->91 97 92 </ul>93 </dd>94 </dl>95 98 <dl id="mbIdentification"> 96 <dt>{lang:identification}</dt> 97 <dd> 98 <!-- BEGIN hello --> 99 <p>{lang:hello} {USERNAME} !</p> 100 <!-- END hello --> 101 <ul> 102 <!-- BEGIN register --> 103 <li><a href="{U_REGISTER}" title="{lang:Create a new account}" rel="nofollow">{lang:Register}</a></li> 104 <!-- END register --> 105 <!-- BEGIN login --> 106 <li><a href="{F_IDENTIFY}" rel="nofollow">{lang:Connection}</a></li> 107 <!-- END login --> 108 <!-- BEGIN logout --> 109 <li><a href="{U_LOGOUT}">{lang:logout}</a></li> 110 <!-- END logout --> 111 <!-- BEGIN profile --> 112 <li><a href="{U_PROFILE}" title="{lang:hint_customize}">{lang:customize}</a></li> 113 <!-- END profile --> 114 <!-- BEGIN admin --> 115 <li><a href="{U_ADMIN}" title="{lang:hint_admin}">{lang:admin}</a></li> 116 <!-- END admin --> 117 </ul> 118 <!-- BEGIN quickconnect --> 119 <form method="post" action="{F_IDENTIFY}" class="filter" id="quickconnect"> 120 <fieldset> 121 <legend>{lang:Quick connect}</legend> 99 <dt>{'identification'|@translate}</dt> 100 <dd> 101 {if isset($USERNAME)} 102 <p>{'hello'|@translate} {$USERNAME} !</p> 103 {/if} 104 105 <ul> 106 {if isset($U_REGISTER)} 107 <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow">{'Register'|@translate}</a></li> 108 {/if} 122 109 123 <label> 124 {lang:Username} 125 <input type="text" name="username" size="15" value=""> 126 </label> 110 {if isset($U_IDENTIFY)} 111 <li><a href="{$U_IDENTIFY}" rel="nofollow">{'Connection'|@translate}</a></li> 112 {/if} 127 113 128 <label> 129 {lang:Password} 130 <input type="password" name="password" size="15"> 131 </label> 114 {if isset($U_LOGOUT)} 115 <li><a href="{$U_LOGOUT}">{'logout'|@translate}</a></li> 116 {/if} 132 117 133 <!-- BEGIN remember_me --> 134 <label> 135 {lang:remember_me} 136 <input type="checkbox" name="remember_me" value="1"> 137 </label> 138 <!-- END remember_me --> 118 {if isset($U_PROFILE)} 119 <li><a href="{$U_PROFILE}" title="{'hint_customize'|@translate}">{'customize'|@translate}</a></li> 120 {/if} 139 121 140 <p> 141 <input class="submit" type="submit" name="login" value="{lang:submit}">142 </p> 143 <ul class="actions">144 <li><a href="{U_LOST_PASSWORD}" title="{lang:Forgot your password?}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/lost_password.png" class="button" alt="{lang:Forgot your password?}"></a></li> 145 <!-- BEGIN register --> 146 <li><a href="{U_REGISTER}" title="{lang:Create a new account}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/register.png" class="button" alt="{lang:register}"/></a></li>147 <!-- END register -->148 </ul>122 {if isset($U_ADMIN)} 123 <li><a href="{$U_ADMIN}" title="{'hint_admin'|@translate}">{'admin'|@translate}</a></li> 124 {/if} 125 </ul> 126 127 {if isset($U_IDENTIFY)} 128 <form method="post" action="{$U_IDENTIFY}" class="filter" id="quickconnect"> 129 <fieldset> 130 <legend>{'Quick connect'|@translate}</legend> 149 131 150 </fieldset> 151 </form> 152 <!-- END quickconnect --> 132 <label> 133 {'Username'|@translate} 134 <input type="text" name="username" size="15" value=""> 135 </label> 136 137 <label> 138 {'Password'|@translate} 139 <input type="password" name="password" size="15"> 140 </label> 141 142 {if $AUTHORIZE_REMEMBERING} 143 <label> 144 {'remember_me'|@translate} 145 <input type="checkbox" name="remember_me" value="1"> 146 </label> 147 {/if} 148 <p> 149 <input class="submit" type="submit" name="login" value="{'submit'|@translate}"> 150 </p> 151 152 <ul class="actions"> 153 <li><a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}"></a></li> 154 {if isset($U_REGISTER)} 155 <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'register'|@translate}"/></a></li> 156 {/if} 157 </ul> 158 159 </fieldset> 160 </form> 161 {/if} 153 162 154 163 </dd> -
trunk/template/yoga/month_calendar.tpl
r2222 r2231 1 <!-- DEV TAG: not smarty migrated --> 2 <!-- BEGIN calendar --> 3 <!-- $Id$ --> 4 <!-- BEGIN thumbnails --> 1 {* $Id$ *} 2 3 {if !empty($chronology_navigation_bars) } 4 {foreach from=$chronology_navigation_bars item=bar} 5 <div class="calendarBar"> 6 {if isset($bar.previous)} 7 <div style="float:left">« <a href="{$bar.previous.URL}">{$bar.previous.LABEL}</a></div> 8 {/if} 9 {if isset($bar.next)} 10 <div style="float:right"><a href="{$bar.next.URL}">{$bar.next.LABEL}</a> »</div> 11 {/if} 12 {if isset($bar.CONTENT)} 13 {$bar.CONTENT} 14 {else} 15 16 {/if} 17 </div> 18 {/foreach} 19 {/if} 20 21 {if !empty($chronology_calendar.calendar_bars) } 22 {foreach from=$chronology_calendar.calendar_bars item=bar} 23 <div class="calendarCalBar"> 24 <span class="calCalHead"><a href="{$bar.U_HEAD}">{$bar.HEAD_LABEL}</a> ({$bar.NB_IMAGES})</span><br/> 25 {$bar.NAV_BAR} 26 </div> 27 {/foreach} 28 {/if} 29 30 {if isset($chronology_calendar.month_view) } 5 31 <table class="calMonth"> 6 <!-- BEGIN head --> 7 <thead><tr> 8 <!-- BEGIN col --> 9 <td class="calDayHead">{calendar.thumbnails.head.col.LABEL}</td> 10 <!-- END col --> 11 </tr></thead> 12 <!-- END head --> 13 <!-- BEGIN row --> 32 <thead> 14 33 <tr> 15 <!-- BEGIN col --> 16 <!-- BEGIN blank --> 17 <td class="calDayCellBlank" style="width:{calendar.thumbnails.WIDTH}px;height:{calendar.thumbnails.HEIGHT}px;"> 18 <!-- END blank --> 19 <!-- BEGIN empty --> 20 <td class="calDayCellEmpty" style="width:{calendar.thumbnails.WIDTH}px;height:{calendar.thumbnails.HEIGHT}px;">{calendar.thumbnails.row.col.empty.LABEL} 21 <!-- END empty --> 22 <!-- BEGIN full --> 23 <td class="calDayCellFull"><div class="calBackDate">{calendar.thumbnails.row.col.full.LABEL}</div><div class="calForeDate">{calendar.thumbnails.row.col.full.LABEL}</div> 24 <div class="calImg" style="width:{calendar.thumbnails.WIDTH}px;height:{calendar.thumbnails.HEIGHT}px;"><a href="{calendar.thumbnails.row.col.full.U_IMG_LINK}"> 25 <img style="{calendar.thumbnails.row.col.full.STYLE}" {calendar.thumbnails.row.col.full.IMG_WIDTH} {calendar.thumbnails.row.col.full.IMG_HEIGHT} 26 src="{calendar.thumbnails.row.col.full.IMAGE}" alt="{calendar.thumbnails.row.col.full.IMAGE_ALT}" 27 title="{calendar.thumbnails.row.col.full.IMAGE_ALT}"> 28 </a></div> 29 <!-- END full --> 30 </td> 31 <!-- END col --> 34 {foreach from=$chronology_calendar.month_view.wday_labels item=wday} 35 <td class="calDayHead">{$wday}</td> 36 {/foreach} 32 37 </tr> 33 <!-- END row --> 38 </thead> 39 40 {foreach from=$chronology_calendar.month_view.weeks item=week} 41 <tr> 42 {foreach from=$week item=day} 43 {if !empty($day)} 44 {if isset($day.IMAGE)} 45 <td class="calDayCellFull"> 46 <div class="calBackDate">{$day.DAY}</div><div class="calForeDate">{$day.DAY}</div> 47 <div class="calImg" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;"> 48 <a href="{$day.U_IMG_LINK}"> 49 <img style="{$day.IMAGE_STYLE}" src="{$day.IMAGE}" alt="{$day.IMAGE_ALT}" title="{$day.IMAGE_ALT}" /> 50 </a> 51 </div> 52 {else} 53 <td class="calDayCellEmpty" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;">{$day.DAY} 54 {/if} 55 {else} 56 <td class="calDayCellBlank" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;"> 57 {/if} 58 </td> 59 {/foreach} {*day in week*} 60 </tr> 61 {/foreach} {*week in month*} 34 62 </table> 35 <!-- END thumbnails --> 36 <!-- END calendar --> 63 {/if} 64
Note: See TracChangeset
for help on using the changeset viewer.