Where is this script coming from?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nakz
    New Member
    • Apr 2004
    • 9
    • 3.0.0 'Gold'

    Where is this script coming from?

    I think this script is causing an overflow error on IE Browser.
    Where can i find it?


    Code:
    <script type="text/javascript"><!--
    
    window.orig_onload = window.onload;
    window.onload = function() {
    if (is_ie || is_moz) { var cpost=document.location.hash;if(cpost){ if(cobj = fetch_object(cpost.substring(1,cpost.length)))cobj.scrollIntoView(true); }}
    
    if(typeof window.orig_onload == "function") window.orig_onload();
    }
    
    //-->
    </script>
    </body>
    
    </html>
    
    
    
    <script type="text/javascript">
    <!--
    	// Main vBulletin Javascript Initialization
    	vBulletin_init();
    //-->
    </script>
    
    <script type="text/javascript"><!--
    
    window.orig_onload = window.onload;
    window.onload = function() {
    if (is_ie || is_moz) { var cpost=document.location.hash;if(cpost){ if(cobj = fetch_object(cpost.substring(1,cpost.length)))cobj.scrollIntoView(true); }}
    
    if(typeof window.orig_onload == "function") window.orig_onload();
    }
    
    //-->
    </script>
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    I recognize the vBulletin_init(); call as being in the footer, so I would guess that other stuff is in the footer also. (You can always do a Search in Templates for it.)

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment

    • philg
      Member
      • Nov 2005
      • 65

      #3
      nakz, its vbseo that adds it. And I believe it an error on their behalf for placing it on the forumhome and showforum..

      You can remove it by editing vbseo/includes/functions_vbseo_hook.php

      find:
      case 'forumhome_complete':

      Regards,
      Phil

      Comment

      • Marvin Hlavac
        Member
        • Sep 2007
        • 98

        #4
        Could someone please explain what the script does? Is it safe to remove it (at least for guests?). Will any functionality be broken? Which one?

        I see the code not just on FORUMHOME & FORUMDISPLAY, but also in SHOWTHREAD pages. In SHOWTHREAD pages the code seems a bit different (larger). Would it be advisable to remove it from home & forums, and leave it as is in threads?

        Comment

        • Marvin Hlavac
          Member
          • Sep 2007
          • 98

          #5
          I removed the following code marked in red color from functions_vbseo_hook.php, but it didn't seem to have any effect:

          Code:
          break;
          case 'forumhome_complete':
          [COLOR=#ff0000]vbseo_insert_code(
          "if (is_ie || is_moz) { var cpost=document.location.hash;if(cpost){ if(cobj = fetch_object(cpost.substring(1,cpost.length)))cobj.scrollIntoView(true); }}",
          'onload');[/COLOR]
          if(!is_array($GLOBALS['birthdays']))
          {
          In the footer of my home, I still see the following code:

          Code:
          <script type="text/javascript">
          //<=!=[=C=D=A=T=A=[
          
          window.orig_onload = window.onload;
          window.onload = function() {
          if (is_ie || is_moz) { var cpost=document.location.hash;if(cpost){ if(cobj = fetch_object(cpost.substring(1,cpost.length)))cobj.scrollIntoView(true); }}
          
          if(typeof window.orig_onload == "function") window.orig_onload();
          }
          
          //]=]=>
          </script>
          
          How do I remove the script from my footer?

          Comment

          • Loco.M
            Senior Member
            • Mar 2005
            • 4319
            • 3.5.x

            #6
            Originally posted by Marvin Hlavac
            Could someone please explain what the script does? Is it safe to remove it (at least for guests?). Will any functionality be broken? Which one?

            I see the code not just on FORUMHOME & FORUMDISPLAY, but also in SHOWTHREAD pages. In SHOWTHREAD pages the code seems a bit different (larger). Would it be advisable to remove it from home & forums, and leave it as is in threads?
            You'll need to ask at vbseo.com for support on their product..
            -- Web Developer for hire
            ---Online Marketing Tools and Articles

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...