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 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 in vbulletin posts :)

Posted March 17th, 2006 by mightyhitter under Google Adsense, VBulletin

 

8 Responses to “How to insert Google Adsense in first and last post of Vbulletin?”

  1. jackass Says:

    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?

  2. jackass Says:

    oopss.. sorry, thats a problem.. i mean, do i need to enter this code”" in postbit. tq

  3. jackass Says:

    looks like i cant paste the code here…

  4. mightyhitter Says:

    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.

  5. Tips for Adsense Placement in Forum » (take||leave) it Says:

    […] 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. […]

  6. jackass Says:

    Thanks a lot mightyhitter… this was really helpful.. now i can put my ads anywhere in VB… :)

  7. yuyuaaron Says:

    bos, this is one of the best advice i ever seen in adsense tool. btw how much does a vbulletin cost?

  8. mightyhitter Says:

    yuyu, last time i remember it cost me $160.

  9. any one help me about google ads - CodeCall Programming Forum Says:

    […] 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 […]

Leave a Reply