Announcement

Collapse
No announcement yet.

Javascript Integration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Javascript Integration

    Hello,
    I'm new to vbulletin but have lots of experience in php programming. I'm designing a skin for my vbulletin board and am having trouble:

    The Problem
    I'm editing my header and trying to add a java header (seen below). Whenever I edit the header template and add the code (seen below) I get errors. How can I insert this java properly without getting errors?
    All help will be greatly appreciated!

    Code:
    <script language="JavaScript" vqptag="datafile" src="fw_nav.js"></script>
    <script language="JavaScript" vqptag="doc_level_settings" vqp_datafile0="fw_nav.js" vqp_uid0=680686>
     
    //Document Level Menu Settings
    cdd__codebase = ""
    cdd__codebase680686 = ""
    cdd__activate_onclick = false
    cdd__showhide_delay = 200
    cdd__url_target = "_self"
    cdd__url_features = "resizable=1, scrollbars=1, titlebar=1, menubar=1, toolbar=1, location=1, status=1, directories=1, channelmode=0, fullscreen=0"
    cdd__display_urls_in_status_bar = true
    cdd__default_cursor = "hand"
    </script>
     
    <script language="JavaScript" vqptag="loader">
    //NavStudio Code (Warning: Do Not Alter!)
    if (window.showHelp){b_type = "ie"; if (!window.attachEvent) b_type += "mac";}if (document.createElementNS) b_type = "dom";if (navigator.userAgent.indexOf("afari")>-1) b_type = "safari";if (window.opera) b_type = "opera"; qmap1 = "\<\script language=\"JavaScript\" vqptag='loader_sub' src=\""; qmap2 = ".js\">\<\/script\>";;function iesf(){};;function vqp_error(val){alert(val)}
    if (b_type){document.write(qmap1+cdd__codebase+"pbrowser_"+b_type+qmap2);document.close();}
    </script>
     
    <script language='JavaScript' vqptag='placement' vqp_menuid=680686>create_menu(680686)</script>
    *I posted this on one of the other vbulletin forums, but nobody seemed to know the answer, so I'm posting it here.*

  • #2
    What kind of errors do you get?

    Comment


    • #3
      The browser says "PAGE DONE, BUT WITH ERRORS" and it wont display"

      I figured out how to get it to display, but it isnt displaying properly now. The header in the forum can be seen here:

      vb buttonsets.com/forum
      (NO SPACE BETWEEN THE WORDS BECAUSE THE FORUM DOESNT ALLOW IT AS ONE WORD)

      To see the header properly displayed go here
      vb buttonsets.com
      (ONCE AGAIN NO SPACE)


      Do you see what I mean?
      I know it's possible because I saw another site with the same code and it was working find on their vBulletin.

      Comment


      • #4
        I see the javascript in your page source, but your forum's seem to be missing the code for the rest of the header:

        Code:
          <table width="100%" cellpadding="0" cellspacing="0" class="header">
            <tr> 
              <td width="30%"><img src="logo.gif" width="290" height="72" alt="Florida Wakeboarding"></td>
              <td width="70%" align="right"><a href='http://floridawakeboarding.com/phpadsnew/adclick.php?n=a2e5bcc8' target='_blank'><img src='http://floridawakeboarding.com/phpadsnew/adview.php?what=zone:1&amp;n=a2e5bcc8' border='1' alt='' class="banner"></a></td>
            </tr>
          </table>
          <table width="100%" cellpadding="0" cellspacing="0" class="nav">
        
            <tr> 
              <td width="20%"><script language='JavaScript' vqptag='placement' vqp_menuid=680686>create_menu(680686)</script></td>
            </tr>
          </table>

        Comment


        • #5
          Hi,

          I've now added the rest of the header and it can be seen on the forum:

          vb buttonsets.com/forum
          (NO SPACE)

          I still have yet to get the header with no left and right margin but thats no problem. If you notice I still have the same problem with the navbar.


          Heres an example of a site who uses the same coding for their navbar and it works fine in VB
          http://www.nervclan.com/forums/

          And thanks for helping Jake, I really appreciate it.

          Comment


          • #6
            The navbar is working fine for me. What is the problem you are having?

            Comment


            • #7
              If you notice the navbar doesn't look like it should. Compare the forum navbar to the regular navbar on the index. You will see the effects are different, there ARE dividers, and it looks smoother.

              Comment


              • #8
                Try adding your CSS include to the headinclude template:

                Code:
                <link href="../css.css" rel="stylesheet" type="text/css">

                Comment


                • #9
                  I just found out the fix to this problem from another member.

                  In your style vars of your template you must change the DOCTYPE to:

                  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

                  Thanks for your help Jack.

                  Comment


                  • #10
                    Now theres only a slight problem, the content (besides the header itself) appears to be aligned to the right more then usual causing the display to be wider then it should. I can't seem to be able to get the content back to its normal position, ideas?

                    Comment


                    • #11
                      See my post in this thread.

                      Comment


                      • #12
                        Thanks works good now, but unfortunatly the content is right on the edges there is no space.
                        Last edited by 4nmedia; Sun 12 Dec '04, 3:35pm.

                        Comment


                        • #13
                          That thread identifies both the body margins and spacers which make up the total space between the edge and the forum content. If both the margins and spacers are set to 0, then there will be no space.

                          Comment


                          • #14
                            I've managed to create space on the side edges but my I can't seem to get my header to stretch 100%. I've even tried using margin-right: -5px; and margin-left: -5px; No luck

                            Comment


                            • #15
                              Try setting the margins to 0 and the spacer to something other than 0.

                              Comment

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