From: Brion Vibber Date: Mon, 22 Dec 2003 11:10:35 +0000 (+0000) Subject: wgSiteNotice for system messages X-Git-Tag: 1.3.0beta1~1216 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=ee0fc3f9736ad3fca6cd2430c487f0d6901c7815;p=lhc%2Fweb%2Fwiklou.git wgSiteNotice for system messages --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 93e1e2b071..a05a687397 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -174,4 +174,7 @@ $wgNamespacesWithSubpages = array( -1 => 0, 0 => 0, 1 => 1, $wgNamespacesToBeSearchedDefault = array( -1 => 0, 0 => 1, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0 ); +# If set, a bold ugly notice will show up at the top of every page. +$wgSiteNotice = ""; + ?> diff --git a/includes/Skin.php b/includes/Skin.php index 16c400ed63..ca101631fe 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -245,14 +245,19 @@ class Skin { # function beforeContent() { - global $wgUser, $wgOut; + global $wgUser, $wgOut, $wgSiteNotice; if ( $wgOut->isPrintable() ) { $s = $this->pageTitle() . $this->pageSubtitle() . "\n"; $s .= "\n
"; return $s; } - return $this->doBeforeContent(); + if( $wgSiteNotice ) { + $note = "\n
$wgSiteNotice
\n"; + } else { + $note = ""; + } + return $this->doBeforeContent() . $note; } function doBeforeContent()