Thursday, August 27, 2009

Google AdSense

Adding Google AdSense module into MediaWiki.

Ad module added with help of Google AdSense extension for MediaWiki engine. This small extension does all routine work.

  1. Download Google AdSense extension for MediaWiki (1.14+).
  2. Unpack to "extensions" directory.
  3. Update LocalSettings.php (see below).
  4. Update common.css (http://devwiki.beloblotskiy.com/index.php5?title=MediaWiki:Common.css). New CSS fragment can be found here. This step is really optional.

LocalSettings.php
require_once( "extensions/GoogleAdSense/GoogleAdSense.php" );
$wgGoogleAdSenseClient = 'pub-8940041409402700';
$wgGoogleAdSenseSlot = '2005982900';
$wgGoogleAdSenseID = 'AvbWiki_Right_Skyscraper_120x600';
$wgGoogleAdSenseWidth = 120;
$wgGoogleAdSenseHeight = 600;

All these parameters are from Google AsSense code.

As always, all extensions are listed here...

No comments: