## Mod Title: Quick reply to topic ## Mod Version: 1.1.2 ## Author: OOHOO < webdev@mlinux.wusdsl.net > http://phpbb-tw.net/ #-----[ 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 |