Extension:Echo

This page is a translated version of the page Extension:Echo and the translation is 35% complete.
この拡張機能は MediaWiki 1.40 以降に同梱されています。 そのため再度ダウンロードする必要はありません。 しかし、提供されているその他の手順に従う必要はあります。
MediaWiki 拡張機能マニュアル
Notifications
リリースの状態: 安定
実装 通知
説明 ウィキ内で他の拡張機能が使用する通知システムを提供。
作者
最新バージョン 継続的な更新
互換性の方針 MediaWiki とともにリリースされるスナップショット。 master には後方互換性がありません。
MediaWiki >= 1.43
データベースの変更 はい
テーブル echo_email_batch
echo_event
echo_notification
echo_subscription
echo_target_page
echo_push_provider
echo_push_subscription
echo_push_topic
echo_unread_wikis
ライセンス MIT ライセンス
ダウンロード
ヘルプ Help:Extension:Echo/ja
  • $wgEchoNotificationCategories
  • $wgEchoMaxMentionsCount
  • $wgEchoPerUserWhitelistFormat
  • $wgEchoPushMaxSubscriptionsPerUser
  • $wgEchoMentionOnChanges
  • $wgEchoPollForUpdates
  • $wgEchoUseJobQueue
  • $wgEchoBundleEmailInterval
  • $wgEchoEnableApiEvents
  • $wgEchoMentionsOnMultipleSectionEdits
  • $wgDefaultNotifyTypeAvailability
  • $wgEchoSecondaryIcons
  • $wgEchoCacheVersion
  • $wgEchoMaxUpdateCount
  • $wgEchoNotifiers
  • $wgEchoAgentBlacklist
  • $wgEchoSharedTrackingCluster
  • $wgEchoEnablePush
  • $wgEchoPerUserBlacklist
  • $wgEchoEnableEmailBatch
  • $wgEchoWatchlistNotifications
  • $wgNotifyTypeAvailabilityByCategory
  • $wgEchoMaxMentionsInEditSummary
  • $wgEchoNotifications
  • $wgEchoCluster
  • $wgEchoPushServiceBaseUrl
  • $wgEchoWatchlistEmailOncePerPage
  • $wgAllowArticleReminderNotification
  • $wgEchoNotificationIcons
  • $wgEchoSharedTrackingDB
  • $wgEchoOnWikiBlacklist
  • $wgEchoSeenTimeCacheType
  • $wgEchoMentionStatusNotifications
  • $wgEchoCrossWikiNotifications
  • $wgEchoEmailFooterAddress
  • manage-all-push-subscriptions
  • echo-create
四半期ごとのダウンロード数 126 (Ranked 43rd)
使用中の公開ウィキ 2,698 (Ranked 187th)
translatewiki.net で翻訳を利用できる場合は、Echo 拡張機能の翻訳にご協力ください
問題点 未解決のタスク · バグを報告

The Notifications extension, historically called Echo in code and documentation for sysadmins and developers, provides an in-wiki notification system that provides the user with alerts and notices about activity on the wiki, such as another user mentioning them on a talk page, or an edit of theirs being reverted. Other MediaWiki extensions can make use of Notifications to send their own notifications; Thanks and DiscussionTools are two such extensions.

インストール

  • The database user must have been granted the "REFERENCES" right for the database. How you check this depends on how you set up the database in the first place. For example, if you used a control panel application, then that interface should provide a way to check and change the privileges of the database user ($wgDBuser in LocalSettings.php ).
  • ダウンロードして、ファイルをextensions/フォルダー内のEchoという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'Echo' );
    
  • 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
  • 必要ならば、お好みで設定を変更してください
  •   完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

To allow daily or weekly summary notifications to be delivered by mail (for users that choose that in preferences), the following script inside the Echo extension directory needs to be run on a daily basis, which can be scheduled in a cron job:

maintenance/processEchoEmailBatch.php

設定

It is possible to use conditional user options to set different notification preferences for new users, without affecting existing users.

ローカルの詳細情報はSpecial:DisplayNotificationsConfigurationをご参照ください。

パラメーター

構成設定(既定値は extension.json で定義)
パラメーター 既定 コメント
$wgEchoEnableEmailBatch true メール経由のバッチ機能を有効にするか
$wgEchoUseJobQueue false
  • true - ジョブ キュー経由でウェブ上とメールの通知を使い分け
  • false - 通知を随時、送信
