Who is online?
In total there are 3 users online :: 0 Registered, 0 Hidden and 3 Guests None
Most users ever online was 246 on Tue 31 Jan - 2:47
Statistics
We have 150 registered usersThe newest registered user is Luxic
Our users have posted a total of 2050 messages in 200 subjects
Latest topics
» A small shareby Flora Today at 21:03
» Edit the 404 page on Forumotion
by LGforum Today at 15:29
» How to Change The Homepage?
by LGforum Today at 15:28
» Counter for my notices box
by Niko Today at 15:03
» 21. Show Recent Topics Preview In Accordion
by ReBoRN Yesterday at 19:08
9. Quote Post in Quick Reply (no page change)
Page 1 of 2 • Share •
Page 1 of 2 • 1, 2 
9. Quote Post in Quick Reply (no page change)
9. Quote post in Quick reply
What this script will do is change the function of your Quote button. Instead of taking you to another page with the quoted post, it will now put the post in the Quick Reply editor, without changing page. So when you click on the Quote button, you will see the quote in the quck reply.
Multiple Quote buttons can be clicked on the page for a nice and easy 'Multiquote' feature.
This will work in board type PHPBB3, Invision and PunBB. I didn't check phpbb2... out of laziness.
Also, for punBB (and phpbb2) it will not work if you have edited the class name of Quote button.
What you must do now is visit Javascript Management and create a new file. (or put it in another jQuery function if you know what you're doing). Tick 'in the topics' since it only needs to run on topc pages.
and here is the code:
[noguest]
[/noguest]
The same thing can be done for the Edit feature, but would require a bit more. But it is perfectly possible to click edit and be able to edit your post from the Quick Reply. I wonder if anyone can figure it out from this
What this script will do is change the function of your Quote button. Instead of taking you to another page with the quoted post, it will now put the post in the Quick Reply editor, without changing page. So when you click on the Quote button, you will see the quote in the quck reply.
Multiple Quote buttons can be clicked on the page for a nice and easy 'Multiquote' feature.
This will work in board type PHPBB3, Invision and PunBB. I didn't check phpbb2... out of laziness.
Also, for punBB (and phpbb2) it will not work if you have edited the class name of Quote button.
What you must do now is visit Javascript Management and create a new file. (or put it in another jQuery function if you know what you're doing). Tick 'in the topics' since it only needs to run on topc pages.
and here is the code:
[noguest]
- Code:
var CopyrightNotice='Quick Quote in Quick Reply for forumotion boards. Copyright © by AvacWeb. All Rights Reserved. Use and modification of this script is not allowed without this entire copyright notice in the original, copied, or modified script. No distribution without consent.';
$(function() {
$('.i_icon_quote').click(function(e) { e.preventDefault();
var url=this.parentNode.href;
$('body').append('<div id="LGquote" style="display:none"></div>');
var x=$('#LGquote');
x.load(url + ' textarea', function() {
var message=x.find('textarea').val();
var y=document.getElementById('quick_reply').message;
y.value+=message; y.focus();
$('#LGquote').remove();
});
});
});
[/noguest]
The same thing can be done for the Edit feature, but would require a bit more. But it is perfectly possible to click edit and be able to edit your post from the Quick Reply. I wonder if anyone can figure it out from this
Last edited by LGforum on Thu 5 Jan - 3:11; edited 4 times in total

LGforum- Forum Version: Phpbb3
Posts: 729
Join date: 2011-10-05
Location: UK

Re: 9. Quote Post in Quick Reply (no page change)
Amazing, thanks LGForum >
Johnny- Posts: 25
Join date: 2011-11-13
Re: 9. Quote Post in Quick Reply (no page change)
Fantastic LGForum. Thank you..

redindian- Posts: 14
Join date: 2011-11-28
Age: 36
Location: Malaysia

Re: 9. Quote Post in Quick Reply (no page change)
Sorry bro, not working in wysiwyg mode.

redindian- Posts: 14
Join date: 2011-11-28
Age: 36
Location: Malaysia

Re: 9. Quote Post in Quick Reply (no page change)
@ redindian's Turn the wysiwyg mode off. Go to: Admin>General>Messages Emails>Configuration. Scroll down under the messages to find: Activate the WYSIWYG mode by default in the posts : Cick "no."
Then try this again. It should work.
Edited to say: I tested this on my board (phpbb3). Works fine.
Then try this again. It should work.
Edited to say: I tested this on my board (phpbb3). Works fine.

Flora
Status: If you like gardening, please join my site. Ty. :)
Forum Version: Phpbb3
Posts: 151
Join date: 2011-11-18
Location: USA

Re: 9. Quote Post in Quick Reply (no page change)
Just tested it and it does not work in phpBB2, unless I did something wrong.
Suuki- Posts: 34
Join date: 2011-11-07
Re: 9. Quote Post in Quick Reply (no page change)
Suuki wrote:Just tested it and it does not work in phpBB2, unless I did something wrong.
I don't think the problem was that you did something wrong. The code wasn't tested for phpbb2.

Flora
Status: If you like gardening, please join my site. Ty. :)
Forum Version: Phpbb3
Posts: 151
Join date: 2011-11-18
Location: USA

Re: 9. Quote Post in Quick Reply (no page change)
Flora wrote:Suuki wrote:Just tested it and it does not work in phpBB2, unless I did something wrong.
I don't think the problem was that you did something wrong. The code wasn't tested for phpbb2.
Yeah XD
Suuki- Posts: 34
Join date: 2011-11-07
Re: 9. Quote Post in Quick Reply (no page change)
Flora wrote:@ redindian's Turn the wysiwyg mode off. Go to: Admin>General>Messages Emails>Configuration. Scroll down under the messages to find: Activate the WYSIWYG mode by default in the posts : Cick "no."
Then try this again. It should work.
Edited to say: I tested this on my board (phpbb3). Works fine.
Thank you Flora.

redindian- Posts: 14
Join date: 2011-11-28
Age: 36
Location: Malaysia

Re: 9. Quote Post in Quick Reply (no page change)
Hmm, one day i'll explain the issues with this method and update this tutorial to a much better way.
Howeer until then, i'd recommend to everyone not to use this if you are regularly posting code on the site. Such as this site, this tutorial would be BAD on this site.
EDIT: its been updated to fix the issues.
Howeer until then, i'd recommend to everyone not to use this if you are regularly posting code on the site. Such as this site, this tutorial would be BAD on this site.
EDIT: its been updated to fix the issues.
Last edited by LGforum on Wed 7 Dec - 16:59; edited 1 time in total

LGforum- Forum Version: Phpbb3
Posts: 729
Join date: 2011-10-05
Location: UK

Re: 9. Quote Post in Quick Reply (no page change)
@ redindian - You're welcome. Glad I was able to help. 

Flora
Status: If you like gardening, please join my site. Ty. :)
Forum Version: Phpbb3
Posts: 151
Join date: 2011-11-18
Location: USA

Re: 9. Quote Post in Quick Reply (no page change)
I have been working with this code lately & figuring out solution to a bug; but am unable.
The bug is when the quoted text contains the character &
so when quoted every & converts to & [the original html syntax] for &
The bug is when the quoted text contains the character &
so when quoted every & converts to & [the original html syntax] for &
ion-cube
Status: Testing
Posts: 121
Join date: 2011-10-19
Age: 23
Location: Pakistan
Re: 9. Quote Post in Quick Reply (no page change)
Your correct that is the bug.
However it is the same with every special character. Because this method gets the quotes text from the HTML, then it will always have the issue of presenting special characters with their HTML equivalents.
Since it someone has brought it up. I'll provide a fixed code sometime soon
EDIT: its been fixed.
However it is the same with every special character. Because this method gets the quotes text from the HTML, then it will always have the issue of presenting special characters with their HTML equivalents.
Since it someone has brought it up. I'll provide a fixed code sometime soon
EDIT: its been fixed.
Last edited by LGforum on Wed 7 Dec - 16:59; edited 1 time in total

LGforum- Forum Version: Phpbb3
Posts: 729
Join date: 2011-10-05
Location: UK

Re: 9. Quote Post in Quick Reply (no page change)
well off-topic, I am missing you somewhere else though your company has always been a pleasure; plus may I point out that when quote is clicked page doesnt scrolls down in Firefox/Chrome but yes in Opera.
i hav tried simpler approach like ths
[noguest]
ths works $('#text_editor_textarea').focus(); any other approach i be happy to listen
i hav tried simpler approach like ths
[noguest]
- Code:
$(function() {
$('.i_icon_quote').click(function() {
var x = this.parentNode.href;
$.get(x, function(response) {
var findmsg = response.indexOf('<textarea id="text_editor_textarea');
var start = response.indexOf('>', findmsg) + 1;
var end = response.indexOf('</textarea>');
var message = response.substring(start, end);
document.post.message.value += message;
// window.location = window.location.href += '#bottom'; //removed
document.getElementById("text_editor_textarea").focus();
});
return false;
});
});
ths works $('#text_editor_textarea').focus(); any other approach i be happy to listen
ion-cube
Status: Testing
Posts: 121
Join date: 2011-10-19
Age: 23
Location: Pakistan
Re: 9. Quote Post in Quick Reply (no page change)
Focusing on the textarea is great addition, i like it
I miss somewhere else too. But I can't come back unfortunately.
I miss somewhere else too. But I can't come back unfortunately.

LGforum- Forum Version: Phpbb3
Posts: 729
Join date: 2011-10-05
Location: UK

Page 1 of 2 • 1, 2 
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum