Manual:Interface/Sitenotice
MediaWiki:Sitenotice is displayed above the page title for all users on all pages, unless it is disabled or superseded by another notice.
The message is disabled if the sitenotice page is empty or its contents are the single character -.
Which notice is displayed for a user is decided in this order:
- If the CentralNotice extension is enabled, it may add banner before the sitenotice. CentralNotice banners do not replace the sitenotice, read more below.
- If the user is not logged-in with an account, MediaWiki:Anonnotice is displayed (if enabled).
- Otherwise, MediaWiki:Sitenotice is displayed (if enabled).
- Otherwise, the message configured in $wgSiteNotice is displayed (if enabled).
- If MediaWiki:Namespacenotice-* is enabled (where
*is the namespace number of the current page), then the namespace notice will be added after the site notice. - Otherwise, no notice is displayed.
Dismissing
[edit ]If Extension:DismissableSiteNotice is installed, registered users can hide any site notice by clicking [dismiss] on the notice.
For an individual user to recover a previously dismissed site notice, they should delete the cookie dismissSiteNotice for www.mediawiki.org in their browser.
To show the site notice again, even for those who have dismissed it, sysops should increment the number in MediaWiki:Sitenotice id (this redisplays the notice for everyone regardless of whether the actual notice has been edited or not).
CentralNotice
[edit ]The CentralNotice banners are shown independent of other notices. The banners are are edited from a central wiki, for example, meta:Special:CentralNotice.
Mobile
[edit ]The MinervaNeue skin (used by the MobileFrontend extension) only shows site notices when $wgMinervaEnableSiteNotice is set to true (which is now the default since MediaWiki 1.36).
Individual notices can be selectively hidden on mobile using the nomobile class.
Hooks
[edit ]The site notice can be modified by extensions/skins via the SiteNoticeBefore and SiteNoticeAfter hooks.
See also
[edit ]- Manual:Interface/Edit notice
- meta:Fundraising/2006/Sitenotice Q4 page explains how to customize the site notice on local projects.
- Manual:$wgReadOnly
- Manual:Hooks/SiteNoticeBefore