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