Extension:Google Adsense

Description
This lets Users put Google Adsense on top of their wiki. See Example.

Make a Google Adsense Account
Go on to https://www.google.com/adsense/ and register with Google Adsense, (note:it takes two days for your website to get reviewed and approved).

After you can log in, click on Adsense Setup then click on AdSense for Content.

Ad unit - Choose if you just want images, text or both to be shown on your website.

728x90 Leaderboard is what you are going to add to the website so don't alter it. You can change the colors if you wish. Continue until you get the code for the advert, which you need for the step below.

Adsense.php
Make a file called Adsense.php in the same folder where LocalSetting.php is. Add this code below to file:

 

The bold should be changed to the code you got from the step above.

Monobook.php
Go to monobook.php and add this code:



Under:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Note: is there a such code in the monobook.php, is Mediawiki 1.6 has this code?

Monobook/Main.css
Go to the monobook folder and open main.css and alter some of the codes in the file. Change the the code which is in bold.

*/

width: 100%; float: right; margin: 0 0 .6em -12.2em; padding: 0; }	margin: 2.8em 0 0 12.2em; padding: 0 1em 1em 1em; position: relative; z-index: 2; }	padding-top: 160px; }
 * 1) column-content {
 * 1) content {
 * 1) column-one {

Change it to:

*/

width: 100%; float: right; margin: 0 0 .6em -12.2em; padding: 0; }	margin: 1.8em 0 0 12.2em; padding: 0 1em 1em 1em; position: relative; z-index: 2; }	padding-top: 40px; }
 * 1) column-content {
 * 1) content {
 * 1) column-one {

Then find p-cactions (half way in the middle). Change the the code which is in bold.

position: absolute; top: 1.3em; left: 11.5em; margin: 0; white-space: nowrap; width: 76%; line-height: 1.1em; overflow: visible; background: none; border-collapse: collapse; padding-left: 1em; list-style: none; font-size: 95%; }
 * 1) p-cactions {

Change it to:

position: absolute; top: 9.9em; left: 11.5em; margin: 0; white-space: nowrap; width: 76%; line-height: 1.1em; overflow: visible; background: none; border-collapse: collapse; padding-left: 1em; list-style: none; font-size: 95%; }
 * 1) p-cactions {