|
From: Markus P. <mar...@us...> - 2005-05-01 19:47:07
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28273 Modified Files: template.php Log Message: Revised template.php. It works on eXtreme Styles MOD ;-) Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/template.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** template.php 21 Mar 2005 22:10:25 -0000 1.11 --- template.php 1 May 2005 19:46:54 -0000 1.12 *************** *** 1,14 **** <?php /** ------------------------------------------------------------------------ ! * subject : mx-portal, CMS & portal * begin : june, 2002 ! * copyright : (C) 2002-2005 MX-System ! * email : jon...@ho... * project site : www.mx-system.com * * description : * ------------------------------------------------------------------------- - * copyright : (C) 2001 The phpBB Group - * email : su...@ph... * * $Id$ --- 1,11 ---- <?php /** ------------------------------------------------------------------------ ! * subject : mxBB-Portal, CMS & portal * begin : june, 2002 ! * copyright : (C) 2002-2005 mxBB-Portal * project site : www.mx-system.com * * description : * ------------------------------------------------------------------------- * * $Id$ *************** *** 35,39 **** * This is required. Reason is constructors have different method names. */ ! function mx_Template( $root = "." ) { parent::Template($root); --- 32,36 ---- * This is required. Reason is constructors have different method names. */ ! function mx_Template($root = '.') { parent::Template($root); *************** *** 47,108 **** * object. */ ! function make_filename( $filename ) { global $module_root_path, $mx_root_path, $phpbb_root_path, $theme; ! $style_path = $theme['template_name'] . '/'; ! ! // Look at MX-Module folder... ! ! if ( file_exists( $module_root_path . 'templates/' . $style_path . $filename ) ) { $filename = $module_root_path . 'templates/' . $style_path . $filename; } ! else if ( file_exists( $module_root_path . 'templates/subSilver/' . $filename ) ) { $filename = $module_root_path . 'templates/subSilver/' . $filename; } ! else if ( file_exists( $module_root_path . 'templates/' . $filename ) ) { $filename = $module_root_path . 'templates/' . $filename; ! } ! ! // Look at MX-Root folder... ! ! else if ( file_exists( $mx_root_path . 'templates/' . $style_path . $filename ) ) { $filename = $mx_root_path . 'templates/' . $style_path . $filename; } ! else if ( file_exists( $mx_root_path . 'templates/subSilver/' . $filename ) ) { $filename = $mx_root_path . 'templates/subSilver/' . $filename; } ! else if ( file_exists( $mx_root_path . 'templates/' . $filename ) ) { $filename = $mx_root_path . 'templates/' . $filename; } ! else if ( file_exists( $mx_root_path . $this->root . '/' . $filename ) ) { $filename = $mx_root_path . $this->root . '/' . $filename; ! } ! // Look at phpBB-Root folder... ! ! else if ( file_exists( $phpbb_root_path . 'templates/' . $style_path . $filename ) ) { $filename = $phpbb_root_path . 'templates/' . $style_path . $filename; } ! else if ( file_exists( $phpbb_root_path . 'templates/subSilver/' . $filename ) ) { $filename = $phpbb_root_path . 'templates/subSilver/' . $filename; } ! else if ( file_exists( $phpbb_root_path . $this->root . '/' . $filename ) ) { $filename = $phpbb_root_path . $this->root . '/' . $filename; } ! else if ( file_exists( $this->root . '/' . $filename ) ) ! { // Check if it's an absolute or relative path. ! if ( substr( $filename, 0, 1 ) != '/' ) { $filename = ($rp_filename = phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename; --- 44,108 ---- * object. */ ! function make_filename($filename) { global $module_root_path, $mx_root_path, $phpbb_root_path, $theme; ! $style_path = $theme['template_name'] . '/'; ! ! // ! // Look at mxBB-Module folder... ! // ! if( file_exists($module_root_path . 'templates/' . $style_path . $filename) ) { $filename = $module_root_path . 'templates/' . $style_path . $filename; } ! else if( file_exists($module_root_path . 'templates/subSilver/' . $filename) ) { $filename = $module_root_path . 'templates/subSilver/' . $filename; } ! else if( file_exists($module_root_path . 'templates/' . $filename) ) { $filename = $module_root_path . 'templates/' . $filename; ! } ! ! // ! // Look at mxBB-Root folder... ! // ! else if( file_exists($mx_root_path . 'templates/' . $style_path . $filename) ) { $filename = $mx_root_path . 'templates/' . $style_path . $filename; } ! else if( file_exists($mx_root_path . 'templates/subSilver/' . $filename) ) { $filename = $mx_root_path . 'templates/subSilver/' . $filename; } ! else if( file_exists($mx_root_path . 'templates/' . $filename) ) { $filename = $mx_root_path . 'templates/' . $filename; } ! else if( file_exists($mx_root_path . $this->root . '/' . $filename) ) { $filename = $mx_root_path . $this->root . '/' . $filename; ! } ! ! // // Look at phpBB-Root folder... ! // ! else if( file_exists($phpbb_root_path . 'templates/' . $style_path . $filename) ) { $filename = $phpbb_root_path . 'templates/' . $style_path . $filename; } ! else if( file_exists($phpbb_root_path . 'templates/subSilver/' . $filename) ) { $filename = $phpbb_root_path . 'templates/subSilver/' . $filename; } ! else if( file_exists($phpbb_root_path . $this->root . '/' . $filename) ) { $filename = $phpbb_root_path . $this->root . '/' . $filename; } ! else if( file_exists($this->root . '/' . $filename) ) ! { // Check if it's an absolute or relative path. ! if( substr($filename, 0, 1) != '/' ) { $filename = ($rp_filename = phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename; *************** *** 110,116 **** } ! if ( !file_exists( $filename ) ) { ! die( "Template->make_filename(): Error - file $filename does not exist." ); } --- 110,116 ---- } ! if( !file_exists($filename) ) { ! die("Template->make_filename(): Error - file $filename does not exist."); } |