|
From: Jon O. <jon...@us...> - 2007-08-27 15:10:34
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4049/includes Modified Files: Tag: core28x mx_functions_style.php Log Message: Solved issues reported in the BT is commited. And: - template get_file update, backported from 2.9.x - removed blockCP block select, if not admin Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** mx_functions_style.php 6 Aug 2007 22:40:07 -0000 1.17 --- mx_functions_style.php 26 Aug 2007 19:06:41 -0000 1.17.2.1 *************** *** 69,125 **** // ! // Look at mxBB-Module folder... // ! if( file_exists($module_root_path . 'templates/' . $style_path . $filename) ) ! { ! // ! // First check current template ! // ! $filename = $module_root_path . 'templates/' . $style_path . $filename; ! $this->module_template_path = 'templates/' . $style_path; ! } ! else if( file_exists($module_root_path . 'templates/subSilver/' . $filename) ) ! { ! // ! // Then check subSilver ! // ! $filename = $module_root_path . 'templates/subSilver/' . $filename; ! $this->module_template_path = 'templates/subSilver/'; ! } ! else if( file_exists($module_root_path . 'templates/' . $filename) ) { ! // ! // Finally check the tenmplate root (for compatibility with some old modules) ! // ! $filename = $module_root_path . 'templates/' . $filename; ! $this->module_template_path = 'templates/'; } // ! // Look at mxBB-Root folder... // ! else if( file_exists($mx_root_path . 'templates/' . $style_path . $filename) ) { // // First check current template // ! $filename = $mx_root_path . 'templates/' . $style_path . $filename; } ! else if( file_exists($mx_root_path . 'templates/subSilver/' . $filename) ) { // ! // Then check subSilver // ! $filename = $mx_root_path . 'templates/subSilver/' . $filename; } ! /* ! else if( file_exists($mx_root_path . 'templates/' . $filename) ) { // ! // Finally check the template root // ! $filename = $mx_root_path . 'templates/' . $filename; } - */ else if( file_exists( $this->root . '/' . $filename) ) { --- 69,140 ---- // ! // Look at mxBB-Module folder.........................................................................mxBB-module // ! if (!empty($module_root_path)) { ! $this->module_template_path = ''; ! if( file_exists($module_root_path . 'templates/' . $style_path . '/' . $filename) ) ! { ! // ! // First check current template ! // ! $filename = $module_root_path . 'templates/' . $style_path . '/' . $filename; ! $this->module_template_path = 'templates/' . $style_path . '/'; ! } ! else if( file_exists($module_root_path . 'templates/' . $mx_user->cloned_template_name . '/' . $filename) && !empty($mx_user->cloned_template_name)) ! { ! // ! // Then check Cloned template ! // ! $filename = $module_root_path . 'templates/' . $mx_user->cloned_template_name . '/' . $filename; ! $this->module_template_path = 'templates/' . $mx_user->cloned_template_name . '/'; ! } ! 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) ) ! { ! // ! // Finally check the template root (for compatibility with some old modules) ! // ! $filename = $module_root_path . 'templates/' . $filename; ! $this->module_template_path = 'templates/'; ! } ! ! if (!empty($this->module_template_path)) ! { ! return $filename; ! } } // ! // Look at mxBB-Root folder.........................................................................mxBB-Root // ! if( file_exists($mx_root_path . 'templates/' . $style_path . '/' . $filename) ) { // // First check current template // ! $filename = $mx_root_path . 'templates/' . $style_path . '/' . $filename; } ! else if( file_exists($mx_root_path . 'templates/' . $mx_user->cloned_template_name . '/' . $filename) && !empty($mx_user->cloned_template_name)) { // ! // Then check Cloned template // ! $filename = $mx_root_path . 'templates/' . $mx_user->cloned_template_name . '/' . $filename; } ! else if( file_exists($mx_root_path . 'templates/' . $mx_user->default_template_name . '/' . $filename) ) { // ! // Then check Cloned template // ! $filename = $mx_root_path . 'templates/' . $mx_user->default_template_name . '/' . $filename; } else if( file_exists( $this->root . '/' . $filename) ) { *************** *** 129,147 **** { // ! // Look at phpBB-Root folder... // ! if( file_exists($phpbb_root_path . 'templates/' . $style_path . $filename) ) { // // First check current template // ! $filename = $phpbb_root_path . 'templates/' . $style_path . $filename; } ! else if( file_exists($phpbb_root_path . 'templates/subSilver/' . $filename) ) { // ! // Then check subSilver // ! $filename = $phpbb_root_path . 'templates/subSilver/' . $filename; } else if( file_exists($phpbb_root_path . $this->root . '/' . $filename) ) --- 144,162 ---- { // ! // phpBB.........................................................................phpBB // ! if( file_exists($phpbb_root_path . 'templates/' . $style_path . '/' . $filename) ) { // // First check current template // ! $filename = $phpbb_root_path . 'templates/' . $style_path . '/' . $filename; } ! else if( file_exists($phpbb_root_path . 'templates/' . $mx_user->cloned_template_name . '/' . $filename) && !empty($mx_user->cloned_template_name)) { // ! // Then check Cloned // ! $filename = $phpbb_root_path . 'templates/' . $mx_user->cloned_template_name . '/' . $filename; } else if( file_exists($phpbb_root_path . $this->root . '/' . $filename) ) *************** *** 156,160 **** if( substr($filename, 0, 1) != '/' ) { ! $filename = ($rp_filename = phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename; } } --- 171,175 ---- if( substr($filename, 0, 1) != '/' ) { ! $filename = ($rp_filename = phpBB2::phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename; } } *************** *** 417,420 **** --- 432,441 ---- } + if (!$init_style) + { + $init_style = 1; + $init_override = 1; + } + // // Setup demo style *************** *** 681,684 **** --- 702,707 ---- $current_template_path = $module_root_path . $this->current_template_path; $cloned_template_path = $module_root_path . $this->cloned_current_template_path; + $default_template_path = $module_root_path . $this->default_current_template_path; + $template_name = $this->template_name; |