Extension:S5h adsense filter

What can this extension do?
This extension provides Google Adsense code to page text. This is useful if you do not wish to modify skins in order to insert the adverts to every page.

I didn't find anything that worked for me by means of modifying skins so I decided to insert the adcode before the page text.

Usage
Download, install and modify the variables.

For example: $ wget http://www.s5h.net/code/mediawiki/s5h_adsense_filter.php

Download instructions
Please download the s5h_adsense_filter.php code and install in. should hold your LocalSettings.php, you should already have an extensions directory beneath this. In reality, providing PHP can read the directory where you decide to store this, there shouldn't be a problem, but using an extensions directory should keep the installation tidy.

You may verify the PGP signature of this if you wish (http://www.s5h.net/wiki/Gpg):

-BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux)

iEYEABECAAYFAk1Ic9oACgkQ4dyr7s6PRYgqoACaA8HLxr54FAH15bt35qlxeM8p va8An3RBxauv5uK+RbEXXRXsobw3uLpw =8CwB -END PGP SIGNATURE-

Installation
To install this extension, add the code to LocalSettings.php:

Configuration parameters
Google will provide you with your own  variables.

You will be provided with the  variable by Google.

Additional features
Version 1.800 allows for additional parameters to be configured, these include:



Define this in your LocalSettings.php as the number of adverts which can be displayed.

Example:

$wgs5hadsensefilter["max_adverts"] = 3;



This contains a  value as to weather the advert is displayed at the top of the page (before any other article text).

Example:

$wgs5hadsensefilter["page_start"] = TRUE;



This contains a  value as to weather the advert can be displayed in a paragraph.

Example:

$wgs5hadsensefilter["h1"] = TRUE;



See above h1 definition.



See above h1 definition.



See above h1 definition.



See above h1 definition.