The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How to quote in quick reply?

2 posters

Go down

Solved How to quote in quick reply?

Post by bizzydesigner March 24th 2017, 8:24 pm

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
bizzydesigner
bizzydesigner
New Member

Posts : 3
Reputation : 1
Language : English

http://thecrats.forumotion.com

Back to top Go down

Solved Re: How to quote in quick reply?

Post by Guest March 24th 2017, 8:27 pm

Hello @bizzydesigner,

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?
avatar
Guest
Guest


Back to top Go down

Solved Re: How to quote in quick reply?

Post by bizzydesigner March 24th 2017, 8:33 pm

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?

bizzydesigner
bizzydesigner
New Member

Posts : 3
Reputation : 1
Language : English

http://thecrats.forumotion.com

Back to top Go down

Solved Re: How to quote in quick reply?

Post by Guest March 24th 2017, 8:37 pm

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
avatar
Guest
Guest


Back to top Go down

Solved Re: How to quote in quick reply?

Post by bizzydesigner March 24th 2017, 8:42 pm

That did it! Thanks so much!

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;
});
[/quote]
bizzydesigner
bizzydesigner
New Member

Posts : 3
Reputation : 1
Language : English

http://thecrats.forumotion.com

Back to top Go down

Solved Re: How to quote in quick reply?

Post by Guest March 24th 2017, 8:46 pm

You are welcome! Glad that was able to fix it for you! Great thanks to @Ange Tuteur for the code that I found Smile

Cheers,
James
avatar
Guest
Guest


Back to top Go down

Solved Re: How to quote in quick reply?

Post by SLGray March 24th 2017, 9:08 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


How to quote in quick reply? Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51555
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum