source: extensions/floOS/OS_default/themeconf.inc.php @ 9108

Last change on this file since 9108 was 9108, checked in by flop25, 13 years ago

first commit : update for 2.1 and higher
Integrating spreadmenu directly IN the theme

File size: 1.4 KB
Line 
1<?php
2$themeconf = array(
3  'name'         => 'OS_default',
4  'parent'        => 'default',
5  'icon_dir'      => 'themes/OS_default/icon',
6  'mime_icon_dir' => 'themes/OS_default/icon/mimetypes/',
7  'local_head'    => 'local_head.tpl',
8  'activable' => false,
9        'Exclude'                       => array('theNBMPage','thePicturePage','thePopuphelpPage',),    # Excluded pages
10);
11// thx to Vdigital and his plugin spreadmenus
12if ( !function_exists( 'add_menu_on_public_pages' ) ) {
13        if ( defined('IN_ADMIN') and IN_ADMIN ) return false;
14        add_event_handler('loc_after_page_header', 'add_menu_on_public_pages', 20);
15
16        function  add_menu_on_public_pages() {
17          if ( function_exists( 'initialize_menu') ) return false; # The current page has already the menu
18          global $template, $page, $conf;
19          if ( isset($page['body_id']) and in_array($page['body_id'], get_themeconf('Exclude')) ) return false;
20
21          $template->set_filenames(array(
22                'add_menu_on_public_pages' => dirname(__FILE__) . '/template/add_menu_on_public_pages.tpl',
23          ));
24          include_once(PHPWG_ROOT_PATH.'include/menubar.inc.php');
25          $template->parse('add_menu_on_public_pages');
26         
27          if (is_admin())
28                {
29          $template->assign(
30        'U_ADMIN', get_root_url().'admin.php?page=picture_modify'
31      .'&amp;cat_id='.(isset($page['category']) ? $page['category']['id'] : '')
32      .( isset($page['image_id']) ? '&amp;image_id='.$page['image_id'] : '')
33      );
34                }
35         
36        }
37}
38
39?>
Note: See TracBrowser for help on using the repository browser.