Ok at this point I have my forum set up to display ads AFTER the first post of any thread AND after the last post of any thread. I have done so using the following template mods:
Admin CP -> Styles & Templates -> Style Manager -> ? ? -> Postbit Templates -> Postbit or Postbit_Legacy
PHP Code:
<if condition="$post[postcount] % $vboptions[maxposts] == 1 AND $vbulletin->userinfo[usergroupid] != 'x' ">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
<adsense code here>
</if>
</td>
</tr>
</table>
</div>
$spacer_close
</if>
Then I added this code to display an ad AFTER the LAST post.
Admin CP -> Styles & Templates -> Style Manager -> ? ? -> Show Thread Templates -> SHOWTHREAD
Added the codee in red.
Code:
</table>
<!-- / toolbar -->
<!-- end content table -->
$spacer_close
<!-- / end content table -->
<if condition="$show['threadedmode'] OR $show['hybridmode']">
<!-- thread posts list -->
$threadlist
<!-- /thread posts list -->
</if>
<div id="posts">$postbits</div>
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
BANNER CODE HERE
</td>
</tr>
</table>
</div>
$spacer_close
<!-- start content table -->
$spacer_open
<!-- / start content table -->
<!-- controls below postbits -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="top">
The problem with this, is when a new thread is created the first post has two ad tables under it. Is there away to cancel out the last table if there is only one post in the thread?
Also here is the code for ads between the last post and second to last post:
Admin CP -> Styles & Templates -> Style Manager -> ? ? -> Postbit Templates -> Postbit or Postbit_Legacy
Blue marks the change in if conditon from showing it after the first post of a thread.
Code:
<if condition="$post[postcount] % $vboptions[maxposts] == $vboptions[maxposts] - 1">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
BANNER CODE HERE
</td>
</tr>
</table>
</div>
$spacer_close
</if>