![]() |
Monetizing MediaWiki > AdSense >
See also:
Table of Contents [hide]
Make an Ad ∞
Go to https://www.google.com/adsense/start/ and make a 120x240 ad.
prep the advertising slot ∞
\nano /your_wiki/skins/adsense/adsense_vertical.php
and paste
<div id="v-g-ads" class="portlet"> <h5>Google ads</h5> <div class="pBody"> <!-- Your Google AdSense code here --> </div> </div>
edit your skin ∞
\nano /your_wiki/skins/MonoBook.php
Search for this:
</div><!-- end of the left (by default at least) column -->
Above it, paste this:
<?php // Google AdSense block: if(!strstr($_SERVER['REQUEST_URI'], "Special:") && !strstr($_SERVER['REQUEST_URI'], "action=submit") && !strstr($_SERVER['REQUEST_URI'], "action=edit") && !strstr($_SERVER['REQUEST_URI'], "Template:")) { include("adsense/adsense_vertical.php"); } ?>
Be warned, your MonoBook.php will be overwritten when you update MediaWiki, so back up this file. Or better yet, re-apply your changes in case they made legit updates to the skin.
Thanks to ∞
-
Blender‘s old wiki’s skin
-
https://web.archive.org/web/20100902013926/forum.dreamhosters.com/3rdparty/29149-MediaWiki-and-Google-AdSense.htm [ 2 ]
Footnotes
- was wiki.blender.org/index.php/Meta/Blender_skin (not archived) [ ↩ ]
- Before the forum was removed, that post would later become the mangled https://web.archive.org/web/20200216192958/https://discussion.dreamhost.com/t/mediawiki-and-google-adsense/28444[ ↩ ]

