|
From: Florin C B. <ory...@us...> - 2013-06-02 12:56:37
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9932 Modified Files: mx_menu_nav.php mx_site_nav.php Log Message: navigation menu upgrade to v3 Index: mx_menu_nav.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/mx_menu_nav.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** mx_menu_nav.php 29 Dec 2011 05:51:52 -0000 1.37 --- mx_menu_nav.php 2 Jun 2013 12:56:34 -0000 1.38 *************** *** 30,34 **** // Setup config parameters // ! $config_name = array('menu_custom_tpl', 'menu_display_mode'); for( $i = 0; $i < count($config_name); $i++ ) --- 30,34 ---- // Setup config parameters // ! $config_name = array('menu_display_style', 'menu_display_mode', 'menu_page_sync', 'menu_page_parent', 'menu_custom_tpl'); for( $i = 0; $i < count($config_name); $i++ ) *************** *** 41,46 **** --- 41,55 ---- // Define some parameters // + /* + $menu_display_style = 'Overall_navigation'; + $menu_display_mode == 'Horizontal'; + $menu_page_sync = true; + */ $menu_custom_tpl = $mx_menu_config['menu_custom_tpl']; + $menu_display_style = $mx_menu_config['menu_display_style']; $menu_display_mode = $mx_menu_config['menu_display_mode']; + $menu_page_sync = ( $mx_menu_config['menu_page_sync'] != 'No' ); + + $page_parent = !empty($mx_menu_config['menu_page_parent']) ? $mx_menu_config['menu_page_parent'] : 0; // *************** *** 49,52 **** --- 58,62 ---- // $nav_def_key = 'MX_NAV_MENU_' . $block_id; + if ( defined($nav_def_key) ) { *************** *** 65,71 **** if (!empty($menu_custom_tpl) && !in_array($menu_custom_tpl, array('Classic','Advanced','Simple_CSS_menu','Advanced_CSS_menu','Overall_navigation'))) { ! $template_tmp = $menu_custom_tpl; $template_tmp_path = str_replace(strrchr($template_tmp, '/'), '', $template_tmp) . '/'; ! $kick_js = file_exists($mx_root_path . $module_root_path . 'templates/' .$mx_user->template_names[$module_root_path] . $template_tmp_path) ? ($menu_display_mode == 'Horizontal' ? 'horizontal' : 'vertical') : ''; if (!empty($kick_js)) { --- 75,81 ---- if (!empty($menu_custom_tpl) && !in_array($menu_custom_tpl, array('Classic','Advanced','Simple_CSS_menu','Advanced_CSS_menu','Overall_navigation'))) { ! $template_tmp = array('body' => $menu_custom_tpl); $template_tmp_path = str_replace(strrchr($template_tmp, '/'), '', $template_tmp) . '/'; ! $kick_js = @file_exists($mx_root_path . $module_root_path . 'templates/' .$mx_user->template_names[$module_root_path] . $template_tmp_path) ? ($menu_display_mode == 'Horizontal' ? 'horizontal' : 'vertical') : ''; if (!empty($kick_js)) { *************** *** 75,96 **** else { ! switch( $menu_display_mode ) { ! case 'Horizontal': ! $template_tmp = "mx_menu_horizontal.$tplEx"; break; ! case 'Vertical': ! $template_tmp = "mx_menu_vertical.$tplEx"; break; ! case 'Overall_navigation': ! $template_tmp = "mx_menu_overall_navigation.$tplEx"; break; default: ! $template_tmp = "mx_menu_vertical.$tplEx"; break; } } ! $template->set_filenames(array('body' => $template_tmp)); // --- 85,131 ---- else { ! switch( $menu_display_style ) { ! case 'Classic': ! $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_classic_hor.tpl') : array('body' => 'mx_menu_classic_ver.tpl'); break; ! case 'Advanced': ! $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_advanced_hor.tpl') : array('body' => 'mx_menu_advanced_ver.tpl'); ! $kick_js = $menu_display_mode == 'Horizontal' ? 'adv_hor.js' : 'adv_ver.js'; ! $mx_page->add_footer_text( 'includes/js/' . $kick_js, true ); break; ! case 'Simple_CSS_menu': ! $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_simple_CSS_hor.tpl') : array('body' => 'mx_menu_simple_CSS_ver.tpl'); ! $kick_js = $menu_display_mode == 'Horizontal' ? 'simple_CSS_hor.js' : 'simple_CSS_ver.js'; ! $mx_page->add_footer_text( 'includes/js/' . $kick_js, true ); ! break; ! case 'Advanced_CSS_menu': ! $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_advanced_CSS_hor.tpl') : array('body' => 'mx_menu_advanced_CSS_ver.tpl'); ! $kick_js = $menu_display_mode == 'Horizontal' ? 'adv_CSS_hor.js' : 'adv_CSS_ver.js'; ! $mx_page->add_footer_text( 'includes/js/' . $kick_js, true ); break; + case 'Simple_x': + $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_simple_x_hor.tpl') : array('body' => 'mx_menu_simple_x_ver.tpl'); + break; + case 'Overall_navigation': + $template_tmp = array('body' => 'mx_menu_overall_standard.tpl'); + break; default: ! $template_tmp = $menu_display_mode == 'Horizontal' ? array('body' => 'mx_menu_classic_hor.tpl') : array('body' => 'mx_menu_classic_ver.tpl'); break; } + + switch( $menu_display_mode ) + { + case 'Overall_navigation': + $template_tmp = array('body' => "mx_menu_overall_standard.$tplEx"); + break; + default: + $template_tmp = $template_tmp; + break; + } } ! $template->set_filenames($template_tmp); // *************** *** 117,121 **** // // Check if this Category contains any authorized menus, or any at all - // $menuIsCat = false; foreach($catData as $key => $menuData) --- 152,155 ---- *************** *** 164,175 **** continue; } ! $cat_title = $catData[0]['cat_title']; - global $mx_bbcode; - $cat = ( !empty($lang[$cat_title]) ? $lang[$cat_title] : $cat_title ); ! $bbcode_uid = $catData[0]['bbcode_uid']; ! $cat = $mx_bbcode->decode($cat, $bbcode_uid, false); ! $cat_desc = ''; $cat_desc = $catData[0]['cat_desc']; --- 198,215 ---- continue; } ! // Define the global bbcode bitfield, will be used to load bbcodes ! $bbcode_uid = $catData[0]['bbcode_uid']; ! $bbcode_bitfield = 'cA=='; ! //$bbcode_bitfield = $bbcode_bitfield | base64_decode($catData[0]['bbcode_bitfield']); ! // Instantiate BBCode if need be ! if ($bbcode_bitfield !== '') ! { ! $mx_bbcode = new mx_bbcode(base64_encode($bbcode_bitfield)); ! } ! //$depth = 0; $cat_title = $catData[0]['cat_title']; $cat = ( !empty($lang[$cat_title]) ? $lang[$cat_title] : $cat_title ); ! $cat = $mx_bbcode->decode($cat, $bbcode_uid, false, $bbcode_bitfield); ! $cat_desc = ''; $cat_desc = $catData[0]['cat_desc']; *************** *** 239,243 **** // // Loop through each menu in this category - // $first_menu = true; foreach($catData as $key => $menuData) --- 279,282 ---- *************** *** 353,356 **** --- 392,396 ---- } } + //generate_site_menu($page_parent); $cat_width = $num_of_cats > 0 ? ceil(100 / $num_of_cats) . '%' : '100%'; Index: mx_site_nav.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/mx_site_nav.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mx_site_nav.php 2 Jun 2013 09:40:19 -0000 1.11 --- mx_site_nav.php 2 Jun 2013 12:56:34 -0000 1.12 *************** *** 46,52 **** $menu_page_sync = true; */ - // - // Define some parameters - // $menu_custom_tpl = $mx_menu_config['menu_custom_tpl']; $menu_display_style = $mx_menu_config['menu_display_style']; --- 46,49 ---- *************** *** 74,77 **** --- 71,75 ---- // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); + $virtual_id = $mx_request_vars->request('virtual', MX_TYPE_INT, ''); if (!empty($menu_custom_tpl)) *************** *** 121,125 **** { case 'Overall_navigation': ! $template_tmp = array('body' => 'mx_menu_overall_standard.tpl'); break; default: --- 119,123 ---- { case 'Overall_navigation': ! $template_tmp = array('body' => "mx_menu_overall_standard.$tplEx"); break; default: *************** *** 147,150 **** --- 145,149 ---- 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, + // |