Manual:Interface/Sitenotice
File:OOjs UI icon pageSettings.svg | <translate> This page documents a [[<tvar name=system>Special:MyLanguage/Help:System message</tvar>|system message]], a wiki page that defines part of the [[<tvar name=interface>Special:MyLanguage/Manual:Interface</tvar>|MediaWiki interface]].</translate> <translate> See also the [[<tvar name=qqq>translatewiki:MediaWiki:Interface/Sitenotice/qqq</tvar>|default documentation]].</translate> |
MediaWiki:Sitenotice is displayed above the page title for all users, unless it is superseded by another notice.
The message is displayed if it is defined, that means the sitenotice page is not empty and its contents is different from the single character "-
".
Which notice is displayed for a user is decided in this order:
- If the CentralNotice extension is enabled, it is displayed (even if not defined); see below.
- If the user is anonymous, MediaWiki:Anonnotice is displayed (if defined).
- Otherwise, MediaWiki:Sitenotice is displayed (if defined).
- Otherwise, the global notice in $wgSiteNotice is displayed (if defined).
- Otherwise, no notice is displayed.
Dismissing
If Extension:DismissableSiteNotice is installed, registered users can hide any site notice by clicking [⧼sitenotice close⧽]
on the notice.
For an individual user to recover a previously dismissed site notice, they should delete the cookie dismissSiteNotice
for www.linuxwebexpert.com 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
The CentralNotice extension is shown regardless of other notices. The messages are edited through an interface on a "host" wiki, for example, meta:Special:CentralNotice.
Mobile
The Skin: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
The site notice can be modified by extensions/skins via the SiteNoticeBefore and SiteNoticeAfter hooks.
See also
- 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