[問題] 簡易子版面+iCGstation風格的安裝問題 (已解決,thanks)

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

版主: 版主管理群

主題已鎖定
starbucks
星球普通子民
星球普通子民
文章: 4
註冊時間: 2002-10-11 20:09

[問題] 簡易子版面+iCGstation風格的安裝問題 (已解決,thanks)

文章 starbucks »

問題外掛:簡易子版面v1.0
參考連結:http://www.phpbb-tw.net/phpbb/viewtopic.php?t=33019
使用版本:phpBB 2.0.16
網站位置:test
已使用的外掛: 版面圖示 (Forum_icon_1.07)
風格: iCGstation
狀況描述:

問題一:
admin/admin_forums.php


有根據ETERNAL後半段的建議修改,
但有步驟不太清楚
IN LINE AFTER ADD / 在該行之後加入 ======================
代碼:

,forum_sub=".$forum_sub.",sort_sub=".$sort_sub."

後面加上===============
代碼:

}
}
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update forum information", "", __LINE__, __FILE__, $sql);
}
//forum_sub end
這裡指的後面,
是在上一步驟,加入的

代碼: 選擇全部

,forum_sub=".$forum_sub.",sort_sub=".$sort_sub."
後面嗎?


問題二:
在viewforum_body.tpl 檔案
找到=======================================
-> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
取代為=====================================
{FORUM_PATH}
我只有找到

代碼: 選擇全部

<a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
而且有2處(8和83行)
少了

代碼: 選擇全部

 -> 
請問此處應該如何修改?

以下是我的viewforum_body.tpl 檔案:

代碼: 選擇全部


<table border="0" cellpadding="0" cellspacing="0" class="tbn">
<tr>
<td class="tbnl" rowspan="3"><img src="images/spacer.gif" alt="" width="76" height="39" /></td>
<td height="17"></td>
<td height="17"></td>
</tr>
<td class="tbnbot"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span> &raquo; <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td>
<td class="tbnr"><img src="images/spacer.gif" alt="" width="39" height="22" /></td>
</tr>
</table>
<br />

<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">{FORUM_ICON_IMG}<a class="maintitle" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><br /><span class="gensmall"><b>{L_MODERATOR}: {MODERATORS}<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="100%"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" /></a></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>

  <table border="0" cellpadding="0" cellspacing="0" class="tbt"><tr><td class="tbtl"><img src="images/spacer.gif" alt="" width="22" height="22" /></td><td class="tbtbot"><img src="images/spacer.gif" alt="" width="8" height="22" align="absmiddle" /></td><td class="tbtr"><img src="images/spacer.gif" alt="" width="124" height="22" /></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">&nbsp;{L_FORUM}&nbsp;</th>
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
   <th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</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 />
     </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="0" cellspacing="1" width="100%" class="forumline">
	<tr> 
	  <th colspan="2" align="center" height="25" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
	  <th width="50" align="center" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
	  <th width="100" align="center" nowrap="nowrap">&nbsp;{L_AUTHOR}&nbsp;</th>
	  <th width="50" align="center" nowrap="nowrap">&nbsp;{L_VIEWS}&nbsp;</th>
	  <th align="center" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
	</tr>
	<!-- BEGIN topicrow -->
	<tr> 
	  <td class="row1" align="center" valign="middle" width="20"><img src="{topicrow.TOPIC_FOLDER_IMG}" 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="row1" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td>
	  <td class="row1" align="center" valign="middle"><span class="name">{topicrow.TOPIC_AUTHOR}</span></td>
	  <td class="row1" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td>
	  <td class="row1" 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="cat" align="center" valign="middle" colspan="6" height="28"><span class="genmed">{L_DISPLAY_TOPICS}:&nbsp;{S_SELECT_TOPIC_DAYS}&nbsp; 
		<input type="submit" class="liteoption" value="{L_GO}" name="submit" />
		</span></td>
	</tr>
  </table>
  <table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></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">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a> &raquo; <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="1" cellpadding="0">
  <tr> 
	<td align="right">{JUMPBOX}</td>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" class="tbt"><tr><td class="tbtl"><img src="images/spacer.gif" alt="" width="22" height="22" /></td><td class="tbtbot"><img src="images/spacer.gif" alt="" width="8" height="22" align="absmiddle" /></td><td class="tbtr"><img src="images/spacer.gif" alt="" width="124" height="22" /></td></tr></table>
<table width="100%" cellspacing="1" border="0" align="center" cellpadding="0" class="forumline">
	<tr>
		<td align="left" valign="top" width="100%" class="row1">
			<table cellspacing="0" cellpadding="0" border="0">
				<tr>
					<td class="row1" width="20" align="left"><img src="{FOLDER_NEW_IMG}" alt="{L_NEW_POSTS}" /></td>
					<td class="row1">{L_NEW_POSTS}</td>
					<td class="row1">&nbsp;&nbsp;</td>
					<td class="row1" width="20" align="center"><img src="{FOLDER_IMG}" alt="{L_NO_NEW_POSTS}" /></td>
					<td class="row1">{L_NO_NEW_POSTS}</td>
					<td class="row1">&nbsp;&nbsp;</td>
					<td class="row1" width="20" align="center"><img src="{FOLDER_ANNOUNCE_IMG}" alt="{L_ANNOUNCEMENT}" /></td>
					<td  class="row1">{L_ANNOUNCEMENT}</td>
				</tr>
				<tr> 
					<td class="row1" width="20" align="center"><img src="{FOLDER_HOT_NEW_IMG}" alt="{L_NEW_POSTS_HOT}" /></td>
					<td class="row1">{L_NEW_POSTS_HOT}</td>
					<td class="row1">&nbsp;&nbsp;</td>
					<td class="row1" width="20" align="center"><img src="{FOLDER_HOT_IMG}" alt="{L_NO_NEW_POSTS_HOT}" /></td>
					<td class="row1">{L_NO_NEW_POSTS_HOT}</td>
					<td class="row1">&nbsp;&nbsp;</td>
					<td class="row1" width="20" align="center"><img src="{FOLDER_STICKY_IMG}" alt="{L_STICKY}" /></td>
					<td class="row1">{L_STICKY}</td>
				</tr>
				<tr>
					<td class="row1"><img src="{FOLDER_LOCKED_NEW_IMG}" alt="{L_NEW_POSTS_LOCKED}" /></td>
					<td class="row1">{L_NEW_POSTS_LOCKED}</td>
					<td class="row1">&nbsp;&nbsp;</td>
					<td class="row1"><img src="{FOLDER_LOCKED_IMG}" alt="{L_NO_NEW_POSTS_LOCKED}" /></td>
					<td class="row1">{L_NO_NEW_POSTS_LOCKED}</td>
					<td class="row1">&nbsp;&nbsp;</td>
					<td class="row1">&nbsp;</td>
					<td class="row1">&nbsp;</td>
				</tr>
			</table>
		</td>
		<td class="row1" align="right" valign="top"  width="250" nowrap="nowrap"><span class="gensmall">{S_AUTH_LIST}</span></td>
	</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>



問題三:
在viewtopic_body.tpl 檔案

找到=================
-> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
取代為===============
{FORUM_PATH}

也是找不到相符的字串\r
只有在8和68行有類似的, 但不完全相同,
請問請處該如何修改?

以下是我的viewtopic_body.tpl 檔案:

代碼: 選擇全部


<table border="0" cellpadding="0" cellspacing="0" class="tbn">
<tr>
<td class="tbnl" rowspan="3"><img src="images/spacer.gif" alt="" width="76" height="39" /></td>
<td height="17"></td>
<td height="17"></td>
</tr>
<td class="tbnbot"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span>  &raquo; <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
<td class="tbnr"><img src="images/spacer.gif" alt="" width="39" height="22" /></td>
</tr>
</table>
<br />
<table width="100%" cellspacing="2" cellpadding="2" border="0">
  <tr> 
	<td align="left" valign="bottom" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>&nbsp;&nbsp;&nbsp;<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" class="tbt"><tr><td class="tbtl"><img src="images/spacer.gif" alt="" width="22" height="22" /></td><td class="tbtbot"><a class="maintitle" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a> {PAGINATION}<img src="images/spacer.gif" alt="" width="8" height="22" align="absmiddle" /></td><td class="tbtr"><img src="images/spacer.gif" alt="" width="124" height="22" /></td></tr></table>
