第 1 頁 (共 2 頁)
[問題] 關於子版面外掛PART.2
發表於 : 2005-07-17 15:58
由 JEROMYWANG
請問一下喔我都按照著個網址全部用好了
http://phpbb-tw.net/phpbb/viewtopic.php ... %AD%B1V1.1
我也沒安裝任何外掛
但是我安裝好子分版面卻跑出這樣的東ㄒ
代碼: 選擇全部
Fatal error: Call to a member function on a non-object in c:\appserv\www\phpbb2\includes\functions.php on line 250
請問一下這是怎麼一回是ㄋ?
發表於 : 2005-07-18 03:28
由 starless
請你把那幾行附近的POST出來~
否則也不知道該怎麼檢視問題
發表於 : 2005-07-18 12:43
由 JEROMYWANG
沒問題
一共是上下十行
請過目!
代碼: 選擇全部
{
global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID;
\n// $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f
WHERE f.cat_id = c.cat_id
GROUP BY c.cat_id, c.cat_title, c.cat_order
ORDER BY c.cat_order";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain category list.", "", __LINE__, __FILE__, $sql);
}
$category_rows = array();
while ( $row = $db->sql_fetchrow($result) )
{
$category_rows[] = $row;
}
260為空白....謝謝
發表於 : 2005-07-18 19:31
由 心靈捕手
JEROMYWANG 寫:沒問題
一共是上下十行
請過目!
代碼: 選擇全部
{
global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID;
// $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f
WHERE f.cat_id = c.cat_id
GROUP BY c.cat_id, c.cat_title, c.cat_order
ORDER BY c.cat_order";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't obtain category list.", "", __LINE__, __FILE__, $sql);
}
$category_rows = array();
while ( $row = $db->sql_fetchrow($result) )
{
$category_rows[] = $row;
}
260為空白....謝謝
看您貼出的程式碼, 就可以斷定您修改 includes\functions.php 時, "
取代" 不完全.
建議您:
參考下列文章做修正, 即可!
http://phpbb-tw.net/phpbb/viewtopic.php?p=200575#200575
http://phpbb-tw.net/phpbb/viewtopic.php?p=192150#192150
ps. 此外掛並沒有分部( PART.1, PART.2),
您又何必要將同一個安裝外掛的問題, 分成兩個部份呢?

