View Single Post
  #3  
Old 11-14-2011, 04:34 PM
patracy patracy is offline
 
Join Date: Feb 2006
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

These are from the same style.

Looking at the headinclude it looks like it's using references:

PHP Code:
<!-- CSS Stylesheet -->
$style[css]
<if 
condition="is_browser('opera') AND !is_browser('opera', '8.0.1')">
<
style type="text/css" id="vbulletin_opera8fix_css">
ulol padding-$stylevar[left]:20px; }
</
style>
</if>
<if 
condition="$show['editor_css']">
$editor_css
</if>
<!-- / 
CSS Stylesheet -->

<
script type="text/javascript" src="$stylevar[yuipath]/yahoo-dom-event/yahoo-dom-event.js?v=$vboptions[simpleversion]"></script>
<
script type="text/javascript" src="$stylevar[yuipath]/connection/connection-min.js?v=$vboptions[simpleversion]"></script>
<
script type="text/javascript">
<!--
var 
SESSIONURL "$session[sessionurl_js]";
var 
SECURITYTOKEN "$bbuserinfo[securitytoken]";
var 
IMGDIR_MISC "$stylevar[imgdir_misc]";
var 
vb_disable_ajax parseInt("$vboptions[disable_ajax]"10);
// -->
</script>
<
script type="text/javascript" src="clientscript/vbulletin_global.js?v=$vboptions[simpleversion]"></script>
<if 
condition="$show['popups']"><script type="text/javascript" src="clientscript/vbulletin_menu.js?v=$vboptions[simpleversion]"></script></if> 
To make matters worse, it seems that sometimes threads allow JS to function properly. But most of the time not. The main navbar and thread tool JS menus are what's being affected.

From the home of the forum, the navbar menu works fine. But as soon as I go into a post, it seems that all the JS fails to function.

--------------- Added [DATE]1321292175[/DATE] at [TIME]1321292175[/TIME] ---------------

I've also created a new style to test and the problem persists in the same manner there as well.

--------------- Added [DATE]1321293603[/DATE] at [TIME]1321293603[/TIME] ---------------

Looking in FF, I see some errors when I navigate a post.

Quote:
Error: YAHOO is not defined
Source File: http://www.steelsoldiers.com/clients...lobal.js?v=386
Line: 11
Quote:
Error: vBulletin is undefined
Source File: http://www.steelsoldiers.com/clients..._menu.js?v=386
Line: 11
Quote:
Error: $ is not defined
Source File: http://www.steelsoldiers.com/steel-s...rally-5-a.html
Line: 346
Quote:
Error: vBmenu is undefined
Source File: http://www.steelsoldiers.com/steel-s...rally-5-a.html
Line: 545
Quote:
Error: PHP is undefined
Source File: http://www.steelsoldiers.com/clients...quote.js?v=386
Line: 11
I would post the page source, but it exceeds the limit.

--------------- Added [DATE]1321298593[/DATE] at [TIME]1321298593[/TIME] ---------------

