|
From: Jon O. <jon...@us...> - 2008-02-16 20:15:36
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13274 Modified Files: Tag: core28x mx_functions_style.php Log Message: custom default style for modules (updated) Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.17.2.13 retrieving revision 1.17.2.14 diff -C2 -d -r1.17.2.13 -r1.17.2.14 *** mx_functions_style.php 16 Feb 2008 13:07:09 -0000 1.17.2.13 --- mx_functions_style.php 16 Feb 2008 20:15:31 -0000 1.17.2.14 *************** *** 77,80 **** --- 77,82 ---- { $this->module_template_path = ''; + $moduleDefault = !empty($mx_user->loaded_default_styles[$module_root_path]) ? $mx_user->loaded_default_styles[$module_root_path] : $mx_user->default_template_name; + if( file_exists($module_root_path . 'templates/' . $style_path . '/' . $filename) ) { *************** *** 93,103 **** $this->module_template_path = 'templates/' . $mx_user->cloned_template_name . '/'; } ! else if( file_exists($module_root_path . 'templates/' . $mx_user->default_template_name . '/' . $filename) ) { // // Then check default template // ! $filename = $module_root_path . 'templates/' . $mx_user->default_template_name . '/' . $filename; ! $this->module_template_path = 'templates/' . $mx_user->default_template_name . '/'; } else if( file_exists($module_root_path . 'templates/' . $filename) ) --- 95,105 ---- $this->module_template_path = 'templates/' . $mx_user->cloned_template_name . '/'; } ! else if( file_exists($module_root_path . 'templates/' . $moduleDefault . '/' . $filename) ) { // // Then check default template // ! $filename = $module_root_path . 'templates/' . $moduleDefault . '/' . $filename; ! $this->module_template_path = 'templates/' . $moduleDefault . '/'; } else if( file_exists($module_root_path . 'templates/' . $filename) ) *************** *** 231,238 **** --- 233,242 ---- var $loaded_langs = array(); var $loaded_styles = array(); + var $loaded_default_styles = array(); var $template_path = 'templates/'; var $template_name = '' ; + var $template_names = array(); var $current_template_path = ''; *************** *** 243,246 **** --- 247,252 ---- var $default_current_template_path = ''; + var $default_module_style = ''; + var $is_admin = false; var $page_id = ''; *************** *** 709,722 **** // - // Hack for modern modules, with non-subSilver default template - // - if (!empty($this->default_module_style) && $this->default_module_style != $this->default_template_name) - { - $this->default_current_template_path = 'templates/' . $this->default_module_style . '/'; - $this->default_template_name = $this->default_module_style; - $this->default_module_style = ''; - } - - // // Load mxBB Template configuration data // - First try current template --- 715,718 ---- *************** *** 845,848 **** --- 841,845 ---- $this->loaded_styles[$mx_block->module_root_path] = '1'; + $this->loaded_default_styles[$mx_block->module_root_path] = $this->default_module_style; } } *************** *** 937,949 **** if ($image_mode != MX_IMAGES_NONE) { $this->_load_module_style(); - } ! // ! // Reset custom module default style, once used. ! // ! $this->default_module_style = ''; } - } // class mx_user ?> \ No newline at end of file --- 934,959 ---- if ($image_mode != MX_IMAGES_NONE) { + // + // Hack for modern modules, with non-subSilver default template + // + if (!empty($this->default_module_style) && $this->default_module_style != $this->default_template_name) + { + $this->default_current_template_path = 'templates/' . $this->default_module_style . '/'; + $this->default_template_name = $this->default_module_style; + } + $this->_load_module_style(); ! // ! // Reset custom module default style, once used. ! // ! if (!empty($this->default_module_style)) ! { ! $this->default_current_template_path = ''; ! $this->default_template_name = 'subSilver'; ! $this->default_module_style = ''; ! } ! } } } // class mx_user ?> \ No newline at end of file |