Log in

View Full Version : Argh... VBulletin Header / Hook... Jebus...


eob
01-27-2007, 03:00 AM
Ok, I want to do something oh, so, simple but VBulletin is having none of it :D God damn American software... :D

Here's the deal... On my site I have a single header file called 'head.php'. On any page on my site which I want to use the same header, I just wham in

include ('head.php');

..And it spits out a lovely pre-formatted header with lots of 'Welcome to my Website' stuff, the navbar, etc.

Including it as a hook means it works, but, it's all spitted out at the start of the page, ie you have a situation like this:


<table>
welcome to my website
</table>

<head>


Which is completely nuts from a HTML perspective :D

How the hell do I get VBulletin to run my 'head.php' file just before the rest of the forum content (exactly where the default VBulletin logo would go?)

All help and suggestions much appreciated!

PS. Can't edit the head.php file because it's integrated into about 453 files on my actual website, and I can't just cut & paste the HTML/PHP into VBulletin because it changes alllll the time..

Zachery
01-27-2007, 03:27 AM
Not that I have a anwser for you right at this moment, but Its english software for the record.

eob
01-27-2007, 04:33 PM
Even worse :D

Has anybody got any advice or is everyone as stumped as I am???

Anyone? Hello?
*knocks on screen*

Why do all the VB coders wimp out when the going gets tough :D Hate to break it to you guys but the SMF coders would take you all down in a man-on-man fight in an abandoned warehouse with their superior l33t coding skillz :D

Paul M
01-27-2007, 09:27 PM
Perhaps you should ask the "SMF coders" then - insulting the software, and the people you want help from, isn't going to get you very far .......

Dismounted
01-28-2007, 02:54 AM
You're never going to get a hook in the middle of a template....And next time, don't insult the software and think it's humour.
ob_start();
require_once("head.php");
$header = ob_get_contents();
ob_end_clean();
Put that into a plugin at the hook 'global_start' and put '$header' in the template where you want it displayed.