●架設主機作業系統:WindowsXP SP2
●安裝的程式:appserv-win32-2.4.4a + phpMyAdmin 2.7.0-pl1
●我的 phpBB2 版本:phpBB2 2.0.18
代碼: 選擇全部
##############################################################
## Mod Title: Quick reply to topic
## Mod Version: 1.1.2
## Author: OOHOO < webdev@phpbb-tw.net > http://phpbb-tw.net/
##
## Description: This MOD provides a convenient function, which allows
## users to quickly reply to topics without loading the posting page.
## Simply speed up the response time and reduce the useless loading.
##
##
## Installation Level: (easy)
## Installation Time: 1-5 Minutes
## Files To Edit: viewtopic.php, /templates/your_template/viewtopic_body.tpl,
## /language/your_lang/lang_main.php, templates/your_template/your_template.cfg
## Included Files: quick_reply.gif
##############################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#################################################################
##
## Author Note: This MOD didn't include any BBCode or emotion tips, it's
## especially for users who are already familiar with those tips or who
## don't use those tips.
##
##############################################################
## Version History:
## 1.0.0 for phpBB RC2 ~ RC3
## 1.1.0 for phpBB 2.0.0
## 1.1.1 Code for quick reply button include (by Kage Musha)
## 1.1.2 "posting.$phpEx" => append_sid("posting.$phpEx") fixed (by totocat)
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ ACTION: OPEN ]------------------------------------------
#
/viewtopic.php
#
#-----[ ACTION: FIND ]------------------------------------------
#
$post_img = ( $forum_topic_data['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'];
$post_alt = ( $forum_topic_data['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['Post_new_topic'];
#
#-----[ ACTION: AFTER, ADD ]------------------------------------------
#
$quick_reply_img = ( $forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED ) ? $images['reply_locked'] : $images['quick_reply']; // Quick_Reply_MOD
$quick_reply_alt = ( $forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['Quick_Reply_to_topic']; // Quick_Reply_MOD
#
#-----[ ACTION: FIND ]------------------------------------------
#
'POST_IMG' => $post_img,
'REPLY_IMG' => $reply_img,
#
#-----[ ACTION: AFTER, ADD ]------------------------------------------
#
'QUICK_REPLY_IMG' => $quick_reply_img, // Quick_Reply_MOD
'L_QUICK_REPLY_TOPIC' => $quick_reply_alt, // Quick_Reply_MOD
'L_EMPTY_MESSAGE' => $lang['Empty_message'], // Quick_Reply_MOD
'U_QUICK_REPLY' => append_sid("posting.$phpEx"), // Quick_Reply_MOD
'U_HIDDEN_FORM_FIELDS' => ( ($userdata['user_attachsig'] ? '<input type="hidden" name="attach_sig" value="1" />' : "") . ($userdata['user_notify'] ? '<input type="hidden" name="notify" value="1" />' : "") . '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="mode" value="reply" /><input type="hidden" name="post" value="1"><input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" />' ), // Quick_Reply_MOD
#
#-----[ ACTION: OPEN ]------------------------------------------
#
/templates/your_template/viewtopic_body.tpl
#
#-----[ ACTION: FIND ]------------------------------------------
#
<tr>
<td width="40%" valign="top" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}</span>
{S_TOPIC_ADMIN}</td>
<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
#
#-----[ ACTION: REPLACE ]------------------------------------------
#
<tr>
<td width="40%" valign="top" nowrap="nowrap" align="left">
<span class="gensmall">{S_WATCH_TOPIC}</span>
{S_TOPIC_ADMIN}
</td>
</tr>
<tr>
<td valign="top" align="left">
<form name="quick_reply" action="{U_QUICK_REPLY}" method="post"><!-- Quick_Reply_MOD -->
<!-- BEGIN quick_reply_anonymous -->
<span class="gensmall">{L_USERNAME}</span>
<span class="genmed"><input type="text" class="post" tabindex="1" name="username" size="25" maxlength="25" value="" /></span>
<!-- END quick_reply_anonymous -->
<textarea name="message" rows="7" cols="35" wrap="virtual" style="width:500px" class="post" onclick="{if(document.quick_reply.message.value=='{L_QUICK_REPLY_TOPIC}') document.quick_reply.message.value=''}">{L_QUICK_REPLY_TOPIC}</textarea>
{U_HIDDEN_FORM_FIELDS}
<input type="image" src="{QUICK_REPLY_IMG}" border="0" alt="{L_QUICK_REPLY_TOPIC}" onClick="if(document.quick_reply.message.value == '{L_QUICK_REPLY_TOPIC}' || document.quick_reply.message.value == ''){ alert('{L_EMPTY_MESSAGE}'); return false;}else{ return true;}" />
</form>
</td>
<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
#
#-----[ ACTION: OPEN ]------------------------------------------
#
/language/your_lang/lang_main.php
#
#-----[ ACTION: FIND ]------------------------------------------
#
$lang['Post_new_topic'] = "Post new topic";
$lang['Reply_to_topic'] = "Reply to topic";
$lang['Reply_with_quote'] = "Reply with quote";
#
#-----[ ACTION: ADD ]------------------------------------------
#
$lang['Quick_Reply_to_topic'] = "Quick reply to topic"; // Quick_Reply_MOD
#
#-----[ ACTION: OPEN ]------------------------------------------
#
templates/your_template/your_template.cfg
#
#-----[ ACTION: FIND ]------------------------------------------
#
$images['reply_locked'] = "$current_template_images/{LANG}/reply-locked.gif";
#
#-----[ ACTION: AFTER, ADD ]------------------------------------------
#
$images['quick_reply'] = "$current_template_images/{LANG}/quick_reply.gif"; // Quick_Reply_MOD
#
#-----[ ACTION: SAVE & CLOSE FILE ]------------------------------------------
#
#
#-----[ ACTION: UPLOAD ]------------------------------------------
#
quick_reply.gif to templates/your_template/images/your_lang/
#
# EoM
原本是安裝在 SpacePilot3K 風格已經使用半年多,這幾天把風格換成Macinscott2後,
安裝此外掛到Macinscott2風格都沒有任何作用~
Ps.剛在subSilver安裝也是OK的,沒有問題,可以正常使用
只有改templates/ subSilver/viewtopic_body.tpl和templates/subSilveryour_template.cfg
下面是templates/ Macinscott2/viewtopic_body.tpl
代碼: 選擇全部
<table width="95%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><br />
<span class="gensmall"><b>{PAGINATION}</b><br />
</span></td>
</tr>
</table>
<table width="95%" 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> <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="50%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
» <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
<td align="right" valign="middle" width="50%"><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> </span></td>
</tr>
</table>
{POLL_DISPLAY}
<!-- BEGIN postrow -->
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3%" align="left"><img src="templates/Macinscott2/images/buttons.gif" width="66" height="23"></td>
<td width="94%" align="center" background="templates/Macinscott2/images/buttons_bkgd.gif"><span class="cattitle">{postrow.POST_SUBJECT}</span></td>
<td width="3%" align="right"><img src="templates/Macinscott2/images/buttons_right.gif" width="66" height="23"></td>
</tr>
</table>
<table class="forumline" width="95%" cellspacing="1" cellpadding="0" border="0">
<tr align="right">
<td class="row4" colspan="2" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left"> <a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}</span></td>
<td align="right" valign="center" nowrap="nowrap"> {postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG} </td>
</tr>
</table> </td>
</tr>
<tr>
<th class="thTop" nowrap="nowrap">{L_MESSAGE}</th>
</tr>
<tr>
<td colspan="2" align="left" valign="top" class="{postrow.ROW_CLASS}">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" align="left" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="150">
<tr>
<td width="12"><img src="templates/Macinscott2/images/spacer.gif" width="12" height="1" border="0" alt=""></td>
<td width="125"><img src="templates/Macinscott2/images/spacer.gif" width="125" height="1" border="0" alt=""></td>
<td><img src="templates/Macinscott2/images/spacer.gif" width="13" height="1" border="0" alt=""></td>
<td width="10"><img src="templates/Macinscott2/images/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<tr>
<td><img name="topic_top_left" src="templates/Macinscott2/images/topic_top_left.gif" width="12" height="14" border="0" alt=""></td>
<td background="templates/Macinscott2/images/topic_top.gif"><img name="topic_top" src="templates/Macinscott2/images/spacer.gif" width="1" height="14" border="0" alt=""></td>
<td><img name="topic_top_right" src="templates/Macinscott2/images/topic_top_right.gif" width="13" height="14" border="0" alt=""></td>
</tr>
<tr>
<td align="left" valign="top" background="templates/Macinscott2/images/topic_left.gif"> </td>
<td bgcolor="#F2F2F2"><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}<p align="center">{postrow.POSTER_AVATAR}</p>{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span></td>
<td width="13" align="left" valign="top" background="templates/Macinscott2/images/topic_right.gif"></td>
</tr>
<tr>
<td align="left" valign="top"><img name="topic_bttm_left" src="templates/Macinscott2/images/topic_bttm_left.gif" width="12" height="13" border="0" alt=""></td>
<td align="left" valign="top" background="templates/Macinscott2/images/topic_bttm.gif"><img src="templates/Macinscott2/images/spacer.gif" width="1" height="13"></td>
<td align="left" valign="top"><img name="topic_bttm_right" src="templates/Macinscott2/images/topic_bttm_right.gif" width="13" height="13" border="0" alt=""></td>
</tr>
</table>
</td>
<td align="center" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td colspan="2"><span class="postbody"><br />{postrow.MESSAGE}{postrow.SIGNATURE}</span><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row4" width="150" align="center" valign="middle">
<a href="#top"><img src="templates/Macinscott2/images/lang_english/back_to_top.gif" border="0" vspace="4"></a></td>
<td class="row4">
<table cellspacing="0" cellpadding="0" border="0" height="18" width="18">
<tr>
<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG}{postrow.WEBLOG_IMG}{postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
document.write(' {postrow.ICQ_IMG}');
else
document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
//--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="35" align="left" valign="top" background="templates/Macinscott2/images/shadow_bottom.jpg"><img src="templates/Macinscott2/images/shadow_bttm_left_corner.jpg" width="19" height="35"></td>
<td align="left" valign="top" background="templates/Macinscott2/images/shadow_bottom.jpg"><img src="templates/Macinscott2/images/shadow_bottom.jpg" width="19" height="35"></td>
<td align="right" valign="top" background="templates/Macinscott2/images/shadow_bottom.jpg"><img src="templates/Macinscott2/images/shadow_bttm_right_corner.jpg" width="19" height="35"></td>
</tr>
</table>
<!-- END postrow -->
<table width="95%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr align="right">
<td width="10%" 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> <a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" alt="{L_POST_REPLY_TOPIC}" align="middle" /></a></span></td>
<td width="67%" align="left" valign="middle"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
» <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
<td width="23%" height="28" valign="middle" nowrap>{S_TOPIC_ADMIN}
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="right"></td>
</tr>
</table></td>
</tr>
</table>
<table width="95%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="top" nowrap="nowrap"><span class="gensmall">{S_WATCH_TOPIC}</span><br />
<span class="nav">{PAGE_NUMBER}</span>
</td>
<td width="100%" align="left" valign="middle" nowrap></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"></td>
</tr>
</table>
<table width="95%" cellspacing="2" border="0" align="center">
<tr>
<td width="40%" valign="top" nowrap="nowrap" align="left"><p class="gensmall">{L_DISPLAY_POSTS}:<br />
<form method="post" action="{S_POST_DAYS_ACTION}">
{S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER}
<input type="submit" value="{L_GO}" class="liteoption" name="submit" />
</p> </td> </form>
<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
</table>
代碼: 選擇全部
<tr>
<td width="40%" valign="top" nowrap="nowrap" align="left"><p class="gensmall">{L_DISPLAY_POSTS}:<br />
<form method="post" action="{S_POST_DAYS_ACTION}">
{S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER}
<input type="submit" value="{L_GO}" class="liteoption" name="submit" />
</p> </td> </form>
<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
我是將上面代碼(也就是最下面的<table>...</table>)REPLACE(取代)成下面
代碼: 選擇全部
<tr>
<td width="40%" valign="top" nowrap="nowrap" align="left">
<span class="gensmall">{S_WATCH_TOPIC}</span>
{S_TOPIC_ADMIN}
</td>
</tr>
<tr>
<td valign="top" align="left">
<form name="quick_reply" action="{U_QUICK_REPLY}" method="post"><!-- Quick_Reply_MOD -->
<!-- BEGIN quick_reply_anonymous -->
<span class="gensmall">{L_USERNAME}</span>
<span class="genmed"><input type="text" class="post" tabindex="1" name="username" size="25" maxlength="25" value="" /></span>
<!-- END quick_reply_anonymous -->
<textarea name="message" rows="7" cols="35" wrap="virtual" style="width:500px" class="post" onclick="{if(document.quick_reply.message.value=='{L_QUICK_REPLY_TOPIC}') document.quick_reply.message.value=''}">{L_QUICK_REPLY_TOPIC}</textarea>
{U_HIDDEN_FORM_FIELDS}
<input type="image" src="{QUICK_REPLY_IMG}" border="0" alt="{L_QUICK_REPLY_TOPIC}" onClick="if(document.quick_reply.message.value == '{L_QUICK_REPLY_TOPIC}' || document.quick_reply.message.value == ''){ alert('{L_EMPTY_MESSAGE}'); return false;}else{ return true;}" />
</form>
</td>
<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
也有參考下面這篇,也有安裝過Simple Quick Reply MOD
http://phpbb-tw.net/phpbb/viewtopic.php ... acinscott2
但也是都完全沒任何作用~
請各位高手抽空幫小弟解惑,先謝謝各位了