From 9f38be46358e62f33ae2c556269a0223963edc26 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 10 Jun 2009 23:17:54 +0200 Subject: implement ads for archlinux.org as plugin --- extensions/ArchLinuxAds.php | 37 +++++++++++++++++++++++++++++++++++++ skins/ArchLinux.php | 3 +-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 extensions/ArchLinuxAds.php 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 @@ + '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 .= '
+ + +
'; + + return true; +} + +} + +?> diff --git a/skins/ArchLinux.php b/skins/ArchLinux.php index 260f8039..cd0fecfe 100644 --- a/skins/ArchLinux.php +++ b/skins/ArchLinux.php @@ -60,7 +60,7 @@ class ArchLinuxTemplate extends QuickTemplate { * @access private */ function execute() { - global $wgRequest, $wgArchNavBar, $wgArchNavBarSelected, $wgAds; + global $wgRequest, $wgArchNavBar, $wgArchNavBarSelected; $this->skin = $skin = $this->data['skin']; $action = $wgRequest->getText( 'action' ); @@ -129,7 +129,6 @@ class ArchLinuxTemplate extends QuickTemplate { ?> - -- cgit v1.2.2