決定來發問一下...
我的作法是先將ezportal admin移除\r
也就是不再從資料庫裡讀取設定值\r
so...我會這樣做是...猜這樣會比較好改...
然後開啟Portal.php擷取上方設定值\r
移至includes/page_tail.php
代碼: 選擇全部
$CFG['poll_forum'] = '7';
移至includes/page_tail.php
代碼: 選擇全部
//
// Fetch Poll
//
$fetchpoll = phpbb_fetch_poll($CFG['poll_forum']);
if (!empty($fetchpoll))
{
$template->assign_vars(array(
'S_POLL_QUESTION' => $fetchpoll['vote_text'],
'S_POLL_ACTION' => append_sid('posting.'.$phpEx.'?'.POST_TOPIC_URL.'='.$fetchpoll['topic_id']),
'S_TOPIC_ID' => $fetchpoll['topic_id'],
'L_SUBMIT_VOTE' => $lang['Submit_vote'],
'L_LOGIN_TO_VOTE' => $lang['Login_to_vote']
)
);
for ($i = 0; $i < count($fetchpoll['options']); $i++)
{
$template->assign_block_vars('poll_option_row', array(
'OPTION_ID' => $fetchpoll['options'][$i]['vote_option_id'],
'OPTION_TEXT' => $fetchpoll['options'][$i]['vote_option_text'],
'VOTE_RESULT' => $fetchpoll['options'][$i]['vote_result'],
)
);
}
}
else
{
$template->assign_vars(array(
'S_POLL_QUESTION' => $lang['No_poll'],
'DISABLED' => 'disabled="disabled"'
)
);
}
但是幾乎每個位置都試過了!
而且我在Index.php照這個方法做!就成功了O_Q||...
現在都會出現下面的錯誤代碼,猜測是讀不到"投票版面"的設定值...
代碼: 選擇全部
Fatal error: Call to undefined function: phpbb_fetch_poll() in c:\appserv\www\forum\includes\page_tail.php on line 76

