wgSiteNotice for system messages
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 22 Dec 2003 11:10:35 +0000 (11:10 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 22 Dec 2003 11:10:35 +0000 (11:10 +0000)
includes/DefaultSettings.php
includes/Skin.php

index 93e1e2b..a05a687 100644 (file)
@@ -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 = "";
+
 ?>
index 16c400e..ca10163 100644 (file)
@@ -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<div class='bodytext'>";
                        return $s;
                }
-               return $this->doBeforeContent();
+               if( $wgSiteNotice ) {
+                       $note = "\n<div id='notice' style='font-weight: bold; color: red; text-align: center'>$wgSiteNotice</div>\n";
+               } else {
+                       $note = "";
+               }
+               return $this->doBeforeContent() . $note;
        }
 
        function doBeforeContent()