source: extensions/hr_os/themeconf.inc.php @ 10329

Last change on this file since 10329 was 9670, checked in by flop25, 14 years ago

use of $conflocal_dir_site and @import menu.css;

File size: 1.9 KB
Line 
1<?php
2/*
3Theme Name: hr_os
4Version: auto
5Description: A theme with an horizontal menu everywhere and a simple modern design
6Theme URI: http://fr.piwigo.org/ext/extension_view.php?eid=503
7Author: flop25
8Author 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(PHPWG_ROOT_PATH. 'local/config/hr_os.inc.php');
21if (isset($conf['local_dir_site']))
22{
23  @include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR. 'config/hr_os.inc.php');
24}
25// thx to Vdigital and his plugin spreadmenus
26if ( !function_exists( 'add_menu_on_public_pages' ) ) {
27        if ( defined('IN_ADMIN') and IN_ADMIN ) return false;
28        add_event_handler('loc_after_page_header', 'add_menu_on_public_pages', 20);
29
30        function  add_menu_on_public_pages() {
31          if ( function_exists( 'initialize_menu') ) return false; # The current page has already the menu
32          if ( !get_themeconf('add_menu_on_public_pages') ) return false; # The current page has already the menu
33          global $template, $page, $conf;
34          if ( isset($page['body_id']) and in_array($page['body_id'], get_themeconf('Exclude')) ) return false;
35
36          $template->set_filenames(array(
37                'add_menu_on_public_pages' => dirname(__FILE__) . '/template/add_menu_on_public_pages.tpl',
38          ));
39          include_once(PHPWG_ROOT_PATH.'include/menubar.inc.php');
40          $template->parse('add_menu_on_public_pages');
41         
42          if (is_admin())
43                {
44          $template->assign(
45        'U_ADMIN', get_root_url().'admin.php?page=picture_modify'
46      .'&amp;cat_id='.(isset($page['category']) ? $page['category']['id'] : '')
47      .( isset($page['image_id']) ? '&amp;image_id='.$page['image_id'] : '')
48      );
49                }
50         
51        }
52}
53?>
Note: See TracBrowser for help on using the repository browser.