http://phpbb-tw.net/phpbb/viewtopic.php?t=2974
結果出現錯誤..
Parse error: parse error in /data/members/..(省略)
/phpbb2/includes/template.php(127) : eval()'d code on line 54
template.php (line 45-62)
[php]
// 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);
}
[/php]
如果不算註解跟空白行..
template.php (line 45-64)
[php]
if (!isset($this->compiled_code[$handle]) || empty($this->compiled_code[$handle]))
{
$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]);
}
eval($this->compiled_code[$handle]);
return true;
}
function assign_var_from_handle($varname, $handle)
{
if (!$this->loadfile($handle))
{
die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
}
$_str = "";
$code = $this->compile($this->uncompiled_code[$handle], true, '_str');
eval($code);
$this->assign_var($varname, $_str);
return true;
}
[/php]
請問是什麼問題呢 ~ ~"
PS.附上原文程式碼..
代碼: 選擇全部
#######################################################
##
## Hack Title: Hypercells for phpBB 2.0
## Hack Version: 1.0
## Author: Darkman (darkman@lexicon.net)
## Description: Taken from the Hypercells MOD from phpBB 1.X,
## I just made little adjustments to fit phpBB 2.0,
## full credit still goes to the originators from phpBB 1.X
## I just made some tweaking to make it work on phpBB 2.0
##
## Installation Level: Very Easy
## Installation Time: 5 Minutes or less
## Files To Edit: /templates/subSilver/index_body.tpl and viewforum_body.tpl
## Included Files: Nufin...
##
########################################################
#
# Please back up your files prior to modifying your phpBB.
#
#-----[ACTION: OPEN]------------------------------------------
#
/templates/subSilver/index_body.tpl
#
#-----[ ACTION: FIND]------------------------------------------
#
#
<td class="row1" width="100%" height="50">
#
#-----[ ACTION: REPLACE WITH]------------------------------------------
#
<td class="row1" width="100%" height="50" onMouseOver="this.style.backgroundColor='#cccccc'; this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#EFEFEF';" onclick="window.location.href='{catrow.forumrow.U_VIEWFORUM}'">
# NOTE: You can change the values for the color for the background, but to make it effective, make sure the OnMouseOut color is the same as the default table row color.
#
#-----[ ACTION: OPEN]------------------------------------------
#
/templates/subSilver/viewforum_body.tpl
#
#-----[ ACTION: FIND]------------------------------------------
#
<td class="row1" width="100%">
#
#-----[ ACTION: REPLACE WITH]------------------------------------------
#
<td class="row1" width="100%" onMouseOver="this.style.backgroundColor='#cccccc'; this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#EFEFEF';" onclick="window.location.href='{topicrow.U_VIEW_TOPIC}'">
# NOTE: You can change the values for the color for the background, but to make it effective, make sure the OnMouseOut color is the same as the default table row color.
#
#-----[ END OF MOD ]---------------------
#
EOF
http://phpbb-tw.net/phpbb/viewtopic.php ... light=TOP5
代碼: 選擇全部
#
#-----[ OPEN ]------------------------------------------
#
index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row1" width="100%" height="50">
#
#-----[ SUBSTITUTE ]------------------------------------------
#
<td class="row1" width="100%" height="50" onMouseOver="this.style.backgroundColor='#E8EFF7'; this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#F5F8FB';" onclick="window.location.href='{catrow.forumrow.U_VIEWFORUM}'">
PS:那個顏色可以自行修訂成適合自己版面的顏色
#
#-----[ OPEN ]------------------------------------------
#
viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td class="row1" width="100%">
#
#-----[ SUBSTITUTE ]------------------------------------------
#
<td class="row1" width="100%" onMouseOver="this.style.backgroundColor='#E8EFF7'; this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#F5F8FB';" onclick="window.location.href='{row.topicrow.U_VIEW_TOPIC}'">
PS:那個顏色可以自行修訂成適合自己版面的顏色
#
#-----[ END OF MOD ]---------------------
#
EOF

