Ik had gisteren een Quick Reply MOD toegevoegd die heel erg mooi is, maar ik moet telkens op zo' n Quick reply button drukken
Dat is hem,
Alvast Bedankt!! :thumb:

Code: Selecteer alles
<script language='JavaScript'><!--
function quoteSelection() {
theSelection = false;
theSelection = document.selection.createRange().text; // Get text selection
if (theSelection) {
// Add tags around selection
emoticon( '[quote]\n' + theSelection + '\n[/quote]\n');
document.post.message.focus();
theSelection = '';
return;
}else{
alert('{L_NO_TEXT_SELECTED}');
}
}
function storeCaret(textEl) {
if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}
function emoticon(text) {
var itm = null;
var name = 'quick_post_open';
if (document.getElementById) {
itm = document.getElementById(name);
} else if (document.all) {
itm = document.all[name];
} else if (document.layers) {
itm = document.layers[name];
}
if (!itm) {
// Just don't panik, it's ok
} else if (itm.style) {
itm.style.display = "";
} else {
itm.visibility = "show";
}
if (document.post.message.createTextRange && document.post.message.caretPos) {
var caretPos = document.post.message.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
document.post.message.focus();
} else {
document.post.message.value += text;
document.post.message.focus();
}
}
function checkForm() {
formErrors = false;
if (document.post.message.value.length < 2) {
formErrors = "{L_EMPTY_MESSAGE}";
}
if (formErrors) {
alert(formErrors);
return false;
}
}
function ShowHide(layer_open, layer_close) {
if (layer_open != '') {
expandLayer(layer_open);
}
if (layer_close != '') {
expandLayer(layer_close);
}
}
function expandLayer(name) {
var itm = null;
if (document.getElementById) {
itm = document.getElementById(name);
} else if (document.all) {
itm = document.all[name];
} else if (document.layers) {
itm = document.layers[name];
}
if (!itm) {
// Just don't panik, it's ok
} else if (itm.style) {
if (itm.style.display == "none") {
itm.style.display = "";
} else {
itm.style.display = "none";
}
} else {
itm.visibility = "show";
}
}
//-->
</script>Code: Selecteer alles
<!-- BEGIN quick_reply -->
<script language='JavaScript'>
function storeCaret(textEl) {
if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}
function checkForm() {
formErrors = false;
if (document.post.message.value.length < 2) {
formErrors = '{L_EMPTY_MESSAGE}';
}
if (formErrors) {
alert(formErrors);
return false;
} else {
return true;
}
}
</script>
<form action='{quick_reply.POST_ACTION}' method='post' name='post' onsubmit='return checkForm(this)'>
<input type="hidden" name="sid" value="{quick_reply.SID}">
<tr>
<th class='thLeft' height='15'></th>
<th class='thRight' height='15'><b>{L_QUICK_REPLY}</b></th>
</tr>
<tr>
<td class='row1'></td>
<td class='row1' valign='top' align='center'>
<textarea name='message' rows='5' cols='80' wrap='virtual' style='width:100%' tabindex='3' class='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea><br>
<input type='hidden' name='mode' value='reply'>
<input type='hidden' name='t' value='{quick_reply.TOPIC_ID}'>
<input type='hidden' name='last_msg' value='{quick_reply.LAST_MESSAGE}'>
<!--input type='hidden' name='message' value=''-->
<input type='submit' name='post' class='mainoption' value='{L_SUBMIT}'>
</td>
</tr>
</form>
<!-- END quick_reply -->Code: Selecteer alles
<?php
/***************************************************************************
* quick_reply.php
* -------------------
* begin : Tuesday, Aug 20, 2002
* copyright : RustyDragon
* original work by : Smartor <smartor_xp@hotmail.com>
* contact : <dev@RustyDragon.com>, http://www.RustyDragon.com
* $Id: quick_reply.php,v 1.4.1.1 2002/11/18 13:35:54 RustyDragon Exp $
* MODIFIED VERSION BY FAST SJONNY; INFO@LONTRONICS.NL 25-02-2005
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
//
// BEGIN OUTPUT
//
$phpbb_root_path = "./";
if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
}
$template->set_filenames(array(
'quick_reply_output' => 'quick_reply.tpl')
);
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)))
{
$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(":$bbcode_uid", '', $last_msg);
$last_msg = str_replace("'", ''', $last_msg);
$last_msg = "[quote=\"$last_poster\"]" . $last_msg . '[/quote]';
$attach_sig = (( $userdata['session_logged_in'] ) ? $userdata['user_attachsig'] : 0)?"checked='checked'":'';
$notify_user = (( $userdata['session_logged_in'] ) ? $userdata['user_notify'] : 0)?"checked='checked'":'';
$template->assign_block_vars('quick_reply', array(
'POST_ACTION' => append_sid("posting.$phpEx"),
'TOPIC_ID' => $topic_id,
'SID' => $userdata['session_id'],
'LAST_MESSAGE' => $last_msg)
);
if( $userdata['session_logged_in'])
{
$template->assign_block_vars('quick_reply.user_logged_in', array(
'ATTACH_SIGNATURE' => $attach_sig,
'NOTIFY_ON_REPLY' => $notify_user)
);
}else
{
$template->assign_block_vars('quick_reply.user_logged_out', array());
}
$template->assign_vars(array(
'L_EMPTY_MESSAGE' => $lang['Empty_message'],
'L_QUICK_REPLY' => $lang['Quick_Reply'],
'L_SUBMIT' => $lang['Submit'])
);
}
$template->assign_var_from_handle('QUICKREPLY_OUTPUT', 'quick_reply_output');
?>Code: Selecteer alles
#################################################################
## Mod Title: Advanced Quick Reply Mod
## Mod Author: RustyDragon <dev@RustyDragon.com> http://www.phpbbhacks.com
## Mod Version: 1.1.1
## Mod Description: This will allow users to use quick reply form
## which is placed below every topic.
## It will only display when user has the Reply access
## User have a option to quote the last message.
## A list of 24 smilies is shown below input area.
## Users can paste names of users just by clicking on it.
## Also they can select any text on a page and quote it to the input area.
##
## Last 3 options were absent in Quick Reply Mod with Quote on which
## this mod is based.
## Additional feature - uses of template for quick reply form.
## So you can change a look of the mod to whatever you want.
##
## Installation Level: Very Easy
## Installation Time: 2 Minutes
##
## Files To Edit: 3
## viewtopic.php,
## language/lang_english/lang_main.php
## templates/subSilver/viewtopic_body.tpl
##
## Included Files: quick_reply.php, quick_reply.tpl
#################################################################
##
## The Quick-Quote Feature was an idea from Nexialys (www.bebeabord.org)
##
## You should change all your templates and language pack
##
## Advanced Quick Reply Mod is Copyright © RustyDragon, 2002
##
## Quick Reply Mod with Quote is Copyright © Smartor, 2002
## updated to support phpbb 2.0.4 by danb00
##
## MODIFIED VERSION BY FAST SJONNY; INFO@LONTRONICS.NL 25-02-2005
#
#-----[ COPY ]------------------------------------------
#
copy quick_reply.php to /
copy quick_reply.tpl to templates/subSilver
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
#
#-----[ BEFORE, ADD ]------------------------------------
#
include($phpbb_root_path . 'quick_reply.'.$phpEx);
#
#-----[ OPEN ]------------------------------------------
#
lang/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]------------------------------------
#
// Advanced Quick Reply Mod
$lang['Quick_Reply'] = 'Snel Antwoord';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- END postrow -->
#
#-----[ AFTER, ADD ]------------------------------------
#
{QUICKREPLY_OUTPUT}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
#EoM