Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
A perfectly centered Adsense banner below the navbar that is loaded AFTER other ADs Details »
A perfectly centered Adsense banner below the navbar that is loaded AFTER other ADs
Mod Version: 1.00, by StarBuG (Designer) StarBuG is offline
Developer Last Online: Mar 2017 I like it Show Printable Version Email this Page

vB Version: 4.0.2 Rating: (3 votes - 5.00 average) Installs: 12
Released: 30 Mar 2010 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code  

Hello everyone.

I had the following problem:
I want to show a leaderboard banner below the navigation centered.
My leaderboard was clicked only half as often as the banners I showed in the thread as 2nd post.
So I wanted to load my leaderboard banner AFTER the 2nd post banners so that they get the highest paying keywords.

I found a complex but perfect solution for this:

The settings for my forum:
vBulletin 4.0.2
Fixed width for the forum and the forum is centered.
The banner position is exactly 253px from the top.

In Template ad_global_below_navbar add:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Click Save

The ads_navbar_container creates an empty "box" that spans from left to right and has a hight of 100px.
This is the background box on which I will display the adsense banner.

In Template ad_footer_end add:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Click Save

This is the actual Adsense Leaderboard.
It is wraped inside a container (ads_navbar_container_2) that is positioned from the top to fit inside the box we created before (in this case 253px from the top).

After that we define the AD in ads_navbar and center it within the previous container.
If you use other banner formats change the width to fit the banner width.

In Template additional.css add:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Change the colors of the background box to colors that fit your theme.
Adjust the top position to fit your layout.
Change the banner width and box height if you use other formats then a leaderboard.

Click Save

E voila, a perfectly centered banner that is loaded last (displays the lowest paying keywords).

If you want to load it in between 2 other ads, simply search for an ad template that is loaded after the first and before the second and put the ad code there instead of the footer ad template.

In my case I only did this "trick" for banners that are shown to guests which are viewing a thread.
That is done via conditionals.

Instead of the above add the following to your ad_global_below_navbar template:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

In Template ad_footer_end add:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Click Save

In Template additional.css add:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Best regards

StarBuG



Google isn't paying you enough money! Discover WHY!

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	screen_adsense.jpg
Views:	1501
Size:	85.1 KB
ID:	115053  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
phpAdsNew Banner Ads integration (advertisements, classified ads, Adsense, etc.) The M.I.P. vBulletin 3.5 Add-ons 600 25 Apr 2012 09:45

  #16  
Old 06 May 2010, 05:04
ShawneyJ's Avatar
ShawneyJ ShawneyJ is offline
 
Join Date: Jul 2006
Real name: Shawn
looks way better thank you. installed.
__________________
Sorry Guys, just a little busy lately.
Reply With Quote
  #17  
Old 10 Feb 2011, 07:02
Donatello Donatello is offline
 
Join Date: Jan 2011
for me was easiest add after your AdSense Code in ad_global_below_navbar
<center> </center>
in scrip same this:

<center><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><vb:if condition="$adsshown[] = 1"></vb:if></div></center>
Reply With Quote
  #18  
Old 19 Sep 2016, 09:31
tbellik tbellik is offline
 
Join Date: Jan 2015
Thanks........
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 03:17.

Layout Options | Width: Wide Color: