Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-23-2006, 08:19 AM
qbonoguy qbonoguy is offline
 
Join Date: Jul 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!?!?!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:03 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03612 seconds
  • Memory Usage 2,168KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)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
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete