Add a MyBB sidebox to your forum, no MyBB plugins needed.
Sideboxes are great for displaying various information on your forum to your members, often they’re on your portal page, but not on your index page where your main forum activity is. While there are a few MyBB plugins that can install a MyBB sidebox for you, they can take up quite a few SQL queries and puts extra strain on your server. Here’s a small tutorial on how to manually add a basic MyBB sidebox to your forum, by coding a custom sidebox.
1. In Admin CP, go to Templates & Style > Templates > (Your Default Templates) > Index Page Templates > index.
2. Find:
{$forums}
{$boardstats}Replace with:
<table width="100%" cellspacing="0" cellpadding="4" border="0" align="center">
<tr><td valign="top" width="160">
<table border="0" cellspacing="0" cellpadding="4" class="tborder"><tr><td class="thead"><strong>Sidebox A</strong></td></tr><tr><td class="trow1">This is a sidebox, edit me to change this text.</td></tr></table><br />
</td>
<td> </td>
<td valign="top">
{$forums}
{$boardstats}
</td>
</tr>
</table>3. Change the text to what you want, “Sidebox A” is the header of the sidebox, while the rest of the text is the body of the sidebox. It should currently look like this:
Again this just a basic MyBB sidebox, but it can easily be customized to your preferences. You can add more sideboxes by copying:
<table border="0" cellspacing="0" cellpadding="4" class="tborder"><tr><td class="thead"><strong>Sidebox A</strong></td></tr><tr><td class="trow1">This is a sidebox, edit me to change this text.</td></tr></table><br />
And paste just under the same code you copied, it should be like:
<table border="0" cellspacing="0" cellpadding="4" class="tborder"><tr><td class="thead"><strong>Sidebox A</strong></td></tr><tr><td class="trow1">This is a sidebox, edit me to change this text.</td></tr></table><br /> <table border="0" cellspacing="0" cellpadding="4" class="tborder"><tr><td class="thead"><strong>Sidebox B</strong></td></tr><tr><td class="trow1">This is a sidebox, edit me to change this text.</td></tr></table><br />
MyBB sidebox B has now been created:
You can adjust the width of the MyBB sidebox to fit your forum better, and generally you can be creative with them, like adding your Facebook fan page, showing your forum affiliates, displaying important threads, etc. Again it’s a basic MyBB sidebox, but you can add anything you want to them as long as you know basic HTML.

Great post, thank you. In your demo is this side box displayed only in the forum index or does it show in all categories and forums?
Also, with a box like this is is possible for it to contain, for example, some php to display gallery thumbnails or something? I’ve seen that option on something like Simple Portal (for SMF) but I’m not sure how to do it in MyBB.
Anyway thanks for the great posts. Bookmarked.
The sidebox seen here is only displayed on the index page.
Yes you can use PHP as well as Javascript, HTML, etc in the sidebox codes. The PHP code will need to replace the “This is a sidebox, edit me to change this text.” and afterward it can be executed within the browser.
Glad you like the post.
Hi.
Im kind of new for this website hosting. But ive managed to come up with an ok result so far. I was just wondering how to make that sidebox align with my other stuff. Its like 2 cm above everything, and that looks wierd.
Thanks in advance.
-Skvist
The sidebox code is meant to align perfectly alongside the forums, I think it’s an issue with your forum theme.
Hello,
Nice post but i want to add Latest Threads to the 2 table so how can i add that?
please reply.
The quickest and easiest way would be to install this: http://mods.mybb.com/view/recent-topics-on-index-page
Then in the index template find {$recenttopics} and move it just above or below any sidebox code.
Its recent topic and i need latest threads which also includes details like views and all.
Try this then, you’ll need to edit the index.php file so I suggest making a backup of it first. Edit the index.php file of your forum and find:
$plugins->run_hooks("index_start");Below that add:
Save changes.
On your forum’s index template, use {$latestthreads} to add latest threads above or below your sidebox.
Hi, i was just wondering how i could change the sideboxes from the left side to the right?
- Skvist
Use the code like this:
I was thinking about the html code with the {forums} and {boardstats}
Because i want some sideboxed on both left and right side.
Without* ofc
What of displaying the sidebox in the board index only? Can I do it?
Hello, i use that code and work perfect! a lot of thanks!
i have a question: where i place that code in postbit?
i want apply that code in: index, forumdisplay and postbit.
thanks in advance!