################################################## ############
## MOD Title: Advanced Quick Reply
## MOD Author: Z3u5 <
[ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]
>
کد:
http://www.suportephpbb.org
## MOD Description:
## Add quick reply box in the end of viewtopic with some options how:
## Attach sing
## Quote Selected
## Notify reply
## Enable/Disable quick reply box
## Enable/Disable colorize nicks
## Enable/Disable quote the last message
##
##
کد:
http://www.suportephpbb.org
##
## MOD Version: 0.2.0
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit:
## viewtopic.php
## styles/prosiver/template/viewtopic_body.html
##
## Included Files:
## root/*.*
##
################################################## ############
## Author Notes:
##
## You can check updates for this mod in
.
## This MOD has tested in phpBB RC1
##
################################################## ############
## MOD History:
##
## 2007-06-05 - Version 0.2.0
## - Fixed focus textarea
## - Fixed Subject in quick reply
## - Added option to enable bbcode buttons
##
## 2007-06-05 - Version 0.1.5
## - Fixed quote last message smilie
##
## 2007-06-02 - Version 0.1.4
## - Fixed javascript error for Anonymous User
##
## 2007-06-02 - Version 0.1.3
## - Added Subsilver2 template
##
## 2007-05-29 - Version 0.1.2
## - Fixed javascript error
## - Fixed incompatibility with Firefox
##
## 2007-05-29 - Version 0.1.1
## - Add Optoin of colorize
##
## 2007-05-28 - Version 0.1.0
## - Initial Release
##
################################################## ############
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
################################################## ############
#
#-----[ COPY ]------------------------------------------
#
copy root/*.* to phpBB3 root/*.*
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
// Output the posts
$first_unread = $post_unread = false;
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//-- mod : Advanced Quick Reply ---------------------------------------------------------------------
$last_post = end($rowset);
//-- fin mod : Advanced Quick Reply -----------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------
#
page_footer();
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//-- mod : Advanced Quick Reply ---------------------------------------------------------------------
include $phpbb_root_path . 'includes/quickreply.' . $phpEx;
$QuickReply = new QuickReply($topic_id, $forum_id, $topic_data, $last_post);
//-- fin mod : Advanced Quick Reply -----------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------
#
styles/prosiver/template/editor.js
#
#-----[ FIND ]------------------------------------------
#
function initInsertions()
{
var doc;
if( document.forms[form_name])
{
doc = document;
}
else
{
doc = opener.document;
}
var textarea = doc.forms[form_name].elements[text_name];
if (is_ie && typeof(baseHeight) != 'number')
{
textarea.focus();
baseHeight = doc.selection.createRange().duplicate().boundingHe ight;
document.body.focus();
}
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
function initInsertions()
{
var doc;
if( document.forms[form_name])
{
doc = document;
}
else
{
doc = opener.document;
}
var textarea = doc.forms[form_name].elements[text_name];
if (is_ie && typeof(baseHeight) != 'number')
{
// Remove by Quick Reply textarea.focus();
baseHeight = doc.selection.createRange().duplicate().boundingHe ight;
document.body.focus();
}
}
//Quick Reply
var isNav4Min = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4)
var isIE4Min = (navigator.appName.indexOf("Microsoft") != -1 && parseInt(navigator.appVersion) >= 4)
function quoteSelection()
{
var userSelection = false;
var textarea = document.postform.message;
if (isNav4Min && window.getSelection() != '') {
userSelection = window.getSelection();
}
else if (isIE4Min && document.selection) {
userSelection = document.selection.createRange().text;
}
if (userSelection) {
insert_text( '
نقل قول:
\n' + userSelection + '\n
\n', true, false);
textarea.focus();
userSelection = '';
return;
}
else
{
alert('{L_NO_TEXT_SELECTED}');
}
}
function checkForm() {
formErrors = false;
if (document.postform.message.value.length <= 2) {
formErrors = '{TOO_FEW_CHARS}';
}
if (formErrors)
{
alert(formErrors);
return false;
}
else
{
if (document.postform.quote_last_msg.checked)
{
document.postform.message.value = document.postform.last_post.value + document.postform.message.value;
}
return true;
}
}
//Quick Reply
#
#-----[ OPEN ]------------------------------------------
#
styles/prosiver/template/viewtopic_body.html
#
#-----[ FIND ]------------------------------------------
#
<!-- IF not postrow.U_POST_AUTHOR --><strong>{postrow.POST_AUTHOR_FULL}</strong><!-- ELSE -->{postrow.POST_AUTHOR_FULL}<!-- ENDIF -->
#
#-----[ REPLACE WITH ]------------------------------------------
#
<!-- IF S_QR_ACTIVE -->
<!-- IF S_QR_COLOR_NICK -->
<!-- IF postrow.POST_AUTHOR_COLOUR -->
<a href="#" onclick="insert_text('
[color={postrow.POST_AUTHOR_COLOUR}]{postrow.POST_AUTHOR}[/color], ', true, false); return false;"><span style="color: {postrow.POST_AUTHOR_COLOUR};" class="username-coloured">{postrow.POST_AUTHOR}</span></a>
<!-- ELSE -->
<a href="#" onclick="insert_text('
{postrow.POST_AUTHOR}, ', true, false); return false;"><span style="color: {postrow.POST_AUTHOR_COLOUR};" class="username-coloured">{postrow.POST_AUTHOR}</span></a>
<!-- ENDIF -->
<!-- ELSE -->
<a href="#" onclick="insert_text('
{postrow.POST_AUTHOR}, ', true, false); return false;"><span style="color: {postrow.POST_AUTHOR_COLOUR};" class="username-coloured">{postrow.POST_AUTHOR}</span></a>
<!-- ENDIF -->
<!-- ELSE -->
{postrow.POST_AUTHOR_FULL}
<!-- ENDIF -->
#
#-----[ FIND ]------------------------------------------
#
<!-- INCLUDE jumpbox.html -->
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- INCLUDE quickreply_body.html -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM