You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 348 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Google AdSense on top of a PHP-Nuke module

21.11.2. Google AdSense on top of a PHP-Nuke module

If you would like to add a 728x90 banner on top of every module, you can include the AdSense Javascript code in a separate file, call it adsense.php, then just include this file from your module (you can also choose a 486*60-banner if you like):

Put the following code in includes/adsense.php:

<center>
<script type="text/javascript"><!--
google_ad_client = "your client-number";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "336699";
google_color_url = "000000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>

This is nothing else but the well-known Google AdSense Javascript code we have also encountered in Section 20.7 and Section 21.11.1. Once you have adsense.php in the includes directory, it becomes trivial to use its code in any module you choose: for every module you would like to add the Google AdSense to, look for the following code:

include("header.php");

and place the following line after that:

include("includes/adsense.php");
Tip Make some room for long banners
 

Make sure that your module contains the line

$index = 0;

(not necessary if you use 468*60), otherwise you will get the right blocks column too - and this is not nice with a 728*90-banner.

Tip Long AdSense banner in the News module
 

The right place to put the Google AdSense long banner in the News module, is in the modules/News/index.php file,. There, find the line

$topic_title = $row_a[topictext];

and add the line

include("includes/adsense.php");

directly after it (see Google AdSense in PHP-Nuke).

Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.029 Seconds - 304 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::