PDA

View Full Version : Adsense after first post AND after last post


Bob_R
08-31-2009, 10:22 AM
I'd like to add my adsense after the first post and after the last post. Did I do this correctly?

</div>
<!-- / post $post[postid] popup menu -->

<if condition="$post[postcount] % $vboptions[maxposts] == 1"> AND
<if condition="$post['islastshown']">

$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>

Thanks! :)

Gio~Logist
08-31-2009, 11:25 AM
There's an ad location template for after firstpost, ad_showthread_firstpost

For having an ad after all posts you're going to have to add it under $threadlist in the showthread template.

Bob_R
08-31-2009, 11:44 AM
OK.

I did try it the way I mentioned and it worked but caused a horizontal scroll. Will your way cause a horizontal scroll?

Thanks!

Gio~Logist
08-31-2009, 04:32 PM
The only code you really need is the table itself, not sure why you added everything else, seems like you took it from a view source?

If the alignment is off in the first post one (it very well shouldn't be in the showthread, or in the postbit for that matter, but if it is in the first post) just use spacer open and close, nothing more.

Bob_R
09-03-2009, 02:31 AM
Thanks dude. I appreciate it.

Everything works fine except that now for whatever reason my happy gif smilie isn't animated anymore. :(

--------------- Added 1251951306 at 1251951306 ---------------

Actually I take that back everything isn't working perfectly. Besides the animated gif.

When you're at the site as a guest the "Thread tools" are at the bottom as opposed to right there in the first post. And, you can just hover over them, you have to click.

Please advise. :)

--------------- Added 1251983753 at 1251983753 ---------------

For whatever reason the animated smilie works this morning.

Anyway:

Some people say to add the code above quickreply.
You mention to add it under $threadlist
And some people say postbit.

Are all the methods correct? Which is the best way in your or anyone's opinion?

Thanks! :)

Bob_R
09-09-2009, 03:06 AM
I've tried this code in the $threadlist, quick reply & ad location template and nothing works. Please advise.


<if condition="$post['islastshown']">

$spacer_open
<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">

<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXX";
google_ad_host = "pub-XXXXXXX";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "FF4400";
google_color_text = "000000";
google_color_url = "FF4400";
google_ui_features = "rc:6";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</td>
</tr>
</table>
$spacer_close
</if>

--------------- Added 1252495999 at 1252495999 ---------------

By the way I'm referring to after the last post and above quick reply.

I have it showing after the first post on every page that's fine.