<table class="forumline" width="100%" cellspacing="1" cellpadding="0" border="0">
	<tr align="right">
		<td class="cat" colspan="2" height="28"><span class="nav"><a href="{U_VIEW_OLDER_TOPIC}" class="nav">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="nav">{L_VIEW_NEXT_TOPIC}</a> &nbsp;</span></td>
	</tr>
	{POLL_DISPLAY} 
	<tr>
		<th class="thLeft" width="150" height="26" nowrap="nowrap">{L_AUTHOR}</th>
		<th class="thRight" nowrap="nowrap">{L_MESSAGE}</th>
	</tr>
	<!-- BEGIN postrow -->
	<tr> 
		<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>
		<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="0">
			<tr>
				<td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen">&nbsp;</span>&nbsp; &nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
				<td valign="top" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
			</tr>
			<tr> 
				<td colspan="2"><hr /></td>
			</tr>
			<tr>
				<td colspan="2"><span class="postbody">{postrow.MESSAGE}{postrow.SIGNATURE}</span><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
			</tr>
		</table></td>
	</tr>
	<tr> 
		<td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">{L_BACK_TO_TOP}</a></span></td>
		<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="1" cellpadding="0" border="0" height="18" width="18">
			<tr> 
				<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG} {postrow.ICQ_IMG}</td>
			</tr>
		</table></td>
	</tr>
	<!-- END postrow -->
	<tr align="center"> 
		<td class="cat" colspan="2" height="28"><table cellspacing="1" cellpadding="0" border="0">
			<tr><form method="post" action="{S_POST_DAYS_ACTION}">
				<td align="center"><span class="gensmall">{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS}&nbsp;{S_SELECT_POST_ORDER}&nbsp;<input type="submit" value="{L_GO}" class="liteoption" name="submit" /></span></td>
			</form></tr>
		</table></td>
	</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" alt="{L_POST_NEW_TOPIC}" align="middle" /></a>&nbsp;&nbsp;&nbsp;<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
	<td align="left" valign="middle" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;<a href="{U_INDEX}" class="nav">{L_INDEX}</a> 
	  &raquo; {FORUM_ICON_IMG}<a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
	<td align="right" valign="top" 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>

<table width="100%" cellspacing="2" border="0" align="center">
  <tr> 
	<td width="40%" valign="top" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}</span><br />
	  &nbsp;<br />
	  {S_TOPIC_ADMIN}</td>
	<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
  </tr>
</table>



問題四:
\templates\iCGstation\admin\forum_admin_body.tpl 檔案
找到==============
{L_MOVE_DOWN}</a>
後面加上===========
{catrow.forumrow.FORUM_SUB}
我有找到, 但是有2處, 分別在15 and 25 行,
2處都要修改嗎?

以下是我的forum_admin_body.tpl:

代碼: 選擇全部


<h1>{L_FORUM_TITLE}</h1>

<p>{L_FORUM_EXPLAIN}</p>

<form method="post" action="{S_FORUM_ACTION}"><table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
	<tr>
		<th colspan="7">{L_FORUM_TITLE}</th>
	</tr>
	<!-- BEGIN catrow -->
	<tr>
		<td class="cat" colspan="3"><span class="cattitle"><b><a href="{catrow.U_VIEWCAT}">{catrow.CAT_DESC}</a></b></span></td>
		<td class="cat" align="center" valign="middle"><span class="gen"><a href="{catrow.U_CAT_EDIT}">{L_EDIT}</a></span></td>
		<td class="cat" align="center" valign="middle"><span class="gen"><a href="{catrow.U_CAT_DELETE}">{L_DELETE}</a></span></td>
		<td class="cat" align="center" valign="middle" nowrap="nowrap"><span class="gen"><a href="{catrow.U_CAT_MOVE_UP}">{L_MOVE_UP}</a> <a href="{catrow.U_CAT_MOVE_DOWN}">{L_MOVE_DOWN}</a></span></td>
		<td class="cat" align="center" valign="middle"><span class="gen">&nbsp</span></td>
	</tr>
	<!-- BEGIN forumrow -->
	<tr> 
		<td class="row2"><span class="gen">{catrow.forumrow.FORUM_ICON_IMG}&nbsp;&nbsp;<a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span><br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td>
		<td class="row1" align="center" valign="middle"><span class="gen">{catrow.forumrow.NUM_TOPICS}</span></td>
		<td class="row2" align="center" valign="middle"><span class="gen">{catrow.forumrow.NUM_POSTS}</span></td>
		<td class="row1" align="center" valign="middle"><span class="gen"><a href="{catrow.forumrow.U_FORUM_EDIT}">{L_EDIT}</a></span></td>
		<td class="row2" align="center" valign="middle"><span class="gen"><a href="{catrow.forumrow.U_FORUM_DELETE}">{L_DELETE}</a></span></td>
		<td class="row1" align="center" valign="middle"><span class="gen"><a href="{catrow.forumrow.U_FORUM_MOVE_UP}">{L_MOVE_UP}</a> <br /> <a href="{catrow.forumrow.U_FORUM_MOVE_DOWN}">{L_MOVE_DOWN}</a></span></td>
		<td class="row2" align="center" valign="middle"><span class="gen"><a href="{catrow.forumrow.U_FORUM_RESYNC}">{L_RESYNC}</a></span></td>
	</tr>
	<!-- END forumrow -->
	<tr>
		<td colspan="7" class="row2"><input class="post" type="text" name="{catrow.S_ADD_FORUM_NAME}" /> <input type="submit" class="liteoption"  name="{catrow.S_ADD_FORUM_SUBMIT}" value="{L_CREATE_FORUM}" /></td>
	</tr>
	<!-- END catrow -->
	<tr>
		<td colspan="7" class="cat"><input class="post" type="text" name="categoryname" /> <input type="submit" class="liteoption"  name="addcategory" value="{L_CREATE_CATEGORY}" /></td>
	</tr>
</table></form>


以上問題,懇請指點, 謝謝
最後由 starbucks 於 2005-07-05 11:57 編輯,總共編輯了 1 次。
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8532
註冊時間: 2004-04-30 01:54
來自: Taiwan

文章 心靈捕手 »

To starbucks:

先回答您第一個問題:
假如您有安裝其他外掛, 而動到 admin/admin_forums.php 的話,
那麼關於這個外掛的修改, 最容易出錯的地方, 應該算是這裏了.

剛才仔細看 ETERNAL 大大後半段的建議修改, 可能有些錯誤, 容易造成誤解的地方;

由於之前, 我曾經建議大大增加此段的建議修改,
所以, 我根據個人的安裝經驗, 將此處的修改, 稍加整理如下, 希望能夠有效解決您的困擾:
若您安裝過的外掛,有更改過admin/admin_forums.php的內容
在admin/admin_forums.php的修改過程中
有兩個步驟請注意

代碼: 選擇全部

         $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ") 
            VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")"; 

代碼: 選擇全部

         $sql = "UPDATE " . FORUMS_TABLE . " 
            SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . " 
            WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]); 
A. 找到:
ps. 請注意: 您是否有因為加入其他外掛, 而更動 $sql = "INSERT INTO " . FORUMS_TABLE . " 後頭的語法?

代碼: 選擇全部

			$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
				VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";

#
#-----[ In Line Find ]-----
#
, prune_enable

#
#-----[ In Line Before, Add ]-----
#
, forum_sub, sort_sub

#
#-----[ In Line Find ]-----
#
, " . intval($HTTP_POST_VARS['prune_enable'])

#
#-----[ In Line Before, Add ]-----
#
, " .$forum_sub.",".$sort_sub."

#
#-----[ In Lind Find ]-----
#
intval($HTTP_POST_VARS[POST_CAT_URL])

#
#-----[ Replace With ]-----
#
$c
B. 找到:
ps. 請注意: 您是否有因為加入其他外掛, 而更動 $sql = "UPDATE " . FORUMS_TABLE . " 後頭的語法?

代碼: 選擇全部

			$sql = "UPDATE " . FORUMS_TABLE . "
				SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
				WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);

#
#-----[ Before, Add ]-----
# ps. 請注意: 您如果有加入其他外掛, 則自行更動 $sql = "UPDATE " . FORUMS_TABLE . " 後頭的語法!!
//forum_sub start
$forum_set=$HTTP_POST_VARS[POST_CAT_URL];
if(empty($forum_set))
{
message_die(GENERAL_ERROR, "設定錯誤");
}
else
{
$sql = "select count(forum_sub) as id from " . FORUMS_TABLE . " WHERE forum_sub = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "設定錯誤");
}
$get_sub_Id = $db->sql_fetchrow($result);
if($get_sub_Id[id]>0)
{
message_die(GENERAL_ERROR, "此版面有其他子版面相連,無法設定成子版面");
}
$temp=split(",",$forum_set);
$c=intval($temp[0]);
$forum_sub=intval($temp[1]);
if(intval($HTTP_POST_VARS[POST_FORUM_URL])== $forum_sub)
{
$sort_sub=intval($temp[2]);
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
}else
{
if(intval($temp[1])>0)
{
$sort_sub=intval($temp[2])+1;
}else
{
$sort_sub=intval($temp[2]);
}

#
\n#-----[ After, Add ]-----
#
}
}
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update forum information", "", __LINE__, __FILE__, $sql);
}
//forum_sub end

