PDA

View Full Version : Forum Display Enhancements - Adsense after first post in postbit_legacy


vietfancy
27 Oct 2006, 05:38
this is how it going to look like:


if you want to have the same thing:

add this code at the end of your "postbit_legacy" template



<!-- Start Google Ads -->
<if condition="$show['registerbutton']">
<if condition="!$GLOBALS['FIRSTPOSTID']">
<div style="padding-top: 6px;"></div>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">
Sponsored Links
</td>

</tr>
<tr valign="top">
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">

<div id="postmenu_$post[postid]" align="center">
<a class="bigusername" href="#">inHandy.com</a>
</div>

</td>

<td class="alt1" id="td_post_$post[postid]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-left: 0px">


<if condition="$show['messageicon'] OR $post['title']">
<div class="smallfont">
<if condition="$post['title']"><strong>Sponsored links</strong></if>
</div>
<hr size="1" style="border-top: 1px #ff6e45 dotted"; />
</if>

<!-- message -->
<div id="post_message_$post[postid]">
<table>
<tr align=center>
<td align=center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
&nbsp;
<td align=center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>

</div>
<!-- / message -->
<!-- sig -->
<div>
__________________<br />
This is a revenue sharing forum.<br />
Please <a href="login.php"><strong>log-in</strong></a> or <a href="register.php"><strong>register</strong></a> now to hide these posts.
</div>
<br />
<!-- / sig -->


</td>


</tr>
</table>
</if>
</if>
<!-- End Google Ads -->


The codes above is only show ads to guests. if you want to have ads visible to everyone then use this instead



<!-- Start Google Ads -->

<if condition="!$GLOBALS['FIRSTPOSTID']">
<div style="padding-top: 6px;"></div>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">
Sponsored Links
</td>

</tr>
<tr valign="top">
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">

<div id="postmenu_$post[postid]" align="center">
<a class="bigusername" href="#">inHandy.com</a>
</div>

</td>

<td class="alt1" id="td_post_$post[postid]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-left: 0px">


<if condition="$show['messageicon'] OR $post['title']">
<div class="smallfont">
<if condition="$post['title']"><strong>Sponsored links</strong></if>
</div>
<hr size="1" style="border-top: 1px #ff6e45 dotted"; />
</if>

<!-- message -->
<div id="post_message_$post[postid]">
<table>
<tr align=center>
<td align=center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
&nbsp;
<td align=center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>

</div>
<!-- / message -->
</td>


</tr>
</table>
</if>

<!-- End Google Ads -->



Remember to replace pub-XXXXXXXXXXXXXXXX with your id #

Selene
27 Oct 2006, 09:39
Is it allowed to do ? according to google TOS

Rich
27 Oct 2006, 11:33
Selene,

READ Googles TOS! He just released this, so he is either assuming it does, or he doesn't care and posted it anyways. Its YOUR responsibility to know what you can and cant add on your site in reference to google. Someone telling you the wrong thing can kill your account. Do the research.

Selene
27 Oct 2006, 12:46
Rich, ok thanks for ur reply. So can u kindly read it and let me know :lol:

canpare
27 Oct 2006, 13:04
thanks. installed...

Frapegliko
27 Oct 2006, 13:36
cool thank u

vietfancy
27 Oct 2006, 13:50
Is it allowed to do ? according to google TOS

I believe they allowed us to do this as long as your ads shows as ads. Good luck :laugh:

AMG021
27 Oct 2006, 14:55
Thanks

AMG021
27 Oct 2006, 17:18
It is possible to set this by usergroup ?

ChavMagnet
27 Oct 2006, 18:34
Already been released about a week ago http://www.vbulletin.org/forum/showthread.php?t=129449

Freak0204
07 Jul 2007, 07:17
This is messing up my quick reply. Why?

desmomax
07 Apr 2009, 08:08
the first for guest dosnt work..
i see adsense after 1st post also if logged...

lm3a.net
20 May 2009, 09:42
thanks man ,,