MyBB Community Forums

Full Version: advertisements on the right-hand side
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello All. I am searching for the stool pigeon. which enables adding advertisements. after the right page in files index files, showthread.php and forumdisplay.php
Admin CP --> Templates --> Modify / Delete --> *Choose your template set and click 'Expand'* --> Forum Display Templates --> forumdisplay
Replace the code with:
<html>
<head>
<title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>
{$headerinclude}
{$rssdiscovery}
</head>
<body>
{$header}
<table width="100%" border="0">
<tr>
<td> <!-- the left cell is for the main content -->
{$moderatedby}
{$usersbrowsing}<br /><br />
{$rules}
{$subforums}
{$threadslist}
</td>
<td width="150"> <!-- the right cell is for the ad code -->
<!-- ad code -->
</td>
</tr>
</table>
{$footer}
</body>
</html>
Admin CP --> Templates --> Modify / Delete --> *Choose your template set and click 'Expand'* --> Show Thread Templates --> showthread
Replace the code with:
<html>
<head>
<title>{$thread['subject']}</title>
{$headerinclude}
<script type="text/javascript">
		 var quickdelete_confirm = "{$lang->quickdelete_confirm}";
</script>
<script type="text/javascript" src="jscripts/thread.js?ver=121"></script>
</head>
<body>
{$header}
<table width="100%" border="0">
<tr>
<td> <!-- the left cell is for the main content -->
{$pollbox}
<div style="float: right; padding-bottom: 4px;">
	{$newreply}{$newthread}
</div>
{$multipage}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
<tr>
<td class="thead" colspan="2">
	<div style="float: right;">
		<span class="smalltext"><strong><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->threaded}</a> | <a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->linear}</a></strong></span>
	</div>
	<div>
		<strong>{$rating} {$thread['subject']}</strong>
	</div>
</td>
</tr>
<tr>
<td class="tcat" width="15%"><span class="smalltext"><strong>{$lang->author}</strong></span></td>
<td class="tcat" width="85%"><span class="smalltext"><strong>{$lang->message}</strong></span></td>
</tr>
{$posts}
{$threadpages}
<tr>
<td colspan="2" class="tfoot">
<div><strong>&laquo; <a href="showthread.php?tid={$tid}&amp;action=nextoldest">{$lang->next_oldest}</a> | <a href="showthread.php?tid={$tid}&amp;action=nextnewest">{$lang->next_newest}</a> &raquo;</strong></div>
</td>
</tr>
</table>
<div style="padding-top: 4px;">
	{$newreply}{$newthread}
</div>
{$threadexbox}
{$quickreply}
{$moderationoptions}
{$similarthreads}
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
 	<tr>
		<td class="trow1">
			<table width="100%">
				<tr>
					<td>
						<span class="smalltext">
							<a href="printthread.php?tid={$tid}">{$lang->view_printable}</a><br />
							<a href="sendthread.php?tid={$tid}">{$lang->send_thread}</a><br />
							<a href="usercp2.php?action=addsubscription&amp;tid={$tid}">{$lang->subscribe_thread}</a> | <a href="usercp2.php?action=addfavorite&amp;tid={$tid}">{$lang->add_favorites}</a>
						</span>
					</td>
					<td align="right">
						{$ratethread}
						<br />
						{$forumjump}
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</td>
<td width="150"> <!-- the right cell is for the ad code -->
<!-- ad code -->
</td>
</tr>
</table>
{$footer}
</body>
</html>
Where you see <!--ad code --> (in both templates) replace with your ad code.


Hope that does it. Smile
index

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
</head>
<body>
{$header}
<table width="100%" border="0">
<tr>
<td width="90%" valign="top">{$forums}</td>
<td width="10%" valign="top">
<table cellspacing="0" cellpadding="0" border="0" width="160">
<tr>
<td class="tborder">
<table border="0" cellspacing="$theme[borderwidth]" cellpadding="$theme[tablespace]">
<tr>
<td class="thead"><strong>REKLAMA</strong></td>
</tr>
<tr>
<td class="trow1" align="center"><span class="smalltext">
<adrense Code>
</span></td>
</tr>
</table>
</td>
</tr>
</table>
&nbsp;</td>
</tr>
</table>
{$boardstats}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="trow1">
<table width="100%">
<tr>
<td>
<img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /> <span class="smalltext">{$lang->new_posts}</span><br />
<img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /> <span class="smalltext">{$lang->no_new_posts}</span><br />
<img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" style="vertical-align: middle;" /> <span class="smalltext">{$lang->forum_locked}</span>
</td>
<td style="vertical-align: top; text-align: right;"><span class="smalltext">{$logoutlink}<a href="misc.php?action=markread">{$lang->markread}</a> | <a href="showteam.php">{$lang->forumteam}</a> | <a href="stats.php">{$lang->forumstats}</a></span>
{$loginform}
</td>
</tr>
</table>
</td>
</tr>
</table>
{$footer}
</body>
</html>