The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hi guys,
I've been working on a forum today upgraded from a very old version (3.0.5) to the latest version (3.6.8 PL2). Now, on the old forum in the sytle manager there used to be a section called phpinclude_start and in this section I had the following code: Code:
// Example of how to include a seperate file:
ob_start();
if (eregi(".co.uk",$_SERVER['SERVER_NAME']) {
include("ukheader.php");
} else {
include("usheader.php");
}
$header = ob_get_contents();
ob_end_clean();
ob_start();
if eregi(".co.uk",$_SERVER['SERVER_NAME']) {
include("ukfooter.php");
} else {
include("usfooter.php");
}
$footer = ob_get_contents();
ob_end_clean();
// Now place a reference to $your_code where you want the resulting HTML to be displayed.
// This will most likely be the header or footer template.
This allowed me to include my own custom headers and footers depending on which site the user was looking at; the .com or the .co.uk site. However in the latest version that I've just upgraded to, it seems the phpinclude_start section of the style manager no longer exists and therefore my custom headers and footers are not working. I've been reading through and found I might need to use plugins to do this, but does anybody have any pointers on how to do this? Thanks in advance! |
|
#2
|
||||
|
||||
|
You need to add your codes to global_start hook as a plugin.
|
|
#3
|
|||
|
|||
|
Excellent, think i've got it now, thanks!
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|