MyBB Community Forums

Full Version: Custom Header
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So over at our site (http://www.lowbiasgaming.net), we've put together a header with all our links and informations and whatnot and I'd like to bring it over from our non mybb stuff into our mybb stuff.

It's all done in php with includes and all of that and my first thought was "I'll just copy my header.php stuff and paste it into the header template of my theme." but that didn't work.

Is there anyone that knows a good way to go about doing this? I almost want it to feel like there is no transition when you go from the non forum look to the forum look... as best as is possible anyway... and having the same header and footer on both sections will help that quite a bit I think.
if you want your landing page to interact with mybb copy your landing page html into the portal templates ... design that as you want then either (using .htaccess) redirect to portal.php, however currently the portal page needs to be altered in is not default, or copy portal.php to your site root and make a couple of edits to portal.php itself
The best way and part of the way I do it with my wordpress integration is that I have the header output to a raw HTML file.

I then include that in with my own plugin.

You could get the raw HTML and then use the Dynamic Header and Footer plugin
http://mods.mybb.com/view/dynamic-header-and-footer
I downloaded the Dynamic Custom Header/Footer plugin as I liked the sound of it most... the whole "landing page" thing I don't think would work with what we're trying to do.

Anyway... I'm getting an error when I try and use that plugin which goes as follows...

The following warnings occurred:  
Warning [2] file_get_contents(http://www.lowbiasgaming.net/templates/header.php?lang=english&mybb=1): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error - Line: 153 - File: inc/plugins/DynamicHeaderFooter.php PHP 5.4.30 (Linux)


File

Line

Function


[PHP]   errorHandler->error 
/inc/plugins/DynamicHeaderFooter.php 153 file_get_contents 
/inc/plugins/DynamicHeaderFooter.php 170 DynamicHeaderFooter_Process 
/inc/class_plugins.php 101 DynamicHeaderFooter_global_end 
/global.php 736 pluginSystem->run_hooks 
/index.php 18 require_once 
 
You are trying to grab a dynamic page which is not possible as it would require php execution in the template.

You need to make the header and footer pages raw HTML

So maybe capture the output of that page save it to a .html then include that
So I put together an HTML version of the same thing that, on it's own, opens fine, but when I try and use it as the header, I get the same error.
Is the path correct and does your server allow http locations for file_get_contents?

Perhaps try the absolute path