The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Quick quote

View previous topic View next topic Go down

Solved Quick quote

Post by Ghost Pirate on August 13th 2014, 2:25 am

Quick quote
I installed it on my Ghosts Forum it's a Phpbb3 and it's working  Smile 
them
I installed it on my fish forum it's a Phpbb2 and it's not working   Sad 
here is a SS may help you it's from my Phpbb2 forum


Ghost Pirate
Forumember

Male Posts : 255
Reputation : 78
Language : English, Greman, Spanish

Back to top Go down

Solved Re: Quick quote

Post by Ange Tuteur on August 13th 2014, 4:56 am

Hi,

There was a small mistake in the script with the conditional statement, replace your script by :
Code:
$(function(){
  var forum_version = 0,
  new_button = true,
  quote_image = 'http://i39.servimg.com/u/f39/18/90/10/82/render13.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') return;
    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;
});

I corrected the tutorial, thanks. Smile

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2681
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Quick quote

Post by Ghost Pirate on August 13th 2014, 5:26 am

Hi Ange Tuteur

Thank You it works now  thumleft

Ghost Pirate
Forumember

Male Posts : 255
Reputation : 78
Language : English, Greman, Spanish

Back to top Go down

Solved Re: Quick quote

Post by Derri on August 13th 2014, 8:40 am

Topic solved and archived


Forum Rules : : Forumotion Staff : : Appeal A Warning : : FAQ : : Tips & Tricks : : Forgotten Password/Login Issues
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


Derri
Administrator
Administrator

Male Posts : 8355
Reputation : 571
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

View previous topic View next topic Back to top


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