[2.0.4]快速回覆(竹貓OOHOO版)

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
動機不明
喝咖啡的綠皮猴
喝咖啡的綠皮猴
文章: 1179
註冊時間: 2002-03-06 20:37
來自: GOP (重啟)

[2.0.4]快速回覆(竹貓OOHOO版)

文章 動機不明 »

在此跟 OOHOO前輩 說聲抱歉喔...未經同意就先貼出來了... :oops:
以下內容僅適用於 phpBB 2.0.4
OOHOO 寫:##############################################################
## 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 ]------------------------------------------
#

<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 />
<br />
{S_TOPIC_ADMIN}</td>
<td align="right" valign="top" nowrap="nowrap">{JUMPBOX}<span class="gensmall">{S_AUTH_LIST}</span></td>
</tr>
</table>

#
#-----[ ACTION: REPLACE ]------------------------------------------
#

<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 /> <br />{S_TOPIC_ADMIN}
</td>
</tr>
</table>

<table width="100%" cellspacing="2" border="0" align="center">
<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"><b>{L_USERNAME}</b></span><br />
<span class="genmed"><input type="text" class="post" tabindex="1" name="username" size="25" maxlength="25" value="" /></span><br />
<!-- 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><br />
{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>
</table>


#
#-----[ 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
非官方外掛問題區公告: [必看]請配合發問格式及明確主題發問(2006 02/24更新)
七點要求:
1. 發問前先搜尋,確定沒有重複後再發表
2. 主題要明確
3. 依照發問格式
4. 禁連續推文
5. 請盡量減少使用地方性語言
6. 解決問題後請修改第一篇主題,並感謝曾經幫過你的前輩們 ^^
7. 請不要將檔案內容完整貼出喔! 只要提供問題行及上下各五行就可以了
主題已鎖定

回到「非官方認證外掛」