[9108] | 1 | <?php |
---|
[9120] | 2 | /* |
---|
| 3 | Theme Name: OS_default |
---|
| 4 | Version: 1.0.0 |
---|
| 5 | Description: |
---|
[9122] | 6 | Theme URI: http://piwigo.org/ext/extension_view.php?eid=497 |
---|
[9120] | 7 | Author: flop25 |
---|
| 8 | Author URI: http://www.planete-flop.fr |
---|
| 9 | */ |
---|
[9108] | 10 | $themeconf = array( |
---|
| 11 | 'name' => 'OS_default', |
---|
| 12 | 'parent' => 'default', |
---|
| 13 | 'icon_dir' => 'themes/OS_default/icon', |
---|
| 14 | 'mime_icon_dir' => 'themes/OS_default/icon/mimetypes/', |
---|
| 15 | 'local_head' => 'local_head.tpl', |
---|
| 16 | 'activable' => false, |
---|
[9120] | 17 | 'add_menu_on_public_pages' => true, # activation |
---|
[9108] | 18 | 'Exclude' => array('theNBMPage','thePicturePage','thePopuphelpPage',), # Excluded pages |
---|
| 19 | ); |
---|
| 20 | // thx to Vdigital and his plugin spreadmenus |
---|
| 21 | if ( !function_exists( 'add_menu_on_public_pages' ) ) { |
---|
| 22 | if ( defined('IN_ADMIN') and IN_ADMIN ) return false; |
---|
| 23 | add_event_handler('loc_after_page_header', 'add_menu_on_public_pages', 20); |
---|
| 24 | |
---|
| 25 | function add_menu_on_public_pages() { |
---|
| 26 | if ( function_exists( 'initialize_menu') ) return false; # The current page has already the menu |
---|
[9120] | 27 | if ( !get_themeconf('add_menu_on_public_pages') ) return false; # The current page has already the menu |
---|
[9108] | 28 | global $template, $page, $conf; |
---|
| 29 | if ( isset($page['body_id']) and in_array($page['body_id'], get_themeconf('Exclude')) ) return false; |
---|
| 30 | |
---|
| 31 | $template->set_filenames(array( |
---|
| 32 | 'add_menu_on_public_pages' => dirname(__FILE__) . '/template/add_menu_on_public_pages.tpl', |
---|
| 33 | )); |
---|
| 34 | include_once(PHPWG_ROOT_PATH.'include/menubar.inc.php'); |
---|
| 35 | $template->parse('add_menu_on_public_pages'); |
---|
| 36 | |
---|
| 37 | if (is_admin()) |
---|
| 38 | { |
---|
| 39 | $template->assign( |
---|
| 40 | 'U_ADMIN', get_root_url().'admin.php?page=picture_modify' |
---|
| 41 | .'&cat_id='.(isset($page['category']) ? $page['category']['id'] : '') |
---|
| 42 | .( isset($page['image_id']) ? '&image_id='.$page['image_id'] : '') |
---|
| 43 | ); |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | } |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | ?> |
---|