#
#-----[ In Line Find ]-----
#
intval($HTTP_POST_VARS[POST_CAT_URL])

#
#-----[ Replace With ]-----
#
$c

#
#-----[ In Line Find ]-----
#
, prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "

#
#-----[ In Line Before, Add ]-----
#
, forum_sub = " . $forum_sub . ", sort_sub = " . $sort_sub . "
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8532
註冊時間: 2004-04-30 01:54
來自: Taiwan

文章 心靈捕手 »

To starbucks:

關於您提到的第二和第三問題,
無論是 viewforum_body.tpl 或 viewtopic_body.tpl
都只要做同樣的修改( 如下) 即可:

代碼: 選擇全部

#
#-----[ Find ]-----
#
 &raquo; <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a>

#
#-----[ Replace With ]-----
#
 {FORUM_PATH}
ps. 建議您: 這兩個檔案( 上, 下) 兩個地方, 都要修改.

--
關於您提的第四個問題,
\templates\iCGstation\admin\forum_admin_body.tpl 檔案

找到==============
{L_MOVE_DOWN}</a>
後面加上===========
{catrow.forumrow.FORUM_SUB}
我有找到, 但是有2處, 分別在15 and 25 行,
2處都要修改嗎?
建議您: 將修改的程式碼, 加在第" 25 行"( 該行) 後面, 即可.
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
starbucks
星球普通子民
星球普通子民
文章: 4
註冊時間: 2002-10-11 20:09

文章 starbucks »

順利安裝完成了,
多謝心靈捕手兄.
bradpittbb
星球公民
星球公民
文章: 52
註冊時間: 2005-05-27 08:48

[外掛] ㄜ...

文章 bradpittbb »

心靈捕手大人..

我因為一直照著大家給的方法照做~但一直不成功~
所以才會一直降問啦~請原諒我們的無知~
我剛剛重新裝了一次admin_forums..
還是死了!!

控制台出現

代碼: 選擇全部

Parse error: parse error, unexpected T_ELSE in c:\appserv\www\phpbb2\admin\admin_forums.php on line 556
我講一次我的做法好了!!
打開admin/admin_forums.php

代碼: 選擇全部

找到======================================== 
   return($catlist); 
} 

後面加上=====================================

代碼: 選擇全部