發表於 : 2005-07-18 21:09
由 JEROMYWANG
抱歉...心靈大大 你給我的這兩篇網址我都依依看過了
http://phpbb-tw.net/phpbb/viewtopic.php?p=200575#200575
http://phpbb-tw.net/phpbb/viewtopic.php?p=192150#192150
也把我的function該修改的都修改過一便了
但是怎麼還跑出這個勒......這的好點點點喔....
代碼: 選擇全部
Fatal error: Cannot redeclare sub_search() (previously declared in c:\appserv\www\phpbb2\includes\functions.php:227) in c:\appserv\www\phpbb2\includes\functions.php on line 238
我知道是function.php的修改錯誤 , 所以關於 238 上下行數我列在下面\r
一共是上下各十行 請再過目一變.....又麻煩您了
代碼: 選擇全部
{
if ( count($forum_sub[$id]) > 0 )
{
$list= implode(' ', $forum_sub[$id]);
$list.=sub_search($forum_sub2[$id],$forum_sub,$forum_sub2);
}
return $list;
}
//forum_sub end
\nfunction sub_search($id,$forum_sub,$forum_sub2)
{
if ( count($forum_sub[$id]) > 0 )
{
$list="";
for($jj=0;$jj<count($forum_sub[$id]);$jj++)
{
$list.= $forum_sub[$id][$jj];
$list.=sub_search($forum_sub2[$id][$jj],$forum_sub,$forum_sub2);
}
}
*我都把您給我的網址都爬過了 並沒有講到行數238的問題
麻煩心靈大幫忙解答一下。。。謝謝。。。
則關於PART1。PART2
那是因為我怕PART1回覆的太多了 別人看不到我的新問題。。
所以我才列出PART2 對不起! 我下次會改進 謝謝!!
發表於 : 2005-07-18 21:20
由 心靈捕手
JEROMYWANG 寫:抱歉...心靈大大 你給我的這兩篇網址我都依依看過了
http://phpbb-tw.net/phpbb/viewtopic.php?p=200575#200575
http://phpbb-tw.net/phpbb/viewtopic.php?p=192150#192150
也把我的function該修改的都修改過一便了
但是怎麼還跑出這個勒......這的好點點點喔....
代碼: 選擇全部
Fatal error: Cannot redeclare sub_search() (previously declared in c:\appserv\www\phpbb2\includes\functions.php:227) in c:\appserv\www\phpbb2\includes\functions.php on line 238
我知道是function.php的修改錯誤 , 所以關於 238 上下行數我列在下面\r
一共是上下各十行 請再過目一變.....又麻煩您了
代碼: 選擇全部
{
if ( count($forum_sub[$id]) > 0 )
{
$list= implode(' ', $forum_sub[$id]);
$list.=sub_search($forum_sub2[$id],$forum_sub,$forum_sub2);
}
return $list;
}
//forum_sub end
function sub_search($id,$forum_sub,$forum_sub2)
{
if ( count($forum_sub[$id]) > 0 )
{
$list="";
for($jj=0;$jj<count($forum_sub[$id]);$jj++)
{
$list.= $forum_sub[$id][$jj];
$list.=sub_search($forum_sub2[$id][$jj],$forum_sub,$forum_sub2);
}
}
*我都把您給我的網址都爬過了 並沒有講到行數238的問題
麻煩心靈大幫忙解答一下。。。謝謝。。。
則關於PART1。PART2
那是因為我怕PART1回覆的太多了 別人看不到我的新問題。。
所以我才列出PART2 對不起! 我下次會改進 謝謝!!
看來, 這個檔案( includes\functions.php) 已經被您改的" 面目全非" 了.
建議您:
先以( phpbb 2.0.16) 原始檔案覆蓋回去後, 再重新針對此外掛做修改, 應該比較能夠一勞永逸.
發表於 : 2005-07-18 21:38
由 JEROMYWANG
發表於 : 2005-07-18 22:02
由 心靈捕手
您這張圖所顯示的位置並非是在" 首頁"( index_body.tpl), 而是在" 版面頁"( viewforum_body.tpl)
建議您:
檢視 templates/YOUR_THEME/viewforum_body.tpl 的修改, 是否有誤?
--
另外,
如果您要知道如何使用"
子版面" 的話, 那麼建議您先" 爬文", 搜尋相關討論主題, 即可略知ㄧ二.
--
最後,
建議您:
參考" 教學文件庫" 的文章,
想辦法讓別人可以連結到您的論壇吧!
否則的話, 那您根本就是" 孤芳自賞" 而已!
發表於 : 2005-07-18 22:20
由 JEROMYWANG
心靈大大
謝謝您的提點
而關於子版面我已經會使用了
關於放到網路上的事..我一定會想辦法把它用上去的
真的很謝謝你^^
發表於 : 2005-07-18 22:50
由 JEROMYWANG
心靈大 我有再檢視一變viewfourm
我甚至再照的原本網址再從新修改一次\r
看一下喔!
代碼: 選擇全部
打?#125; viewforum_body.tpl
找到=======================================
-> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
取代為=====================================
{FORUM_PATH}
找到=======================================
<table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
<tr>
<th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap"> {L_TOPICS} </th>
<th width="50" align="center" class="thTop" nowrap="nowrap"> {L_REPLIES} </th>
<th width="100" align="center" class="thTop" nowrap="nowrap"> {L_AUTHOR} </th>
<th width="50" align="center" class="thTop" nowrap="nowrap"> {L_VIEWS} </th>
<th width="190" align="center" class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
</tr>
前面?#91;上=====================================
<!-- BEGIN sub_forum -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_TOPICS} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_POSTS} </th>
<th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
</tr>
<!-- BEGIN forumrow -->
<tr>
<td class="row1" align="center" valign="middle" height="50"><img src="{sub_forum.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{sub_forum.forumrow.L_FORUM_FOLDER_ALT}" title="{sub_forum.forumrow.L_FORUM_FOLDER_ALT}" /></td>
<td class="row1" width="70%" height="50"><span class="forumlink"> <a href="{sub_forum.forumrow.U_VIEWFORUM}" class="forumlink">{sub_forum.forumrow.FORUM_NAME}</a><br />
</span> <span class="genmed">{sub_forum.forumrow.FORUM_DESC}<br />{sub_forum.forumrow.FORUM_NAME_SUB}<br />
</span><span class="gensmall">{sub_forum.forumrow.L_MODERATOR} {sub_forum.forumrow.MODERATORS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{sub_forum.forumrow.TOPICS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{sub_forum.forumrow.POSTS}</span></td>
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{sub_forum.forumrow.LAST_POST}</span></td>
</tr>
<!-- END forumrow -->
</table>
<!-- END sub_forum -->
可是為什麼還是這樣勒??

發表於 : 2005-07-18 23:27
由 心靈捕手
To JEROMYWANG:
照理說, 此部分的修改, 應該不會造成這種現象.
建議您:
1. 同樣是用( phpbb 2.0.16) 原始檔案覆蓋回去, 再針對此外掛做一次修改;
2. 還是有困難的話, 請貼出您修改後的 viewforum_body.tpl
我再幫您檢查看看有何異狀?
發表於 : 2005-07-18 23:32
由 JEROMYWANG
代碼: 選擇全部
<form method="post" action="{S_POST_DAYS_ACTION}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><br /><span class="gensmall"><b>{L_MODERATOR}: {MODERATORS}<br /><br />{LOGGED_IN_USER_LIST}</b></span></td>
<td align="right" valign="bottom" nowrap="nowrap"><span class="gensmall"><b>{PAGINATION}</b></span></td>
</tr>
<tr>
<td align="left" valign="middle" width="50"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" /></a></td>
<td align="left" valign="middle" class="nav" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> {FORUM_PATH}</span></td>
<td align="right" valign="bottom" class="nav" nowrap="nowrap"><span class="gensmall"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a></span></td>
</tr>
</table>
<!-- BEGIN sub_forum -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_TOPICS} </th>
<th width="50" class="thTop" nowrap="nowrap"> {L_POSTS} </th>
<th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
</tr>
<!-- BEGIN forumrow -->
<tr>
<td class="row1" align="center" valign="middle" height="50"><img src="{sub_forum.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{sub_forum.forumrow.L_FORUM_FOLDER_ALT}" title="{sub_forum.forumrow.L_FORUM_FOLDER_ALT}" /></td>
<td class="row1" width="70%" height="50"><span class="forumlink"> <a href="{sub_forum.forumrow.U_VIEWFORUM}" class="forumlink">{sub_forum.forumrow.FORUM_NAME}</a><br />
</span> <span class="genmed">{sub_forum.forumrow.FORUM_DESC}<br />{sub_forum.forumrow.FORUM_NAME_SUB}<br />
</span><span class="gensmall">{sub_forum.forumrow.L_MODERATOR} {sub_forum.forumrow.MODERATORS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{sub_forum.forumrow.TOPICS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{sub_forum.forumrow.POSTS}</span></td>
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{sub_forum.forumrow.LAST_POST}</span></td>
</tr>
<!-- END forumrow -->
</table>
<!-- END sub_forum --><table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
<tr>
<th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap"> {L_TOPICS} </th>
<th width="50" align="center" class="thTop" nowrap="nowrap"> {L_REPLIES} </th>
<th width="100" align="center" class="thTop" nowrap="nowrap"> {L_AUTHOR} </th>
<th width="50" align="center" class="thTop" nowrap="nowrap"> {L_VIEWS} </th>
<th align="center" class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
</tr>
<!-- BEGIN topicrow -->
<tr>
<td class="row1" align="center" valign="middle" width="20"><img src="{topicrow.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{topicrow.L_TOPIC_FOLDER_ALT}" title="{topicrow.L_TOPIC_FOLDER_ALT}" /></td>
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />
{topicrow.GOTO_PAGE}</span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td>
<td class="row3" align="center" valign="middle"><span class="name">{topicrow.TOPIC_AUTHOR}</span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td>
<td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</span></td>
</tr>
<!-- END topicrow -->
<!-- BEGIN switch_no_topics -->
<tr>
<td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td>
</tr>
<!-- END switch_no_topics -->
<tr>
<td class="catBottom" align="center" valign="middle" colspan="6" height="28"><span class="genmed">{L_DISPLAY_TOPICS}: {S_SELECT_TOPIC_DAYS}
<input type="submit" class="liteoption" value="{L_GO}" name="submit" />
</span></td>
</tr>
</table>
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="left" valign="middle" width="50"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" /></a></td>
<td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td>
<td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span>
</td>
</tr>
<tr>
<td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right">{JUMPBOX}</td>
</tr>
</table>
<table width="100%" cellspacing="0" border="0" align="center" cellpadding="0">
<tr>
<td align="left" valign="top"><table cellspacing="3" cellpadding="0" border="0">
<tr>
<td width="20" align="left"><img src="{FOLDER_NEW_IMG}" alt="{L_NEW_POSTS}" width="19" height="18" /></td>
<td class="gensmall">{L_NEW_POSTS}</td>
<td> </td>
<td width="20" align="center"><img src="{FOLDER_IMG}" alt="{L_NO_NEW_POSTS}" width="19" height="18" /></td>
<td class="gensmall">{L_NO_NEW_POSTS}</td>
<td> </td>
<td width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ANNOUNCEMENT}" width="19" height="18" /></td>
<td class="gensmall">{L_ANNOUNCEMENT}</td>
</tr>
<tr>
<td width="20" align="center"><img src="{FOLDER_HOT_NEW_IMG}" alt="{L_NEW_POSTS_HOT}" width="19" height="18" /></td>
<td class="gensmall">{L_NEW_POSTS_HOT}</td>
<td> </td>
<td width="20" align="center"><img src="{FOLDER_HOT_IMG}" alt="{L_NO_NEW_POSTS_HOT}" width="19" height="18" /></td>
<td class="gensmall">{L_NO_NEW_POSTS_HOT}</td>
<td> </td>
<td width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_STICKY}" width="19" height="18" /></td>
<td class="gensmall">{L_STICKY}</td>
</tr>
<tr>
<td class="gensmall"><img src="{FOLDER_LOCKED_NEW_IMG}" alt="{L_NEW_POSTS_LOCKED}" width="19" height="18" /></td>
<td class="gensmall">{L_NEW_POSTS_LOCKED}</td>
<td> </td>
<td class="gensmall"><img src="{FOLDER_LOCKED_IMG}" alt="{L_NO_NEW_POSTS_LOCKED}" width="19" height="18" /></td>
<td class="gensmall">{L_NO_NEW_POSTS_LOCKED}</td>
</tr>
</table></td>
<td align="right"><span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
</table>
心靈大 這是我viewfourm修改過後的目錄
請過目 ! 謝謝!
發表於 : 2005-07-18 23:41
由 心靈捕手
To JEROMYWANG:
建議您做以下的修改, 試試看:
#
#-----[ Find ]-----
#
<!-- END sub_forum --><table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
#
#-----[ Replace With ]-----
#
<!-- END sub_forum -->
<table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
發表於 : 2005-07-18 23:46
由 JEROMYWANG
感謝心靈大大~
已經可以了 謝謝!!!
真是感謝妳嚕!!!!
(接下來要學著如何不要孤芳自賞︿︿)
發表於 : 2005-07-19 23:44
由 JEROMYWANG
對不起~又麻煩您了心靈大\r
這次的問題出在關於文章數 還有發表文章時的"主題"
請問大大喔 架設是這樣ㄉ
我有A。B兩個版面A版就是首頁面則B版面ㄋ就是我的子版面\r
我現在B版面發不的文章 為什麼不能一起算再A版面ㄋ就變成這樣\r
A發布
50篇
B發布
50篇
但是跑到A版面顯示的總文章數還是
50偏不是
100篇
這是未什麼ㄋ?
我有看過這篇
http://www.phpbb-tw.net/phpbb/viewtopic ... %C6#201690
但是他是在做進一步都修改而不是像我這種單純修改請問心靈大您有辦法幫我指點迷津嗎??
還有第二個問題就是 我要發佈文章為什麼沒有向竹貓這樣可以有旁邊那種可以選擇主題類型的選項ㄋ??可以麻煩跟我說一下這要怎麼用ㄋ???
===================================
問題外掛:子面板V1.1文章總數 和下拉式主題類型選單
參考連結:
http://www.phpbb-tw.net/phpbb/viewtopic ... %C6#201690
使用版本:phpbb2.0.16
網站位置:windows底下
狀況描述:
如上~~~~~~~~~~~~~~~~!!!!!!!
補充:
除了子面板其他沒有