vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Show Thread Enhancements - iQuote vB3 - Fast & Easy Text Quoting (https://vborg.vbsupport.ru/showthread.php?t=250449)

imedic 08-17-2011 11:19 AM

1 Attachment(s)
Many thanks for suggestion. I have made the modification and minified the file. Only uploading the file (minified) from the previous version over last version worked.

For who is lazy and want the file already edited so after citation page to be repositioned over the quick reply box can use attached file.

Best regards and thank you for a great great mod. It should be developed further to be able to quote that text in a PM / email or maybe even in social media.
Nice way to interact with content.
I will keep an eye here and vote all stars and nominate it too. This should be standard in vb

NOTE: Dont forget to change extension of saved file to .js (I cant upload js file to vb)!

cclaerhout 08-21-2011 02:30 PM

1 Attachment(s)
The members of "my" forum LOVE that addon. They also wanted to have this function in the 'newreply' page with the Advanced Editor. Fortunately the Javascript file was greatly documented. It took me hours, but I've succeed to do it :)

Thanks again Imedic to convert this hack to vB 3 !


P.S :
  • This mod uses what I called a "minimalist design". I didn't want a big menu to display.
  • To make it work with the "newreply' page, your template 'newreply_reviewbit' must not have been edited, which shouldn't be a problem.

MoMan 09-02-2011 11:21 AM

FYI version 1.1 in the original post supports social groups, but I've lost the non-minified file and will have to go looking for it.

I'd very much like to add the functionality for PMs as well.

Konstantinos 09-13-2011 05:39 PM

it works well but in chrome when u click the instant quote while the quoted text enters into quick reply the popup stays there and doesnt vanish :)

edit. it also quotes singatures and if someone has quoted someone else in a post and u quote the quoted text it inserts the quote username wrong ;)

mk craig 42 02-13-2012 03:45 AM

Everything works great however, it doesn't display the name
for example, it does this when I click it:

HTML Code:

[quote]=;2333]This is my quoted text[/quote]
As opposed to this:
HTML Code:

[quote=Craig;2333]This is my quoted text[/quote]
Any ideas? Here is my js file:

PHP Code:

var iQuote={selected_post_number:0,selected_text:"",context_menu:null,init:function(a){var b=fetch_object(a);if(!b){return}var c=fetch_tags(b,"td");for(var d=0;d<c.length;d++){if(!c[d].id||-1===c[d].id.indexOf("td_post_")){continue}var e=c[d].id;var f=e.substr(e.lastIndexOf("_")+1);YAHOO.util.Event.on(e,"mouseup",iQuote.selectionEnd,f);YAHOO.util.Event.on(e,"mousedown",iQuote.selectionStart,f)}iQuote.context_menu=new YAHOO.widget.Menu("iquote_popup_menu",{clicktohide:false});iQuote.context_menu.render(document.body)},selectionStart:function(a,b){var c=window.event||a;var d=!YAHOO.env.ua.ie&&c.button==0||YAHOO.env.ua.ie&&c.button==1;if(d){if(window.getSelection){window.getSelection().removeAllRanges()}else if(document.selection){document.selection.empty()}}if(iQuote.context_menu){iQuote.hide_menu()}iQuote.selected_post_number=b},selectionEnd:function(a,b){var c=window.event||a;var d=!YAHOO.env.ua.ie&&c.button==0||YAHOO.env.ua.ie&&c.button==1;if(!d){return}if(iQuote.selected_post_number&&iQuote.selected_post_number==b){iQuote.selected_text=iQuote.getSelectedText();if(""!==iQuote.selected_text){var e=YAHOO.util.Event.getXY(a);e[0]=e[0]+7;e[1]=e[1]-35;iQuote.context_menu.cfg.setProperty("xy",e);if(!YAHOO.env.ua.ie){var f=function(a){var b=document.createRange();b.setStart(a.anchorNode,a.anchorOffset);b.setEnd(a.focusNode,a.focusOffset);window.getSelection().addRange(b)};var g=function(a,b,c){f(c);iQuote.context_menu.unsubscribe("blur",g)};var h=function(a,b,c){iQuote.context_menu.subscribe("blur",g,c);iQuote.context_menu.blur();iQuote.context_menu.unsubscribe("focus",h)};if(window.getSelection){var i=window.getSelection().getRangeAt(0);var j={anchorNode:i.startContainer,anchorOffset:i.startOffset,focusNode:i.endContainer,focusOffset:i.endOffset};iQuote.context_menu.subscribe("focus",h,j)}}iQuote.context_menu.show();var k=function(a){iQuote.hide_menu();return true};YAHOO.util.Event.on(document,"keydown",k);YAHOO.util.Event.on(document,"contextmenu",k)}}else{iQuote.selected_text="";iQuote.selected_post_number=0}},getSelectedText:function(){if(window.getSelection){return window.getSelection().toString()}if(document.getSelection){return document.getSelection()}if(document.selection&&document.selection.createRange){return document.selection.createRange().text}return""},quote_text:function(){if(!iQuote.selected_post_number||!iQuote.selected_text){return false}var a=iQuote.getScrollXY();iQuote.qr_activate(iQuote.selected_post_number);var b=iQuote.getPosterName(iQuote.selected_post_number);var c=vB_Editor[QR_EditorID].wysiwyg_mode?"<br /><br />":"\r\n\r\n";vB_Editor[QR_EditorID].insert_text("[quote="+b+";"+iQuote.selected_post_number+"]"+iQuote.selected_text+"[/quote]"+c,false);iQuote.selected_post_number=0;iQuote.selected_text="";iQuote.hide_menu();window.location.hash="qrform";return false},qr_activate:function(a){var b=fetch_object("collapseobj_quickreply");if(b&&b.style.display=="none"){toggle_collapse("quickreply")}},getPosterName:function(a){var b=document.getElementById("postmenu_"+a);var c=YAHOO.util.Dom.getElementsByClassName("bigusername","a",b)[0];c=c.text||c.textContent||c.innerText||c.innerHTML.replace(/<[^>]+>/g,"");return PHP.htmlspecialchars(c)},hide_menu:function(){var a=iQuote.context_menu.srcElement.cloneNode(true);a.id="iquote_popup_menu";iQuote.context_menu.destroy();iQuote.context_menu=new YAHOO.widget.Menu(a,{clicktohide:false});iQuote.context_menu.render(document.body)},getScrollXY:function(){var a=0,b=0;if(typeof window.pageYOffset=="number"){b=window.pageYOffset;a=window.pageXOffset}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){b=document.body.scrollTop;a=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){b=document.documentElement.scrollTop;a=document.documentElement.scrollLeft}if(typeof window.pageYOffset!="number"&&!document.body&&!document.documentElement){return false}return[a,b]}} 


