還原template.php檔案 再進行以下修改試試看
#
#-----[ OPEN 打開 ]------------------------------------------------
#
代碼: 選擇全部
includes/template.php
#
#-----[ FIND 尋找 ]------------------------------------------------
#
代碼: 選擇全部
}
/*
Functions that might be useful to style developers.
*/
#
#-----[ BEFORE ADD 之前, 加上 ]------------------------------------
#
代碼: 選擇全部
// Start add - Show usergroups MOD
function append_var_from_handle_to_block($blockname,$varname, $handle)
{
if (!$this->loadfile($handle))
{
die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
}
// Compile it, with the "no echo statements" option on.
$_str = "";
$code = $this->compile($this->uncompiled_code[$handle], true, '_str');
// evaluate the variable assignment.
eval($code);
// assign the value of the generated variable to the given varname.
$this->append_block_vars($blockname, array($varname => $_str));
return true;
}
function append_block_vars($blockname, $vararray)
{
if (strstr($blockname, '.'))
{
// Nested block.
$blocks = explode('.', $blockname);
$blockcount = sizeof($blocks) - 1;
$str = '$this->_tpldata';
for ($i = 0; $i <= $blockcount; $i++)
{
$str .= '[\'' . $blocks[$i] . '.\']';
eval('$lastiteration = sizeof(' . $str . ') - 1;');
$str .= '[' . $lastiteration . ']';
}
// Now we add the block that we're actually assigning to.
// We're adding a new iteration to this block with the given
// variable assignments.
$str .= '= array_merge('.$str.',$vararray);';
// Now we evaluate this assignment we've built up.
eval($str);
}
else
{
// Top-level block.
// Add a to existing block with the variable assignments
// we were given.
$current_iteration = sizeof($this->_tpldata[$blockname . '.'])-1;
$this->_tpldata[$blockname . '.'][$current_iteration] = array_merge($this->_tpldata[$blockname . '.'][$current_iteration],$vararray);
}
return true;
}
/**
* Flush a root level block, so it becomes empty.
*/
function flush_block_vars($blockname)
{
// Top-level block.
// flush a existing block we were given.
$current_iteration = sizeof($this->_tpldata[$blockname . '.'])-1;
unset($this->_tpldata[$blockname . '.']);
return true;
}
// End add - Show usergroups MOD
#
#-----[ SAVE/CLOSE ALL FILES 儲存/關閉所有檔案 ]-------------------
#
# EoM 外掛修正結束