版本: 2.0.8
主機: xdhost.com
問題外掛: show user group
使用版本:2.0.8
網站位置:czforum.net
問題網址: http://czforum.net/phpbb/viewtopic.php?t=10
狀況描述:
我不知為甚麼會這樣\r
show user group 可能一些檔案出錯了
在VIEWTOPIC.PHP
這append_block_vars()的SCRIPT 應該是SHOW USER GROUP
Fatal error: Call to undefined function: append_block_vars() in /home1/czforum/public_html/phpbb/viewtopic.php on line 1305
不知裝甚麼MOD時,可能把一些SCRIPT洗掉
[問題]show user group 可能一些檔案出錯了
版主: 版主管理群
您先前裝過甚麼外掛?
請依發問格式問~ 不然很難解決你的問題唷~
請依發問格式問~ 不然很難解決你的問題唷~
最後由 kevinyung 於 2004-06-17 18:09 編輯,總共編輯了 2 次。
i-Piggy.com feeds you with the latest tech news and detailed tutorials
20 個步驟安裝 phpBB 3 (以 987mb.com 所提供的免費空間作示範)
kevinyung 在 侏羅紀時代 作了第 1 次修改
20 個步驟安裝 phpBB 3 (以 987mb.com 所提供的免費空間作示範)
kevinyung 在 侏羅紀時代 作了第 1 次修改
意思是叫出了找不到的功能: flush_block_vars()
這類 functions 都是在 includes 的 function 檔案中或寫在外掛的附加檔案中\r
不知道你下載的 Show user groups 是不是最新的
http://mods.db9.dk/viewforum.php?f=6
我想新版的 Show user groups 在 includes/template.php 中有修正喔
我建議你下載最新版的來用吧\r
~Mac
這類 functions 都是在 includes 的 function 檔案中或寫在外掛的附加檔案中\r
不知道你下載的 Show user groups 是不是最新的
http://mods.db9.dk/viewforum.php?f=6
我想新版的 Show user groups 在 includes/template.php 中有修正喔
代碼: 選擇全部
#
#-----[ OPEN ]------------------------------------------------
#
includes/template.php
#
#-----[ FIND ]------------------------------------------------
#
}
?>
#
#-----[ 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~Mac

