How to quote in quick reply?
2 posters
Page 1 of 1
How to quote in quick reply?
Technical Details
Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : Yourself
When the problem appeared : Last couple of days
Forum link : http://thecrats.forumotion.com
Description of problem
Hello!I was wondering if anyone was able to effectively make it so when you quote reply it would go to the quick reply, instead of the other screen?
I tried using this, but when I hit quote afterwards it didn't do anything at all.
https://help.forumotion.com/t120810-quote-to-quick-reply
Any help would be appreciated!
Last edited by bizzydesigner on March 24th 2017, 8:48 pm; edited 1 time in total
Re: How to quote in quick reply?
Hello @bizzydesigner,
So you tried adding the code below?
And did you make sure you set it to work in the Topics and not "Homepage" when you put it in the Javascript Modules?
So you tried adding the code below?
- 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();
});
});
});
And did you make sure you set it to work in the Topics and not "Homepage" when you put it in the Javascript Modules?
Guest- Guest
Re: How to quote in quick reply?
Correct. I did that and selected in the topics. I just tried it again and I still get a dead button when I click the quote now. Out of curiosity, does the title make a difference when saving the JS?
Re: How to quote in quick reply?
bizzydesigner wrote:Correct. I did that and selected in the topics. I just tried it again and I still get a dead button when I click the quote now. Out of curiosity, does the title make a difference when saving the JS?
No, the title doesn't matter. The title is simply for you to make those codes more specific for your knowledge.
Try adding this instead:
- Code:
$(function(){
var forum_version = 1,
new_button = false,
quote_image = 'http://i39.servimg.com/u/f39/18/21/60/73/quick10.png';
if (forum_version == 0) n = [".postbody div",".name strong a"];
if (forum_version == 1) n = [".postbody .content div",".postprofile dl dt strong a"];
if (forum_version == 2) n = [".entry-content div",".username a"];
if (forum_version == 3) n = [".post-entry div",".postprofile-details dt a + br + a"];
if (new_button == true) { q = ".quickquote"; $(forum_version==1?"li:has(.i_icon_quote)":"a:has(.i_icon_quote)").after($('<li style="display:inline-block;list-style:none;"><a href="#quick_reply"><img src="'+quote_image+'" class="quickquote" alt="Quick quote" title="Quick quote" /></a></li>')) }
if (new_button == false) { q = "a:has(.i_icon_quote)"; $("a:has(.i_icon_quote)").attr("href", "#quick_reply"); $(".i_icon_quote").attr("title", "Reply with quote") }
$(document).on('mouseup',n[0],function(e){
qtext = $(this).parents(".post");
if (window.getSelection) theSelection = window.getSelection().toString();
else if (document.getSelection) theSelection = document.getSelection();
else if (document.selection) theSelection = document.selection.createRange().text;
});
$(q).click(function () {
if (typeof qtext == 'undefined') {
qtext = $(this).closest('.post');
theSelection = qtext.find(n[0]).text();
}
uname = qtext.find(n[1]).text();
$("div.sceditor-toolbar + iframe").contents().find("body").append('<blockquote><cite>' + uname + '</cite>' + theSelection + '</blockquote> <br />');
$('.sceditor-container textarea')[0].value += '[quote="' + uname + '"]' + theSelection + '[/quote]'
});
var n,q;
});
Last edited by Jadster on March 24th 2017, 8:45 pm; edited 1 time in total
Guest- Guest
Re: How to quote in quick reply?
That did it! Thanks so much!
[/quote]Jadster wrote:bizzydesigner wrote:Correct. I did that and selected in the topics. I just tried it again and I still get a dead button when I click the quote now. Out of curiosity, does the title make a difference when saving the JS?
No, the title doesn't matter. The title is simply for you to make those codes more specific for your knowledge.
Try adding this instead:
[code] $(function(){
var forum_version = 1,
new_button = false,
quote_image = 'https://i.servimg.com/u/f39/18/21/60/73/quick10.png';
if (forum_version == 0) n = [".postbody div",".name strong a"];
if (forum_version == 1) n = [".postbody .content div",".postprofile dl dt strong a"];
if (forum_version == 2) n = [".entry-content div",".username a"];
if (forum_version == 3) n = [".post-entry div",".postprofile-details dt a + br + a"];
if (new_button == true) { q = ".quickquote"; $(forum_version==1?"li:has(.i_icon_quote)":"a:has(.i_icon_quote)").after($('<li style="display:inline-block;list-style:none;"><a href="#quick_reply"><img src="'+quote_image+'" class="quickquote" alt="Quick quote" title="Quick quote" /></a></li>')) }
if (new_button == false) { q = "a:has(.i_icon_quote)"; $("a:has(.i_icon_quote)").attr("href", "#quick_reply"); $(".i_icon_quote").attr("title", "Reply with quote") }
$(document).on('mouseup',n[0],function(e){
qtext = $(this).parents(".post");
if (window.getSelection) theSelection = window.getSelection().toString();
else if (document.getSelection) theSelection = document.getSelection();
else if (document.selection) theSelection = document.selection.createRange().text;
});
$(q).click(function () {
if (typeof qtext == 'undefined') {
qtext = $(this).closest('.post');
theSelection = qtext.find(n[0]).text();
}
uname = qtext.find(n[1]).text();
$("div.sceditor-toolbar + iframe").contents().find("body").append('<blockquote><cite>' + uname + '</cite>' + theSelection + '</blockquote> <br />');
$('.sceditor-container textarea')[0].value += ''' + uname + ' wrote:' + theSelection + '
});
var n,q;
});
Re: How to quote in quick reply?
You are welcome! Glad that was able to fix it for you! Great thanks to @Ange Tuteur for the code that I found
Cheers,
James
Cheers,
James
Guest- Guest
Re: How to quote in quick reply?
Problem solved & topic archived.
|
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Quote to quick reply
» Quick reply and reply some functions not working
» Quoting a quote - Script bug Quick quote?
» When onclick button of "Post Reply" scroll down to the quick reply
» smilies code for quick reply in reply
» Quick reply and reply some functions not working
» Quoting a quote - Script bug Quick quote?
» When onclick button of "Post Reply" scroll down to the quick reply
» smilies code for quick reply in reply
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum