|
From: Jon O. <jon...@us...> - 2005-12-17 00:31:55
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14206/admin Modified Files: admin_mx_module.php admin_mx_module_cp.php admin_mx_page_cp.php Log Message: lots of updates, all covered in http://www.mx-system.com/forum/viewtopic.php?t=7945 Index: admin_mx_module_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_module_cp.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_mx_module_cp.php 11 Dec 2005 16:13:38 -0000 1.9 --- admin_mx_module_cp.php 17 Dec 2005 00:31:42 -0000 1.10 *************** *** 41,50 **** // - // Instatiate the $mx_dynamic_select class (dynamic block select javascript) - // - //$mx_dynamic_select = new mx_dynamic_select(); - //$mx_dynamic_select->generate(); - - // // Mode & Action setting // --- 41,44 ---- *************** *** 52,56 **** --- 46,52 ---- $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, ''); + // // Main module id, to load the adminCP blocks and parameter data + // $nav_module_id = $mx_request_vars->request('module_id', MX_TYPE_INT, ''); *************** *** 62,66 **** // ! // SUBMIT? // if( !empty($mode) && !empty($action) ) --- 58,62 ---- // ! // Update // if( !empty($mode) && !empty($action) ) *************** *** 168,172 **** // Start page proper // - $block_auth_fields = array('auth_view', 'auth_edit'); --- 164,167 ---- *************** *** 284,288 **** 'L_SHOW_STATS_EXPLAIN' => $lang['Show_stats_explain'], 'L_GROUPS' => $lang['Usergroups'], ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], // // Graphics --- 279,284 ---- 'L_SHOW_STATS_EXPLAIN' => $lang['Show_stats_explain'], 'L_GROUPS' => $lang['Usergroups'], ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], ! // // Graphics *************** *** 352,356 **** // Get current/active module // - $sql = "SELECT * FROM " . MODULE_TABLE . " --- 348,351 ---- *************** *** 372,376 **** // Get the rest modules // - $sql = "SELECT * FROM " . MODULE_TABLE . " --- 367,370 ---- *************** *** 571,575 **** // Function loop // - //$modulelist = mx_get_list('module_id', MODULE_TABLE, 'module_id', 'module_name', $module_id, true); for( $function_count = 0; $function_count < $total_functions + 1; $function_count++ ) { --- 565,568 ---- *************** *** 723,726 **** --- 716,723 ---- $parameter_function = !$new_parameter && !empty($parameter_function) ? ( $parameter_rows[$parameter_count]['parameter_type'] != 'Function' ? implode( "\n", unserialize( stripslashes( $parameter_function ) ) ) : $parameter_function ) : ''; + $parameter_auth = !$new_parameter ? $parameter_rows[$parameter_count]['parameter_auth'] : 0; + $parameter_auth_yes = ( $parameter_auth == 1 ) ? 'checked="checked"' : ''; + $parameter_auth_no = ( $parameter_auth == 0 ) ? 'checked="checked"' : ''; + $parameter_default = !$new_parameter ? $parameter_rows[$parameter_count]['parameter_default'] : ''; *************** *** 730,734 **** . '<br /><br />'; - // Replace htmlentites for < and > with actual character. //$row_color = ( !( $i % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !( $parameter_count % 2 ) ) ? 'row1' : 'row1'; --- 727,730 ---- *************** *** 772,775 **** --- 768,772 ---- 'L_PARAMETER_FUNCTION' => $lang['Parameter_function'], 'L_PARAMETER_FUNCTION_EXPLAIN' => $lang['Parameter_function_explain'], + 'L_PARAMETER_AUTH' => $lang['Parameter_auth'], "L_PARAMETER_TEXT" => $lang['Parameter_admin_explain'], 'L_PARAMETER_ID' => $lang['Parameter_id'], *************** *** 779,782 **** --- 776,781 ---- 'E_PARAMETER_TYPE' => $parameter_type, 'E_PARAMETER_FUNCTION' => $parameter_function, + 'E_PARAMETER_AUTH_YES' => $parameter_auth_yes, + 'E_PARAMETER_AUTH_NO' => $parameter_auth_no, 'E_PARAMETER_DEFAULT' => $parameter_default, *************** *** 798,802 **** // Now continue with the function blocks // - $sql = "SELECT blk.*, function_admin, fnc.function_name, fnc.function_id, fnc.function_desc, fnc.module_id FROM " . BLOCK_TABLE . " blk, --- 797,800 ---- *************** *** 1056,1061 **** $template->assign_block_vars('module.function.block.is_block.include_block_edit', array()); } - - } // for ... blocks } // for ... functions --- 1054,1057 ---- Index: admin_mx_page_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_cp.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** admin_mx_page_cp.php 11 Dec 2005 16:13:38 -0000 1.10 --- admin_mx_page_cp.php 17 Dec 2005 00:31:42 -0000 1.11 *************** *** 52,56 **** --- 52,58 ---- $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, ''); + // // Main page id, to load the adminCP + // $nav_page_id = $mx_request_vars->request('page_id', MX_TYPE_INT, ''); *************** *** 61,66 **** } ! setcookie($board_config['cookie_name'] . '_adminPage_page_id', $nav_page_id, time() + 10000000, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); ! if( !empty($mode) && !empty($action) ) { --- 63,69 ---- } ! // ! // Update ! // if( !empty($mode) && !empty($action) ) { *************** *** 89,92 **** --- 92,97 ---- } // if .. !empty($mode) + setcookie($board_config['cookie_name'] . '_adminPage_page_id', $nav_page_id, time() + 10000000, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); + // // Load states *************** *** 169,176 **** // -------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------- // // Start page proper // - $auth_fields = array('auth_view'); $auth_ary = array('auth_view' => AUTH_ALL); --- 174,181 ---- // -------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------- + // // Start page proper // $auth_fields = array('auth_view'); $auth_ary = array('auth_view' => AUTH_ALL); *************** *** 198,203 **** $admin_icon['edit_block'] = $page_nav_icon_url . 'icon_edit.gif'; - // $pagelist = get_list_formatted('page_list', $nav_page_id); - // // Send General Vars to template --- 203,206 ---- *************** *** 324,328 **** // Start Page Template // - $sql = "SELECT * FROM " . PAGE_TEMPLATES . " WHERE page_template_id <> 1 ORDER BY page_template_id"; --- 327,330 ---- *************** *** 453,457 **** } - // // Okay, let's build the index --- 455,458 ---- *************** *** 481,485 **** // Subpanel - column edit // - $column_title = $new_column ? '' : $column_rows[$column]['column_title']; $column_size = $new_column ? '100%' : $column_rows[$column]['column_size']; --- 482,485 ---- *************** *** 489,493 **** . '<br /><br />' . sprintf($lang['Click_page_template_column_delete_yes'], '<a href="' . append_sid("admin_mx_page_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; - $visible_column_edit = in_array('adminTemplateColumnEdit_' . $page_template_id . '_' . $column_template_id, $cookie_states); --- 489,492 ---- *************** *** 525,529 **** --- 524,530 ---- 'S_SUBMIT' => $new_column ? $lang['Create_column'] : $lang['Update'], + // // Quick Panels + // 'MESSAGE_DELETE' => $message_delete, *************** *** 538,542 **** --- 539,545 ---- // + // // Get the list of phpBB usergroups + // $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " *************** *** 563,567 **** // Get current/active module // - $sql = "SELECT * FROM " . PAGE_TABLE . " --- 566,569 ---- *************** *** 583,587 **** // Get the rest modules // - $sql = "SELECT * FROM " . PAGE_TABLE . " --- 585,588 ---- *************** *** 770,774 **** // Auth // - for( $j = 0; $j < count($auth_fields); $j++ ) { --- 771,774 ---- *************** *** 782,787 **** $custom_auth[$j] .= '</select> '; - // $custom_group_auth = mx_get_groups($page_group_auth_id); - $cell_title = $field_names[$auth_fields[$j]]; --- 782,785 ---- *************** *** 841,845 **** // PRIVATE Auth // - $view_groups = @explode(',', $page_rows[$page_count]['auth_view_group']); --- 839,842 ---- *************** *** 861,867 **** $input_private = '-'; } - - $template->assign_block_vars('pages.grouprow', array( 'GROUP_ID' => $group_id, --- 858,862 ---- *************** *** 873,877 **** --- 868,874 ---- } + // // Get blocklist for alternative add_block + // $blocklist = get_list_formatted('block_list', 0, 'block_id'); *************** *** 940,944 **** // Subpanel - column edit // - $column_title = $new_column ? '' : $column_rows[$column]['column_title']; $column_size = $new_column ? '100%' : $column_rows[$column]['column_size']; --- 937,940 ---- *************** *** 1017,1021 **** { $block_id = $block_rows[$block]['block_id']; ! $mx_block->init( $block_id ); $block_order = $block_rows[$block]['block_order']; --- 1013,1017 ---- { $block_id = $block_rows[$block]['block_id']; ! $mx_block->init( $block_id, true ); $block_order = $block_rows[$block]['block_order']; *************** *** 1092,1098 **** $template->assign_block_vars('pages.columnrow.is_columnrow', array()); - } - } // for ... column } --- 1088,1092 ---- *************** *** 1101,1105 **** // Create quick nav box // - $page_select_box = get_list_static('page_id', $page_rows_select, $nav_page_id, false); --- 1095,1098 ---- *************** *** 1120,1126 **** )); - include_once('./page_header_admin.' . $phpEx); $template->pparse('body'); include_once('./page_footer_admin.' . $phpEx); ?> \ No newline at end of file --- 1113,1119 ---- )); include_once('./page_header_admin.' . $phpEx); $template->pparse('body'); include_once('./page_footer_admin.' . $phpEx); + ?> \ No newline at end of file Index: admin_mx_module.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_module.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** admin_mx_module.php 22 Oct 2005 10:51:01 -0000 1.38 --- admin_mx_module.php 17 Dec 2005 00:31:42 -0000 1.39 *************** *** 51,55 **** --- 51,57 ---- $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, ''); + // // Main module id, to load the adminCP blocks and parameter data + // $nav_module_id = $mx_request_vars->request('module_id', MX_TYPE_INT, ''); *************** *** 60,70 **** } - // Load states - $cookie_tmp = $board_config['cookie_name'].'_admincp_blockstates'; - $cookie_states = !empty($HTTP_COOKIE_VARS[$cookie_tmp]) ? explode(",", $HTTP_COOKIE_VARS[$cookie_tmp]) : array(); - - $this_module_path = $mx_request_vars->request('this_module_path', MX_TYPE_NO_TAGS, ''); if( !empty($mode) && !empty($action) ) { --- 62,70 ---- } $this_module_path = $mx_request_vars->request('this_module_path', MX_TYPE_NO_TAGS, ''); + // + // Update + // if( !empty($mode) && !empty($action) ) { *************** *** 95,98 **** --- 95,104 ---- } // if .. !empty($mode) + // + // Load states + // + $cookie_tmp = $board_config['cookie_name'].'_admincp_blockstates'; + $cookie_states = !empty($HTTP_COOKIE_VARS[$cookie_tmp]) ? explode(",", $HTTP_COOKIE_VARS[$cookie_tmp]) : array(); + // -------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------- *************** *** 127,131 **** <input type="hidden" name="id" value="' . $module_id . '" /> <input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; - $result_message_height = $is_pak ? '300px' : '50px'; --- 133,136 ---- *************** *** 202,206 **** // Get current/active module // - $sql = "SELECT * FROM " . MODULE_TABLE . " --- 207,210 ---- *************** *** 222,226 **** // Get the rest modules // - $sql = "SELECT * FROM " . MODULE_TABLE . " --- 226,229 ---- *************** *** 298,304 **** } - //$pak_row = search_pak($module_rows[$module_count]['module_path']); - //$pak_list = get_list_static('file_select', $pak_row, ''); - $message_uninstall = $lang['Module_delete'] . '<br /><br />' . sprintf($lang['Click_module_delete_yes'], '<a href="' . append_sid("admin_mx_module.$phpEx" . $deletemode) . '">', '</a>') --- 301,304 ---- *************** *** 361,366 **** $template->assign_block_vars('module.settings', array()); } - - } --- 361,364 ---- *************** *** 368,372 **** // Create quick nav box // - $module_select_box = get_list_static('module_id', $module_rows_select, $nav_module_id, false); --- 366,369 ---- |