[外掛]快速回覆主題 for phpBB2.0.0

phpBB 大部分皆是由竹貓星球提供資料!
頭像
懸壺子
系統管理員
系統管理員
主題中的帖子: 3
文章: 33357
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

[外掛]快速回覆主題 for phpBB2.0.0

未閱讀文章 懸壺子 »

[外掛]快速回覆主題 for phpBB2.0.0

http://phpbb-tw.net/phpbb/viewtopic.php?t=13334

代碼: 選擇全部

############################################################## 
## 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_row['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new']; 
$post_alt = ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['Post_new_topic']; 

# 
#-----[ ACTION: AFTER, ADD ]------------------------------------------ 
# 

$quick_reply_img = ( $forum_row['forum_status'] == FORUM_LOCKED || $forum_row['topic_status'] == TOPIC_LOCKED ) ? $images['reply_locked'] : $images['quick_reply']; // Quick_Reply_MOD 
$quick_reply_alt = ( $forum_row['forum_status'] == FORUM_LOCKED || $forum_row['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="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 
完整下載
http://phpbb-tw.net/phpbb/download/quic ... _1.1.2.zip
頭像
懸壺子
系統管理員
系統管理員
主題中的帖子: 3
文章: 33357
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

Re: [外掛]快速回覆主題 for phpBB2.0.0

未閱讀文章 懸壺子 »

前幾天升級至2.022版,發現一個問題,無法發文

http://phpbb-tw.net/phpbb/viewtopic.php?t=47294
倉木版大,幫忙回答

代碼: 選擇全部

yehrussell 寫到: 
我的快速回覆時,會有無法發文出現---> 【'無效的 Session. 請重新送出表單.'】 

快速回覆  PS:Quick reply to topic 1.1.2



不知你是用那一版的Quick reply to topic ?

[2.0.4]快速回覆(竹貓OOHOO版) - 動機不明 發表

[外掛]快速回覆主題 for phpBB2.0.0 - oO]-[Oo 發表

我猜你應該是用連結2(oO]-[Oo 發表)的快速回覆才對
如果是的話, 建議你將'U_HIDDEN_FORM_FIELDS' =>這一整行換成動機不明那版的內容
圖檔
頭像
懸壺子
系統管理員
系統管理員
主題中的帖子: 3
文章: 33357
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

Re: [外掛]快速回覆主題 for phpBB2.0.0

未閱讀文章 懸壺子 »

[2.0.4]快速回覆(竹貓OOHOO版) - 動機不明
http://phpbb-tw.net/phpbb/viewtopic.php?t=13334


[外掛]快速回覆主題 for phpBB2.0.0 - oO]-[Oo 發表
http://phpbb-tw.net/phpbb/viewtopic.php?t=4965

in>:   我是用 :->: [外掛]快速回覆主題 for phpBB2.0.0 - oO]-[Oo 發表

把 /viewtopic.php
這段

代碼: 選擇全部

'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="mode" value="reply" /><input type="hidden" name="post" value="1"><input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" />' ), // 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  
f33:  於是成功,可以發文囉!
不會再出現   :->:【'無效的 Session. 請重新送出表單.'】
版面鎖定 主題已鎖定

回到「phpBB2」