MyBB Community Forums

Full Version: [tutorial] How to insert a custom header into mybb.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For me the number one problem for me when it comes to forums is making the forum customized to the rest of the site.

How to add a custom header like this-
http://skiing4life.com/forums/index/
yours will loook way better.
First we'll create a header file called header.php
example-http://skiing4life.com/forums/index/header.php
The code of my header looks like this-
<table height="150" width="1000" >
	<tr>
    <th width="992" height="144" align="left" valign="top" style="background-image:url(http://skiing4life.com/images/header.png); color: #FFF;"p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://skiing4life.com/">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://skiing4life.com/?page_id=3">Conditions</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://skiing4life.com/?cat=4">Games</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://skiing4life.com/?page_id=7">Videos</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://skiing4life.com/forums/index/index.php">Forums</a></span></p></th>
  </tr>
</table>

As you can see all that the page is is the body.

2. Then upload your header.php to the root of your forums
3. Install this mod to mybb. http://mybbhacks.zingaburga.com/showthread.php?tid=260
4. then go to the templates of the theme you want the header in.
5. Find the header file in the list
6. Ok This Is Where You Need To Be Careful At The TOP Of The Theme Where On Line: 1, Do Not Delete It. just move it down to line 2.
<div id="container">
7. In line put-
<?php include("./header.php"); ?>
8. save and go look at your new header!
Shouldn't this be in tutorial section of the board?

And no offence, but this tutorial is really newcommer and istead of so many &nbsp;'s you could make it via CSS istead which would be much cleaner and easier to edit in my opinion.
I made the header in about 1 mintue trying to go fast for this tutorial. You are right about the css. And i had no clue there was a tutorial section i am new.
Wow. How many spacers do you want? Seriously bro, use paddings and margins. Even if you don't want to writ classes and IDs, at least use style="X". That code is just a mess IMO.