############################################################## ## MOD Title: Quick Reply with Quote ## MOD Author: Smartor < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com ## MOD Description: This will add a quick-reply form below every topics ## It will only display when user has the Reply access ## User have a option to quote the last message ## MOD Version: 1.1.3 ## Modified by Rasat - Date: 23-Feb-2005 ## Modified Version: 0.1 ## ## Installation Level: easy ## Installation Time: 5 Minutes ## Files To Edit: 3 ## viewtopic.php ## language/lang_XX/lang_main.php ## templates/template_XX/viewtopic_body.tpl ## Included Files: N/A ############################################################## ## Author Notes: ## ############################################################## ## This MOD is released under the GPL License. ## Intellectual Property is retained by the MOD Author(s) listed above ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------ # viewtopic.php # #-----[ FIND ]------------------------------------------ # $template->pparse('body'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); # #-----[ BEFORE, ADD ]------------------------------------ # // // Quick Reply Mod // if ( ((!$is_auth['auth_reply']) or ($forum_topic_data['forum_status'] == FORUM_LOCKED) or ($forum_topic_data['topic_status'] == TOPIC_LOCKED)) and ($userdata['user_level'] != ADMIN) ) { $quick_reply_form = ""; } else { if ( $can_watch_topic && $is_watching_topic ) { $notify = 1; } else { $notify = $userdata['user_notify']; } $bbcode_uid = $postrow[$total_posts - 1]['bbcode_uid']; $last_poster = $postrow[$total_posts - 1]['username']; $last_msg = $postrow[$total_posts - 1]['post_text']; $last_msg = str_replace(":1:$bbcode_uid", "", $last_msg); $last_msg = str_replace(":u:$bbcode_uid", "", $last_msg); $last_msg = str_replace(":o:$bbcode_uid", "", $last_msg); $last_msg = str_replace(":$bbcode_uid", "", $last_msg); $last_msg = str_replace("'", "'", $last_msg); $last_msg = "[QUOTE=\"$last_poster\"]" . $last_msg . "[/QUOTE]"; $quick_reply_form = "
".$lang["Quick_Reply"].":
"; if (!$userdata['session_logged_in']) { $quick_reply_form .= $lang['Username'] . ": 
"; } $quick_reply_form .= "
".$lang["Quick_quote"]."
".$lang["Attach_signature"]."
 
"; } $template->assign_vars(array( 'QUICK_REPLY_FORM' => $quick_reply_form) ); // // END Quick Reply Mod // # #-----[ OPEN ]------------------------------------------ # language/lang_XX/lang_main.php # #-----[ FIND ]------------------------------------------ # // // That's all Folks! # #-----[ BEFORE, ADD ]------------------------------------ # // Quick Reply Mod $lang['Quick_Reply'] = 'Quick Reply'; $lang['Quick_quote'] = 'Quote the last message'; # #-----[ OPEN ]------------------------------------------ # templates/template_XX/viewtopic_body.tpl # #-----[ FIND ]------------------------------------------ # {S_TOPIC_ADMIN} # #-----[ AFTER, ADD ]------------------------------------ # # #-----[ FIND ]------------------------------------------ # # #-----[ EDIT ]------------------------------------------ # # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM
{QUICK_REPLY_FORM}{JUMPBOX}{S_AUTH_LIST}{JUMPBOX}{S_AUTH_LIST}