Extension:PageNotice
![]() リリースの状態: 安定 |
|
---|---|
実装 | 通知 |
説明 | Lets you define a fixed header or footer message for each page or namespace |
作者 | Daniel Kinzler (Duesentriebトーク) |
MediaWiki | 1.29+ |
ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
ダウンロード | |
|
|
Quarterly downloads | 33 (Ranked 126th) |
translatewiki.net で翻訳を利用できる場合は、PageNotice 拡張機能の翻訳にご協力ください | |
問題点 | 未解決のタスク · バグを報告 |
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 名前空間 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:
使用法
- 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)
例
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!
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のPageNotice
という名前のディレクトリ内に配置します。
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PageNotice - 以下のコードを LocalSettings.php ファイルの末尾に追加します:
wfLoadExtension( 'PageNotice' );
- 必要に応じて設定します。
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
MediaWiki 1.33以前を稼働させている利用者へ:
上記の手順では、wfLoadExtension()
を使用してこの拡張機能をインストールする新しい方法を記載しています。
この拡張機能をこれらの過去のバージョン (MediaWiki 1.33以前) にインストールする必要がある場合は、wfLoadExtension( 'PageNotice' );
の代わりに以下を使用する必要があります:
require_once "$IP/extensions/PageNotice/PageNotice.php";
設定
$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
.
関連項目
- Extension:Header Footer - Provides per-namespace or per-page header & footer inclusion without depending on any other extension.
- Manual:インターフェース/Sitenotice - The sitewide header notice, a standard MediaWiki feature.
![]() | この拡張機能は 1 つ以上のウィキメディアのプロジェクトで使用されています。 これはおそらく、この拡張機能が安定していて高いトラフィックのウェブサイトでも十分に動作することを意味します。 この拡張機能がインストールされている場所を確認するには、ウィキメディアの設定ファイル CommonSettings.php および InitialiseSettings.php 内で、この拡張機能の名前を探してください。 特定のウィキにインストールされている拡張機能の完全な一覧は、そのウィキの Special:Version ページにあります。 |
![]() | この拡張機能は以下のウィキ ファーム/ウィキ ホスト/パッケージに含まれています: これは正式な一覧ではありません。 一部のウィキ ファーム/ウィキ ホスト/パッケージは、ここに記載されていなくてもこの拡張機能を含んでいる場合があります。 必ずご利用のウィキ ファーム、ウィキ ホスト、バンドルで確認してください。 |
Categories:
- Stable extensions/ja
- Notification extensions/ja
- GPL licensed extensions/ja
- Extensions in Wikimedia version control/ja
- ArticleViewFooter extensions/ja
- ArticleViewHeader extensions/ja
- All extensions/ja
- Extensions used on Wikimedia/ja
- Extensions included in Miraheze/ja
- Extensions included in WikiForge/ja
- Extensions included in WikiTide/ja
- Headers and footers extensions/ja