|
From: Jon O. <jon...@us...> - 2007-07-21 23:07:19
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25016/admin Modified Files: admin_mx_page_cp.php admin_mx_portal.php Log Message: Index: admin_mx_portal.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_portal.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** admin_mx_portal.php 4 Jun 2007 21:14:01 -0000 1.32 --- admin_mx_portal.php 21 Jul 2007 23:07:14 -0000 1.33 *************** *** 89,93 **** $phpbb_rel_path = substr( "$phpbb_root_path", 3 ); ! $navigation_block_list = get_list_formatted('block_list', $portal_config['navigation_block'], 'navigation_block', 'mx_menu_nav.php'); $portal_version = $portal_config['portal_version']; --- 89,93 ---- $phpbb_rel_path = substr( "$phpbb_root_path", 3 ); ! $navigation_block_list = get_list_formatted('block_list', $portal_config['navigation_block'], 'navigation_block', 'mx_site_nav.php'); $portal_version = $portal_config['portal_version']; Index: admin_mx_page_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_cp.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** admin_mx_page_cp.php 9 Jul 2007 21:57:05 -0000 1.24 --- admin_mx_page_cp.php 21 Jul 2007 23:07:14 -0000 1.25 *************** *** 90,163 **** $cookie_tmp = $board_config['cookie_name'].'_admincp_pagestates'; $cookie_states = !empty($HTTP_COOKIE_VARS[$cookie_tmp]) ? explode(",", $HTTP_COOKIE_VARS[$cookie_tmp]) : array(); - $sort_cookie = !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_pagesort']) ? explode(",", $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_pagesort']) : array(); - - // - // Sorting options - // - if ( isset( $HTTP_POST_VARS['sort_method'] ) ) - { - switch ( $HTTP_POST_VARS['sort_method'] ) - { - case 'page_id': - $sort_method = 'page_id'; - break; - case 'page_name': - $sort_method = 'page_name'; - break; - case 'page_desc': - $sort_method = 'page_desc'; - break; - default: - $sort_method = !empty($sort_cookie[0]) ? $sort_cookie[0] : 'page_name'; - } - } - else - { - $sort_method = !empty($sort_cookie[0]) ? $sort_cookie[0] : 'page_name'; - } - - if ( isset( $HTTP_POST_VARS['sort_order'] ) ) - { - switch ( $HTTP_POST_VARS['sort_order'] ) - { - case 'ASC': - $sort_order = 'ASC'; - break; - case 'DESC': - $sort_order = 'DESC'; - break; - default: - $sort_order = !empty($sort_cookie[1]) ? $sort_cookie[1] : 'ASC'; - } - } - else - { - $sort_order = !empty($sort_cookie[1]) ? $sort_cookie[1] : 'ASC'; - } - - /* - if ( isset( $HTTP_POST_VARS['include_all'] ) ) - { - switch ( $HTTP_POST_VARS['include_all'] ) - { - case '0': - $include_all = '0'; - break; - case '1': - $include_all = '1'; - break; - default: - $include_all = isset($sort_cookie[2]) ? $sort_cookie[2] : '0'; - } - } - else - { - $include_all = isset($sort_cookie[2]) ? $sort_cookie[2] : '0'; - } - */ - $include_all = 0; - - $sort_cookie = array($sort_method, $sort_order, $include_all, isset($sort_cookie[3]) ? $sort_cookie[3] : intval($include_all), isset($sort_cookie[4]) ? $sort_cookie[4] : '', isset($sort_cookie[5]) ? $sort_cookie[5] : $include_all); - setcookie($board_config['cookie_name'] . '_pagesort', implode(',', $sort_cookie), time() + 10000000, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); // -------------------------------------------------------------------------------------------------------------------- --- 90,93 ---- *************** *** 249,252 **** --- 179,183 ---- 'L_PAGE_TITLE' => $lang['Page'], 'L_PAGE_DESC' => $lang['Page_desc'], + 'L_PAGE_PARENT' => $lang['Page_parent'], 'L_PAGE_ID' => empty($lang['Page_Id']) ? "Page Id" : $lang['Page_Id'], 'L_PAGE_ICON' => empty($lang['Page_icon']) ? "Page Icon" : $lang['Page_icon'], *************** *** 569,572 **** --- 500,516 ---- // Display list of Pages --------------------------------------------------------------- // --------------------------------------------------------------------------------------- + $mx_page->init($nav_page_id, true); + + if ( !$mx_page->page_rowset[$nav_page_id]['page_parent'] ) + { + $page_list .= '<option value="0" selected>' . $lang['None'] . '</option>\n'; + } + else + { + $page_list .= '<option value="0">' . $lang['None'] . '</option>\n'; + } + $page_list .= $mx_page->generate_jumpbox( 0, 0, array( $mx_page->page_rowset[$nav_page_id]['page_parent'] => 1 ) ); + + $select_page = $mx_page->generate_jumpbox( 0, 0, array( $nav_page_id => 1 ) ); // *************** *** 575,580 **** $sql = "SELECT * FROM " . PAGE_TABLE . " ! WHERE page_id = '" . $nav_page_id . "' ! ORDER BY " . $sort_method . " " . $sort_order; if( !($q_pages_current = $db->sql_query($sql)) ) --- 519,523 ---- $sql = "SELECT * FROM " . PAGE_TABLE . " ! WHERE page_id = '" . $nav_page_id . "'"; if( !($q_pages_current = $db->sql_query($sql)) ) *************** *** 596,601 **** $sql = "SELECT * FROM " . PAGE_TABLE . " ! WHERE page_id <> '" . $nav_page_id . "' ! ORDER BY " . $sort_method . " " . $sort_order; if( !($q_pages = $db->sql_query($sql)) ) --- 539,543 ---- $sql = "SELECT * FROM " . PAGE_TABLE . " ! WHERE page_id <> '" . $nav_page_id . "'"; if( !($q_pages = $db->sql_query($sql)) ) *************** *** 623,631 **** // - // Setup an additional var for the quick nav dropdown - // - $page_rows_select = array(); - - // // Pages loop // --- 565,568 ---- *************** *** 637,646 **** $is_current_page = $page_id == $nav_page_id; - if ($page_count > -1) - { - $page_rows_select_tmp = !empty($page_rows[$page_count]['page_desc']) ? ' (' . $page_rows[$page_count]['page_desc'] . ')' : ''; - $page_rows_select[$page_id] = $page_id . ' - ' . $page_rows[$page_count]['page_name'] . $page_rows_select_tmp; - } - if (!$include_all && $page_count > 0) { --- 574,577 ---- *************** *** 668,671 **** --- 599,603 ---- $page_title = !$new_page ? $page_rows[$page_count]['page_name'] : ''; $page_desc = !$new_page ? $page_rows[$page_count]['page_desc'] : ''; + $page_parent = !$new_page ? $page_rows[$page_count]['page_parent'] : ''; $page_icon = !$new_page ? $page_rows[$page_count]['page_icon'] : ''; $page_alt_icon = !$new_page ? $page_rows[$page_count]['page_alt_icon'] : ''; *************** *** 756,759 **** --- 688,692 ---- 'E_PAGE_TITLE' => $page_title, 'E_PAGE_DESC' => $page_desc, + 'E_PAGE_PARENT' => $page_list, 'S_PAGE_ICON' => $page_icon, 'S_PAGE_ALT_ICON' => $page_alt_icon, *************** *** 1135,1143 **** } - // - // Create quick nav box - // - $page_select_box = get_list_static('page_id', $page_rows_select, $nav_page_id, false); - $mode = MX_PAGE_BLOCK_TYPE; $action = MX_DO_INSERT; --- 1068,1071 ---- *************** *** 1151,1155 **** $template->assign_vars(array( ! 'PAGE_SELECT_BOX' => $page_select_box, 'RADIO_COLUMN_LIST' => $radio_column_list, 'S_HIDDEN_DYN_FIELDS' => $s_hidden_dyn_fields --- 1079,1083 ---- $template->assign_vars(array( ! 'PAGE_SELECT_BOX' => $select_page, 'RADIO_COLUMN_LIST' => $radio_column_list, 'S_HIDDEN_DYN_FIELDS' => $s_hidden_dyn_fields |