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"); |
![]() |
Make some room for long banners | |
---|---|---|
Make sure that your module contains the line
(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. |
![]() |
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
and add the line
directly after it (see Google AdSense in PHP-Nuke). |
Help us make a better PHP-Nuke HOWTO!Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum! Chris Karakas, Maintainer PHP-Nuke HOWTO |