summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-06-10 23:17:54 +0200
committerPierre Schmitz <pierre@archlinux.de>2009-06-10 23:17:54 +0200
commit9f38be46358e62f33ae2c556269a0223963edc26 (patch)
tree85900d9fcbef998787419486db3c7c27fb5f3851 /extensions
parent28e0141d1be2df023bd0544886189aaf07508188 (diff)
implement ads for archlinux.org as plugin
Diffstat (limited to 'extensions')
-rw-r--r--extensions/ArchLinuxAds.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/extensions/ArchLinuxAds.php b/extensions/ArchLinuxAds.php
new file mode 100644
index 00000000..f95288da
--- /dev/null
+++ b/extensions/ArchLinuxAds.php
@@ -0,0 +1,37 @@
+<?php
+
+$wgExtensionCredits['other'][] = array(
+ 'name' => 'ArchLinuxAds',
+ 'version' => '1.0',
+ 'description' => 'Display ads on wiki.archlinux.org',
+ 'author' => 'Pierre Schmitz',
+ 'url' => 'http://www.archlinux.org'
+);
+
+$wgHooks['SkinAfterBottomScripts'][] = 'ArchLinuxAds::addAds';
+
+
+class ArchLinuxAds {
+
+public static function addAds($skin, $text) {
+ $text .= '<div style="z-index:0; position:absolute; top:40px; right:10px;">
+ <script type="text/javascript"><!--
+ google_ad_client = "pub-3170555743375154";
+ google_ad_width = 468;
+ google_ad_height = 60;
+ google_ad_format = "468x60_as";
+ google_color_border = "ffffff";
+ google_color_bg = "ffffff";
+ google_color_link = "0771A6";
+ google_color_url = "99AACC";
+ google_color_text = "000000";
+ //--></script>
+ <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
+ </div>';
+
+ return true;
+}
+
+}
+
+?>