MyBB Community Forums

Full Version: Advert boxes on mybb
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello I am kind of new to mybb.
I have reduced the size of the main container with CSS but is there any way I can add divs to each side of the container to put advert boxes in?

Thanks
Tim
AdminCP > Templates > Your theme's templates > Index Templates > index > and find;
{$forums}
and Change it into;
<div style="float: left; width: 73%;">{$forums}</div>
<div style="float: right; width: 25%;">ADVERT CODE GOES HERE</div>
Many thanks
(2012-07-24, 03:01 PM)Yaldaram Wrote: [ -> ]AdminCP > Templates > Your theme's templates > Index Templates > index > and find;
{$forums}
and Change it into;
<div style="float: left; width: 73%;">{$forums}</div>
<div style="float: right; width: 25%;">ADVERT CODE GOES HERE</div>

Hi, Yaldaram

I have tried this change.
But I still have no divs to the side of the main board.

I am hoping to put divs to the side of my board.

Thanks


Here is what i have:...................

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
<div style="float: left; width: 73%;">{$forums}</div>
<div style="float: right; width: 25%;">ADVERT CODE GOES HERE</div>
{$boardstats}

<dl class="forum_legend smalltext">
<dt><img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
<dd>{$lang->new_posts}</dd>

<dt><img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
<dd>{$lang->no_new_posts}</dd>

<dt><img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
<dd>{$lang->forum_locked}</dd>
</dl>
<br style="clear: both" />
{$footer}
</body>
</html>


ITs OK.
I have sorted it.
I was not using the default css and so it was clashing.
Thanks
Tim
Hi, Is there anyway i can replicate this code so that my divs appear on every page eg. threads within the forum?
Thanks.
Tim
Yes you can add this advert box in the header so it appears in every page like a sidebar Smile
Thanks, but is there a way to put the contents of forumdisplay into a div and float it left with say 70%. will this work. Its does not work for me.
Any ideas?
try this

<table width="100%" align="center" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="75%" valign="top">{$forums}</td>
<td width="25%" valign="top">
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="5" class="tborder">
<tr>
<td class="tcat">Adverts</td>
<tr>
<td class="trow1">Your Advert here</td>
</tr>
</table></td>
</tr>
</table>
thanks yaldaram i had used in showthread Big GrinBig Grin
No problem Smile if you need other things