Extension:AdsWherever

AdsWherever is a very simple extension that displays any advertising codes on your wiki page.

Source
Copy the following code into extensions/AdsWherever.php:

Installation

 * Create the file AdsWherever.php and paste the code shown above. Make sure there are no empty lines after the final php exit tag.
 * Upload adswherever.php to your $IP/extensions directory.
 * Add the following lines at the end of LocalSettings.php:

Usage
After you set the variable in $ad['name'], insert a tag into anywhere of your page. Here is an example to insert the google adsense code.

To insert this tag:  It will show the whole google adsense code.

Also try

where it shows the Hello World example as above.