|
From: Jon O. <jon...@us...> - 2008-04-27 18:45:33
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13832/includes Modified Files: Tag: core28x navmenu_functions.php Log Message: Output duplicated template parameters, for compatibility with 2.9.x. Index: navmenu_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/includes/navmenu_functions.php,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -C2 -d -r1.7.2.1 -r1.7.2.2 *** navmenu_functions.php 3 Feb 2008 19:26:05 -0000 1.7.2.1 --- navmenu_functions.php 27 Apr 2008 18:45:27 -0000 1.7.2.2 *************** *** 283,286 **** --- 283,287 ---- if ( isset( $mx_page->subpage_rowset[$page_parent] ) ) { + $first_menu = true; foreach( $mx_page->subpage_rowset[$page_parent] as $subpage_id => $page_data ) { *************** *** 292,295 **** --- 293,297 ---- { $cat = $page_data['page_name']; + $desc = $page_data['page_desc']; // *************** *** 331,335 **** // For overall_header navigation // - is this current page category? ! $current_parent_page = ($mx_page->page_id == $page_data['page_id'] || has_active_subpage($subpage_id) || ( isset($_GET['cat_link']) ? intval($_GET['cat_link']) == $page_data['page_id'] : false) ) ? true : false; // --- 333,338 ---- // For overall_header navigation // - is this current page category? ! //$current_parent_page = ($mx_page->page_id == $page_data['page_id'] || has_active_subpage($subpage_id) || ( isset($_GET['cat_link']) ? intval($_GET['cat_link']) == $page_data['page_id'] : false) ) ? true : false; ! $current_parent_page = ($mx_page->page_id == $page_data['page_id'] || has_active_subpage($subpage_id) ) ? true : false; // *************** *** 346,349 **** --- 349,354 ---- // $cat_on = $current_parent_page ? true : ( isset($HTTP_COOKIE_VARS['mxNavCat_' . $block_id . $page_data['page_id']]) ? $HTTP_COOKIE_VARS['mxNavCat_' . $block_id . $page_data['page_id']] == 1 : $catData[0]['cat_show'] == 1 ); + $menu_sep = $first_menu ? '' : '|'; + $first_menu = false; $template->assign_block_vars('catrow', array( *************** *** 351,356 **** 'BLOCK_ID' => intval($block_id), 'CATEGORY' => $catt, ! 'CATEGORY_URL' => $cat_url, 'CATEGORY_NAME' => $cat, 'U_CAT_NAV_CONTRACT' => $images['mx_contract'], 'U_CAT_NAV_EXPAND' => $images['mx_expand'], --- 356,364 ---- 'BLOCK_ID' => intval($block_id), 'CATEGORY' => $catt, ! 'CATEGORY_NAME' => $cat, + 'CATEGORY_URL' => $cat_url, + 'U_CATEGORY_URL' => $cat_url, // For compatibility with 2.9.x+ + 'U_CAT_NAV_CONTRACT' => $images['mx_contract'], 'U_CAT_NAV_EXPAND' => $images['mx_expand'], *************** *** 358,373 **** 'CAT_SHOW' => $cat_on ? '' : 'none', 'U_MENU_ICON' => $menu_icon, ! 'CURRENT' => $current_parent_page ? '-current' : '' )); generate_site_menu( $subpage_id, $depth + 1, $current_parent_page ); } else { $is_current = $mx_page->page_id == $page_data['page_id']; $action = $page_data['page_name']; $action = ( !empty($lang[$action]) ? $lang[$action] : $action ); $style = $is_current ? 'cattitle' : 'genmed'; // // Get menu icon --- 366,422 ---- 'CAT_SHOW' => $cat_on ? '' : 'none', 'U_MENU_ICON' => $menu_icon, ! 'CURRENT' => $current_parent_page ? '-current' : '', ! 'MENU_SEP' => $menu_sep, ! ! // ! // Overall Nav ! // ! 'U_CATEGORY_URL' => $cat_url, ! 'U_CATEGORY_URL_TARGET' => $link_target, ! 'CATEGORY_NAME' => $cat, ! 'CATEGORY_DESC' => $desc, ! 'CATEGORY_STYLE' => $style, ! 'MENU_SEP' => $menu_sep, )); + if ($current_parent_page) + { + // + // Overall Nav + // + $is_current = $mx_page->page_id == $page_data['page_id']; + $style = $is_current ? 'cattitle' : 'genmed'; + $link_target = ( true ) ? '' : '_blank'; + + $template->assign_block_vars('menurow_cat', array( + // + // Overall Nav + // + 'U_CATEGORY_URL' => $cat_url, + 'U_CATEGORY_URL_TARGET' => $link_target, + 'CATEGORY_NAME' => $cat, + 'CATEGORY_DESC' => $desc, + 'CATEGORY_STYLE' => $style, + 'CURRENT' => $is_current ? '-current' : '', + + )); + } + + // Recursive call generate_site_menu( $subpage_id, $depth + 1, $current_parent_page ); } else { + $row_color_over = $theme['tr_color2']; + $is_current = $mx_page->page_id == $page_data['page_id']; $action = $page_data['page_name']; $action = ( !empty($lang[$action]) ? $lang[$action] : $action ); + $desc = $page_data['page_desc']; $style = $is_current ? 'cattitle' : 'genmed'; + $menu_sep = $first_menu ? '' : '|'; + $first_menu = false; + // // Get menu icon *************** *** 404,408 **** $link_target = ( true ) ? '' : '_blank'; - $row_color_over = $theme['tr_color2']; $menu_array = array( --- 453,456 ---- *************** *** 411,424 **** 'MENU_STYLE' => $style, 'MENU_DESC' => $desc, 'U_MENU_MODULE' => $menu_link, 'U_LINK_TARGET' => $link_target, ! 'U_MENU_ICON' => $menu_icon ); $template->assign_block_vars('catrow.modulerow', $menu_array); if ($current_parent_page) { $template->assign_block_vars('modulerow', $menu_array); } } --- 459,481 ---- 'MENU_STYLE' => $style, 'MENU_DESC' => $desc, + 'MENU_SEP' => $menu_sep, 'U_MENU_MODULE' => $menu_link, 'U_LINK_TARGET' => $link_target, ! 'U_MENU_ICON' => $menu_icon, ! ! // For compatibility with 2.9.x+ ! 'U_MENU_URL' => $menu_link, ! 'U_MENU_URL_TARGET' => $link_target, ! 'U_MENU_ICON' => $menu_icon, ! 'CURRENT' => $is_current ? '-current' : '', ); $template->assign_block_vars('catrow.modulerow', $menu_array); + $template->assign_block_vars('catrow.menurow', $menu_array); // For compatibility with 2.9.x+ if ($current_parent_page) { $template->assign_block_vars('modulerow', $menu_array); + $template->assign_block_vars('menurow', $menu_array); // For compatibility with 2.9.x+ } } |