The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
How do I include a site wide header file?
I've got a site with multiple applications...
My forum is located in: /forum My global menu is located in: /_common/header/header.inc I've read a crap load of threads on this... How do I include my global site menu at the top of every page of my forum? (vb 3.5.4) I apologize for the duplicate question, I just can't get anything to work from previous posts. I would think this should be much easier than it is... ugh! I've tried modifying global.php, I've tried adding a plugin hook to global_start and global_complete containing the php include code, I've tried adding the include to the template header... I've noticed that the vast majority of the answers on this topic are incomplete answers which assume you already understand the vb style/templating system pretty well... some detailed instructions would be nice... Thanks in advance! Help would be appreciated as there are just a ton of threads on this topic that are either (1) not answered or (2) have incomplete answers or (3) have incorrect answers. Here is what I've tried... ----------------------------------- Create a new Plugin: Hook Location: global_start Title: Global Menu Plugin PHP Code: ob_start(); include_once(/_common/header/header.inc’); $global_menu = ob_get_contents(); ob_end_clean(); ---------------------------------- At the top of my header template I placed: $global_menu --------------------------------- In my headinclude: <script type="text/javascript" language="JavaScript1.2" src="/_common/header/stmenu.js"></script> ---------------------------------- Contents of header.inc: <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <table width="100%" height="28" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000"> <tr> <td><a href="/"><img src="logo.png" width="113" height="28" border="0" /></a></td> <td> <script type="text/javascript" language="JavaScript1.2"> <!-- stm_bm(["menu4097",650,"","blank.gif",0,"","",2,0,250,250, 1000,1,0,0,"","100%",67108897,0,1,2,"hand","hand", ""],this); stm_bp("p0",[0,4,0,0,0,5,0,0,100,"progidXImageTransform.Micro soft.Fade(overlap=.5,enabled=0,Duration=1.00)",-2,"progidXImageTransform.Microsoft.Fade(overlap= .5,enabled=0,Duration=1.00)",-2,10,0,0,"#999999","#000000","",3,0,0,"#000000"]); stm_ai("p0i0",[0," Wiki ","","",-1,-1,0,"/wiki","_self","","","","",0,0,0,"","",0,0,0,0,1,"# 000000",0,"#A5D30C",0,"","",3,3,1,1,"#000000","#AD D629","#FFFFFF","#000000","9pt Verdana","9pt Verdana",0,0]); stm_aix("p0i1","p0i0",[0," Forum ","","",-1,-1,0,"/forum"]); stm_aix("p0i2","p0i0",[0," News ","","",-1,-1,0,"/news"]); stm_aix("p0i3","p0i0",[0," Rumors ","","",-1,-1,0,"/rumors"]); stm_aix("p0i4","p0i0",[0," Resources ","","",-1,-1,0,"/resources"]); stm_aix("p0i5","p0i0",[0," Links ","","",-1,-1,0,"/links"]); stm_ep(); stm_em(); //--> </script> </td> </tr> </table> </td> </tr> <tr> <td><table width="100%" border="0" cellpadding="0" cellspacing="0" background="line.png" bgcolor="#000000"> <tr> <td height="8"><img src="line_spacer.gif" width="8" height="8" /></td> </tr> </table></td> </tr> </table> ------------------------------- All of this and the include still doesn't work... On a normal site this would just be one simple include line. What am I missing!?!?! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|