SPREADM_DIR, 'Path' => (substr(SPREADM_PATH,0,2) == './') ? substr(SPREADM_PATH,2) : SPREADM_PATH, 'Version' => SPREADM_VER, 'On_picture' => true, 'Exclude' => array('theNBMPage','thePopuphelpPage',), # Excluded pages 'On_theme' => array( 'Sylvia', 'clear', 'dark', 'aqua', 'blancmontxl', 'GBO_hk-3', 'GBO_hk-3_clear', 'grum-dark-II', 'kardon', 'Pure_clear_blue', 'Pure_green_nature', 'Pure_tr_clear_blue', 'sobre', 'VerticalWhite', 'p0w0', 'wipi' ), # Eligible themes (currently assumed by the plugin) ); if (!isset($conf['Spread menus']) or !is_array($conf['Spread menus'])) $conf['Spread menus'] = $default; else $conf['Spread menus'] = array_merge( $default, $conf['Spread menus'] ); $conf['Spread menus']['Version'] = SPREADM_VER; if ( !function_exists( 'spread_menus_on_public_pages' ) ) { if ( defined('IN_ADMIN') and IN_ADMIN ) return false; add_event_handler('loc_after_page_header', 'spread_menus_on_public_pages', 20); function spread_menus_on_public_pages() { if ( function_exists( 'initialize_menu') ) return false; # The current page has already the menu global $template, $page, $conf; if ( isset($page['body_id']) and in_array($page['body_id'], $conf['Spread menus']['Exclude']) ) return false; if ( isset($page['body_id']) and $page['body_id'] == 'thePicturePage' and !$conf['Spread menus']['On_picture'] ) return false; $themeconf = $template->get_template_vars('themeconf'); # themes could set $themeconf['spread_menus'] with the .css filename they provide in their css subfolder if ( isset($themeconf['spread_menus']) and isset($themeconf['id']) ) $conf['Spread menus']['On_theme'][] = $themeconf['id']; if ( !isset($themeconf['id']) or !in_array($themeconf['id'],$conf['Spread menus']['On_theme']) ) return false; $template->set_filenames(array( 'spread_menus_on_public_pages' => dirname(__FILE__) . '/template/spread_menus_on_public_pages.tpl', )); include_once(PHPWG_ROOT_PATH.'include/menubar.inc.php'); $template->assign( array( 'SPREADM' => $conf['Spread menus'] ) ); $template->parse('spread_menus_on_public_pages'); } } ?>