- Timestamp:
- Feb 7, 2007, 10:23:33 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/picture.php
r1730 r1787 44 44 if (!in_array($page['image_id'], $page['items'])) 45 45 { 46 page_not_found('The requested image does not belong to this image set', 47 duplicate_index_url() ); 46 page_not_found( 47 'The requested image does not belong to this image set', 48 duplicate_index_url() 49 ); 48 50 } 49 51 50 52 // add default event handler for rendering element content 51 add_event_handler('render_element_content', 'default_picture_content', 52 EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 53 add_event_handler( 54 'render_element_content', 55 'default_picture_content', 56 EVENT_HANDLER_PRIORITY_NEUTRAL, 57 2 58 ); 53 59 trigger_action('loc_begin_picture'); 54 60 … … 64 70 return $content; 65 71 } 72 66 73 global $user; 67 $my_template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], 68 $user['theme'] ); 69 $my_template->set_filenames( array('default_content'=>'picture_content.tpl') ); 74 75 $my_template = new Template( 76 PHPWG_ROOT_PATH.'template/'.$user['template'], 77 $user['theme'] 78 ); 79 $my_template->set_filenames( 80 array('default_content'=>'picture_content.tpl') 81 ); 70 82 71 83 if (isset($element_info['high_url'])) … … 89 101 return $my_template->parse( 'default_content', true); 90 102 } 91 92 93 103 94 104 // +-----------------------------------------------------------------------+ … … 212 222 { 213 223 include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php'); 214 rate_picture($page['image_id'], 215 isset($_POST['rate']) ? $_POST['rate'] : $_GET['rate'] ); 224 rate_picture( 225 $page['image_id'], 226 isset($_POST['rate']) ? $_POST['rate'] : $_GET['rate'] 227 ); 216 228 redirect($url_self); 217 229 } … … 396 408 if (!empty($picture['current']['width'])) 397 409 { 398 list($picture['current']['scaled_width'],$picture['current']['scaled_height']) = 399 get_picture_size( 410 list( 411 $picture['current']['scaled_width'], 412 $picture['current']['scaled_height'] 413 ) = get_picture_size( 400 414 $picture['current']['width'], 401 415 $picture['current']['height'], … … 420 434 if ( isset( $_GET['slideshow'] ) and isset($page['next_item']) ) 421 435 { 422 // $redirect_msg, $refresh, $url_link and $title are required for creating an automated423 // refresh page in header.tpl436 // $redirect_msg, $refresh, $url_link and $title are required for creating 437 // an automated refresh page in header.tpl 424 438 $refresh= $_GET['slideshow']; 425 439 $url_link = add_url_params( … … 437 451 438 452 // do we have a plugin that can show metadata for something else than images? 439 $metadata_showable = trigger_event('get_element_metadata_available', 440 ( 441 ($conf['show_exif'] or $conf['show_iptc']) 442 and isset($picture['current']['image_path']) 453 $metadata_showable = trigger_event( 454 'get_element_metadata_available', 455 ( 456 ($conf['show_exif'] or $conf['show_iptc']) 457 and isset($picture['current']['image_path']) 443 458 ), 444 $picture['current']['path'] ); 459 $picture['current']['path'] 460 ); 461 445 462 if ($metadata_showable) 446 463 { … … 472 489 $page['slideshow'] = false; 473 490 } 474 // maybe someone wants a special display (call it before page_header so that they 475 // can add stylesheets) 476 $element_content = trigger_event('render_element_content', 477 '', $picture['current'] ); 478 479 if ( isset($picture['next']['image_url']) 480 and isset($picture['next']['is_picture']) ) 481 { 482 $template->assign_block_vars( 'prefetch', 491 492 // maybe someone wants a special display (call it before page_header so that 493 // they can add stylesheets) 494 $element_content = trigger_event( 495 'render_element_content', 496 '', 497 $picture['current'] 498 ); 499 500 if (isset($picture['next']['image_url']) 501 and isset($picture['next']['is_picture'])) 502 { 503 $template->assign_block_vars( 504 'prefetch', 483 505 array ( 484 506 'URL' => $picture['next']['image_url'] 485 )486 );507 ) 508 ); 487 509 } 488 510 489 511 $template->set_filenames(array( 'picture' => $page['display_tpl'] )); 490 512 491 492 513 //------------------------------------------------------- navigation management 493 foreach ( array('first','previous','next','last') as $which_image)514 foreach (array('first','previous','next','last') as $which_image) 494 515 { 495 516 if (isset($picture[$which_image])) … … 502 523 'U_IMG' => $picture[$which_image]['url'], 503 524 ) 525 ); 526 } 527 else 528 { 529 $template->assign_block_vars( 530 $which_image.'_unactive', 531 array() 504 532 ); 505 533 } -
trunk/template/yoga/picture.tpl
r1780 r1787 41 41 <a class="navButton prev" href="{last.U_IMG}" title="{lang:last_page} : {last.TITLE_IMG}" rel="last"><img src="{pwg_root}{themeconf:icon_dir}/last.png" class="button" alt="{lang:last_page}"></a> 42 42 <!-- END last --> 43 <!-- BEGIN last_unactive --> 44 <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/last_unactive.png" class="button" alt="{lang:last_page}"></a> 45 <!-- END last_unactive --> 43 46 <!-- BEGIN next --> 44 <a class="navButton next" href="{next.U_IMG}" title="{ lang:next_page} :{next.TITLE_IMG}" rel="next"><img src="{pwg_root}{themeconf:icon_dir}/right.png" class="button" alt="{lang:next_page}"></a>47 <a class="navButton next" href="{next.U_IMG}" title="{L_NEXT_IMG}{next.TITLE_IMG}" rel="next"><img src="{pwg_root}{themeconf:icon_dir}/right.png" class="button" alt="{lang:next_page}"></a> 45 48 <!-- END next --> 46 <a class="navButton up" href="{U_UP}" title="{lang:thumbnails}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{lang:home}"></a> 49 <!-- BEGIN next_unactive --> 50 <a class="navButton next"><img src="{pwg_root}{themeconf:icon_dir}/right_unactive.png" class="button" alt="{lang:next_page}"></a> 51 <!-- END next_unactive --> 52 <a class="navButton up" href="{U_UP}" title="{lang:thumbnails}" rel="up"><img src="{pwg_root}{themeconf:icon_dir}/up.png" class="button" alt="{L_UP_ALT}"></a> 47 53 <!-- BEGIN previous --> 48 <a class="navButton prev" href="{previous.U_IMG}" title="{ lang:previous_page} :{previous.TITLE_IMG}" rel="prev"><img src="{pwg_root}{themeconf:icon_dir}/left.png" class="button" alt="{lang:previous_page}"></a>54 <a class="navButton prev" href="{previous.U_IMG}" title="{L_PREV_IMG}{previous.TITLE_IMG}" rel="prev"><img src="{pwg_root}{themeconf:icon_dir}/left.png" class="button" alt="{lang:previous_page}"></a> 49 55 <!-- END previous --> 56 <!-- BEGIN previous_unactive --> 57 <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/left_unactive.png" class="button" alt="{lang:previous_page}"></a> 58 <!-- END previous_unactive --> 50 59 <!-- BEGIN first --> 51 60 <a class="navButton prev" href="{first.U_IMG}" title="{lang:first_page} : {first.TITLE_IMG}" rel="first"><img src="{pwg_root}{themeconf:icon_dir}/first.png" class="button" alt="{lang:first_page}"></a> 52 61 <!-- END first --> 62 <!-- BEGIN first_unactive --> 63 <a class="navButton prev"><img src="{pwg_root}{themeconf:icon_dir}/first_unactive.png" class="button" alt="{lang:first_page}"></a> 64 <!-- END first_unactive --> 53 65 </div> 54 66
Note: See TracChangeset
for help on using the changeset viewer.