source: extensions/PaysonsPlaces/themeconf.inc.php @ 11378

Last change on this file since 11378 was 11378, checked in by tearran, 13 years ago
File size: 1.6 KB
Line 
1<?php
2/*
3Theme Name: paysonsplaces
4Version: .0.0.2
5Description:
6Theme URI: http://piwigo.org/ext/extension_view.php?eid=557
7Author: Tearran
8Author URI: http://tearran.deviantart.com
9*/
10$themeconf = array(
11        'name'  => 'paysonsplaces',
12        'parent' => 'default',
13        'icon_dir' => 'themes/paysonsplaces/icon',
14        'add_menu_on_public_pages' => true,     # activation
15        'Exclude' => array('theNBMPage','thePopuphelpPage',)
16);
17
18// thx to Vdigital and his plugin spreadmenus
19if ( !function_exists( 'add_menu_on_public_pages' ) ) {
20//      if ( defined('IN_ADMIN') and IN_ADMIN ) return false;
21        add_event_handler('loc_after_page_header', 'add_menu_on_public_pages', 20);
22
23        function  add_menu_on_public_pages() {
24          if ( function_exists( 'initialize_menu') ) return false; # The current page has already the menu
25          if ( !get_themeconf('add_menu_on_public_pages') ) return false; # The current page has already the menu
26          global $template, $page, $conf;
27         // if ( isset($page['body_id']) and in_array($page['body_id'], get_themeconf('Exclude')) ) return false;
28
29          $template->set_filenames(array(
30                'add_menu_on_public_pages' => dirname(__FILE__) . '/template/add_menu_on_public_pages.tpl',
31          ));
32          include_once(PHPWG_ROOT_PATH.'include/menubar.inc.php');
33          $template->parse('add_menu_on_public_pages');
34         
35          if (is_admin())
36                {
37          $template->assign(
38        'U_ADMIN', get_root_url().'admin.php?page=picture_modify'
39      .'&amp;cat_id='.(isset($page['category']) ? $page['category']['id'] : '')
40      .( isset($page['image_id']) ? '&amp;image_id='.$page['image_id'] : '')
41      );
42                }
43         
44        }
45}
46?>
Note: See TracBrowser for help on using the repository browser.