Extension:PageNotice

From mediawiki.org
This page is a translated version of the page Extension:PageNotice and the translation is 25% complete.
MediaWiki 拡張機能マニュアル
PageNotice
リリースの状態: 安定
実装 通知
説明 Lets you define a fixed header or footer message for each page or namespace
作者 Daniel Kinzler (Duesentriebトーク)
MediaWiki 1.29+
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
  • $wgPageNoticeDisablePerPageNotices
Quarterly downloads 28 (Ranked 116th)
translatewiki.net で翻訳を利用できる場合は、PageNotice 拡張機能の翻訳にご協力ください
問題点 未解決のタスク · バグを報告

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

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

使用法

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]].

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!

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のPageNoticeという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PageNotice
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'PageNotice' );
    
  • 必要に応じて設定します。
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

設定

$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.

関連項目