On Wed, 2004-07-28 at 23:57 +1000, Tim Starling wrote:
If I thought it was a good idea to replace
$wgSiteNotice with
wfMsg('sitenotice'), I would have done so, instead of writing something
more complicated and more flexible.
I've done this for now:
$notice = wfMsg( 'sitenotice' );
if($notice == '<sitenotice>') $notice = '';
if($wgSiteNotice) $notice .= $wgSiteNotice;
if($notice != '-' && $notice != '') {
$parserOutput = $wgParser->parse( $notice, $wgTitle,
$wgOut->mParserOptions, true );
$wgSiteNotice = $parserOutput->getText();
}
It allows you to append arbitrary site-wide informations with the
possibility to use templates (need to be pulled from the MW NS to
provide a non-localized fallback) for recurring events.
And projects can set up their own message on top of that my modifying
MediaWiki:Sitenotice to something non-empty and non-'-'.
--
Gabriel Wicke