Log in

View Full Version : Adding include files with hooks


Michi
11-19-2005, 04:38 AM
Hi,

I'm trying to wrap the vbulletin with my own layout files. Right now I have a plugin at Global_start that says:

ob_start();
include("/www/path/beginPage.php");
$header_inc = ob_get_contents();
ob_end_clean();
ob_start();
include("/www/path/beginBody.php");
$header_inc2 = ob_get_contents();
ob_end_clean();
ob_start();
include("/www/path/endPage.php");
$footer_inc = ob_get_contents();
ob_end_clean();

Then the files I'm including have mostly plain html with some php functions etc, nothing weird, and the files are working 100% with other pages on my site.

The variables $header_inc etc are added in the templates, the first two in the beginning of the header-template and the last in the footer-template.

The weird thing is - IF there's some php errors in the include files, all forum pages show the layout files up to the point where the error occurs - but no vbulletin stuff.

BUT if there are no errors in the files, the forum pages show up as "normal", there's no sign of any include file I've tried to add.

I even tested it so that the include file only has 1 word, eg "HELLO", but even that doesn't show up.

Why is that happening?

Michi
11-21-2005, 10:40 AM
Hi,

I'm trying to wrap the vbulletin with my own layout files. Right now I have a plugin at Global_start that says:

ob_start();
include("/www/path/beginPage.php");
$header_inc = ob_get_contents();
ob_end_clean();
ob_start();
include("/www/path/beginBody.php");
$header_inc2 = ob_get_contents();
ob_end_clean();
ob_start();
include("/www/path/endPage.php");
$footer_inc = ob_get_contents();
ob_end_clean();

Then the files I'm including have mostly plain html with some php functions etc, nothing weird, and the files are working 100% with other pages on my site.

The variables $header_inc etc are added in the templates, the first two in the beginning of the header-template and the last in the footer-template.

The weird thing is - IF there's some php errors in the include files, all forum pages show the layout files up to the point where the error occurs - but no vbulletin stuff.

BUT if there are no errors in the files, the forum pages show up as "normal", there's no sign of any include file I've tried to add.

I even tested it so that the include file only has 1 word, eg "HELLO", but even that doesn't show up.

Why is that happening?

Anyone?