|
From: Jon O. <jon...@us...> - 2008-02-23 19:38:28
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv939/includes Modified Files: Tag: core28x mx_functions_core.php mx_functions_phpbb.php mx_functions_style.php Log Message: Custom module default style update for panel parameters blockCP stays in current page Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.52.2.9 retrieving revision 1.52.2.10 diff -C2 -d -r1.52.2.9 -r1.52.2.10 *** mx_functions_core.php 22 Feb 2008 23:23:48 -0000 1.52.2.9 --- mx_functions_core.php 23 Feb 2008 19:38:24 -0000 1.52.2.10 *************** *** 1961,1965 **** function load_block_parameters( $block_id = false ) { ! global $mx_root_path, $template, $blockcptemplate, $board_config, $theme, $userdata; $return = false; --- 1961,1965 ---- function load_block_parameters( $block_id = false ) { ! global $mx_root_path, $module_root_path, $template, $blockcptemplate, $board_config, $theme, $userdata; $return = false; *************** *** 1977,1981 **** ob_start(); $this->is_panel = false; ! $template = new mx_Template($mx_root_path . $this->module_root_path . 'templates/subSilver', $board_config); switch ( $parameter_data['parameter_type'] ) --- 1977,1981 ---- ob_start(); $this->is_panel = false; ! $template = new mx_Template($mx_root_path . $this->module_root_path); switch ( $parameter_data['parameter_type'] ) *************** *** 2020,2024 **** --- 2020,2026 ---- break; default: + $module_root_path = $mx_root_path . $this->module_root_path; $this->is_panel = $this->_get_custom_module_parameters($parameter_data, $block_id); + $module_root_path = ''; break; } Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.17.2.17 retrieving revision 1.17.2.18 diff -C2 -d -r1.17.2.17 -r1.17.2.18 *** mx_functions_style.php 17 Feb 2008 22:11:17 -0000 1.17.2.17 --- mx_functions_style.php 23 Feb 2008 19:38:24 -0000 1.17.2.18 *************** *** 135,139 **** { // ! // Then check Cloned template // $filename = $mx_root_path . 'templates/' . $mx_user->default_template_name . '/' . $filename; --- 135,139 ---- { // ! // Then check Default template // $filename = $mx_root_path . 'templates/' . $mx_user->default_template_name . '/' . $filename; *************** *** 186,190 **** if( !file_exists($filename) ) { ! die(var_export($mx_user->loaded_default_styles) . "Template->make_filename(): Error - file $filename does not exist. <br />Module: $module_root_path <br />Current style: $style_path <br />Cloned style: $mx_user->cloned_template_name <br />Default style: $mx_user->default_template_name <br />Custom module default style: $moduleDefault"); } } --- 186,190 ---- if( !file_exists($filename) ) { ! die("Template->make_filename(): Error - file $filename does not exist. <br />Module: $module_root_path <br />Current style: $style_path <br />Cloned style: $mx_user->cloned_template_name <br />Default style: $mx_user->default_template_name <br />Custom module default style: $moduleDefault"); } } *************** *** 918,921 **** --- 918,923 ---- function extend($lang_mode = MX_LANG_MAIN, $image_mode = MX_IMAGES) { + global $mx_block; + if (defined('IN_ADMIN')) { *************** *** 923,926 **** --- 925,935 ---- } + if (!empty($this->loaded_default_styles[$mx_block->module_root_path])) + { + $this->default_module_style = $this->loaded_default_styles[$mx_block->module_root_path]; + $this->default_template_name = $this->default_module_style; + $this->default_current_template_path = 'templates/' . $this->default_template_name; + } + if ($lang_mode != MX_LANG_NONE) { *************** *** 948,962 **** global $mx_block; ! if (!empty($default_module_style)) ! { ! $this->default_module_style = $default_module_style; ! $this->default_template_name = $this->default_module_style; ! $this->default_current_template_path = 'templates/' . $this->default_template_name; ! } ! ! if (!defined('IN_ADMIN')) ! { ! $this->loaded_default_styles[$mx_block->module_root_path] = $this->default_module_style; ! } } } // class mx_user --- 957,961 ---- global $mx_block; ! $this->loaded_default_styles[$mx_block->module_root_path] = $default_module_style; } } // class mx_user Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.32.2.14 retrieving revision 1.32.2.15 diff -C2 -d -r1.32.2.14 -r1.32.2.15 *** mx_functions_phpbb.php 17 Feb 2008 20:17:44 -0000 1.32.2.14 --- mx_functions_phpbb.php 23 Feb 2008 19:38:24 -0000 1.32.2.15 *************** *** 237,241 **** } ! if ( empty($page_id) ) { $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); --- 237,245 ---- } ! if ( empty($page_id) && $mx_request_vars->is_request('portalpage') ) ! { ! $page_id = $mx_request_vars->request('portalpage', MX_TYPE_INT, 1); ! } ! else if ( empty($page_id) ) { $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); |