Creating a custom MyBB CMS type layout.
Earlier I made a post about creating a custom MyBB sidebox on a forum, this tutorial is a more advanced version of the previous post. This is how to create a MyBB CMS (content management system) type of layout that will allow you to add additional content on your forum Index, Header and Footer areas, like in the screenshot below. No MyBB plugins!
What will be done here is creating 6 new content blocks around your main forum; a header block, a footer block, and 4 sidebox blocks, 2 on each side of the forum. The sidebox blocks will only show on the index page of the forum, while the header and footer blocks will display on every page. The blocks will transform your forum into a MyBB CMS type layout to add extra content, such as affiliates, ads, social sharing, welcome text, etc, almost like a real CMS.
Note that this MyBB CMS setup is somewhat advanced and takes some time and coding, but the end result is worth it.
Step 1: Add new group settings for MyBB CMS layout
You’ll need to create new settings in your Admin CP, go to Configuration > Add New Setting Group and add the following to each field:
- Title: Custom MyBB CMS
- Description: Settings for Custom MyBB CMS.
- Display Order: 0
- Identifier: mybbcms
Save settings, here’s the result:
Step 2: Add new settings for content blocks
This is the longest step for this custom MyBB CMS, you’ll need to create 12 settings, 2 for the Header Box, 2 for the Footer Box, and 8 for the four sideboxes to add/remove content. Go to Add New Setting and add the following for setting 1:
- Title: HeaderBox Title
- Description: Name of HeaderBox.
- Group: Custom MyBB CMS
- Display Order: 0
- Identifier: hbtitle
- Type: Text
- Value: (leave as blank)
Save settings.
Add New Setting and add the following for setting 2:
- Title: HeaderBox Content
- Description: Enter content of HeaderBox here.
- Group: Custom MyBB CMS
- Display Order: 1
- Identifier: hb
- Type: Textarea
- Value: (leave as blank)
Save settings.
Add New Setting and add the following for setting 3:
- Title: FooterBox Title
- Description: Name of FooterBox.
- Group: Custom MyBB CMS
- Display Order: 2
- Identifier: fbtitle
- Type: Text
- Value: (leave as blank)
Save settings.
Add New Setting and add the following for setting 4:
- Title: FooterBox Content
- Description: Enter content of FooterBox here.
- Group: Custom MyBB CMS
- Display Order: 3
- Identifier: fb
- Type: Textarea
- Value: (leave as blank)
Save settings.
So far, we’ve added settings for two content blocks that will show on every page, one in the header of the forum and one in the footer of the forum. Now let’s add settings for the sideboxes.
Add New Setting and add the following for setting 5:
- Title: Sidebox 1 Title
- Description: Name of Sidebox 1.
- Group: Custom MyBB CMS
- Display Order: 4
- Identifier: sbtitle1
- Type: Text
- Value: (leave as blank)
Save settings.
Add New Setting and add the following for setting 6:
- Title: Sidebox 1 Content
- Description: Enter content of Sidebox 1 here.
- Group: Custom MyBB CMS
- Display Order: 5
- Identifier: sb1
- Type: Textarea
- Value: (leave as blank)
Save settings.
Add New Setting and add the following for setting 7:
- Title: Sidebox 2 Title
- Description: Name of Sidebox 2.
- Group: Custom MyBB CMS
- Display Order: 6
- Identifier: sbtitle2
- Type: Text
- Value: (leave as blank)
Save settings.
Add New Setting and add the following for setting 8:
- Title: Sidebox 2 Content
- Description: Enter content of Sidebox 2 here.
- Group: Custom MyBB CMS
- Display Order: 7
- Identifier: sb2
- Type: Textarea
- Value: (leave as blank)
Save settings.
Add New Setting and add the following for setting 9:
- Title: Sidebox 3 Title
- Description: Name of Sidebox 3.
- Group: Custom MyBB CMS
- Display Order: 8
- Identifier: sbtitle3
- Type: Text
- Value: (leave as blank)
Save settings.
Add New Setting and add the following for setting 10:
- Title: Sidebox 3 Content
- Description: Enter content of Sidebox 3 here.
- Group: Custom MyBB CMS
- Display Order: 9
- Identifier: sb3
- Type: Textarea
- Value: (leave as blank)
Save settings.
Add New Setting and add the following for setting 11:
- Title: Sidebox 4 Title
- Description: Name of Sidebox 4.
- Group: Custom MyBB CMS
- Display Order: 10
- Identifier: sbtitle4
- Type: Text
- Value: (leave as blank)
Save settings.
Add New Setting and add the following for setting 12:
- Title: Sidebox 4 Content
- Description: Enter content of Sidebox 4 here.
- Group: Custom MyBB CMS
- Display Order: 11
- Identifier: sb4
- Type: Textarea
- Value: (leave as blank)
Save settings, you should now have 12 settings looking similar to this:
Step 3: Now that the settings are in place for the custom MyBB CMS setup, next is to edit the templates to display the new content blocks. Go to Templates & Style > Templates > (your default templates) > Footer Templates > footer.
Find (line 1):
<br />
Add below:
<table border="0" cellspacing="0" cellpadding="4" class="tborder"><tr><td class="thead"><strong><div align="center">{$mybb->settings['fbtitle']}</div></strong></td></tr><tr><td class="trow1"><div align="center">{$mybb->settings['fb']}</div></td></tr></table><br />Save settings.
Step 4: Go to Header Templates > header.
Find:
{$pm_notice}
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
{$pending_joinrequests}
<navigation>
<br />Add below:
<table border="0" cellspacing="0" cellpadding="4" class="tborder"><tr><td class="thead"><strong><div align="center">{$mybb->settings['hbtitle']}</div></strong></td></tr><tr><td class="trow1"><div align="center">{$mybb->settings['hb']}</div></td></tr></table><br />Save settings.
Step 5: Go to Index Page Templates > index.
Find:
{$forums}
{$boardstats}Replace with:
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<td><table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr><td valign="top" width="160">
<table border="0" cellspacing="0" cellpadding="1" class="tborder"><tr><td class="thead"><strong>{$mybb->settings['sbtitle1']}</strong></td></tr><tr><td class="trow1">{$mybb->settings['sb1']}</td></tr></table><br />
<table border="0" cellspacing="0" cellpadding="1" class="tborder"><tr><td class="thead"><strong>{$mybb->settings['sbtitle2']}</strong></td></tr><tr><td class="trow1">{$mybb->settings['sb2']}</td></tr></table><br />
</td>
<td> </td>
<td valign="top">
{$forums}
{$boardstats}
</td>
</tr>
</table></td>
<td valign="top">
<td valign="top" width="160">
<table border="0" cellspacing="0" cellpadding="1" class="tborder"><tr><td class="thead"><strong>{$mybb->settings['sbtitle3']}</strong></td></tr><tr><td class="trow1">{$mybb->settings['sb3']}</td></tr></table><br />
<table border="0" cellspacing="0" cellpadding="1" class="tborder"><tr><td class="thead"><strong>{$mybb->settings['sbtitle4']}</strong></td></tr><tr><td class="trow1">{$mybb->settings['sb4']}</td></tr></table><br />
</td>
</table>Save settings, you’re done!
How it works: Your forum should be showing a bunch of empty boxes, to fill them up with your own content go to Admin CP > Configuration > Custom MyBB CMS.
Here you can add content to your sideboxes and header/footer content blocks, simply fill in the title and add the content you want, you can use HTML in these boxes. Here’s a basic result:
This tutorial for making a custom MyBB CMS is completely customizable, so you can add or remove as many boxes as you want on your forum. You can also use this for adding other kinds of codes such as adding social sharing buttons or placing ads in one of these content blocks too.





I like your preview in the first. In left side box what step do i need make my forum look like that.?
For just the left sidebox you can follow this tutorial: http://mybbgroup.com/how-to-add-a-mybb-sidebox-no-plugins-required/
I’ve implemented this on the index page of my forum only, and it works really well thank you. However, I’d like to do something a little bit more complicated, which is make the HeaderBox only appear for Guests, as I’m using it for a message to explain what the site is about and to encourage guests to register, as I’ve hidden a lot of the content so that only registered members can access it.
So I want the HeaderBox to only appear for guests. Can you help?
Kind regards
Add the HeaderBox into the “header_welcomeblock_guest” template instead.
Thanks, that worked great. However, I’ve been implementing the boxes so that they appears on the index page only. So is there a way is there a way to do this so that it will only appear on the index page for guests, and not in the header of all pages.