BirdOPrey5 02-13-2012 11:19 AM

I would check your postbit or postbit_legacy template- actually try it on a complete default style and see if you have the same problem or not.

mk craig 42 02-13-2012 02:36 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2299222)
I would check your postbit or postbit_legacy template- actually try it on a complete default style and see if you have the same problem or not.

Thanks for your reply BirdOPrey5, I found the problem, but I don't know how to fix it!

It's because I have Username Images installed, so I was testing this on myself, where I have a username image & it's not fetching my username.. I logged on today and tried on someone who doesn't have a username image, and it worked perfectly...

Any ideas of a fix to that, here is that section on my postbit_legacy

PHP Code:

<!-- User Name Images by World Domination -->
<
div id="postmenu_$post[postid]">
                    <if 
condition="$show['profile']">
                    <
class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]"><if condition="$post['field5']"><img src="$post[field5]max-width="170" max-height="30" border="0"/></a> <else />$post[musername]</a></if><script type="text/javascript"vbmenu_register("postmenu_$post[postid]"true); </script><else />$post[musername]</if>$threadauthor</div></center

       <
center><if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if></center


BirdOPrey5 02-14-2012 01:34 PM

I don't know if it would work but I'd try this...

change this code:
Code:

<if condition="$post['field5']"><img src="$post[field5]" max-width="170" max-height="30" border="0"/></a> <else />$post[musername]</a></if>
to this:
Code:

<if condition="$post['field5']"><img src="$post[field5]" max-width="170" max-height="30" border="0"/><span style="display:none;">$post[musername]</span></a><else />$post[musername]</a></if>
I'm not sure it will help or not- it will at least create the username but it will be invisible.

mk craig 42 02-14-2012 11:11 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2299597)
I don't know if it would work but I'd try this...

change this code:
Code:

<if condition="$post['field5']"><img src="$post[field5]" max-width="170" max-height="30" border="0"/></a> <else />$post[musername]</a></if>
to this:
Code:

<if condition="$post['field5']"><img src="$post[field5]" max-width="170" max-height="30" border="0"/><span style="display:none;">$post[musername]</span></a><else />$post[musername]</a></if>
I'm not sure it will help or not- it will at least create the username but it will be invisible.

You genius! I never even thought to do something like that! Worked like a charm, thanks so much :)

karabaja3 05-24-2015 09:40 PM

Does anyone know how to disable usage in the latest post?


All times are GMT. The time now is 09:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01248 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete