How to insert Google Adsense in first and last post of Vbulletin?
->
I have wrote once about this trick here, but the content messed up with the sample coding.
Let start again, so you got an Adsense account and wish to insert the code in your forum? I’m talking about Vbulletin, I’m not sure about phpBB and other CMS. For xoops, please refer here.
For Vbulletin;
1. Go to admin cp.
2. Under Styles/Template, look for ‘Search within templates’.
3. Select your current style name and key in ‘postbit’ then make a search.
4. The result will be highlighted in red.
5. Select ‘postbit’ then edit.
6. Look for HTML comments such as “posts, messages, signature”. That is where we will put our code.
7. Now we will a PHP test, because we are interested in first and last post only, not all of the posts.
8. Enter this test:
<if condition="(!$GLOBALS['FIRSTPOSTID'])">
your adsense code here
</if>
9. And if you are into the last post, enter the following as well:
<if condition="($post[islastshown] and !$GLOBALS[’vbulletin’]->GPC[’ajax’])">
your adsense code here
</if>
10. Save it and now check if you manage to have your adsense in vbulletin posts ![]()



April 2nd, 2006 at 8:37 am
Hello mightyhitter, im still with vbulletin but im interested about to put google ads in first and last post. I had follow ur instruction but i cant find
and GPC[’ajax’])”> in postbit. Do i need to enter this code in posbit manually?
April 2nd, 2006 at 8:41 am
oopss.. sorry, thats a problem.. i mean, do i need to enter this code”" in postbit. tq
April 2nd, 2006 at 8:43 am
looks like i cant paste the code here…
April 2nd, 2006 at 6:58 pm
hi,
the code above not there in standard posbit. you have to enter it manually.
you can find in postbit where the body of posts appear. enter the above code above or below the body.
April 10th, 2006 at 12:58 pm
[…] Changes to those styles or skins may vary, depend on what type of forum one is using. I have written some basic tips of how to modify the vbulletin style and xoops template for Adsense placement. […]
April 28th, 2006 at 9:09 am
Thanks a lot mightyhitter… this was really helpful.. now i can put my ads anywhere in VB…
May 24th, 2006 at 10:02 pm
bos, this is one of the best advice i ever seen in adsense tool. btw how much does a vbulletin cost?
May 28th, 2006 at 6:56 pm
yuyu, last time i remember it cost me $160.
January 1st, 2007 at 11:58 am
[…] How to insert Google Adsense in first and last post of Vbulletin? // mightyhitter.com and Insert Google Adsense below last post? - vBulletin Community Forum if not enough vbulletin insert google ads - Google Search __________________ http://www.time4videos.net.tc […]