Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Extension:Echo

From mediawiki.org
Translate this page
Languages:
MediaWiki 1.44 introduces a built-in notifications framework (seeManual:Notifications), but you still need this extension for users to see the notifications.
MediaWiki extensions manual
Notifications
Release status: stable
ImplementationNotify
DescriptionProvides an in-wiki notification system that can be used by other extensions.
Author(s)
Latest versioncontinuous updates
Compatibility policySnapshots releases along with MediaWiki. Master is not backward compatible.
Database changesYes
Tablesecho_email_batch
echo_event
echo_notification
echo_subscription
echo_target_page
echo_push_provider
echo_push_subscription
echo_push_topic
echo_unread_wikis
LicenseMIT License
Download
HelpHelp:Extension:Echo
  • $wgAllowArticleReminderNotification
  • $wgEchoMaxMentionsCount
  • $wgEchoPerUserWhitelistFormat
  • $wgEchoPushMaxSubscriptionsPerUser
  • $wgEchoMentionOnChanges
  • $wgEchoPollForUpdates
  • $wgEchoMentionsInEditSummaryBots
  • $wgEchoUseJobQueue
  • $wgEchoBundleEmailInterval
  • $wgEchoEnableApiEvents
  • $wgEchoMentionsOnMultipleSectionEdits
  • $wgDefaultNotifyTypeAvailability
  • $wgEchoSecondaryIcons
  • $wgEchoCacheVersion
  • $wgEchoMaxUpdateCount
  • $wgEchoNotifiers
  • $wgEchoAgentBlacklist
  • $wgEchoSharedTrackingCluster
  • $wgEchoEnablePush
  • $wgEchoPerUserBlacklist
  • $wgEchoEmailFooterAddress
  • $wgEchoWatchlistNotifications
  • $wgNotifyTypeAvailabilityByCategory
  • $wgEchoMaxMentionsInEditSummary
  • $wgEchoNotifications
  • $wgEchoCluster
  • $wgEchoPushServiceBaseUrl
  • $wgEchoNotificationCategories
  • $wgEchoWatchlistEmailOncePerPage
  • $wgEchoEnableEmailBatch
  • $wgEchoNotificationIcons
  • $wgEchoSharedTrackingDB
  • $wgEchoSeenTimeCacheType
  • $wgEchoMentionStatusNotifications
  • $wgEchoCrossWikiNotifications
  • $wgEchoOnWikiBlacklist
  • manage-all-push-subscriptions
  • echo-create
Translate the Echo extension if it is available at translatewiki.net
IssuesOpen tasks ·Report a bug

TheNotifications extension, historically calledEcho 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 andDiscussionTools are two such extensions.

Installation

[edit]
This extensioncomes with MediaWiki 1.40 and later, so you do not need to download it. The remaining configuration instructions must still be followed.
  • The database user must have been granted the "REFERENCES" right for the database. How you check this depends on how youset 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 inLocalSettings.php).
  • Download and move the extractedEcho folder to yourextensions/ directory.
    Developers and code contributors should install the extensionfrom Git instead, using:
    cdextensions/gitclonehttps://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
  • Add the following code at the bottom of yourLocalSettings.php file:
    wfLoadExtension('Echo');
  • Run theupdate script which will automatically create the necessary database tables that this extension needs.
  • If necessary configure at your convenience
  • YesDone – Navigate toSpecial:Version on your wiki to verify that the extension is successfully installed.

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

$php./maintenance/run.phpEcho:processEchoEmailBatch
Notifications Portal
About
Documentation
Developer documentation
v · d · e

Configuration

[edit]

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

SeeSpecial:DisplayNotificationsConfiguration for local details.

Parameters

[edit]
Configuration settings (defaults defined inextension.json)
ParameterDefaultComment
$wgEchoEnableEmailBatchtrueWhether to turn on email batch function
$wgEchoUseJobQueuefalse
  • true - Defer web and email notification delivery via job queue.
  • false - Deliver notifications immediately
