AdSense for Mobile Content
This modification is in the archives.
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. PHP CGI/Perl JSP ASP Here is the PHP Solution How to add Adsense for Mobile Content into your VB mobile template using the PHP include code bits. Requirements: 1 New Plugin 1 New File 1 Template Edit Instructions: 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: Code:
ob_start(); include('path/to/this/file/mobilead.php'); $mobileadsense = ob_get_contents(); ob_end_clean(); --------------- 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. Enjoy! If you use this, please Download No files for download. Screenshots |