$wgEchoEmailFooterAddress '' The organization address (or whatever text you want to appear in the footer of the email notifications). LocalSettings.phpで定義されている必要がある。
$wgNotificationSender $wgPasswordSender The email address for both "from" and "reply to" on email notifications. Should be defined in LocalSettings.php
$wgNotificationSenderName 「emailsender」メッセージ (MediaWiki) Name for "from" on email notifications. LocalSettings.phpで定義されている必要がある。
$wgNotificationReplyName No Reply Name for "reply to" on email notifications. LocalSettings.phpで定義されている必要がある。
$wgEchoCluster false これが false に設定されている場合、メインデータベースを使用します。特定の外部データベースを使用する場合は、$wgExternalServers で定義されているいずれかのキーを使用してください。
$wgEchoSharedTrackingDB false ウィキを横断した未読通知の追跡に使用する共有データベース。false にすると、それらの追跡を一切行いません。
$wgEchoSharedTrackingCluster false 共有された追跡データベースが存在するクラスタ。メインクラスタに存在する場合は false にします。 $wgExternalServers で定義されているキーでなければなりません。
$wgEchoMaxUpdateCount 2000 The max number of notifications allowed for a user to do a live update, this is also the number of max notifications allowed for a user to have.
$wgEchoMaxMentionsCount 50 The max number of mention notifications allowed for a user to send at once
$wgEchoMentionStatusNotifications false Enable mention success/failure notifications
$wgEchoMentionsOnMultipleSectionEdits true 複数の節を編集した場合のトリガの言及
$wgEchoMentionOnChanges true 同じ節に署名が追加される限り、既存のコメントへの編集のための言及をトリガにします。
$wgEchoMaxMentionsInEditSummary 0 Maximum number of users that will be notified that they were linked from an edit summary or 0 for no notifications
$wgEchoBundleEmailInterval 0 各バンドルメールの送信間隔を秒単位で指定します。 This should be set to 0 to disable email bundling if there is no delay queue support
$wgEchoNewMsgAlert true ログインしている利用者に対して、新しいトークページのメッセージのアラートを有効にするかどうか。
$wgNotifyTypeAvailabilityByCategory
[
	// Otherwise, a user->user email could trigger an additional redundant notification email.
	'emailuser' => [
		'web' => true,
		'email' => false,
	],
	'mention-failure' => [
		'web' => true,
		'email' => false,
	],
	'mention-success' => [
		'web' => true,
		'email' => false,
	],
]
Define which notify types are available for each notification category. If any notify types are omitted, it defaults to $wgDefaultNotifyTypeAvailability.
$wgEchoNotifiers
[
	'web' => [ 'EchoNotifier', 'notifyWithNotification' ],
	'email' => [ 'EchoNotifier', 'notifyWithEmail' ],
]
Definitions of the different types of notification delivery that are possible. Each definition consists of a class name and a function name. EchoNotificationController クラスも参照してください。
$wgEchoAgentBlacklist [] List of usernames which will not trigger notifications
$wgEchoOnWikiBlacklist Echo-blacklist Page location of community maintained blacklist within NS_MEDIAWIKI containing one username per line which will not trigger notifications. Set to null to disable.
$wgEchoPerUserWhitelistFormat %s/Echo-whitelist An sprintf format of the location of the per-user notification agent whitelist within the NS_USER namespace. %s will be replaced with the users name. The whitelists must contain one username per line which will always trigger notifications regardless of their existence in the blacklists. Set to null to disable.
$wgEchoCrossWikiNotifications false Whether to enable the cross-wiki notifications feature. To enable this feature you need to:
  • have CentralAuth for a global user system (T243412)
  • have $wgMainStash and $wgMainWANCache shared between wikis
  • configure $wgEchoSharedTrackingDB
$wgEchoUseCrossWikiBetaFeature false Feature flag for the cross-wiki notifications beta feature

If this is true, the cross-wiki notifications preference will appear in the BetaFeatures section. If this is false, it'll appear in the Notifications section instead.

This does not control whether cross-wiki notifications are enabled by default. For that, use $wgDefaultUserOptions['echo-cross-wiki-notifications'] = true;