//forum_sub start 
function get_sub_list($id) 
{ 
   global $db; 
   $sql="select cat_id,cat_title from ".CATEGORIES_TABLE." order by cat_order  "; 
   if( !$result = $db->sql_query($sql) ) 
   { 
      message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql); 
   } 
   $cat_data = array(); 
   while( $row = $db->sql_fetchrow($result) ) 
   { 
      $cat_data[] = $row; 
   } 
   $db->sql_freeresult($result); 
   $sql = "SELECT cat_id,forum_id,forum_name,sort_sub,forum_sub from ".FORUMS_TABLE."  ORDER BY cat_id,forum_order"; 
   if( !$result = $db->sql_query($sql) ) 
   { 
      message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql); 
   } 
   $forum_data = array(); 
   $forum_sub = array(); 
   $forum_sub2 = array(); 
   while( $row = $db->sql_fetchrow($result) ) 
   { 
      $s=""; 
      if($row[forum_sub]==0) 
      { 
         $forum_data[$row['cat_id']][] = $row; 
      } 
      else 
      { 
         if ($row[forum_id] == $id) 
         { 
            $s = " selected=\"selected\""; 
         } 
         $forum_sub[$row['forum_sub']][] = "add_select('".$row[cat_id].",".$row[forum_id].",".$row[sort_sub]."','".$row[forum_name]."','$s',".($row[sort_sub]+1).");"; 
         $forum_sub2[$row['forum_sub']]=$row[forum_id]; 
      } 
   } 
   $db->sql_freeresult($result); 
   $sub_list=""; 
   for( $i=0;$i<count($cat_data);$i++) 
   { 
      $s = ""; 
      $cat_id=$cat_data[$i][cat_id]; 
      $sub_list .="add_select('".$cat_id.",0,0','".$cat_data[$i][cat_title]."','$s',0);"; 
      for($j=0;$j<count($forum_data[$cat_id]);$j++) 
      { 
         $s = ""; 
         if ($forum_data[$cat_id][$j][forum_id] == $id) 
         { 
            $s = " selected=\"selected\""; 
         } 
         $sub_list .= "add_select('".$forum_data[$cat_id][$j][cat_id].",".$forum_data[$cat_id][$j][forum_id].",".$forum_data[$cat_id][$j][sort_sub]."','".$forum_data[$cat_id][$j][forum_name]."','$s',".($forum_data[$cat_id][$j][sort_sub]+1).");"; 

         if ( count($forum_sub[$forum_data[$cat_id][$j][forum_id]]) > 0 ) 
         { 
            $sub_list.= implode(' ', $forum_sub[$forum_data[$cat_id][$j][forum_id]]); 
            $sub_list.=sub_search($forum_sub2[$forum_data[$cat_id][$j][forum_id]],$forum_sub,$forum_sub2); 
         } 
      } 
   } 
   return $sub_list; 
} 
//forum_sub end 
找到======================
$catlist = get_list('category', $cat_id, TRUE);
取代為======================
$catlist = get_sub_list($row['forum_id']);
找到======================
while( list($field, $value) = each($forum_auth_ary) )
{
$field_sql .= ", $field";
$value_sql .= ", $value";
}
後面加上==================

代碼: 選擇全部

//forum_sub start 
         $forum_set=$HTTP_POST_VARS[POST_CAT_URL]; 
         if(empty($forum_set)) 
         { 
            message_die(GENERAL_ERROR, "?#93;定錯誤"); 
         } 
         else 
         { 
            $temp=split(",",$forum_set); 
            $c=intval($temp[0]); 
            $forum_sub=intval($temp[1]); 
            if($forum_sub >0 && intval($HTTP_POST_VARS[POST_FORUM_URL])!= $forum_sub) 
            { 
               $sort_sub=intval($temp[2])+1; 
            }else 
            { 
               $sort_sub=intval($temp[2]); 
            } 
         } 
//forum_sub end 
至於後面則是照心靈捕手前面的解釋照做~~
請問有哪裡不對嗎??
怎麼還是進不去控制台?ㄋ~~
謝謝!!


●架設主機作業系統:windows xp home 512 MB RAM
●您的上網方式:hinet ADSL 512/256k 固定ip
●您安裝的程式: php2.0.15 。
●您的 domain(網域名稱) localhost
●您的 phpBB2 連結網址:http://211.20.74.243/phpBB2/index.php

代碼: 選擇全部

頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8532
註冊時間: 2004-04-30 01:54
來自: Taiwan

文章 心靈捕手 »

To bradpittbb:

如果安裝外掛有問題, 那麼您只要發表一個主題,
按照" 發問格式", 並且" 詳述問題", 即可.

按照您處理這個外掛的提問方式, 這裡發一篇文章, 那裡發一篇文章, 並無濟於事啊!

// 這篇算是最初的發文吧!
http://phpbb-tw.net/phpbb/viewtopic.php?p=200296#200296
// 以後就顯得有點亂了?( 依照發文的時間排序)
http://phpbb-tw.net/phpbb/viewtopic.php?p=200702#200702
http://phpbb-tw.net/phpbb/viewtopic.php?p=201074#201074
http://phpbb-tw.net/phpbb/viewtopic.php?p=201136#201136
http://phpbb-tw.net/phpbb/viewtopic.php?p=201188#201188

之前, 建議您不要一直重複提問, 主要意思也是如此而已;
並非說, 您遇到的困難, 不要再提出來.

您上頭的安裝流程並沒有錯,
問題可能只是出在您的" 執行" 結果有誤;
重點是, 您應該貼出您修正後的 admin/admin_forums.php ( 連結)

ps. 您既然有權限, 可以安裝外掛, 上傳檔案;
為甚麼會無法貼出有問題的檔案( 文字檔) 連結呢?
:-?
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
bradpittbb
星球公民
星球公民
文章: 52
註冊時間: 2005-05-27 08:48

