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]}}