$wgEchoNotificationCategories extension.jsonを参照 Define the categories that notifications can belong to. Categories can be assigned the following parameters. All parameters are optional:
  • priority - controls the order in which notifications are displayed in preferences and batch emails. Priority ranges from 1 to 10. If the priority is not specified, it defaults to 10, which is the lowest.
  • no-dismiss - disables the dismissability of notifications in the category. It can either be set to an array of output formats (see $wgEchoNotifiers) or an array containing 'all'.
  • usergroups - specifies an array of usergroups eligible to receive the notifications in the category. If no usergroups parameter is specified, all groups are eligible.

If a notifications type doesn't have a category parameter, it is automatically assigned to the other category which is lowest priority and has no preferences or dismissibility.

$wgEchoNotificationIcons extension.jsonを参照 Defines icons, which are 30x30 images. This is passed to BeforeCreateEchoEvent so extensions can define their own icons with the same structure. It is recommended that extensions prefix their icon key. An example is myextension-name. This will help avoid namespace conflicts.

You can use either a path or a url, but not both. The value of 'path' is relative to $wgExtensionAssetsPath.

The value of 'url' should be a URL.

You should customize the site icon URL, which is: $wgEchoNotificationIcons['site']['url']

$wgEchoNotifications extension.jsonを参照 Define the event types for echo. Event definitions are in the form of 'event-name' => [ ... ].
  • category - defines the category the event belongs to. 既定値は 'other' です。
  • group - 既定値は 'neutral' です。
  • bundle - define which output formats are available for bundling.
  • presentation-model - define which class is used to render notification messages and links for notification panels, special page and emails. It must extend EchoEventPresentationModel.
$wgEchoConfig extension.jsonを参照 Configuration for EventLogging. Individual schemas can be disabled.
$wgEchoPerUserBlacklist null Boolean that enabled Per User Blacklist.


利用者の個人設定

Preference settings (defaults defined in extension.json)
個人設定 既定 コメント
$wgDefaultUserOptions['echo-email-frequency'] 0 How often to send emails, by default:
  • 0 - send emails for each notification as they come in (default)
  • -1 - do not send emails
  • 1 - each day
  • 7 - each 7 days
  • ...
$wgDefaultUserOptions['echo-email-format'] Depends on $wgAllowHTMLEmail Default user preference for whether to use HTML or text email. Either html or plain-text.
$wgDefaultUserOptions["echo-subscriptions-email-{$category}"] false for most categories; depends Default user preference for whether to notify via email for a particular category
$wgDefaultUserOptions["echo-subscriptions-web-{$category}"] true for most categories; depends Default user preference for whether to notify via web for a particular category


アーキテクチャ

機能ページのアーキテクチャ節 を参照してください。

使用法

Notification negative list / positive list

There are occasionally specific users, typically bots, which perform maintenance tasks that should not generate notifications. To handle these cases, users can be globally blacklisted from the LocalSettings.php file (or InitialiseSettings.php in the case of WMF wikis):

$wgEchoAgentBlacklist = [ 'SampleBot', 'SampleUser' ];

There is also an on-wiki blacklist that can be maintained by the wiki's community. The location of the global on-wiki blacklist defaults to MediaWiki:Echo-blacklist. Individual users can override the blacklist by creating a whitelist. The whitelist location defaults to Special:MyPage/Echo-whitelist. All on-wiki lists expect to receive one case-specific username per line with no special markup or prefixes. For example:

SampleBot
SampleUser
"Mention" option

One of the notification types that this extension allows is: "Notify me when someone links to my user page." It might not be obvious to some users, but this particular notification only works when the person linking to another user's page also signs (~~~~) the post.

After installation of the extension, a new tab "Notifications" is created in a user's Special:Preferences page. Under the section "Notify me about these events", in front of the "Mention" option, the hoverbox states: "Notify me when someone links to my user page." If an administrator feels, that the requirement for signing the post isn't obvious in this help text, it can be modified by changing the text in the Wiki's MediaWiki:Echo-pref-tooltip-mention page.

用語

  • 通知(notification) - Echo によって届けられる個々の通知
  • メッセージ(message) - Flow の議論における活動についての通知
  • アラート(alert) - メッセージ以外の通知

関連項目