Fatal error: Cannot redeclare class template in f:\appserv\www\gf-forum\includes\template.php on line 30
但使用系統管理員身分就不會出錯\r
junior_admin下載點
http://www.nivisec.com/downloads/phpbb/junior_admin.zip
junior_admin 外掛修改部分剪貼上都沒錯\r
另外小弟為了支援phpBB 2.0.15 修改了以下內容::
includes\template.php 之部分內容#
#-----[ OPEN ]------------------------------------------
#
login.php
#
#-----[ FIND ]------------------------------------------
#
if( !$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && ($userdata['user_level'] == ADMIN))
#
#-----[ REPLACE WITH ]------------------------------------------
#
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
$jr_admin_userdata = jr_admin_get_user_info($userdata['user_id']);
if( !$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && (!empty($jr_admin_userdata['user_jr_admin']) || $userdata['user_level'] == ADMIN)))
#
#-----[ OPEN ]------------------------------------------
#
admin/pagestart.php
#
#-----[ FIND ]------------------------------------------
#
redirect(append_sid("login.$phpEx?redirect=admin/&admin=1", true));
#
#-----[ REPLACE WITH ]------------------------------------------
#
redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx&admin=1", true));
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
class Template { ←第三十行
var $classname = "Template";
// variable that holds all the data we'll be substituting into
// the compiled templates.
// ...
// This will end up being a multi-dimensional array like this:
// $this->_tpldata[block.][iteration#][child.][iteration#][child2.][iteration#][variablename] == value
// if it's a root-level variable, it'll be like this:
// $this->_tpldata[.][0][varname] == value
var $_tpldata = array();
// Hash of filenames for each template handle.
var $files = array();
// Root template directory.
var $root = "";
// this will hash handle names to the compiled code for that handle.
var $compiled_code = array();
// This will hold the uncompiled code for that handle.
var $uncompiled_code = array();
/**
* Constructor. Simply sets the root dir.
*
*/
function Template($root = ".")
{
$this->set_rootdir($root);
}
