Changeset 12263 for extensions/hr_glass_xl
- Timestamp:
- Sep 29, 2011, 6:29:37 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/hr_glass_xl/themeconf.inc.php
r10827 r12263 3 3 Theme Name: hr_glass_xl 4 4 Version: auto 5 Description: A theme with an horizontal menu everywhereand a simple modern design5 Description: A theme with an horizontal menu and a simple modern design 6 6 Theme URI: http://fr.piwigo.org/ext/extension_view.php?eid=502 7 7 Author: flop25 … … 15 15 'local_head' => 'local_head.tpl', 16 16 'activable' => true, 17 'add_menu_on_public_pages' => true, # activation18 'Exclude' => array('theNBMPage','thePopuphelpPage',), # Excluded pages19 17 ); 20 @include(PHPWG_ROOT_PATH. 'local/config/hr_glass_xl.inc.php'); 21 if (isset($conf['local_dir_site'])) 22 { 23 @include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR. 'config/hr_glass_xl.inc.php'); 24 } 18 // Need upgrade? 19 if (!isset($conf['hr_glass_xl'])) 20 { 21 $config = array( 22 'home' => true, 23 'categories' => true, 24 'picture' => false, 25 'other' => true, 26 ); 27 28 $query = ' 29 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 30 VALUES ("hr_glass_xl" , "'.pwg_db_real_escape_string(serialize($config)).'" , "hr_glass_xl parameters");'; 31 32 pwg_query($query); 33 load_conf_from_db(); 34 } 35 25 36 // thx to P@t 26 37 add_event_handler('loc_begin_page_header', 'set_hr_glass_xl_header'); … … 47 58 $template->assign('display_hr_glass_xl_banner', $header); 48 59 } 49 50 // thx to Vdigital and his plugin spreadmenus51 if ( !function_exists( 'add_menu_on_public_pages' ) ) {52 if ( defined('IN_ADMIN') and IN_ADMIN ) return false;53 add_event_handler('loc_after_page_header', 'add_menu_on_public_pages', 20);54 55 function add_menu_on_public_pages() {56 if ( function_exists( 'initialize_menu') ) return false; # The current page has already the menu57 if ( !get_themeconf('add_menu_on_public_pages') ) return false; # The current page has already the menu58 global $template, $page, $conf;59 if ( isset($page['body_id']) and in_array($page['body_id'], get_themeconf('Exclude')) ) return false;60 61 $template->set_filenames(array(62 'add_menu_on_public_pages' => dirname(__FILE__) . '/template/add_menu_on_public_pages.tpl',63 ));64 include_once(PHPWG_ROOT_PATH.'include/menubar.inc.php');65 $template->parse('add_menu_on_public_pages');66 67 if (is_admin())68 {69 $template->assign(70 'U_ADMIN', get_root_url().'admin.php?page=picture_modify'71 .'&cat_id='.(isset($page['category']) ? $page['category']['id'] : '')72 .( isset($page['image_id']) ? '&image_id='.$page['image_id'] : '')73 );74 }75 76 }77 }78 60 ?>
Note: See TracChangeset
for help on using the changeset viewer.