phpbb2.0.7
安裝show user group1.3.5em後,發表文章後進去查看內容時顥示頁面\r
代碼: 選擇全部
Fatal error: Call to undefined function: flush_block_vars() in c:\appserv\www\forum\includes\functions_usergroup.php on line 44 請問怎樣解决呢?(己爬文很久,找不到答案)
版主: 版主管理群

代碼: 選擇全部
Fatal error: Call to undefined function: flush_block_vars() in c:\appserv\www\forum\includes\functions_usergroup.php on line 44 代碼: 選擇全部
includes/template.php代碼: 選擇全部
}
/*
Functions that might be useful to style developers.
*/代碼: 選擇全部
// 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