Extension:PageNotice
![]() Release status: stable |
|
---|---|
Implementation | Notify |
Description | Lets you define a fixed header or footer message for each page or namespace |
Author(s) | Daniel Kinzler (Duesentriebtalk) |
MediaWiki | 1.29+ |
License | GNU General Public License 2.0 or later |
Download | |
|
|
Quarterly downloads | 51 (Ranked 112nd) |
Translate the PageNotice extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
The PageNotice extension provides a way to create a fixed notice messages on the top or the bottom of
- a page (by individual page name), or
- entire namespaces (by Namespace number).
You can define new fixed MediaWiki messages by creating new pages following a special page-naming pattern to hold that message, and then creating your desired message as the contents of that new page:
Usage[edit]
- top notice for page XXX goes in
[[MediaWiki:top-notice-XXX]]
- bottom notice for page XXX goes in
[[MediaWiki:bottom-notice-XXX]]
- top notice for pages in namespace NNN goes in
[[MediaWiki:top-notice-ns-NNN]]
(where NNN is the numeric namespace ID) - bottom notice for pages in namespace NNN goes in
[[MediaWiki:bottom-notice-ns-NNN]]
(where NNN is the numeric namespace ID)
Examples[edit]
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 New Page, name:
- [[mediawiki:top-notice-ns-0]]
- Create new 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:
- Create New Page, name:
- [[mediawiki:bottom-notice-ns-0]]
- Create new page contents:
{| cellspacing="5" cellpadding="0" style="margin: 0em 0em 1em 0em; border: 1px solid #1DA0E7; background: #B3DDF4; width: 100%" | '''''Welcome to this wiki - you can edit every page!''''' |}
- Result looks like this:
Welcome to this wiki - you can edit every page!
Installation[edit]
- Download and place the file(s) in a directory called
PageNotice
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'PageNotice' );
- Configure as required.
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
To users running MediaWiki 1.33 or earlier:
The instructions above describe the new way of installing this extension using wfLoadExtension()
.
If you need to install this extension on these earlier versions (MediaWiki 1.33 and earlier), instead of wfLoadExtension( 'PageNotice' );
, you need to use:
require_once "$IP/extensions/PageNotice/PageNotice.php";
Configuration[edit]
$wgPageNoticeDisablePerPageNotices
- If set to
true
, notices on the per-page level are disabled; only namespace level notices will appear. The default value isfalse
. - On Wikimedia wikis this is set to
true
.
See also[edit]
- Extension:Header Footer - Provides per-namespace or per-page header & footer inclusion without depending on any other extension.
- Manual:Interface/Sitenotice - The sitewide header notice, a standard MediaWiki feature.
![]() | This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |
![]() | This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |
- Stable extensions
- Notification extensions
- GPL licensed extensions
- Extensions in Wikimedia version control
- ArticleViewFooter extensions
- ArticleViewHeader extensions
- All extensions
- Extensions used on Wikimedia
- Extensions included in Miraheze
- Extensions included in WikiForge
- Extensions included in WikiTide
- Headers and footers extensions