Announcement

Collapse
No announcement yet.

Adsense Integration - First Post Ad Location?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • LEIVA
    replied
    Tomatogirl you rock works perfect Thanks

    Leave a comment:


  • tomatogirl
    replied
    Originally posted by LEIVA View Post
    Ok i have add that code and it work perfect now like you read above is only to show to guests, how i can show it to both guests and registers ? Thanks
    If you omit the code shown in red, the ad will be shown to everybody, guests and registered users.

    So, instead of this:

    Code:
    <if condition="$bbuserinfo['usergroupid'] == 1">
    <div style="float:right; width:300px; height:250px; margin-left:10px">
    
    put your 300 x 250 ad code here
    
    </div>
    </if>
    Just use this:

    Code:
    <div style="float:right; width:300px; height:250px; margin-left:10px">
    
    put your 300 x 250 ad code here
    
    </div>

    Leave a comment:


  • LEIVA
    replied
    Originally posted by tomatogirl View Post
    Go to Admin CP > Styles & Templates > Style Manager > << >> (Expand Templates) > Ad Location Templates > ad_showthread_firstpost_start

    That template should be blank (unless you've already added any code there yourself). Put the following code in that template. The code in red makes the ad show only to guests; it can be omitted and the ad will be shown to everybody. It could also be replaced with a different conditional to show the ad to whatever user group(s) you want.

    Code:
    <if condition="$bbuserinfo['usergroupid'] == 1">
    <div style="float:right; width:300px; height:250px; margin-left:10px">
    
    put your 300 x 250 ad code here
    
    </div>
    </if>
    The following is just something to note, which may or may not matter to you. At first it bothered me, but I decided that it is actually the more logical behavior, so I did not pursue finding a way to change it.
    If the first post (the post in which the ad is shown) is very short, the person's signature (if they have one) and quote button will be immediately under the post, to the left of the ad (see attached screen shot). It will not be all the way at the bottom of the post box as it is when there is no ad. This is contrary to the screen shot shown in the vBulletin manual under Google Adsense Integration, which shows a short post with the sig and quote button at the bottom, below the ad. However, I have verified that even when one is using the built-in vBulletin Adsense Integration, very short posts have the sig and quote button to the left of the ad, not at the bottom under the ad.

    Ok i have add that code and it work perfect now like you read above is only to show to guests, how i can show it to both guests and registers ? Thanks

    Leave a comment:


  • tomatogirl
    replied
    Originally posted by lifanovsky View Post
    On my forum it didn't bumped down automatically. Eventually I just shortened its length by myself.
    Did you shorten the length of the quote box? Can you share how you did that? It would be very useful.

    Leave a comment:


  • tomatogirl
    replied
    Originally posted by ddo36 View Post
    i followed this mod, and its nice. BUT i want the ads to show only at the first post. how can i do it?
    I have not used that mod myself, but I believe it is supposed to show the ad in only the first post on each page. That mod has you edit the postbit, so I believe it must have been written before vBulletin added their built-in Ad Location Templates. Now all you have to do is put your code in ad_showthread_firstpost_start.

    Admin CP > Styles and Templates > Style Manager > << >> (Expand Templates) > Ad Location Templates > ad_showthread_firstpost_start

    The reason I had given a link to that mod before was because it gives a bit of code that can be used to remove the quote button when an ad is shown.

    Leave a comment:


  • ddo36
    replied
    This may be helpful to some... for those who are showing ads only to guests, vbulletin.org has info on how to remove the Quote button for guests only: http://www.vbulletin.org/forum/showthread.php?t=172170.
    i followed this mod, and its nice. BUT i want the ads to show only at the first post. how can i do it?

    Leave a comment:


  • lifanovsky
    replied
    On my forum it didn't bumped down automatically. Eventually I just shortened its length by myself.

    Leave a comment:


  • tomatogirl
    replied
    You're welcome! On my site, if there is a quote, the quote gets bumped down below the ad. I have not found a solution for this. When I tested the built-in vBulletin adsense integration, it was the same way.

    Leave a comment:


  • lifanovsky
    replied
    Great advice, thank you! Though there's one trouble - if in the first post there is a quote, the background of the quote gets under the ad space. Is it possible to do something about this too?

    Thank you!

    Leave a comment:


  • tomatogirl
    replied
    Yes, large images will be pushed below the ad.

    Leave a comment:


  • Bradley_Wint
    replied
    What about when you place large images. I assume the ad box will push whatever image below the level of the ad?

    Leave a comment:


  • tomatogirl
    replied
    This may be helpful to some... for those who are showing ads only to guests, vbulletin.org has info on how to remove the Quote button for guests only: http://www.vbulletin.org/forum/showthread.php?t=172170.

    Leave a comment:


  • tomatogirl
    replied
    Thank you for the suggestion! Although I have decided I do prefer having both the sig and quote button immediately beneath the post, I tried this to see how it would look. It doesn't work. Using a div clear causes the entire text of the post to be below the ad.

    Leave a comment:


  • Bradley_Wint
    replied
    Why don't you just put a div clear after it? That should help with the sig spacing.

    Leave a comment:


  • tomatogirl
    replied
    Originally posted by jmurrayhead View Post
    I don't want to use the Adsense Integration...but I like the location used for the first post. Is this an actual location provided in our templates or do we need to do this manually?
    Go to Admin CP > Styles & Templates > Style Manager > << >> (Expand Templates) > Ad Location Templates > ad_showthread_firstpost_start

    That template should be blank (unless you've already added any code there yourself). Put the following code in that template. The code in red makes the ad show only to guests; it can be omitted and the ad will be shown to everybody. It could also be replaced with a different conditional to show the ad to whatever user group(s) you want.

    Code:
    <if condition="$bbuserinfo['usergroupid'] == 1">
    <div style="float:right; width:300px; height:250px; margin-left:10px">
    
    put your 300 x 250 ad code here
    
    </div>
    </if>
    The following is just something to note, which may or may not matter to you. At first it bothered me, but I decided that it is actually the more logical behavior, so I did not pursue finding a way to change it.
    If the first post (the post in which the ad is shown) is very short, the person's signature (if they have one) and quote button will be immediately under the post, to the left of the ad (see attached screen shot). It will not be all the way at the bottom of the post box as it is when there is no ad. This is contrary to the screen shot shown in the vBulletin manual under Google Adsense Integration, which shows a short post with the sig and quote button at the bottom, below the ad. However, I have verified that even when one is using the built-in vBulletin Adsense Integration, very short posts have the sig and quote button to the left of the ad, not at the bottom under the ad.
    Attached Files

    Leave a comment:

Related Topics

Collapse

Working...
X