[外掛] 這次可以嗎?

文章 bradpittbb »

嗯~我是在自己電腦架的論譚啦..嗯~~說真的~我不知道怎麼讓別人連結到我的某個檔案~~我是這方面的白癡...我以為一定要上傳才可以~~

謝謝心靈捕手大人的告誡...小的會謹記在心!!
bradpittbb
星球公民
星球公民
文章: 52
註冊時間: 2005-05-27 08:48

[外掛] 終於波上網了!!

文章 bradpittbb »

嗯~
這是我的麻煩精-admin_forums的原始檔...
請各位專家們幫幫我吧...我真的...很由衷的感謝你們的..


http://211.20.74.243:608
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8532
註冊時間: 2004-04-30 01:54
來自: Taiwan

Re: [外掛] 終於波上網了!!

文章 心靈捕手 »

bradpittbb 寫:嗯~
這是我的麻煩精-admin_forums的原始檔...
請各位專家們幫幫我吧...我真的...很由衷的感謝你們的..


http://211.20.74.243:608
雖然有心幫您, 但是實在是" 愛莫能助"! :roll:

建議您:
參考這篇文章( 後半段), 再試一下, 能否貼出您的檔案?
http://phpbb-tw.net/phpbb/viewtopic.php?p=201418#201418
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
bradpittbb
星球公民
星球公民
文章: 52
註冊時間: 2005-05-27 08:48

[外掛] 這可以了!!

文章 bradpittbb »

我的admin_forums原始檔在這
http://211.20.74.243/phpbb2/admin_forums.txt

或是這裡也可以連到我整個admin資料庫唷~~
http://211.20.74.243:608

拜託了~~心靈捕手及其他老師們...

嗚....


●架設主機作業系統:windows xp home 512 MB RAM
●您的上網方式:hinet ADSL 512/256k 固定ip
●您安裝的程式: php2.0.15 。
●您的 domain(網域名稱) localhost
●您的 phpBB2 連結網址:http://211.20.74.243/phpBB2/index.php
頭像
心靈捕手
默默耕耘的老師
默默耕耘的老師
文章: 8532
註冊時間: 2004-04-30 01:54
來自: Taiwan

Re: [外掛] 這可以了!!

文章 心靈捕手 »

bradpittbb 寫:我的admin_forums原始檔在這
http://211.20.74.243/phpbb2/admin_forums.txt

或是這裡也可以連到我整個admin資料庫唷~~
http://211.20.74.243:608

拜託了~~心靈捕手及其他老師們...

嗚....


●架設主機作業系統:windows xp home 512 MB RAM
●您的上網方式:hinet ADSL 512/256k 固定ip
●您安裝的程式: php2.0.15 。
●您的 domain(網域名稱) localhost
●您的 phpBB2 連結網址:http://211.20.74.243/phpBB2/index.php
您貼出的 admin_forums.txt 不能叫做" 原始檔", 應該稱作您修改後的" 文字檔" 即可\r

查看您的檔案發現在\r

代碼: 選擇全部

$sql = "INSERT INTO " . FORUMS_TABLE . "...
以及

代碼: 選擇全部

$sql = "UPDATE " . FORUMS_TABLE . "...
這兩個地方改的很亂, 而且看不出您有需要參考上頭我的改法的地方;
也就是說, 並沒有發現到( 除了" 簡易子版面" 外掛) 有因為加入其他外掛, 而改變其中的值.

建議您:
  1. 用最原始的( phpbb 2.0.16) 檔案( admin/admin_forums.php) 覆蓋回去, 重新修改此檔;
    您只要用取代的方法, 修改這上述兩個地方, 即可;
  2. 可以的話, 不要在這個主題回文; 比較理想的回文地方, 應該是您最初的發表主題處:
    http://phpbb-tw.net/phpbb/viewtopic.php?p=200296#200296
  3. 至少, 您現在知道如何貼出檔案了.
    如果安裝還有問題的話, 那麼歡迎您繼續指教( 但請詳述問題)!
施比受有福,祝福您好運! ^_^
歡迎光臨★★心靈捕手★★ :: 討論區
https://wang5555.dnsfor.me/phpBB3/
主題已鎖定

回到「外掛問題討論」