$wgEchoEmailFooterAddress''The organization address (or whatever text you want to appear in the footer of the email notifications). Should be defined in LocalSettings.php
$wgNotificationSender$wgPasswordSenderThe email address for both "from" and "reply to" on email notifications. Should be defined in LocalSettings.php
$wgNotificationSenderName"emailsender" message (MediaWiki)Name for "from" on email notifications. Should be defined in LocalSettings.php
$wgNotificationReplyNameNo ReplyName for "reply to" on email notifications. Should be defined in LocalSettings.php
$wgEchoClusterfalseUse the main db if this is set to false, to use a specific external db, just use any key defined in$wgExternalServers
$wgEchoSharedTrackingDBfalseShared database to use for keeping track of cross-wiki unread notifications; false to not keep track of it at all
$wgEchoSharedTrackingClusterfalseCluster the shared tracking database is located on; false if it is on the main one. Must be a key defined in$wgExternalServers
$wgEchoMaxUpdateCount2000The 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.
$wgEchoMaxMentionsCount50The max number of mention notifications allowed for a user to send at once
$wgEchoMentionStatusNotificationsfalseEnable mention success/failure notifications
$wgEchoMentionsOnMultipleSectionEditstrueTrigger mentions for multiple-section edits
$wgEchoMentionOnChangestrueTrigger mentions for edits to existing comments, as long as a signature is added in the same section
$wgEchoMaxMentionsInEditSummary0Maximum number of users that will be notified that they were linked from an edit summary or 0 for no notifications
$EchoMentionsInEditSummaryBotsfalseWhether to allow mentions by bot accounts in edit summaries to trigger notifications (subject to EchoMaxMentionsInEditSummary limit)
$wgEchoBundleEmailInterval0The time interval between each bundle email in seconds; set a small number for test wikis. This should be set to 0 to disable email bundling if there is no delay queue support
$wgEchoNewMsgAlerttrueWhether or not to enable a new talk page message alert for logged in users.
$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. See also EchoNotificationController class.
$wgEchoAgentBlacklist[]List of usernames which will not trigger notifications
$wgEchoOnWikiBlacklistEcho-blacklistPage 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-whitelistAn 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 tonull to disable.
$wgEchoCrossWikiNotificationsfalseWhether 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
$wgEchoUseCrossWikiBetaFeaturefalseFeature flag for the cross-wiki notifications beta feature

If this istrue, the cross-wiki notifications preference will appear in the BetaFeatures section. If this isfalse, 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;

$wgEchoNotificationCategoriesSeeextension.jsonDefine 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 theother category which is lowest priority and has no preferences or dismissibility.

$wgEchoNotificationIconsSeeextension.jsonDefines 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']

$wgEchoNotificationsSeeextension.jsonDefine the event types for echo. Event definitions are in the form of 'event-name' => [ ... ].
  • category - defines the category the event belongs to. Defaults to 'other'.
  • group - defaults to '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 extendEchoEventPresentationModel.
$wgEchoConfigSeeextension.jsonConfiguration for EventLogging. Individual schemas can be disabled.
$wgEchoPerUserBlacklistnullBoolean that enabled Per User Blacklist.


User preferences

[edit]
Preference settings (defaults defined inextension.json)
PreferenceDefaultComment
$wgDefaultUserOptions['echo-email-frequency']0How 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$wgAllowHTMLEmailDefault user preference for whether to use HTML or text email. Eitherhtml orplain-text.
$wgDefaultUserOptions["echo-subscriptions-email-{$category}"]false for most categories; dependsDefault user preference for whether to notify via email for a particular category
$wgDefaultUserOptions["echo-subscriptions-web-{$category}"]true for most categories; dependsDefault user preference for whether to notify via web for a particular category


Architecture

[edit]

Seethe architecture section of the feature page.

Usage

[edit]

Notification negative list / positive list

[edit]

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 toMediaWiki:Echo-blacklist.Individual users can override the blacklist by creating a whitelist.The whitelist location defaults toSpecial:MyPage/Echo-whitelist.All on-wiki lists expect to receive one case-specific username per line with no special markup or prefixes.For example:

SampleBotSampleUser

"Mention" option

[edit]

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'sSpecial: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'sMediaWiki:Echo-pref-tooltip-mention page.

Terminology

[edit]
  • notification - Any individual notice that is delivered by Echo
  • message - A notification about activity in a Flow discussion
  • alert - Any notification other than a message

See also

[edit]
This extension is being used on one or moreWikimedia 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'sCommonSettings.php andInitialiseSettings.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'sSpecial: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.
Retrieved from "https://www.mediawiki.org/w/index.php?title=Extension:Echo&oldid=7956669"
Categories:
Hidden category:

[8]ページ先頭

©2009-2025 Movatter.jp