Announcement

Collapse
No announcement yet.

PHP include for header

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

  • PHP include for header

    ok, so I was able to include my php header file on the forums using the following:

    Code:
    ob_start();
    require("/home/thexyfac/public_html/members/images/headermembers.php");
    $header = ob_get_contents();
    ob_end_clean();
    then using $header in the header template it in fact does include the file. problem is none of our dynamic menu's from the php file are working in vbulletin. They work fine as a standalone file, but what is vbulletin doing to make it not work?

    Here is the code found in our headermembers.php file

    Code:
     
    <link href="css.css" rel="stylesheet" type="text/css" />
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
     <tr>
      <td align="center">
    <table border="0" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" width="779" height="147">
      <tr>
    	<td valign="top">
    	  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[url="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0[/url]" width="779" height="147">
    		<param name="movie" value="img/header.swf" />
    		<param name="quality" value="high" />
    		<embed src="img/header.swf" quality="high" pluginspage="[url="http://www.macromedia.com/go/getflashplayer"]http://www.macromedia.com/go/getflashplayer[/url]" type="application/x-shockwave-flash" width="779" height="147"></embed>
    	  </object>
    	</td>
      </tr>
    </table>
    <table border="0" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" width="779" height="45">
     <tr>
      <td><img src="img/menubar.jpg" height="45" border="0" usemap="#Map" /></td>
     </tr>
    </table>
    <table border="0" background="img/submenubar.jpg" cellspacing="0" cellpadding="0" width="779" height="41">
     <tr>
      <td valign="middle" align="justify">
      <!-- Edit the dimensions of the below, plus background color-->
      <ilayer width="779" height="24" name="dep1" bgcolor="#E6E6FF">
      <layer name="dep2" width="779" height="24">
      </layer>
      </ilayer>
      <div id="describe" style="width:779px;height:28px" onmouseover="clear_delayhide()" onmouseout="resetit(event)"></div>
      </td>
     </tr>
    </table>
      
    <script language="JavaScript1.2" type="text/javascript">
    /*
    Tabs Menu (mouseover)- By Dynamic Drive
    For full source code and more DHTML scripts, visit [url="http://www.dynamicdrive.com/"]http://www.dynamicdrive.com[/url]
    This credit MUST stay intact for use
    */
    var submenu=new Array()
    //Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.
     
    submenu[1]='<table border=0 cellpadding=0 cellspacing=0 width=100% height=24><tr><td width=20% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/nandi/index.php">Introduction</a></td><TD>&nbsp;|&nbsp;</TD><td width=20% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/nandi/compplan.php">LFI Compensation Plan</a></td><TD>&nbsp;|&nbsp;</TD><td width=20% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/nandi/incomecalc.php">Income Calculator</a></td><TD>&nbsp;|&nbsp;</TD><td width=20% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/nandi/packages.php">Product Packages</a></td><TD>&nbsp;|&nbsp;</TD><td width=20% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/nandi/leads.php">Leads</a></td></tr></table>'
    submenu[2]='<table border=0 cellpadding=0 cellspacing=0 width=100% height=24><tr><td width=16% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/leadershiptools/index.php">Introduction</a></td><TD>&nbsp;|&nbsp;</TD><td width=16% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/leadershiptools/recognition.php">Recognition</a></td><TD>&nbsp;|&nbsp;</TD><td width=16% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/leadershiptools/richdad.php">Rich Dad Poor Dad</a></td><TD>&nbsp;|&nbsp;</TD><td width=16% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/leadershiptools/klemmer.php">Klemmer & Associates</a></td><TD>&nbsp;|&nbsp;</TD><td width=16% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/leadershiptools/brilliant.php">Brilliant Compensation</a></td><TD>&nbsp;|&nbsp;</TD><td width=16% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/leadershiptools/goldenmind.php">Golden Mastermind</a></td></tr></table>'
    submenu[3]='<table border=0 cellpadding=0 cellspacing=0 width=100% height=24><tr><td width=20% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/memberbens/index.php">Introduction</a></td><TD>&nbsp;|&nbsp;</TD><td width=20% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/memberbens/lifestylezproductions.php">Lifestylez Productions</a></td><TD>&nbsp;|&nbsp;</TD><td width=20% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/memberbens/xyrewards.php">XY Factor Rewards</a></td><TD>&nbsp;|&nbsp;</TD><td width=20% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/memberbens/nase.php">N.A.S.E.</a></td><TD>&nbsp;|&nbsp;</TD><td width=20% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/memberbens/xygear.php">XY Gear</a></td></tr></table>'
    submenu[4]='<table border=0 cellpadding=0 cellspacing=0 width=100% height=24><tr><td width=50% align="center"><B>Forum Search:</B> <input name="search" type="text" size="25">&nbsp;&nbsp;<B>GO</B></td><td width=50% align="center">  (To use the Forum Search, keep the mouse over the input box.)</td></tr></table>'
    submenu[5]='<table border=0 cellpadding=0 cellspacing=0 width=100% height=24><tr><td width=14% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/money/index.php">Introduction</a></td><TD>&nbsp;|&nbsp;</TD><td width=14% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/money/iras.php">IRA&acute;s</a></td><TD>&nbsp;|&nbsp;</TD><td width=14% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/money/mutualfunds.php">Mutual Funds</a></td><TD>&nbsp;|&nbsp;</TD><td width=14% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/money/taxincentives.php">Tax Incentive Products</a></td><TD>&nbsp;|&nbsp;</TD><td width=14% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/money/realestate.php">Real Estate</a></td><TD>&nbsp;|&nbsp;</TD><td width=14% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/money/insurance.php">Insurance</a></td><TD>&nbsp;|&nbsp;</TD><td width=14% align="center" valign="middle"><font size="1" face="Verdana"><b><a href="../members/money/nase.php">N.A.S.E.</a></td></tr></table>'
    //Set delay before submenu disappears after mouse moves out of it (in milliseconds)
    var delay_hide=500
    /////No need to edit beyond here
    var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""
    function showit(which){
    clear_delayhide()
    thecontent=(which==-1)? "" : submenu[which]
    if (document.getElementById||document.all)
    menuobj.innerHTML=thecontent
    else if (document.layers){
    menuobj.document.write(thecontent)
    menuobj.document.close()
    }
    }
    function resetit(e){
    if (document.all&&!menuobj.contains(e.toElement))
    delayhide=setTimeout("showit(-1)",delay_hide)
    else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
    delayhide=setTimeout("showit(-1)",delay_hide)
    }
    function clear_delayhide(){
    if (window.delayhide)
    clearTimeout(delayhide)
    }
    function contains_ns6(a, b) {
    while (b.parentNode)
    if ((b = b.parentNode) == a)
    return true;
    return false;
    }
    </script>
    <map name="Map" id="Map">
      <area shape="rect" coords="23,7,104,38" href="#" onmouseover="showit(1)" />
      <area shape="rect" coords="172,7,257,39" href="#" onmouseover="showit(2)" />
      <area shape="rect" coords="342,6,423,37" href="#" onmouseover="showit(3)" />
      <area shape="rect" coords="500,6,602,39" href="#" onmouseover="showit(4)" />
      <area shape="rect" coords="675,7,747,38" href="#" onmouseover="showit(5)" />
    </map>
     </td>
     </tr>
    </table>
    Any idea's?

  • #2
    try using something besides $header as its a golbal varible ( at least i think so) try $flash_header

    Comment


    • #3
      Thank's for the suggestion, but still no luck. The file is being included just fine, it's just that our dynamic menu's are not loading up. You can see what I mean at the test site http://thexyfactor.com/members/index.php . I know, it isn't centered and nothing is finished, but as you rollover the top menu's they should have DHTML boxes that pop up over them.

      Comment


      • #4
        i would then guess it probally has to do with all the JS everywhere else

        as vB uses alot for the rest of the site >.>

        Comment


        • #5
          hmmm wonder if there is any way around that. Does vb3 maybe not like javascript in the header anymore? I guess our other option is just to build the entire thing in flash, but that is a last resort.

          Comment


          • #6
            well no i was suggesting that sumthing in your file might be conflicting with vBulletins already heavy js


            also instead of using a 3rd party drop down try looking at how vbulletin does it

            Comment


            • #7
              We are thinking that it might be a conflict with us using the ilayers with the layer inside of it. Do you know if you can use ilayers with no problems in vb3? I also did notice that the vbulletin DHTML drop downs do not work when we have our header included which does suggest that our javascript is in conflict with theirs somehow. We may look at changing our system over to the vbulletin menu system, but again that is only if we HAVE to.

              Comment


              • #8
                ive never used ilayers much to be honest, vB3 is just XHTML coding so are ilayer XHTML 1.0 complient?

                i would guess that the both are conflicting

                Comment


                • #9
                  The problem is you are introducing conflicting Javascript into the system. vBulletin's drop down menus require the onLoad event so you will have to choose between them or your new menu that you are introducing.
                  Translations provided by Google.

                  Wayne Luke
                  The Rabid Badger - a vBulletin Cloud demonstration site.
                  vBulletin 5 API

                  Comment

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