Extension:DismissableSiteNotice
![]() リリースの状態: 安定 |
|
---|---|
実装 | 外装 , 自分のウィキ |
説明 | 利用者が通知を終了できるようにする |
作者 | Brion Vibber (Brion VIBBERトーク) |
最新バージョン | continuous updates |
互換性ポリシー | MediaWikiとともにリリースされるスナップショット。 master には後方互換性がありません。 |
MediaWiki | 1.25+ |
データベースの変更 | いいえ |
ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
ダウンロード | |
例 | Wikimedia sites |
|
|
translatewiki.net で翻訳を利用できる場合は、DismissableSiteNotice 拡張機能の翻訳にご協力ください | |
問題点 | 未解決のタスク · バグを報告 |
The DismissableSiteNotice extension allows users to close the sitenotice, using cookies.
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のDismissableSiteNotice
という名前のディレクトリ内に配置します。 - 以下のコードをLocalSettings.phpの末尾に追加します:
wfLoadExtension( 'DismissableSiteNotice' );
- 必要に応じて設定します。
- 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
MediaWiki 1.25以前を稼働させている利用者へ:
上記の手順では、wfLoadExtension()
を使用してこの拡張機能をインストールする新しい方法を記載しています。
この拡張機能をこれらの過去のバージョン (MediaWiki 1.25以前) にインストールする必要がある場合は、wfLoadExtension( 'DismissableSiteNotice' );
の代わりに以下を使用する必要があります:
require_once "$IP/extensions/DismissableSiteNotice/DismissableSiteNotice.php";
設定
This extension provides two configuration parameters:
$wgMajorSiteNoticeID
- 整数。 The value is stored inside a cookie. When a user decides to close the sitenotice, the current value of $wgMajorSiteNoticeID is saved as well and the closed notice is not shown again. $wgMajorSiteNoticeID now can be incremented when a new text is set up as sitenotice. If $wgMajorSiteNoticeID has inbetween been incremented, then the sitenotice is shown again, even if the user closed an older sitenotice before.
$wgDismissableSiteNoticeForAnons
- This allows to set whether or not it should be possible for anonymous visitors of the wiki to dismiss the sitenotice shown. 既定値は "
false
" です。 Available for MW 1.25 +
使用法
When you add a new sitenotice and want everyone to see it, change the number on the created page "MediaWiki:Sitenotice id" by one (e.g. if it would be 5, you'd replace the page with the number 6 and so on).
The extension behavior is that it will remember the dismissal by the user and only reset after the number in MediaWiki:Sitenotice_id has been raised. This allows a wiki to make minor updates to a notice without causing it to show again for everybody.
この拡張機能は 1 つ以上のウィキメディアのプロジェクトで使用されています。 これはおそらく、この拡張機能が安定していて高いトラフィックのウェブサイトでも十分に動作することを意味します。 この拡張機能がインストールされている場所を確認するには、ウィキメディアの設定ファイル CommonSettings.php および InitialiseSettings.php 内で、この拡張機能の名前を探してください。 特定のウィキにインストールされている拡張機能の完全な一覧は、そのウィキの Special:Version ページにあります。 |
この拡張機能は以下のパッケージ/ウィキファームに含まれています: |