[問題]show user group 1.3.5em

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
頭像
totoromehk
星球公民
星球公民
文章: 47
註冊時間: 2003-12-28 21:15
來自: 天神村
聯繫:

[問題]show user group 1.3.5em

文章 totoromehk »

http://totoromehk.no-ip.com/forum/index.php
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 

請問怎樣解决呢?(己爬文很久,找不到答案)
圖檔
天霜
竹貓忠實會員
竹貓忠實會員
文章: 882
註冊時間: 2003-04-15 19:40
來自: 星之鄉學園
聯繫:

文章 天霜 »

還原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 外掛修正結束
不回答來自 私人訊息, 電子郵件, 及時通 的相關 phpBB 問題
除非是個人疏失所造成的問題

這世界還有拼命守護的價值嗎...
頭像
totoromehk
星球公民
星球公民
文章: 47
註冊時間: 2003-12-28 21:15
來自: 天神村
聯繫:

文章 totoromehk »

成功了,謝謝天霜大哥 :lol:
圖檔
主題已鎖定

回到「外掛問題討論」