MyBB Community Forums

Full Version: I want to create some side boxes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi all i know there are a few side box plugins but i simply want to make some template edits to create a few right side boxes that i can put images, ads, video etc in i would like these boxes to have the same color headeras template if ta makes sense you know as in the category head. is there any tutorials on how to do this?
Go to: ACP > Templates > Your theme's Templates > Index Templates > index > and find;
{$forums}
Replace it with;
<div class="sidebar" style="float: left; width: 20%;">
<table width="50%" cellpadding="6" cellspacing="1" border="0" class="tborder">
<tbody>
<tr>
<td class="thead" colspan="2">
<div class="float_left" style="font-size: 11px;">BOX_NAME</div><div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['newbox_e']}.gif" id="newbox_img" class="expander" alt="[-]" title="[-]" /></div>
</td>
</tr>
</tbody>
<tbody style="{$collapsed['newbox_e']}" id="newbox_e">  
<tr>
<td class="trow1">CONTENT</td>
</tr>
</tbody>
</table>
</div>
<div class="forums" style="float: right;width: 80%;">
{$forums}
</div>

Should result into this;
[attachment=22486]

You can Replace BOX_NAME and CONTENT with your own text Wink
Looks like just what i need how would i get it so there is a small gap between the side box and the forum? just because does not look right against the forum. Wink
Change
<div class="sidebar" style="float: left; width: 20%;">
to
<div class="sidebar" style="float: left; width: 19%;">
Thanks although my box looks a little odd odd on the corners http://www.windowcleaningforums.co.uk/index.php
Try to remove class="sidebar" and class="forums" from both divs.
Didn't seem to make any difference

Ah just fixed. Changed

<table width="50%" cellpadding="6" cellspacing="1" border="0" class="tborder">

to
<table width="50%" cellpadding="6" cellspacing="0" border="0" class="tborder">
Last question how would i go about adding more than one box?
figured that also thanks for the help
I can recommend this: http://money9.net/how-to-add-a-sidebar-i...-homepage/

I use it on my site.
(2011-04-28, 03:28 PM)gavpedz Wrote: [ -> ]Last question how would i go about adding more than one box?

Find;
</tbody>
</table>
and Ad the following code just after that;
<br/>
<table width="50%" cellpadding="6" cellspacing="0" border="0" class="tborder">
<tbody>
<tr>
<td class="thead" colspan="2">
<div class="float_left" style="font-size: 11px;">BOX_NAME</div><div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['newbox_e']}.gif" id="newbox_img" class="expander" alt="[-]" title="[-]" /></div>
</td>
</tr>
</tbody>
<tbody style="{$collapsed['newbox_e']}" id="newbox_e">  
<tr>
<td class="trow1">CONTENT</td>
</tr>
</tbody>
</table>

In this way you can as much side boxes as you can. Wink
nice.gonna try this too.. Big Grin thanks yaldaram
Pages: 1 2