View Full Version : Where are the PHP header and footer of vBulletin
sunshineyos
02-21-2008, 09:29 AM
Hey All,
I need to find the header and footer functions/files of the vBulletin forum system.
Does anyone know where those are located?
Thanks.
Marco van Herwaarden
02-21-2008, 09:45 AM
I think you mean the 'header' & 'footer' templates.
AdminCP -> Styles & Templates -> Style Manager.
sunshineyos
02-21-2008, 10:15 AM
What I mean is -
I need to load a PHP function everytime a page is loaded on my vBulletin forum - that is why I need to know where is the php file that is being loaded every time and retrives the header and the footer (retrieves the styles)
Marco van Herwaarden
02-21-2008, 10:33 AM
Then you probably mean ./global.php
sunshineyos
02-21-2008, 10:43 AM
Yes, Maybe global.php is where those header and footer are - but do you have ANY idea what functions are being called for loading the header and footer?
Opserty
02-21-2008, 11:30 AM
eval('$header = "'. fetch_template('header') .'";');
Probably...
If you want to load something on every page then use the global_start hook location for a plugin...
sunshineyos
02-21-2008, 11:35 AM
Thank you, you are right I found the header at init.php
Now I have a different problem - since I edited some things at the init.php file - I got a message on my control pannel : "Crack attempt detected. Your ip ... loggen and notify sent to our security department"... - Why ???
Opserty
02-21-2008, 11:46 AM
Undo your changes and make use of the Plugin System (http://www.vbulletin.com/docs/html/plugin_system) use the global_start hook as I suggested above.
sunshineyos
02-21-2008, 12:58 PM
Hey again,
Now a new problem just popped up - my system uses a $db variable too for my database management. Since the vBulletin uses a $db var too - it makes the system go crazy!
Is there's ANY way to change the $db var of vBulletin for a different name? (I can't change mine since ALL of my web system uses that var)...
Any Suggestions to solve that problem???
Kirk Y
02-21-2008, 01:08 PM
You could try $vbulletin->db.
Opserty
02-21-2008, 01:29 PM
// Unset vBulletins $db..
unset($db);
// Include your files and do what ever you need
require_once('/yourfolder/yourfile.php');
// Unset your db variable
unset($db);
// Reset vBulletin's db var
$db =& $vbulletin->db;
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.