Changeset 1793

Show
Ignore:
Timestamp:
02/09/07 02:41:49 (6 years ago)
Author:
rvelices
Message:

- added plugin action loc_end_picture
- enhanced the event tracer plugin to show a list of all events and actions trigered by pwg
- small reorganization in picture.php

Location:
trunk
Files:
2 added
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/picture.php

    r1787 r1793  
    7070    return $content; 
    7171  } 
    72    
    73   global $user; 
    74    
     72 
     73  global $user, $page; 
     74 
    7575  $my_template = new Template( 
    7676    PHPWG_ROOT_PATH.'template/'.$user['template'], 
     
    8181    ); 
    8282 
    83   if (isset($element_info['high_url'])) 
     83  if ( !isset($page['slideshow']) and isset($element_info['high_url']) ) 
    8484  { 
    8585    $uuid = uniqid(rand()); 
     
    430430  ); 
    431431 
     432 
     433$template->set_filename('picture', 'picture.tpl'); 
     434if ( isset( $_GET['slideshow'] ) ) 
     435{ 
     436  $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1); 
     437  $page['slideshow'] = true; 
     438  if ( $conf['light_slideshow'] ) 
     439  { 
     440    $template->set_filename('picture', 'slideshow.tpl'); 
     441  } 
     442  if ( isset($page['next_item']) ) 
     443  { 
     444    // $redirect_msg, $refresh, $url_link and $title are required for creating 
     445    // an automated refresh page in header.tpl 
     446    $refresh= $_GET['slideshow']; 
     447    $url_link = add_url_params( 
     448        $picture['next']['url'], 
     449        array('slideshow'=>$refresh) 
     450      ); 
     451    $redirect_msg = nl2br(l10n('redirect_msg')); 
     452  } 
     453} 
     454 
    432455$title =  $picture['current']['name']; 
    433 $refresh = 0; 
    434 if ( isset( $_GET['slideshow'] ) and isset($page['next_item']) ) 
    435 { 
    436   // $redirect_msg, $refresh, $url_link and $title are required for creating 
    437   // an automated refresh page in header.tpl 
    438   $refresh= $_GET['slideshow']; 
    439   $url_link = add_url_params( 
    440       $picture['next']['url'], 
    441       array('slideshow'=>$refresh) 
    442     ); 
    443   $redirect_msg = nl2br(l10n('redirect_msg')); 
    444   $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1); 
    445 } 
    446  
    447456$title_nb = ($page['current_rank'] + 1).'/'.$page['cat_nb_images']; 
    448457 
     
    474483$page['body_id'] = 'thePicturePage'; 
    475484 
    476 //------------------------------------------------------------ light slideshow 
    477 // Warning !!! Warning !!! Warning !!! 
    478 // Notice for plugins writers check if you have to act on the active template 
    479 // like this if ( $page['slideshow'] ) { return false; } 
    480 // 
    481 if ( isset($_GET['slideshow']) and $conf['light_slideshow'] ) 
    482 { 
    483   $page['display_tpl'] = 'slideshow.tpl'; 
    484   $page['slideshow'] = true;  
    485   unset($picture['current']['high_url']);  
    486 } 
    487 else { 
    488   $page['display_tpl'] = 'picture.tpl'; 
    489   $page['slideshow'] = false;   
    490 } 
    491  
    492485// maybe someone wants a special display (call it before page_header so that 
    493486// they can add stylesheets) 
     
    508501    ); 
    509502} 
    510  
    511 $template->set_filenames(array( 'picture' => $page['display_tpl'] )); 
    512503 
    513504//------------------------------------------------------- navigation management 
     
    838829 
    839830include(PHPWG_ROOT_PATH.'include/page_header.php'); 
     831trigger_action('loc_end_picture'); 
    840832$template->parse('picture'); 
    841833include(PHPWG_ROOT_PATH.'include/page_tail.php'); 
  • trunk/plugins/event_tracer/tracer_admin.php

    r1705 r1793  
    2424$template->assign_var('EVENT_TRACER_FILTERS', implode("\n", $me->my_config['filters'] ) ); 
    2525$template->assign_var('EVENT_TRACER_SHOW_ARGS', $me->my_config['show_args'] ? 'checked="checked"' : '' ); 
     26$template->assign_var('U_LIST_EVENTS', get_admin_plugin_menu_link(dirname(__FILE__).'/event_list.php')); 
     27 
    2628//$template->assign_var('EVENT_TRACER_F_ACTION', $my_url); 
    2729 
  • trunk/plugins/event_tracer/tracer_admin.tpl

    r1705 r1793  
    2424 
    2525<p><input type="submit" value="Submit" /></p> 
     26 
     27<p><a href="{U_LIST_EVENTS}">Click here to see a complete list of actions and events trigered by this PWG version</a>.</p> 
    2628</form>