forked from Sturmkrieg/mw-WikiBanner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWikiBanner.php
More file actions
29 lines (21 loc) · 855 Bytes
/
WikiBanner.php
File metadata and controls
29 lines (21 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
$wgExtensionCredits['other'][] = array(
'path' => __FILE__,
'name' => "WikiBanner",
'description' => "Allows top and bottom banners to be added to the wiki as configured in the LocalSettings.php file.",
// 'descriptionmsg' => "",
'version' => 1.1,
'author' => "Inquisitor Ehrenstein",
'url' => "http://www.mediawiki.org/wiki/Extension:WikiBanner",
);
//Explicitly defining global variables
$wgTopBannerCode = '<!-- No Top Banner -->';
$wgBottomBannerCode = '<!-- No Bottom Banner -->';
//Code for adding the top and bottom banners to the wiki
$wgHooks['BeforePageDisplay'][] = 'WikiBanner';
function WikiBanner( OutputPage &$out, Skin &$skin ) {
global $wgTopBannerCode, $wgBottomBannerCode;
$out->prependHTML( $wgTopBannerCode );
$out->addHTML( $wgBottomBannerCode );
return TRUE;
}