vBulletin is undefined error.
Quote:
vBulletin.events.systemInit.subscribe(function(){i f(vBulletin.elements.vB_Lightbox_Container){for(va r B=0;B<vBulletin.elements.vB_Lightbox_Container.len gth;B++){var A=vBulletin.elements.vB_Lightbox_Container[B];init_postbit_lightbox(A[0],A[1])}vBulletin.elements.vB_Lightbox_Container=null}}) ;var Lightboxes=new Array();var Lightbox_overlay=null;var Lightbox_overlay_select_handler=null;var Lightbox_event_default=null;var Lightbox_current=null;var Lightbox_map={};function vB_Lightbox(B,C,D,A){this.minborder=100;this.mindi mension=50;this.event_click=1;this.event_hover=2;t his.click_triggered=false;this.events_enabled=fals e;this.element=B;this.timeout=null;this.imageloade r=null;this.status=0;this.active=false;this.ajax_r eq=null;this.cursor=null;this.link=null;this.date= null;this.time=null;this.name=null;this.html=null; this.loader_link=null;this.loader_height=null;this .loader_width=null;this.lightbox=null;this.closebt n=null;this.img=null;this.uniqueid=C;this.containe rid=D;if(A&this.event_hover){YAHOO.util.Event.on(t his.element,"mouseover",this.countdown,this,true); YAHOO.util.Event.on(this.element,"mouseout",this.h alt,this,true)}if(A&this.event_click){YAHOO.util.E vent.on(this.element,"click",this.image_click,this ,true)}}vB_Lightbox.prototype.set_status=function( A,B){console.log("vB_Lightbox :: Set status = %d (%s)",A,B);this.status=A};vB_Lightbox.prototype.ch eck_status=function(A){if(this.status>=A){return true}else{console.warn("Checked status for %d, found %d",A,this.status);return false}};vB_Lightbox.prototype.countdown=function(A ){if(!this.active){this.set_status(1,"countdown"); this.cursor=YAHOO.util.Dom.getStyle(this.element," cursor");this.element.style.cursor="wait";this.cli ck_triggered=false;this.timeout=setTimeout("Lightb oxes['"+this.uniqueid+"'].load_lightbox();",1500)}};vB_Lightbox.prototype.h alt=function(A){if(this.status<2){this.set_status( 0,"halt")}clearTimeout(this.timeout);this.element. style.cursor=this.cursor};vB_Lightbox.prototype.im age_click=function(A){if(A.ctrlKey||A.shiftKey){re turn true}this.click_triggered=true;this.load_lightbox( A)};vB_Lightbox.prototype.load_lightbox=function(E ){if(this.check_status(0)&&!YAHOO.util.Connect.isC allInProgress(this.ajax_req)){this.set_status(2,"l oad_lightbox 1");if(Lightbox_current&&Lightbox_current.loader_l ink){Lightbox_current.img.src=Lightbox_current.loa der_link;Lightbox_current.img.width=Lightbox_curre nt.loader_width;Lightbox_current.img.height=Lightb ox_current.loader_height;center_element(Lightbox_c urrent.lightbox)}if(E){YAHOO.util.Event.stopEvent( E)}if(this.timeout){clearTimeout(this.timeout);thi s.element.style.cursor=this.cursor}if(this.html==n ull){var A=this.element.getAttribute("href");var B=A.substr(A.indexOf("?")+1)+"&securitytoken="+SEC URITYTOKEN+"&ajax=1&uniqueid="+this.uniqueid;if(Li ghtbox_map[this.containerid][this.uniqueid+1]==null){B=B+"&last=1"}if(Lightbox_map[this.containerid][this.uniqueid-1]==null){B=B+"&first=1"}B=B+"&total="+Lightbox_map[this.containerid].size();B=B+"&current="+(Lightbox_map[this.containerid].find(this.uniqueid)+1);this.show_overlay();try{th is.ajax_req=YAHOO.util.Connect.asyncRequest("POST" ,A,{success:this.handle_ajax_response,failure:this .handle_ajax_error,scope:this,timeout:vB_Default_T imeout},B)}catch(E){var D=A.substr(0,A.indexOf("?"));var C;if(C=D.match(/\/([^/]*attachment\.php)$/)){this.ajax_req=YAHOO.util.Connect.asyncRequest(" POST",C[1],{success:this.handle_ajax_response,failure:this.h andle_ajax_error,scope:this,timeout:vB_Default_Tim eout},B)}else{if(this.click_triggered){window.loca tion=A}}}}else{this.set_status(3,"load_lightbox 2");this.show_lightbox()}}};vB_Lightbox.prototype. handle_ajax_error=function(A){vBulletin_AJAX_Error _Handler(A);if(this.click_triggered){window.locati on=this.element.getAttribute("href")}};vB_Lightbox .prototype.handle_ajax_response=function(C){if(!th is.check_status(2)){return }if(C.responseXML){var E=C.responseXML.getElementsByTagName("error");if(E .length){this.set_status(0,"handle_ajax_response - error");if(E[0].firstChild.nodeValue=="notimage"){console.warn("A ttempted to load non-image (.%s) into lightbox. Aborted.",C.responseXML.getElementsByTagName("exte nsion")[0].firstChild.nodeValue)}else{alert(E[0].firstChild.nodeValue.replace(/<(\/|[a-z]+)[^>]+>/g,""))}return false}var B=C.responseXML.getElementsByTagName("link");if(B. length){this.set_status(3,"handle_ajax_response - success");this.show_overlay();this.link=B[0].firstChild.nodeValue;this.imageloader=new Image();YAHOO.util.Event.on(this.imageloader,"load ",this.show_lightbox,this,true);var D=new Array("date","time","name","html");for(var A=0;A<D.length;A++){this[D[A]]=C.responseXML.getElementsByTagName(D[A])[0].firstChild.nodeValue}this.lightbox=document.body. appendChild(string_to_node(this.html));this.closeb tn=YAHOO.util.Dom.get("lightboxbutton"+this.unique id);YAHOO.util.Event.on(this.closebtn,"click",this .hide_lightbox,this,true);YAHOO.util.Event.on(this .closebtn,"mouseover",this.highlight_btn,this.clos ebtn,true);YAHOO.util.Event.on(this.closebtn,"mous eout",this.highlight_btn,this.closebtn,true);this. prevbtn=YAHOO.util.Dom.get("lightboxprevbutton"+th is.uniqueid);YAHOO.util.Event.on(this.prevbtn,"cli ck",this.prev_lightbox,this,true);YAHOO.util.Event .on(this.prevbtn,"mouseover",this.highlight_btn,th is.prevbtn,true);YAHOO.util.Event.on(this.prevbtn, "mouseout",this.highlight_btn,this.prevbtn,true);t his.nextbtn=YAHOO.util.Dom.get("lightboxnextbutton "+this.uniqueid);YAHOO.util.Event.on(this.nextbtn, "click",this.next_lightbox,this,true);YAHOO.util.E vent.on(this.nextbtn,"mouseover",this.highlight_bt n,this.nextbtn,true);YAHOO.util.Event.on(this.next btn,"mouseout",this.highlight_btn,this.nextbtn,tru e);YAHOO.util.Event.on(YAHOO.util.Dom.get("lightbo xlink"+this.uniqueid),"click",this.hide_lightbox,t his,true);this.img=YAHOO.util.Dom.get("lightboximg "+this.uniqueid);this.loader_link=this.img.src;thi s.loader_width=this.img.width;this.loader_height=t his.img.height;this.imageloader.src=this.link;this .show_lightbox()}else{if(this.click_triggered){win dow.location=imagelink}}}else{if(this.click_trigge red){window.location=imagelink}}};vB_Lightbox.prot otype.show_overlay=function(){if(this.check_status (2)){var C=fetch_viewport_info();if(Lightbox_overlay==null) {Lightbox_overlay=document.createElement("div");Li ghtbox_overlay.id="Lightbox_overlay";var A={display:"none",position:"absolute",top:"0px",ba ckgroundColor:"#000000",opacity:0.85,zIndex:10};if (document.dir=="rtl"){A.right="0px"}else{A.left="0 px"}for(var B in A){if(YAHOO.lang.hasOwnProperty(A,B)){YAHOO.util.D om.setStyle(Lightbox_overlay,B,A[B])}}Lightbox_overlay=document.body.appendChild(Ligh tbox_overlay);Lightbox_overlay_select_handler=new vB_Select_Overlay_Handler(Lightbox_overlay)}YAHOO. util.Dom.setStyle(Lightbox_overlay,"display","");Y AHOO.util.Dom.setStyle(Lightbox_overlay,"width",C. w+"px");YAHOO.util.Dom.setStyle(Lightbox_overlay," height",C.h+"px");YAHOO.util.Dom.setXY(Lightbox_ov erlay,[C.x,C.y]);Lightbox_overlay_select_handler.hide()}};vB_Ligh tbox.prototype.show_lightbox=function(){if(this.ch eck_status(3)){if(Lightbox_current){Lightbox_curre nt.hide_lightbox(false,this,true)}this.show_overla y();if(!this.imageloader.complete&&this.imageloade r.readyState!="complete"){YAHOO.util.Event.removeL istener(this.imageloader,"load",this.show_lightbox );YAHOO.util.Event.on(this.imageloader,"load",this .show_lightbox,this,true)}else{this.img.src=this.l ink;this.resize_image();YAHOO.util.Dom.setStyle(th is.closebtn,"display","")}YAHOO.util.Dom.setStyle( this.lightbox,"display","");YAHOO.util.Dom.setStyl e(this.lightbox,"zIndex",11);if(Lightbox_map[this.containerid].size()==1){YAHOO.util.Dom.setStyle(this.prevbtn," display","none");YAHOO.util.Dom.setStyle(this.next btn,"display","none")}Lightbox_current=this;this.c enter_lightbox();this.active=true;this.enable_even ts()}};vB_Lightbox.prototype.hide_lightbox=functio n(B,C,A){if(B&&B.type=="keydown"&&B.keyCode!=27){r eturn }this.set_status(0,"hide_lightbox");this.disable_e vents();this.active=false;YAHOO.util.Dom.setStyle( this.lightbox,"display","none");if(!A){YAHOO.util. Dom.setStyle(Lightbox_overlay,"display","none")}Li ghtbox_overlay_select_handler.show();Lightbox_curr ent=null};vB_Lightbox.prototype.next_lightbox=func tion(B){var A=null;if(Lightbox_map[this.containerid][this.uniqueid+1]!=null){A=Lightboxes[this.uniqueid+1]}else{A=Lightboxes[Lightbox_map[this.containerid].first()]}A.load_lightbox()};vB_Lightbox.prototype.prev_lig htbox=function(B){var A=null;if(Lightbox_map[this.containerid][this.uniqueid-1]!=null){A=Lightboxes[this.uniqueid-1]}else{A=Lightboxes[Lightbox_map[this.containerid].last()]}A.load_lightbox()};vB_Lightbox.prototype.highligh t_btn=function(){var B=YAHOO.util.Dom.getStyle(this,"color");var A=YAHOO.util.Dom.getStyle(this,"background-color");var D,C;D=((B=="white"||B.toLowerCase()=="#ffffff")?"b lack":"white");C=((A=="black"||A.toLowerCase()=="# 000000")?"white":"black");YAHOO.util.Dom.setStyle( this,"color",D);YAHOO.util.Dom.setStyle(this,"back ground-color",C)};vB_Lightbox.prototype.center_lightbox=f unction(){center_element(this.lightbox)};vB_Lightb ox.prototype.handle_viewport_change=function(){thi s.resize_image();this.center_lightbox();this.show_ overlay()};vB_Lightbox.prototype.handle_viewport_c hange_ie=function(){setTimeout("Lightboxes['"+this.uniqueid+"'].handle_viewport_change();",100)};vB_Lightbox.prot otype.resize_image=function(){var C=fetch_viewport_info();var A=this.imageloader.width;var B=this.imageloader.height;if(A>C.w-this.minborder){A=C.w-this.minborder;A=(A<this.mindimension?this.mindime nsion:A);B=Math.ceil(this.imageloader.height*(A/this.imageloader.width))}if(B>C.h-this.minborder){B=C.h-this.minborder;B=(B<this.mindimension?this.mindime nsion:B);A=Math.ceil(this.imageloader.width*(B/this.imageloader.height))}this.img.setAttribute("w idth",A);this.img.setAttribute("height",B);this.im g.setAttribute("title",this.name+"; \n"+this.imageloader.width+" x "+this.imageloader.height+" (@"+Math.ceil(A/this.imageloader.width*100)+"%)");if(A<this.imagel oader.width||B<this.imageloader.height){console.in fo("vB_Lightbox :: Image original size: %dx%d, resizing to %dx%d",this.imageloader.width,this.imageloader.hei ght,A,B)}};vB_Lightbox.prototype.enable_events=fun ction(){if(!this.events_enabled){YAHOO.util.Event. on(window,"resize",(is_ie?this.handle_viewport_cha nge_ie:this.handle_viewport_change),this,true);YAH OO.util.Event.on(window,"scroll",this.hide_lightbo x,this,true);YAHOO.util.Event.on(window,"keydown", this.hide_lightbox,this,true);YAHOO.util.Event.on( Lightbox_overlay,"click",this.hide_lightbox,this,t rue);this.events_enabled=true}};vB_Lightbox.protot ype.disable_events=function(){if(this.events_enabl ed){YAHOO.util.Event.removeListener(window,"resize ",(is_ie?this.handle_viewport_change_ie:this.handl e_viewport_change));YAHOO.util.Event.removeListene r(window,"scroll",this.hide_lightbox);YAHOO.util.E vent.removeListener(window,"keydown",this.hide_lig htbox);YAHOO.util.Event.removeListener(Lightbox_ov erlay,"click",this.hide_lightbox);this.events_enab led=false}};vB_Lightbox_Container=function(){};vB_ Lightbox_Container.prototype.size=function(){var B=0;for(var A in this){if(YAHOO.lang.hasOwnProperty(this,A)){B++}}r eturn B};vB_Lightbox_Container.prototype.first=function( ){for(var A in this){if(YAHOO.lang.hasOwnProperty(this,A)){return A}}};vB_Lightbox_Container.prototype.last=function (){var B;for(var A in this){if(YAHOO.lang.hasOwnProperty(this,A)){B=A}}r eturn B};vB_Lightbox_Container.prototype.find=function(C ){var B=0;for(var A in this){if(YAHOO.lang.hasOwnProperty(this,A)){if(A== C){return B}B++}}return -1};function is_lightbox_element(A){return(typeof (A.getAttribute("rel"))=="string"&&A.getAttribute( "rel").match(/Lightbox[_]?(\d*)?/))}function init_postbit_lightbox(D,C,G){var A=userAgent.match(/applewebkit\/([0-9]+)/);if(A&&A[1]<522){return }if(Lightbox_event_default===null){Lightbox_event_ default=C}if(typeof (C)=="undefined"||C===false){C=(Lightbox_event_def ault?Lightbox_event_default:1+2)}var E=YAHOO.util.Dom.getElementsBy(is_lightbox_element ,"a",D);for(var B=0;B<E.length;B++){var F=Lightboxes.length;var H=E[B].getAttribute("rel").match(/Lightbox[_]?(\d*)?/).pop();H=(H?H:0);Lightboxes[F]=new vB_Lightbox(E[B],F,H,C);if(!Lightbox_map[H]||G){Lightbox_map[H]=new vB_Lightbox_Container();G=false}Lightbox_map[H][F]=F}};
From page source
Quote:
vBulletin.register_control("vB_Lightbox_Container" , "posts", 1);
PHP in undefined
Quote:
function mq_init(D){var C=fetch_cookie("vbulletin_multiquote");if(C!=null& &C!=""){C=C.split(",")}else{C=new Array()}var E;var A=fetch_tags(D,"img");for(var B=0;B<A.length;B++){if(A[B].id&&A[B].id.substr(0,3)=="mq_"){E=A[B].id.substr(3);A[B].onclick=function(F){return mq_click(this.id.substr(3))};change_mq_image(E,(PH P.in_array(E,C)>-1?true:false))}}}function mq_click(F){var D=fetch_cookie("vbulletin_multiquote");var B=new Array();var E=false;if(D!=null&&D!=""){D=D.split(",");for(C in D){if(!YAHOO.lang.hasOwnProperty(D,C)){continue}if (D[C]==F){E=true}else{if(D[C]){B.push(D[C])}}}}change_mq_image(F,(E?false:true));if(!E){B.pu sh(F);if(typeof mqlimit!="undefined"&&mqlimit>0){for(var C=0;C<(B.length-mqlimit);C++){var A=B.shift();change_mq_image(A,false)}}}set_cookie( "vbulletin_multiquote",B.join(","));return false}function change_mq_image(C,B){var A=fetch_object("mq_"+C);if(A){if(B==true){A.src=A. src.replace(/\/multiquote_off\.([a-zA-Z0-9]+)$/,"/multiquote_on.$1")}else{A.src=A.src.replace(/\/multiquote_on\.([a-zA-Z0-9]+)$/,"/multiquote_off.$1")}}}mq_init(fetch_object("posts" ));
Yahoo is not defined error:
Quote:
var link_spans = YAHOO.util.Dom.getElementsByClassName("top_link", "span");
That's found in the file /clientscript/special_section.js

--------------- Added [DATE]1321300941[/DATE] at [TIME]1321300941[/TIME] ---------------

Pages JS will work from:

/search.php
/forum.php
/misc.php

It's random it seems when viewing threads under /forum.php

--------------- Added [DATE]1321301876[/DATE] at [TIME]1321301876[/TIME] ---------------

Ok, I see something else. The threads that allow JS to work on are the direct post links.

Example:
www.site.com/showthread.php?t=12345

The ones that don't work are:
www.site.com/forumname/threadname.html

--------------- Added [DATE]1321305669[/DATE] at [TIME]1321305669[/TIME] ---------------

I believe this might be due to vbseo which I've disabled because the install failed?

--------------- Added [DATE]1321307996[/DATE] at [TIME]1321307996[/TIME] ---------------

Looks like I'm making progress, reloaded vbseo and I *think* things are working correctly now.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01365 seconds
  • Memory Usage 1,889KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (9)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete