Pagina 1 van 1
[opgelost door Bee]Quick Reply
Geplaatst: 26 feb 2005, 10:15
door LoYaL
Hey,
Ik had gisteren een Quick Reply MOD toegevoegd die heel erg mooi is, maar ik moet telkens op zo' n Quick reply button drukken

, kan iemand iets in die file editten dat die Quick reply er gewoon staat, want is best wel nutteloos steeds op die button te drukken..
http://www.phpbbhacks.com/download/3247
Dat is hem,
Alvast Bedankt!! :thumb:
Geplaatst: 26 feb 2005, 10:30
door Cheeta
Geplaatst: 26 feb 2005, 10:36
door LoYaL
Die vind ik lelijk... maar weet je wel hoe je die andere kan aanpassen dan???
Geplaatst: 26 feb 2005, 10:43
door Cheeta
je wilt dat je niet eerst op een knop hoeft te drukken om het te activeren?
heb je een link naar je forum want heb geen flauw idee hoe deze deruit ziet
en wat doet die als je dit stuk weghaalt
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>
Geplaatst: 26 feb 2005, 11:18
door Lontronics
Dan zal de boel waarschijnlijk niet meer werken aangezien je ook de functie checkform dan verwijdert
Wat ik me afvraag, wordt hier nou bedoeld dat je eerst op de toets quick reply moet drukken alvorens je quick reply in te kunnen typen OF moet je hetgene wat je ingetypt hebt bevestigen met een druk op de knop?
Het eerste lijkt me idd een beetje onzinnig, het tweede lijkt me logisch...
Ik heb zelf de quick reply van Smartor enigszins aangepast zodat hij even breed is als de topic en dat je slechts een button hebt, nl de >ok< .
Mocht dit een interessante optie zijn dan laat maar ff weten dan zal ik de boel hier posten
Jan
Geplaatst: 26 feb 2005, 11:24
door Cheeta
het is het 1ste
dat is gekopieerd van vbulletin

Geplaatst: 26 feb 2005, 11:51
door Bee
Ik zou een link handig vinden, dan kan ik je template bekijken, en de wijzigingen die ik in gedachte heb geven.
Geplaatst: 26 feb 2005, 11:57
door Lontronics
Dat is dan idd een beetje onzinnig...
Ik heb het zo gedaan:
quick_reply.tpl:
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 -->
quick_reply.php:
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');
?>
En de install.txt:
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
Het enige wat ik heb gedaan is de mod van Smartor uitkleden, dus ik heb er zelf geen code aan toegevoegd en alle credits gaan dus gewoon naar Smartor

Bij mij werkt de mod naar tevredenheid op deze manier.
Een printscreen van hoe het er bij mij uitziet:
screenshot
Groeten,
Jan
Geplaatst: 26 feb 2005, 14:32
door Bee
Opgelost, even iets verwijderen, en klaar is men, dan is dat hele aanpassen niet nodig

Geplaatst: 26 feb 2005, 14:33
door LoYaL
Is al opgelost dankzij Bee :thumb:
Geplaatst: 26 feb 2005, 14:52
door Cheeta
plaats het jusite antwoord dan ff aub
Geplaatst: 26 feb 2005, 15:02
door Bee
Er zit in Quick_post.tpl een Layer (<div ... >) en daarin een style attribuut. Verwijder de visibility:hidden; daarin, en je hoeft niet meer te drukken
