MyBB Community Forums

Full Version: Kind of a PHP in templates question (i have searched!)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

What I would like to do is get my myBB bulletin board, and stick it completely into my own wrapper (my own website template - sounds simple?)

The only extra requirement which makes this difficult for me is that I wan to include my global website header through all pages on my website (not just my forum) and therefore I want the exact same header included globally for when I update it etc..

I know there is a mod out (not even sure if it is compatible with 1.6) that allows you to add PHP into the template system, but this doesn't really seem worth it for me, as it does lower performance slightly, and most importantly is a bit of a security flaw, especially when all i want to do is simply include a header file on top of all forums...

Is there any way I could do this by editing the PHP files directly?

If so, what files would I have to edit? Is there a file I can edit globally to include my header and footer on every forum page, or would I have to edit the index.php, forumdisplay.php, games.php etc all individually?

Thanks in advance to all you experts out there!!
Just put the HTML for it in the header and footer template, and it'll show everywhere. Or if it has to be PHP, might be better to have a plugin include it.
You can use {$header}, {$headerinclude} etc in your template that will appear on any pages that call the template you've created.
Thanks for your replies, but I need to include a PHP file onto the top of every page of the forum.
Is the plugin the only way to go?

Thanks
You can't put PHP in the templates, you'd have to use:
require("some_file_name_here.php");
At the top of your PHP file, then eval templates.