1 | <?php |
---|
2 | /* |
---|
3 | Theme Name: paysonsplaces |
---|
4 | Version: 11379 |
---|
5 | Description: |
---|
6 | Theme URI: http://piwigo.org/ext/extension_view.php?eid=557 |
---|
7 | Author: Tearran |
---|
8 | Author URI: http://tearran.deviantart.com |
---|
9 | */ |
---|
10 | |
---|
11 | |
---|
12 | $themeconf = array( |
---|
13 | 'name' => 'paysonsplaces', |
---|
14 | 'parent' => 'default', |
---|
15 | 'icon_dir' => 'themes/paysonsplaces/icon', |
---|
16 | 'add_menu_on_public_pages' => true, # activation |
---|
17 | 'Exclude' => array('theNBMPage','thePopuphelpPage',) |
---|
18 | ); |
---|
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 |
---|
27 | if ( !get_themeconf('add_menu_on_public_pages') ) return false; # The current page has already the menu |
---|
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 | |
---|
50 | |
---|
51 | ?> |
---|