Changeset 16938 for extensions/SmartAlbums
- Timestamp:
- Jul 23, 2012, 5:21:46 PM (12 years ago)
- Location:
- extensions/SmartAlbums
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SmartAlbums/admin.php
r16104 r16938 4 4 global $conf, $template, $page; 5 5 6 $page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : $page['tab'] ='cat_list';6 $page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : 'cat_list'; 7 7 8 8 if ($page['tab'] == 'album') … … 19 19 $tabsheet->assign(); 20 20 21 $template->assign(array(22 'SMART_PATH' => SMART_PATH,23 ));24 25 21 include(SMART_PATH . 'admin/'.$page['tab'].'.php'); 26 22 } -
extensions/SmartAlbums/admin/album.php
r16924 r16938 53 53 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 54 54 $tabsheet = new tabsheet(); 55 $tabsheet->add('properties', l10n('Properties'), $admin_album_base_url.'-properties'); 56 $tabsheet->add('sort_order', l10n('Manage photo ranks'), $admin_album_base_url.'-sort_order'); 57 $tabsheet->add('permissions', l10n('Permissions'), $admin_album_base_url.'-permissions'); 58 $tabsheet->add('notification', l10n('Notification'), $admin_album_base_url.'-notification'); 59 $tabsheet->add('smartalbum', 'SmartAlbum', $self_url); 55 $tabsheet->set_id('album'); 60 56 $tabsheet->select('smartalbum'); 61 57 $tabsheet->assign(); -
extensions/SmartAlbums/main.inc.php
r16126 r16938 39 39 include_once(SMART_PATH.'include/cat_list.php'); 40 40 41 41 42 add_event_handler('loc_begin_cat_list', 'smart_cat_list'); 42 add_event_handler(' loc_begin_admin_page', 'smart_add_admin_album_tab');43 add_event_handler('tabsheet_before_select','smart_tab', 50, 2); 43 44 add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu'); 45 } 46 47 function smart_tab($sheets, $id) 48 { 49 if ($id == 'album') 50 { 51 $sheets['smartalbum'] = array( 52 'caption' => 'SmartAlbum', 53 'url' => SMART_ADMIN.'-album&cat_id='.$_GET['cat_id'], 54 ); 55 } 56 57 return $sheets; 44 58 } 45 59 … … 53 67 } 54 68 55 function smart_add_admin_album_tab()56 {57 global $page, $template;58 if ($page['page'] != 'album') return;59 60 $template->assign('SMART_CAT_ID', $_GET['cat_id']);61 $template->set_prefilter('tabsheet', 'smart_add_admin_album_tab_prefilter');62 }63 function smart_add_admin_album_tab_prefilter($content)64 {65 $search = '{/foreach}';66 $add = '67 <li class="{if false}selected_tab{else}normal_tab{/if}">68 <a href="'.SMART_ADMIN.'-album&cat_id={$SMART_CAT_ID}"><span>SmartAlbum</span></a>69 </li>';70 return str_replace($search, $search.$add, $content);71 }72 69 ?>
Note: See TracChangeset
for help on using the changeset viewer.