User:Fo0bar/Google AdSense
From Meta, a Wikimedia project coordination wiki
You may notice a Google AdSense block to the top right of Finnix's website (or you may not; it blends in well). If you want to do this on your own MediaWiki installation, it's not hard to do. First, edit skins/MonoBook.php and look for the following lines:
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
<h1 class="firstHeading"><?php $this->text('title') ?></h1>
Insert the following between those two lines:
<div class="noprint floatright"><span> <script type="text/javascript"><!-- google_ad_client = "pub-9372650377977516"; google_ad_width = 234; google_ad_height = 60; google_ad_format = "234x60_as"; google_ad_type = "text"; google_ad_channel =""; google_color_border = "CCCCCC"; google_color_bg = "FFFFFF"; google_color_link = "000000"; google_color_url = "666666"; google_color_text = "333333"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </span></div>
Of course, you will want to replace the script data with the AdSense code Google generates for you. "234x60 Half Banner" works the best, though "468x60 Banner" could be used as well (if the title is too long, it will wrap around to the next line, insead of going over/under the AdSense block). The "Steely Gaze" theme blends in the best with MonoBook. Of course, if you want the ad to stand out, you'll probably want a theme with more contrast.
[edit] Also See
- AdSense MediaWiki extension