AdSense inside the first post – AdsenseExperts Exclusive

Hello

This is another AdSense implementation for your vBulletin 4.0 Forum.

This placement is exclusively released for AdsenseExperts.

You are allowed to use this placement on your own forum, however republishing this modification on other website is only allowed with prior written consent by me.

What this mod does

This mod adds a Google Adsense large rectangle inside the first post of each thread.

It is blended to complement your forum content but is clearly labeled as Ad to strictly separate Ads from content.

This approach is taken for the reasons discussed here: Is too much blending bad for business?

Make sure you use the same colors as you use on your forum to optimize blending!

If you use this AD implementation make sure you also try: AdSense inside the last post – AdsenseExperts Exclusive

Note

This mod shows the AD only to GUESTS!

If you want to show it to your members as well remove the

$show['guest']

part from the condition!

Installation instructions

In the template additional.css add:

/*------------------------------------------------------------------------------
| #> Advertising Optimized by AdsenseExperts
+-----------------------------------------------------------------------------*/
/* Ad inside first and/or last post */
.ad_text {
  font-weight: normal; 
  margin-bottom: 0px !important;
}
.AdCommercial { 
  float: right; 
  clear: right; 
  overflow:hidden; 
  background-color:#FAFAFA; 
  text-align: right; 
  font-size:10px; 
  width:336px; 
  margin-left:5px;
}

.ads_hr_style { 
  background-color: #FAFAFA; 
  color: #FAFAFA; 
  border: 1px dotted #D8D8D8; 
  border-style: none none dotted; 
  display: block !important;
}

.AdCenter { 
  align:center; 
  margin:0; 
  padding-bottom: 5px;
}

.bbcode_container div.bbcode_quote { 
  overflow: auto; 
}

then open the template postbit_legacy and replace:

{vb:raw post.message}

with the code below:

<vb:if condition="$show['guest'] AND $post['isfirstshown']">
  <div class="ad_content_wrapper">
    <div class="AdCommercial">
      <hr class="ads_hr_style" />
      <p class="ad_text">ADVERTISING</p>
      <div class="AdCenter">
        YOUR ADSENSE RECTANGLE CODE HERE
      </div>
      <hr class="ads_hr_style2" />
    </div>
   {vb:raw post.message}
  </div>
<vb:else />
  {vb:raw post.message}
</vb:if>

Notes

Make sure to check and adapt especially domain to fit your forum.

If you are also want to use my AdSense inside the last post – AdsenseExperts Exclusive implementation then you need to use this code instead of the above (css remains the same):

<vb:if condition="$show['guest'] AND $post['isfirstshown']">
  <div class="ad_content_wrapper">
    <div class="AdCommercial">
      <hr class="ads_hr_style" />
      <p class="ad_text">ADVERTISING</p>
      <div class="AdCenter">
        YOUR ADSENSE RECTANGLE CODE HERE
      </div>
      <hr class="ads_hr_style2" />
    </div>
   {vb:raw post.message}
  </div>
<vb:elseif condition="$show['guest'] AND !$thread[replycount] == 0 AND !$post['isfirstshown'] AND $post['islastshown']" />
  <div class="ad_content_wrapper">
   <div class="AdCommercial">
     <hr class="ads_hr_style" />
     <p class="ad_text">ADVERTISING</p>
     <div class="AdCenter">
       YOUR ADSENSE RECTANGLE CODE HERE
     </div>
     <hr class="ads_hr_style2" />
   </div>
   {vb:raw post.message}
  </div>
<vb:else />
   {vb:raw post.message}
</vb:if>

Screenshot


Versions

  • v1.4: Changed the CSS for bbcode behaviour to not conflict in nested codes.
  • v1.3: Changes to get it to work with 4.1.10+
  • v1.2: floatspacer was removed due to ad overlapping text in older browsers. Code Optimization.
  • v1.1: added a float_spacer so that the text flows around the AD
  • v1.0: initial release

Of course feedback is welcome and if you have suggestions to further improve CTR please let me know!

Kind regards

admin

This entry was posted in AdSense Placements and tagged , , , , , . Bookmark the permalink.

