|
From: OryNider <ory...@us...> - 2008-03-09 11:53:21
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15623 Modified Files: mx_functions_style.php Log Message: fix Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** mx_functions_style.php 9 Mar 2008 09:52:41 -0000 1.60 --- mx_functions_style.php 9 Mar 2008 11:51:55 -0000 1.61 *************** *** 1251,1254 **** --- 1251,1270 ---- $default_template_path = $module_root_path . $this->default_current_template_path; $template_name = $this->template_name; + + // + // If use default template with difrent modules config file name + // + if (!empty($this->module_cfg_name[$module_root_path])) + { + $module_cfg_info = "<br />Custom module config file: " . $this->module_cfg_name[$module_root_path]; + $default_cfg_file = $this->module_cfg_name[$module_root_path]; + + } + else + { + $module_cfg_info = "<br />Custom module config file: Not set"; + $default_cfg_file = false; + } + @include($mx_root_path . $module_root_path . $this->current_template_path . '/' . $this->template_name . '.cfg'); *************** *** 1261,1266 **** $current_template_path = $module_root_path . $this->cloned_current_template_path; $template_name = $this->cloned_template_name; ! @include($mx_root_path . $module_root_path . $this->cloned_current_template_path . '/' . $this->cloned_template_name . '.cfg'); } --- 1277,1283 ---- $current_template_path = $module_root_path . $this->cloned_current_template_path; $template_name = $this->cloned_template_name; + $default_cfg_file = ($default_cfg_file) ? $default_cfg_file : $this->cloned_template_name; ! @include($mx_root_path . $module_root_path . $this->cloned_current_template_path . '/' . $default_cfg_file . '.cfg'); } *************** *** 1272,1290 **** $current_template_path = $module_root_path . $this->default_current_template_path; $template_name = $this->default_template_name; ! @include($mx_root_path . $module_root_path . $this->default_current_template_path . '/' . $this->default_template_name . '.cfg'); } // ! // If use default template with difrent modules config file name // ! if ( (!$mx_template_config) && !empty($this->module_cfg_name[$module_root_path])) { ! $current_template_path = $module_root_path . $this->default_current_template_path; ! $template_name = $this->default_template_name; ! @include($module_root_path . $this->default_current_template_path . '/' . $this->module_cfg_name[$module_root_path] . '.cfg'); } ! // // We have no template to use - die --- 1289,1309 ---- $current_template_path = $module_root_path . $this->default_current_template_path; $template_name = $this->default_template_name; + $default_cfg_file = ($default_cfg_file) ? $default_cfg_file : $this->default_template_name; ! @include($mx_root_path . $module_root_path . $this->default_current_template_path . '/' . $default_cfg_file . '.cfg'); } // ! // If use default module template intead // ! if ( !$mx_template_config ) { ! $current_template_path = $module_root_path . $this->default_module_style; ! $template_name = $this->default_module_style; ! $default_cfg_file = ($default_cfg_file) ? $default_cfg_file : $this->default_module_style; ! @include($mx_root_path . $module_root_path . $this->default_module_style . '/' . $default_cfg_file . '.cfg'); } ! // // We have no template to use - die *************** *** 1292,1296 **** if ( !$mx_template_config ) { ! mx_message_die(CRITICAL_ERROR, "Could not open MX-Publisher " . $module_root_path . $this->default_current_template_path . " style config file", '', __LINE__, __FILE__); } --- 1311,1315 ---- if ( !$mx_template_config ) { ! mx_message_die(CRITICAL_ERROR, "Could not open " . $mx_root_path . $module_root_path . $this->cloned_current_template_path . '/' . $this->cloned_template_name . '.cfg' . " style config file or file can not be validated. <br /> Current style: $this->template_name <br />Cloned style: $this->cloned_template_name <br />Default style: $this->default_template_name <br />Custom module default style: $this->default_module_style $module_cfg_info", '', __LINE__, __FILE__); } |