Changeset 21307
- Timestamp:
- Mar 7, 2013, 1:50:05 AM (11 years ago)
- Location:
- extensions/skeleton/trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/skeleton/trunk/include/public_events.inc.php
r18858 r21307 12 12 { 13 13 $page['section'] = 'skeleton'; 14 $page['title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].'<a href="'.SKELETON_PUBLIC.'">'.l10n('Skeleton').'</a>';15 14 16 // print_r($tokens); 15 // section_title is for breadcrumb, title is for page <title> 16 $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].'<a href="'.SKELETON_PUBLIC.'">'.l10n('Skeleton').'</a>'; 17 $page['title'] = l10n('Skeleton'); 18 19 // define body_id 20 add_event_handler('loc_begin_page_header', 'skeleton_loc_begin_page_header'); 17 21 } 22 } 23 24 function skeleton_loc_begin_page_header() 25 { 26 global $page; 27 $page['body_id'] = 'theSkeletonPage'; 18 28 } 19 29 … … 23 33 function skeleton_loc_end_page() 24 34 { 25 global $page ;35 global $page, $template; 26 36 27 if ( isset($page['section']) and $page['section'] =='skeleton' )37 if ( isset($page['section']) and $page['section']=='skeleton' ) 28 38 { 29 39 include(SKELETON_PATH . 'include/skeleton_page.inc.php'); 40 } 41 } 42 43 /* 44 * button on album and photos pages 45 */ 46 function skeleton_add_button() 47 { 48 global $template; 49 50 $template->assign('SKELETON_PATH', SKELETON_PATH); 51 $template->set_filename('skeleton_button', realpath(SKELETON_PATH.'template/my_button.tpl')); 52 $button = $template->parse('skeleton_button', true); 53 54 if (script_basename()=='index') 55 { 56 $template->add_index_button('<li>'.$button.'</li>', EVENT_HANDLER_PRIORITY_NEUTRAL); 57 } 58 else 59 { 60 $template->add_picture_button($button, EVENT_HANDLER_PRIORITY_NEUTRAL); 30 61 } 31 62 } -
extensions/skeleton/trunk/language/en_UK/intro.html
r17933 r21307 16 16 <li>Simple template prefilter (on picture.php page)</li> 17 17 <li>Add new method to the API</li> 18 <li>Add a toolbar button</li> 18 19 </ul> 19 20 </p> -
extensions/skeleton/trunk/language/fr_FR/intro.html
r17933 r21307 16 16 <li>Préfiltre de template simple (sur page picture.php)</li> 17 17 <li>Ajout d'une méthode à l'API</li> 18 <li>Ajout d'un bouton dans la barre d'outils</li> 18 19 </ul> 19 20 </p> -
extensions/skeleton/trunk/main.inc.php
r21304 r21307 71 71 // NOTE: skeleton_blockmanager_apply1() and skeleton_blockmanager_apply2() can (should) be merged 72 72 73 // add button on album and photos pages 74 add_event_handler('loc_end_index', 'skeleton_add_button'); 75 add_event_handler('loc_end_picture', 'skeleton_add_button'); 76 73 77 // prefilter on photo page 74 78 add_event_handler('loc_end_picture', 'skeleton_loc_end_picture');
Note: See TracChangeset
for help on using the changeset viewer.