100 Responses to AdSense inside the first post – AdsenseExperts Exclusive

  1. JamesColin says:
    Hi, you can't ask people to ask you for autorization to implement a div float right, it's too funny, you have no copyright on any ad placement :-)

    Anyway, it was just a comment on the funny side of your text, but I have a question is why do you translate ANZEIGE as DISPLAY ?

    It should be ADVERTISEMENT, no? DISPLAY simply looks strange and doesn't explain anything in english as to the nature of the sponsored links below.
    • Kolbi says:
      My question is why to you add "Advertisement" or "Anzeige" ?

      Is it a must to fit to Google TOS?
  2. admin says:
    In German the word "Anzeige" is used for Advertisings as well.

    I used "Adverts" for this English version.

    However you are free to change the text Adverts to any text you find appropriate.

    The copyright notice is for the whole modification.

    There are many vBulletin modification sites copying my AdSense Modifications and releasing them on their forum. I don't want that for the exclusive releases I made for AdsenseExperts unless I give them permission.

    I know you can't really copyright CSS styling but it is a friendly reminder to at least be polite and ask me for permission. ;)
  3. JamesColin says:
    Ah ok, I thought you were talking about someone wanting to use your ad placement on a site. But in fact you mean a webmaster wanting to copy and paste your article on his site, this is understandable yes.

    About the word DISPLAY I'm talking about your exemple here:
    (Resource no longer exists) Perhaps it's because I have a browser in english, but I see the word DISPLAY on the top right above the ads.
  4. admin says:
    That is an auto translation by google translate of the german word "Anzeige".

    It is googles fault not mine :p
  5. admin says:
    I just released the new Version 1.1 of my AD
    Implementation inside the first post.

    I added a float_spacer which lets the text flow around the AD which makes it even more blend in with the content.

    Thanks to JamesColin for the Idea :)
    • Aquestor says:
      Hi, i have installed the wallpaper and it is great, but i want this awesome Ad showing in first Post too.

      But after making the edits it doesn`t work well. Any idea why this didn`t work with my forum?
      .float_spacer_right {
        float:right; 
        width: 1px;
        height: 60px; 
      }
      After changeing the 60px into 0px it is also not floating

      Thanks for the great work. I hvae read all the threads of adsenseexperts and i learned a lot thanks!

      Greetz

      Kai
  6. admin says:
    Do you see any changes in CTR after the implementation that the rectangle is displayed after a few lines of content?

    Yes in fact I do.

    CTR went up more than 300% (still below 2% though) and eCPM went up 350%.

    I compared a time frame of 12 days for this comparison.

    It is not very representative but that suggestion was gold :p Thanks again JamesColin.

    What this shows is that you never should stop optimizing your ADs.

    And even a small change can mean a lot more money!

    That is what AdsenseExperts is all about :D

    So if you are using version 1.0 I strongly suggest you upgrade to version 1.1

    Before the float_spacer:


    after the float_spacer:
    • puertoblack2003 says:
      thanks for the share i was re-directed from vbseo
  7. Taurus says:
    Is it perhaps possible to add the float spacer (So that the text flows) at the adsense code itself, and not in the CSS?

    I am using digitalpoint's hack for this as yours unfortunately does not work for me. I have BBCode notices in some of my posts and when I have these inside a first post the add overlaps the notice.

    I hope you understand what I want to do. At this stage the add is placed in a random place in the first post, and I centered it. But I would like to get the same affect yours have. Thanks.
  8. admin says:
    That is why
    .bbcode_container div.bbcode_quote { 
      clear:both; 
    }
    is also in the CSS definition.

    With bbcode present the text with the quote will start below the Ad.

    There should be a similar css definition for code.

    My guess would be:
    div.bbcode_code
  9. Taurus says:
    Thank you very much. Looking into that now.
  10. Emath says:
    Q: is this allowed by google agreement ? and what happened if i put a picture on that post ? the ad disappear or the ad goes over the picture ?
  11. JamesColin says:
    If the picture is larger than the width between the left border of the content space and the left border of the ad, then the picture would be pushed down below the ad.

    If the picture is not larger than this space, then the picture would be on the left of the ad.

    Yes it is allowed, I don't see anything in adsense's tos showing otherwise.
  12. admin says:
    No, I do that because of this:
    Is too much blending bad for business?
  13. Ricky says:
    I have one question, can we strip css a little , bcz already VB4 is bloated with inefficient stylying code and every time I do a modification and ad code, it hurts as I don't want to add more codes in it. What do you say..

    Your approach is that .. create 2 div floating right, one with fixed width and height ie. 1 px width and height say 80px, bcz both are floating element, they will sit over each other. , can we strip code little more ? like : CSS
    .main_ad { 
      border-top:#ccc 1px dotted;
      border-bottom:#ccc 1px dotted;
      width:330px; 
      padding:2px 5px 5px 10px;
      float:right; 
    }
    .fixed_div {
      height:60px; 
      float:right;
      width: 1px;
      padding:2px;
    }
    .adboast_div {
      text-align:right; 
      font-size:8px; 
      color:#ccc;
    }
    Now inpost AD code
    <div class="fixed_div></div>
    <div class="main_ad">
    <div class="adboast_div">Advert.</div>
    AD GOES HERE
    </div>
    I have not tested it and may have errors but apparently looks like will do same layout as you suggested. Your views are required. It is little smaller than your code.

    Neverthless to say, you did a nice job by sharing your views here.
  14. admin says:
    Why don't you try it instead of asking us and then tell us if it produces the same result?
    • Ricky says:
      Why don't you try it instead of asking us and then tell us if it produces the same result?
      Ok.. I did testing and results are as expected, only little change in CSS above, I produced same effect as you suggested. Only problem was that it took so much of time just because of my little knowledge about vbulletin.

      I was trying to add it in postbit_legacy template however, I was not using postbit_legacy , so it was really frustrating that I am adding code and its not visible at all.

      I tried style-rebuild etc. etc. ..

      nyways, I used the code in postbit and was resolved.

      Also, I am using medium rectangle.

      Now what do you suggest, should I use text only ads or text and images both?
  15. Kolbi says:
    You are talking about one change? What have you changed exactly? :)

    Thanks.

    Like your little optimised code.
  16. cheenamalai says:
    Applied this code, and the result was that any post with a quote, would show 5 lines of empty spacing above the quote in all the posts.

    Anybody having this problem? I followed the instructions very carefully.
    • admin says:
      Applied this code, and the result was that any post with a quote, would show 5 lines of empty spacing above the quote in all the posts.

      Anybody having this problem? I followed the instructions very carefully.

      This is because if you show the Ad and would not change the quote behaviour then your quote would overlap the ad which is against the AdSense TOS. The same goes for code, php and html tags I believe but I don't use them on my forums.

      I prevented this from happening to my members (which don't see ads) by making all my Ads a product for vbulletin which creates a new css template which is only loaded for guests. Try to wrap the bbcode_quote line in a condition and see if this works:
      <vb:if condition="$show['guest']">
      .bbcode_container div.bbcode_quote { clear:both; }
      </vb:if>
      
      I am not sure though if conditions work in CSS templates.
      • cloferba says:
        I prevented this from happening to my members (which don't see ads) by making all my Ads a product for vbulletin which creates a new css template which is only loaded for guests.

        could you please add more information about this?

        im not using any plugin for quotes, but i have same issue:
        (Image no longer exists)

        how can i fix this?

        pd: congratulations for all your modifications, they have help me to earn a bit more :)
  17. cheenamalai says:
    The above had to do with.

    .bbcode_container div.bbcode_quote clear:both;
    when i changed this to

    .bbcode_container2 div.bbcode_quote2 clear:both;

    Problem was solved. However, when there is a quote it doesn't side it like the default vbulletin advertising system. Instead, the ad just goes behind it, violating Google TOS.

    If it was possible for the quote to just go left like the vbulletin ad system, it would be nice.
  18. cheenamalai says:
    I used paranorma's quote overhaul at vbulletin.org and it looks quite better with this mod.

    Check it out, it will enhance your posts with quotes/ads.
  19. admin says:
    What's the Link?
  20. cheenamalai says:
    New Quotes by panoramaharem 4.0.4 - vBulletin.org Forum

    You can change the css/image appropriately.
  21. admin says:
    I don't like the design of these quotes but as long as it works for you that's cool ;)
  22. admin says:
    Get yourself Firebug and play with the CSS on the fly to find the problem. CSS isn't that hard.

    But normally it should work fine.
  23. Aquestor says:
    I already did that before, but i was only able to show the advert higher or lower or could make more difference between Advert and Text.

    If the Text is shown as it should at the top of the post, i have a scrollbar in the post and the text is behind the Ad.

    Will go on with try and error thanks for your help and the great implementations.
  24. Aquestor says:
    Sorry that i wasted your Time, it doesn`t collaborate with vbcms.

    My fault
  25. admin says:
    If you find a solution let us know.

    There are other vB owners with vbcms for sure ;)
  26. Aquestor says:
    find in postbit-ie.css and replacement-vbulletin-ie.css:
    /* VBIV-7249 */
    .postbitlegacy .postrow .content {
     float: {vb:stylevar right};
     width: 100%;
     _float: none;
     _width: auto;
    }
    /* end VBIV-7249 */
    delete
    • ravel says:
      Hi,

      have you ever tried to edit your thread while advertisement is inside the thread?

      This is how it looks:



      Any idea how to solve this issue?

      I think you haven't faced the problem yet because you have disabled ads for registered forum users.

      Thanks in advance
  27. admin says:
    I don't show Ads to my members so I don't have this problem.

    I would wait until the new Editor comes out maybe this fixes the problem.

    Or try to excule the script editpost but that wont fix the quick edit problem.
  28. ravel says:
    What new Editor do you mean? Is anything announced by vbulletin?

    Excluding the editpost script doesn't work because of ajax
  29. admin says:
    There will be a new Editor in the next version(s), yes.

    One that works with all browsers
  30. DADOCTOR says:
    Hello, first post for me

    Very interesting adsense forum, its great how you have simplified the site to make less noise, I agree!

    I have looked at this thread and since I can't see the answer, I am going to ask the "can this ad in first post be adapted to older vB versions?"

    I had a go with the adsense in welcome message, but could not make it work with 3.7x version

    If you guys dont know the answer maybe you know a forum who has done this to a older version,

    I have a 4.0x license but am a bit hesitant to do the change over after I have heard and seen so much negativity about it

    If I could mod my forum the same as this forum, I would upgrade, removing noise/unwanted links it what I want.

    I would be interested to hear about how this was achieved and is it a service provided by someone?

    Thanks for an interesting forum and sorry to hijack the thread, but I would like to hear about the older version compatibility with this.

    Regards Ryan
  31. admin says:
    Yes it definitely should work with older versions.

    I think that this version should work with older vBs as well but if not you could solve the problem simply with tables instead of CSS.
  32. admin says:
    In the CSS change
    .bbcode_container div.bbcode_quote { 
      clear:both; 
    }
    to
    .bbcode_container div.bbcode_quote { 
      clear:right; 
    }
    that should fix the problem.
  33. cloferba says:
    it works, thank you!
  34. admin says:
    you are welcome :)
  35. Toon says:
    I have my ads aligned to the right but they still appear behind the quoted text in a post, is there a better way to display these?
  36. Toon says:
    Found the answer, for some reason when I searched 'quote' is came up with nothing?
  37. Toon says:
    Using the extra css earlier in the thread, I now get massive gaps for members as if the ads are still there?
  38. admin says:
    this needs to be in the CSS
    .bbcode_container div.bbcode_quote { 
      clear:right; 
    }
    • Toon says:
      this needs to be in the CSS
      .bbcode_container div.bbcode_quote { 
        clear:right; 
      }
      Perfect thank you, I had clear both
  39. admin says:
    I just released the newest Version of my AdSense inside the first post modification.

    This new version corrects a problem that the fload_spacer CSS was causing. In older Browsers like IE7 the Ad was showing over the text which is a violation of AdSense TOS. That is why I removed the float_spacer. This means the Ad starts at the top where the text starts.

    I also highly optimized my CSS code and removed the need for the dotted line image by utilizing css styling for
    <hr>
    If you are using my old version, I strongly suggest you upgrade!
  40. Kolbi says:
    When have you updatet to v1.2?
    • admin says:
      When have you updatet to v1.2?

      When I posted the reply, 30.07.2011 ;)
  41. Kolbi says:
    Thanks ;) Danke ;)
  42. Kolbi says:
    Where is the .AdCommercial CSS hint used? Shouldn't it be could .AdInline
  43. admin says:
    You are right, thanks.

    Corrected the Problem ;)
  44. basketmen says:
    Hi admin, i am sorry, can you make this hack for vb 3 too? since very many forums dont want upgrade to vb 4, and still using vb 3

    or if you cant, can you give permission for someone to convert this to vb 3, in vbulletin.org? with copyright notice to you of course
  45. Kolbi says:
    These "hack" can be more or less be used for a vb3 board, too.

    Change
    <vb:if condition="$show['guest']">   
      <div class="AdCommercial">
        <hr class="ads_hr_style2" />   
        <h5>ADVERTISING</h5>
        <div class="AdCenter">
          YOUR ADSENSE LARGE RECTANGLE CODE HERE
        </div>
        <hr class="ads_hr_style2" /> 
      </div> 
    </vb:if>
    to
    <if condition="$show['guest']">
      <div class="AdCommercial">
        <hr class="ads_hr_style2" />
        <h5>ADVERTISING</h5>
        <div class="AdCenter">
          YOUR ADSENSE LARGE RECTANGLE CODE HERE
        </div>
        <hr class="ads_hr_style2" />
      </div>
    </if>
  46. admin says:
    The CSS should work in vB 3 as well however you need to find the right place to put it though.

    I don't run any vB3 forums anymore so I can't help you with this.
  47. Invi says:
    sorry to ask this if its already being answered .

    Could i show this on the first post of every page , i have threads running into 100 of pages and mostly guests and readers follow it from the first post of that page and not the actual first post.

    what necessary changes needs to be done to the code to show the add on first post of every page.

    Thanks
  48. admin says:
    It does show in the first post of every page ;)
  49. xabo says:
    Is it possible to exclude some groups from seeing this? Like "Not for VIP, but everyone else" ? :)
  50. admin says:
    add to the condition:
    AND is_member_of($bbuserinfo, X,Y,Z)
    X,Y,Z being the numbers of the usergroups you would like to see the Ads ;)
  51. Kolbi says:
    to only exclude you can use:
    AND !is_member_of($bbuserinfo, X,Y,Z)
    X,Y,Z sehen es dann nicht, allen anderen schon.
  52. Toon says:
    Mine seems to overlap image now, is there a fix for this?

    (Resource no longer exists)
  53. JamesColin says:
    Toon, it doesn't overlap the (3) images on your first post for me, on firefox, windows.
  54. admin says:
    It doesn't overlap for me too with firefox and ie9
  55. rumas says:
    I upgraded to VB 4.1.11 and I noticed the text no longer wraps around the first post ad, I checked your site admin and I noticed it's not wrapping for you as well.

    (Resource no longer exists)

    I checked both my sites and yours on these browsers:

    Firefox 10.0.2 IE 9.0.8 Chrome 17.0.963.56 m

    I am sure most people haven't noticed it yet. Can anyone confirm this and provide a solution?
  56. admin says:
    I have to take a closer look at this. Could take a while though ;) Thanks for the tip
  57. rumas says:
    I think I was able to chase down the CSS in VB 4.1.10 and 4.1.11 that has caused the text not to flow around ad problem.

    This was generated by the showthread-rollup.css, what tpl it is in I am not sure:
    blockquote {
    overflow:hidden;
    }
    Add this to additional.css:
    blockquote {
    overflow:visible;
    }
    ...seems to solve the problem. I don't know if this is a permanent solution or what consequences this will have to other styling. It works for now, until admin can release an update.

    I am also going to assume the "AdSense in last post" provide here by admin will also require this, but i haven't tested it.

    I hope this is helpful to someone else.
  58. admin says:
    Your settings will create the old problem that quotes overlap the Ads.

    If you use AdSense then this is a violation of AdSense TOS.

    I think there is no easy fix for this.

    I have to find another approach for the implementation
  59. rumas says:
    Yeah you're right...that's disappointing!

    This:
    .bbcode_container div {
    clear:right;
    }
    ...sends the quote to the next line under the ad. Again, I am not sure what other style problems this might cause.
  60. admin says:
    yes, that was my previous solution but if a post with an ad starts with a quote then all text is below the ad.

    I'll try to find a better solution for this
  61. rumas says:
    I have a lot of free time this week so if I find anything else I will post it, but obviously you been through all this already and I am posting nothing new.
  62. admin says:
    If you find a solution that would be great.

    All I can think of right now would be a workaround and limit the size of the quotes for post where ads are shown.

    However therefor I need to get post conditions to work in the bbcode_quote template.

    Made a request for help here: https://www.vbulletin.com/forum/showthread.php/397449-Condition-question

    If you can think of a different approach let us know
  63. rumas says:
    I believe I found the problem and have a solution. Vbulletin 4.1.10 has added an ads section to the Style Variable editor, this stopped the text from flowing around the AD properly.

    Here is the new working css, Red indicates the changes I made to the admins CSS:
    /*------------------------------------------------------------------------------
    | #> Advertising
    +-----------------------------------------------------------------------------*/
    /* Ad inside first post */
    .AdCommercial { 
      float: right; 
      overflow:hidden; 
      background-color:#FAFAFA; 
      text-align: right; 
      font-size:10px; 
      width:336px; 
      margin-left:10px;
    }
    .AdCenter { 
      align:center; 
      margin:0; 
      padding-bottom: 5px;
    }
    .bbcode_container div.bbcode_quote { 
      clear:right; 
    }
    .ads_hr_style2 { 
      background-color: #FAFAFA; 
      color: #FAFAFA; 
      border: 1px dotted #D8D8D8; 
      border-style: 
      none none dotted; 
      display: block !important;
    }
    blockquote {
      overflow:visible
    }
    .hasad {
      margin-right:0
    }
    This pushes the quote box down just like it worked prior to vb 4.1.10. Alternatively you could change "ad_post_maxWidth" to 0 in the Style Variable Editor. This is the same as this:
    .hasad {
      margin-right:0
    }
    Here is a screen shot of the working CSS: If you want the the text in the quote box to flow around the ad try this:
    /*------------------------------------------------------------------------------
    | #> Puts ad on top of Quote, Quote text flows around ad
    +-----------------------------------------------------------------------------*/
    /* Ad inside first post */
    .AdCommercial,.ads_hr_style2 {
      background:#fafafa
    }
    .AdCommercial {
      position:relative;
      z-index:1;
      float:right;
      overflow:hidden;
      text-align:right;
      font-size:10px;
      width:auto;
      margin-left:10px
    }
    .AdCenter {
      align:center;
      margin:0;
      padding-bottom:5px
    }
    .ads_hr_style2 {
      color:#fafafa;
      border:1px dotted #d8d8d8;
      border-style:none none dotted;
      display:block !important
    }
    blockquote {
      overflow:visible
    }
    .hasad {
      margin-right:0
    }
    It may not look as pretty, but it doesn't push your quoted content further down the page. Everything still works the same as the admins CSS only this puts the ad on top of the quote and flows the text around it.

    Here is a screen shot of this:

    Any feedback would be great.

    $post['isfirstshown'] option would be great...so far no answer.
  64. admin says:
    Ok, I found a new solution for the Problem

    In additional.css:
    /*------------------------------------------------------------------------------
    | #> Advertising
    +-----------------------------------------------------------------------------*/
    /* Ad inside post LR*/
    .AdCommercial { 
      float: right; 
      overflow:hidden; 
      background-color:#FAFAFA; 
      text-align: right; 
      font-size:10px; 
      width:336px; 
      margin-left:5px;
    }
    .AdCenter { 
      align:center; 
      margin:0; 
      padding-bottom: 5px;
    }
    .ads_hr_style2 { 
      background-color: #FAFAFA; 
      color: #FAFAFA; 
      border: 1px dotted #D8D8D8; 
      border-style: none none dotted; 
      display: block !important;
    }
    .ad_content_wrapper div.bbcode_container {
      width:300px; 
      margin: 5px 0 20px;
    }
    in postbit_legacy find:
    {vb:raw post.message}
    and replace it with:
    <vb:if condition="$show['guest'] AND $post['isfirstshown'] ">
      <div class="ad_content_wrapper">
        <div class="AdCommercial">
          <hr class="ads_hr_style2" />
          <h5>ANZEIGE</h5>
          <div class="AdCenter">
            YOUR AD CODE HERE
          </div>
          <hr class="ads_hr_style2" />
        </div>
       {vb:raw post.message}
      </div>
    <vb:else />
      {vb:raw post.message}
    </vb:if>
    This way if the post is the first post on a page and contains an ad then the bbcode box gets a fixed with of 300px

    If you use a larger width for your forum you might want to change the width for the bbcode in your additional.css

    You need to do this for bbcode_code etc. as well if you use them on your forum

    Example page: (Resource no longer exists)

    Let me know what you think :)
    • ravel says:
      Hi,

      your latest solution works great but it stands in conflict with the "Adsense inside last post" manual. Both manuals say that you have to replace the vb:raw post.message. What do we have to change to use both Ads (first and last post)?

      Thanks for the great work!
  65. admin says:
    You are right. But because it uses conditions you can set it up like this:
    <vb:if condition="$show['guest'] AND $post['isfirstshown'] ">
      <div class="ad_content_wrapper">
        <div class="AdCommercial">
          <hr class="ads_hr_style2" />
          <h5>ADVERTISING</h5>
          <div class="AdCenter">
            YOUR AD CODE HERE
          </div>
          <hr class="ads_hr_style2" />
        </div>
        {vb:raw post.message}
      </div>
    <vb:elseif condition="$show['guest'] AND !$thread[replycount] == 0 AND  !$post['isfirstshown'] AND $post['islastshown']" />
      <div class="ad_content_wrapper">
        <div class="AdCommercial">
          <hr class="ads_hr_style2" />
          <h5>ADVERTISING</h5>
          <div class="AdCenter">
            YOUR ADSENSE LARGE RECTANGLE CODE HERE
          </div>
          <hr class="ads_hr_style2" />
        </div>
        {vb:raw post.message}
      </div>
    <vb:else />
      {vb:raw post.message}
    </vb:if>
    
    • Toon says:
      You are right. But because it uses conditions you can set it up like this:
      <vb:if condition="$show['guest'] AND $post['isfirstshown'] ">
        <div class="ad_content_wrapper">
          <div class="AdCommercial">
            <hr class="ads_hr_style2" />
            <h5>ADVERTISING</h5>
            <div class="AdCenter">
              YOUR AD CODE HERE
            </div>
            <hr class="ads_hr_style2" />
          </div>
         {vb:raw post.message}
        </div>
      <vb:elseif condition="$show['guest'] AND !$thread[replycount] == 0 AND  !$post['isfirstshown'] AND $post['islastshown']" />
        <div class="ad_content_wrapper">
          <div class="AdCommercial">
            <hr class="ads_hr_style2" />
            <h5>ADVERTISING</h5>
            <div class="AdCenter">
              YOUR ADSENSE LARGE RECTANGLE CODE HERE
            </div>
            <hr class="ads_hr_style2" />
          </div>
         {vb:raw post.message}
        </div>
      <vb:else />
        {vb:raw post.message}
      </vb:if>
      Tried this but had to delete it as this duplicates the content from the first post for all members.
    • Toon says:
      Ok, I found a new solution for the Problem

      In additional.css:
      /*------------------------------------------------------------------------------
      | #> Advertising
      +-----------------------------------------------------------------------------*/
      /* Ad inside post LR*/
      .AdCommercial { 
        float: right; 
        overflow:hidden; 
        background-color:#FAFAFA; 
        text-align: right; 
        font-size:10px; 
        width:336px; 
        margin-left:5px;
      }
      .AdCenter { 
        align:center; 
        margin:0; 
        padding-bottom: 5px;
      }
      .ads_hr_style2 { 
        background-color: #FAFAFA; 
        color: #FAFAFA; 
        border: 1px dotted #D8D8D8; 
        border-style: none none dotted; 
        display: block !important;
      }
      .ad_content_wrapper div.bbcode_container {
        width:300px; 
        margin: 5px 0 20px;
      }
      in postbit_legacy find:
      {vb:raw post.message}
      and replace it with:
      <vb:if condition="$show['guest'] AND $post['isfirstshown'] ">
        <div class="ad_content_wrapper">
          <div class="AdCommercial">
            <hr class="ads_hr_style2" />
            <h5>ANZEIGE</h5>
            <div class="AdCenter">
              YOUR AD CODE HERE
            </div>
            <hr class="ads_hr_style2" />
          </div>
          {vb:raw post.message}
        </div>
      <vb:else />
        {vb:raw post.message}
      </vb:if>
      This way if the post is the first post on a page and contains an ad then the bbcode box gets a fixed with of 300px

      If you use a larger width for your forum you might want to change the width for the bbcode in your additional.css

      You need to do this for bbcode_code etc. as well if you use them on your forum

      Example page: (Resource no longer exists)

      Let me know what you think :)

      Think I'm getting in a real mix with this ^^^^ This is for the ad in the first post?

      You are right. But because it uses conditions you can set it up like this:
      <vb:if condition="$show['guest'] AND $post['isfirstshown'] ">
      <div class="ad_content_wrapper">
       <div class="AdCommercial">
        <hr class="ads_hr_style2" />
         <h5>ADVERTISING</h5>
         <div class="AdCenter">
           YOUR AD CODE HERE
         </div>
        <hr class="ads_hr_style2" />
      </div>
       {vb:raw post.message}
      </div>
      <vb:elseif condition="$show['guest'] AND !$thread[replycount] == 0 AND  !$post['isfirstshown'] AND $post['islastshown']" />
      <div class="ad_content_wrapper">
       <div class="AdCommercial">
        <hr class="ads_hr_style2" />
         <h5>ADVERTISING</h5>
         <div class="AdCenter">
           YOUR ADSENSE LARGE RECTANGLE CODE HERE
         </div>
        <hr class="ads_hr_style2" />
      </div>
       {vb:raw post.message}
      </div>
      <vb:else />
      {vb:raw post.message}
      </vb:if>
      This is for the ad in the last post? ^^^ If this is the new code should it be in the original post or is this not the solution any more?

      Link: (Resource no longer exists)

      I think I've misunderstood which code is for which, I now have 2 ads appearing in the first post.
      Thanks
  66. Toon says:
    After the most recent update I seem to have a slight clear issue, if you see here...

    (Resource no longer exists)

    My last post ad knocks the content down as it should but the first one seems to have a small overlap. Is there a solution for this?

    Thanks
  67. admin says:
    It is the same solution as in this post.

    Use the code above your post and the css from this thread
  68. Toon says:
    Thanks for that admin but the ads still seemed slightly clipped on the right hand edge..

    (Resource no longer exists)
  69. onlinemaaz says:
    postbit and postbit_lagency i have edited both files according to your steps but still no ad displayed in my forum..please help
  70. onlinemaaz says:
    where is additional.css ??
  71. admin says:
    Tried this but had to delete it as this duplicates the content from the first post for all members.

    Then you did not replace vb:raw post.message with the code but instead posted it below it or something.

    ps: Can you make screenshots of your problems. It is better than a link ;)

    where is additional.css ??
    It's a CSS template from vBulletin.
    • Toon says:
      Then you did not replace vb:raw post.message with the code but instead posted it below it or something.

      ps: Can you make screenshots of your problems. It is better than a link ;)

      It's a CSS template from vBulletin.

      You are correct I still had the TMS set to below rather than replace.
  72. admin says:
    The last quote is for the first and the last post.
  73. cheenamalai says:
    Without floatspacer, the clicks are down almost 40%.
  74. admin says:
    I know however I can't find any solution without it causing troubles.

    I am open for suggestions though :)
  75. admin says:
    I updated the implementation to better handle nested bbcode.

    The new code can be found in my first post in this thread because it is now recommended for all vB4 versions.

    I suggest you upgrade to Version 1.5 :)
    • monkie says:
      Hello,

      This mod is great! Any idea of how I can place adsense inside vBulletin CMS article (top right)?
  76. cheenamalai says:
    Do you still have version v1.1 for first and last post?
  77. admin says:
    Version 1.1 is attached as txt file in the first post
    • adeel says:
      Version 1.1 is attached as txt file in the first post

      I want to display my ad inside the first post where content ends, instead of top right.

      Like this



      Must stay inside the post.

      Kindly let me know if this can be done. I will be happy to pay to make this happen.
  78. admin says:
    Of course this can be done. Should be some CSS changes.

    You might want to give it a try yourself, it shouldn't be that hard.

    If you can't figure it out contact me via PM.
  79. synseal says:
    Love your adsense placements! - thankyou for sharing.

    Is this allowed after changing your .css a little.

    TIA.

  80. admin says:
    did you check threads with quotes, code and other bbcode and how they look with the ad on the left side?

    How is text behaving next to your ad on the left?
  81. Knocks says:
    Anyone have the XenForo implementation of this? Nothing on the official XF forums.
  82. Taurus says:
    What would happen with this when users centers their text in a post?
  83. m7sen says:
    hi

    can i do it with vb3.8.7 ?

    thanks
  84. m7sen says:
    how can i do it please help me ^_^
  85. cr.jones.2014 says:
    first thank you very much second i just want to ask you How can i Add This To Blogger

Leave a Reply

Your email address will not be published. Required fields are marked *

*