MyBB Community Forums

Full Version: Adsense between topics
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Where would I add my adsense code if I wanted to show them in between one forum topic and another one?

Thanks,

Jeremy
i know this isn't what you wanted but i would advise not doing that.

i have found the best places for ads are in sidebars and at the top and bottom of the forum. inbetween threads and forum topics people tend to get ad block and ignore them.

my revenue trebled when i added a sidebar with an add!
thanks for the info. I would love to have a sidebar, but I think the theme I'm using isn't compatible with a sidebar. I'm using Mybulletin theme. Any advise would be great.
for the default theme.

go to templates > modify/delete > default templates > index page templates > index.
you will see this:

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
</head>
<body>
{$header}
{$forums}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" /></div>
<div><strong>{$lang->boardstats}</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
{$whosonline}
{$birthdays}
{$forumstats}
</tbody>
</table>
<br />
<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>

if you copy this into dreamweaver or something you can just copy put a table around the forums. like this:

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
</head>
<body>
{$header}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">{$forums}
      <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
        <thead>
          <tr>
            <td class="thead"><div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" /></div>
                <div><strong>{$lang-&gt;boardstats}</strong></div></td>
          </tr>
        </thead>
        <tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
        </tbody>
        {$whosonline}
        {$birthdays}
        {$forumstats}
  <tr>
    <td></tbody></td>
  </tr>
      </table>
      <br />
      <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-&gt;new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /> <span class="smalltext">{$lang-&gt;new_posts}</span><br />
                    <img src="{$theme['imgdir']}/off.gif" alt="{$lang-&gt;no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /> <span class="smalltext">{$lang-&gt;no_new_posts}</span><br />
                    <img src="{$theme['imgdir']}/offlock.gif" alt="{$lang-&gt;forum_locked}" style="vertical-align: middle;" /> <span class="smalltext">{$lang-&gt;forum_locked}</span> </td>
                <td style="vertical-align: top; text-align: right;"><span class="smalltext">{$logoutlink}<a href="misc.php?action=markread">{$lang-&gt;markread}</a> | <a href="showteam.php">{$lang-&gt;forumteam}</a> | <a href="stats.php">{$lang-&gt;forumstats}</a></span> {$loginform} </td>
              </tr>
          </table></td>
        </tr>
      </table></td>
    <td width="200" valign="top">sidebar here </td>
  </tr>
</table>
</body>
</html>

this will make a space for the sidebar. if you want it in the same style as the normal forums like my forum (www.webberscorner.com) just add this to the sidebar.

<table border="0" cellspacing="1" cellpadding="4" width="190px">
<tr>
<td class="thead"><strong>side name</strong></td>
</tr>
<tr>
<td class="trow1">
<span class="smalltext">
<center>
stuff
</center>
</span></td>
</tr>
</table>

that would add a sidebar on the homepage. i wouldn't advise adding it anywhere else as you have to edit a lot of template files which can get a little messy.

maybe then you could use the ads after first post plugin for the ads between posts inside the threads? http://mods.mybboard.com/view.php?did=197

this isn't exactly what you wanted but would still earn you the same amount.

hope this helps.

dave.
Thanks for the code, but it wont work with the Mybulletin theme which I'm using. I've tried and it doesn't display correctly

I've been using Ads after first post 2.0 mod, but thank you non-the-less.
ill be using this though lol