Extension:PageNotice

Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:GPL licensed extensions
MediaWiki extensions manual
PageNotice
Release status: stableCategory:Stable extensions
Implementation NotifyCategory:Notification extensions
Description Lets you define a fixed header or footer message for each page or namespace
Author(s) Daniel Kinzler (Duesentriebtalk)
MediaWiki 1.29+Category:Extensions with manual MediaWiki version
License GNU General Public License 2.0 or later
Download Category:Extensions in Wikimedia version control
  • $wgPageNoticeDisablePerPageNotices
Quarterly downloads 11 (Ranked 90th)
Translate the PageNotice extension if it is available at translatewiki.net
Issues Open tasks · Report a bug
Category:All extensions

The PageNotice extension provides a way to create a fixed notice message on the top or the bottom of either:

  • an entire namespace (by Namespace number)
  • an individual page (by page name, if the extension is configured to allow it)

Usage

Wiki administrators can define a page notice by creating a new page in MediaWiki namespace following a special page-naming pattern, and then writing the notice in that new page.

  • The top notice for pages in namespace NN goes in [[MediaWiki:top-notice-ns-NN]] (where NN is the numeric namespace ID).
  • The bottom notice for pages in namespace NN goes in [[MediaWiki:bottom-notice-ns-NN]] (where NN is the numeric namespace ID).

If enabled:

  • The top notice for page XXX goes in [[MediaWiki:top-notice-XXX]].
  • The bottom notice for page XXX goes in [[MediaWiki:bottom-notice-XXX]].

Examples

This will put the phrase: "Welcome to this wiki - you can edit every page!" at the top of every page in the main namespace:

Create a new page named:
[[mediawiki:top-notice-ns-0]]
Add the page contents:
'''Welcome to this wiki - you can edit every page!'''

This will put a blue banner saying "Welcome to this wiki - you can edit every page!" at the bottom of every page in the main namespace:

Create a new page named:
[[mediawiki:bottom-notice-ns-0]]
Add the page contents:
<div style="margin-left: 1em; border: 1px solid #1DA0E7; background: #B3DDF4;">'''''Welcome to this wiki - you can edit every page!'''''</div>
Result looks like this:
Welcome to this wiki - you can edit every page!

Installation

  • Download and move the extracted PageNotice folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PageNotice
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'PageNotice' );
    
  • Configure as required.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

$wgPageNoticeDisablePerPageNotices
If set to true, notices on the per-page level are disabled; only namespace level notices will appear. The default value is false.
On Wikimedia wikis this is set to true.

See also

Category:Extensions used on Wikimedia#PageNotice Category:Headers and footers extensions
Category:All extensions Category:ArticleViewFooter extensions Category:ArticleViewHeader extensions Category:Extensions in Wikimedia version control Category:Extensions included in Miraheze Category:Extensions included in WikiForge Category:Extensions used on Wikimedia Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:GPL licensed extensions Category:Headers and footers extensions Category:Notification extensions Category:Stable extensions