Log in

View Full Version : including a header file?


MamboCube
10-31-2005, 03:05 PM
how do i include my own header file on my forum, it used to have 4 boxes in the admin panel where in phpinclude_start i could enter my own include,

but with the new version it doesnt have it

so does anyone know how to include my own header?

Zachery
10-31-2005, 03:07 PM
how do i include my own header file on my forum, it used to have 4 boxes in the admin panel where in phpinclude_start i could enter my own include,

but with the new version it doesnt have it

so does anyone know how to include my own header?

Use the global_start hook, just like you used phpinclude_start

MamboCube
10-31-2005, 04:19 PM
thnx again for your reply zachery

i dont know how to use the global_start hook, befor there was a box where i could include the header, but now there isnt,
so in wat file do i have to include it or where exactly in the admin panel?

and how do i use the global_start hook?

thnx

MamboCube
11-02-2005, 05:47 PM
can anyone help me with this?

evenmonkeys
11-02-2005, 10:44 PM
I can help you... I'm replying right now...

The first thing you need to do is create a php file. All that needs to be in the file is what you're trying to accomplish. You don't need to add the include crap. Once you got all that finished, upload it to your site. Keep the location in mind.

Next step is creating the hook. Go to your admincp > Plugin System > Add New Plugin... Now enter this information in.

Hook Location: global_start (1/4 down)
Title: Whatever
PHP Plugin Code:

ob_start();
include('http://site.com/file.php');
$variable = ob_get_contents();
ob_end_clean();

Active: Yes

Some details on that... Specify the location of the file. Change variable to match your liking. This is what you're going to use when you call for the file.

If this is going in your header template, enter in $variable wherever you would like to call for it.

Hope this helps.

MamboCube
11-03-2005, 06:47 AM
That looks pretty promising, im off to college now, but ill try it when i get back, thanks for the help mate!