Register Members List Search Today's Posts Mark Forums Read

Mod Options
AdSense for Mobile Content Details »
AdSense for Mobile Content
Mod Version: 1.00, by WNxWakko (Member) WNxWakko is offline
Developer Last Online: Sep 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.4 Rating: (2 votes - 3.00 average) Installs: 12
Released: 17 Nov 2008 Last Update: Never Downloads: 2
Not Supported Uses Plugins Template Edits Additional Files External Content  

AdSense for Mobile Content in VB Templates

If you have ever attempted to create the Adsense for Mobile Content then you probably hit a stumbling block when it didn't give you the code it normally provides for regular ads.

The problem is you cant just copy paste the code google gives you and expect it to work. Google gives you the following four options and none of these can be pasted into VB Templates.

AdSense for Mobile Content generated code options.

Here is the PHP Solution

How to add Adsense for Mobile Content into your VB mobile template using the PHP include code bits.

1 New Plugin
1 New File
1 Template Edit


Since the information you need to put in all three of these will vary on your server paths, I dont know any way to give you a plugin to import that wouldn't require you to change it anyway. You will need to create these manually. Some of this I found in the VB handbook.

1. Create a Plug-in for global_start with these contents:

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

Replace the path and filename with the correct path and filename of the PHP file you want to include. The code in mobilead.php will execute and any output generated by this script will be stored in $mobileadsense


2. Create the PHP file

Login to your Google Adsense account and create a AdSense for Mobile Content.
Choose Server-side scripting language: PHP

Since the contents of this PHP file will be different for everyones individual account you will need to create it. When you see Your AdSense code showing in PHP, copy that into a newly created PHP file and call it "mobilead.php"

Upload the file to your root directory or where ever you wish to have it reside.

3. Template Change

Place $mobileadsense in one of your templates, such as header, navbar, FORUMHOME, depending upon where you want the mobile ads to display.

Your done!

If you wish to create more than one ad, just repeat the process and use a different name on the files and variables.


If you use this, please click install

Download Now

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


Click image for larger version

Name:	mobilecontent.gif
Views:	223
Size:	7.3 KB
ID:	89487  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Old 17 Nov 2008, 20:23
Hornstar's Avatar
Hornstar Hornstar is offline
Join Date: Jun 2005
Real name: Matt
If only google didnt ban me in the early days id give this a go now :/
Reply With Quote
Old 18 Nov 2008, 14:55
unp unp is offline
Join Date: Oct 2008
Not working for me.
Reply With Quote
Old 20 Nov 2008, 01:08
WNxWakko's Avatar
WNxWakko WNxWakko is offline
Join Date: Apr 2003
Are you testing using your PC browser? If you are it wont display. Google designed the code to only appear if you are using a mobile device. Confirm your testing with a mobile.
Reply With Quote
Old 20 Nov 2008, 01:15
gwerzal's Avatar
gwerzal gwerzal is offline
Join Date: Oct 2007
Thanks il give it a go
Reply With Quote
Old 20 Jan 2009, 13:43
tpearl5's Avatar
tpearl5 tpearl5 is offline
Join Date: Nov 2001
Real name: John
Thanks! This is exactly what I was looking for... however, I can't get any ads to display - I'm not getting any errors.
Reply With Quote
Old 09 Feb 2009, 12:41
iamthemoz iamthemoz is offline
Join Date: Jun 2008
Thanks! Works great!
Reply With Quote
Old 08 Nov 2009, 12:00
iamthemoz iamthemoz is offline
Join Date: Jun 2008
Recently this plugin has had a major impact on the speed of my site. I had to uninstall. Any ideas?
Reply With Quote
Old 01 Apr 2013, 22:00
Naijasite's Avatar
Naijasite Naijasite is offline
Join Date: Mar 2012
how do i make it work on mobile style 4.2 ?
Reply With Quote

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 07:38.

Layout Options | Width: Wide Color: