|
From: Jon O. <jon...@us...> - 2008-03-14 19:25:06
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28448 Modified Files: mx_functions_style.php Log Message: Another fix, for block parameters Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** mx_functions_style.php 13 Mar 2008 20:50:56 -0000 1.66 --- mx_functions_style.php 14 Mar 2008 19:24:55 -0000 1.67 *************** *** 201,207 **** if (!empty($module_root_path)) { - $this->module_template_path = ''; $moduleDefault = !empty($mx_user->loaded_default_styles[$mx_block->module_root_path]) ? $mx_user->loaded_default_styles[$mx_block->module_root_path] : $mx_user->default_template_name; $fileSearch = array(); $fileSearch[] = $style_path; // First check current template --- 201,207 ---- if (!empty($module_root_path)) { $moduleDefault = !empty($mx_user->loaded_default_styles[$mx_block->module_root_path]) ? $mx_user->loaded_default_styles[$mx_block->module_root_path] : $mx_user->default_template_name; + $this->debug_paths .= '<br>Module'; $fileSearch = array(); $fileSearch[] = $style_path; // First check current template *************** *** 220,223 **** --- 220,224 ---- // Look at MX-Publisher-Root folder.........................................................................MX-Publisher-Root // + $this->debug_paths .= '<br>CORE'; $fileSearch = array(); $fileSearch[] = $style_path; // First check current template *************** *** 226,230 **** $fileSearch[] = './'; ! $temppath = $this->doFileSearch($fileSearch, $filename, $filename2, 'templates/'); if (!empty($this->module_template_path)) { --- 227,231 ---- $fileSearch[] = './'; ! $temppath = $this->doFileSearch($fileSearch, $filename, $filename2, 'templates/', $mx_root_path); if (!empty($this->module_template_path)) { *************** *** 235,238 **** --- 236,240 ---- // Look at Custom Root folder..............this is used my mx_mod installers too.......this does not use standard templates folders wich are set when the template was re-initialized and defined as custom var // + $this->debug_paths .= '<br>This'; $fileSearch = array(); $fileSearch[] = './'; *************** *** 241,245 **** $fileSearch[] = $mx_user->default_template_name; // Then check Default template ! $temppath = $this->doFileSearch($fileSearch, $filename, $filename2, $this->root); if (!empty($this->module_template_path)) { --- 243,247 ---- $fileSearch[] = $mx_user->default_template_name; // Then check Default template ! $temppath = $this->doFileSearch($fileSearch, $filename, $filename2, $this->root, $mx_root_path); if (!empty($this->module_template_path)) { *************** *** 257,260 **** --- 259,263 ---- case 'internal': case 'phpbb2': + $this->debug_paths .= '<br>phpbb2'; $fileSearch = array(); $fileSearch[] = $style_path; // First check current template *************** *** 274,277 **** --- 277,281 ---- // case 'phpbb3': + $this->debug_paths .= '<br>phpbb3'; $fileSearch = array(); $fileSearch[] = $style_path . '/' . 'theme'; // First check current template *************** *** 306,309 **** --- 310,314 ---- } + echo($this->debug_paths); die("Template->make_filename(): Error - file $filename does not exist. <br />Class-Root: $this->root <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"); } *************** *** 318,325 **** * @return unknown */ ! function doFileSearch($fileSearch, $filename, $filename2, $root, $module_root_path = '', $check_file2 = true) { - global $mx_root_path; - $this->module_template_path = ''; foreach ($fileSearch as $key => $path) --- 323,328 ---- * @return unknown */ ! function doFileSearch($fileSearch, $filename, $filename2, $root, $root_path = '', $check_file2 = true) { $this->module_template_path = ''; foreach ($fileSearch as $key => $path) *************** *** 327,341 **** if (!empty($path)) { ! if( file_exists($mx_root_path . $module_root_path . $root . $path . '/' . $filename) ) { ! $this->module_template_path = $mx_root_path . $root . $path . '/'; ! return $mx_root_path . $module_root_path . $root . $path . '/' . $filename; } if ($check_file2) { ! if( file_exists($mx_root_path . $module_root_path . $root . $path . '/' . $filename2) ) { ! $this->module_template_path = $mx_root_path . $root . $path . '/'; ! return $mx_root_path . $module_root_path . $root . $path . '/' . $filename2; } } --- 330,345 ---- if (!empty($path)) { ! $this->debug_paths .= '<br>' . $root_path . $root . $path . '/' . $filename; ! if( file_exists($root_path . $root . $path . '/' . $filename) ) { ! $this->module_template_path = $root . $path . '/'; ! return $root_path . $root . $path . '/' . $filename; } if ($check_file2) { ! if( file_exists($root_path . $root . $path . '/' . $filename2) ) { ! $this->module_template_path = $root . $path . '/'; ! return $root_path . $root . $path . '/' . $filename2; } } *************** *** 343,357 **** else if ($path == './') { ! if( file_exists($mx_root_path . $module_root_path . $root . $filename) ) { ! $this->module_template_path = $mx_root_path . $root; ! return $mx_root_path . $module_root_path . $root . $filename; } if ($check_file2) { ! if( file_exists($mx_root_path . $module_root_path . $root . $filename2) ) { ! $this->module_template_path = $mx_root_path . $root; ! return $mx_root_path . $module_root_path . $root . $filename2; } } --- 347,361 ---- else if ($path == './') { ! if( file_exists($root_path . $root . $filename) ) { ! $this->module_template_path = $root; ! return $root_path . $root . $filename; } if ($check_file2) { ! if( file_exists($root_path . $root . $filename2) ) { ! $this->module_template_path = $root; ! return $root_path . $root . $filename2; } } |