Log in

View Full Version : looping adsense on every page?


specmav
06-02-2007, 01:47 AM
Yup another adsense thread. at the moment I have my adsense set up as:


<if condition="!is_member_of($bbuserinfo, 5, 6, 7, 22)">
<if condition="$post[postcount] == 1 || $post[postcount] == 5 || $post[postcount] ==10">

$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
</td>
</tr>
</table>

</div>
$spacer_close

</if>
</if>

At the moment I have 10 threads showing per page, so when visitors go to page 2 there is no more adsense shown because I didnt have it loop every 5 posts. How can I set it up so that adsense is shown after the first, last and in the middle of every page, not just the first page.

Thanks!

MillerLight
06-25-2007, 03:54 PM
If you find out, shoot me a PM please.

Kebbie
06-25-2007, 05:34 PM
I'm not sure what you mean, but I have my adsense set up in my header. It shows right under the logo. http://gottwinz.net/forums/index.php

TheMilkCarton
06-25-2007, 07:47 PM
For the last ad, try "$post['islastshown']" I think it is.. I've seen it used before and if I had to guess I'd say it would successfully loop the ad on the last post of every page.

Also, while I'm guessing, I'd say there is also a "$post['isfirstshown']" but I'm not positive. I don't think there's any way to loop the middle ad on every page, sorry.

If those don't help, I don't think it would be too hard to do with some PHP in a plugin.. although I'm not that skilled. :)