Расширение:Echo
Echo Статус релиза: стабильный |
|
---|---|
![]() |
|
Реализация | Уведомлять |
Описание | Предоставляет встроенную систему уведомлений вики, которая может использоваться другими расширениями. |
Автор(ы) | |
Последняя версия | постоянные обновления |
Политика совместимости | Snapshots releases along with MediaWiki. Master is not backwards compatible. |
MediaWiki | 1.32+ |
Изменения БД | Да |
Таблицы | echo_email_batch echo_event echo_notification echo_subscription echo_target_page |
Лицензия | MIT License |
Загрузка | |
|
|
|
|
|
|
Переведите расширение Echo если оно доступно на translatewiki.net | |
Проблемы | Открытые задачи · Сообщить об ошибке |
Расширение Echo предоставляет встроенную систему уведомлений вики, которая может использоваться другими расширениями. Расширение:Thanks и StructuredDiscussions это два расширения MediaWiki, которые используют Echo. Смотрите Notifications для полного описания того, что делает это расширение.
Загрузка
Расширение можно получить непосредственно из Git [?]:
- Просмотреть код
- Некоторые расширения имеют теги для стабильных выпусков.
- Посмотрите теги
- Выберите тег
- Нажмите "snapshot"
- Каждая ветвь связана с прошлым выпуском MediaWiki. Существует также ветвь "master", содержащая последнюю альфа-версию (может потребоваться альфа-версия MediaWiki).
- Посмотрите ветви
- Выберите название ветви
- Нажмите "Continue"
Извлеките snapshot и поместите его в каталог extensions/Echo/ вашей MediaWiki.
Если вы знакомы с git и имеете доступ к оболочке на своём сервере, тогда Вы можете получить расширение следующим образом:
cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo.git
Установка
- Скачайте и распакуйте файл(ы) в папку с названием
Echo
в вашей папкеextensions/
. - Добавьте следующие строки в конец файла LocalSettings.php:
wfLoadExtension( 'Echo' );
- Выполните скрипт обновления, который автоматически создаст необходимые таблицы, используемые расширением.
- Можно настроить позже, если необходимо что-то поменять из этого.
Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.
Для использующих MediaWiki 1.28 или более ранние версии:
В приведенных выше инструкциях описывается новый способ установки этого расширения с использованием wfLoadExtension()
.
Если вам нужно установить это расширение на более ранние версии (MediaWiki 1.28 и более ранние), вместо wfLoadExtension( 'Echo' );
, вам необходимо использовать:
require_once "$IP/extensions/Echo/Echo.php";
Настройка
Помимо настройки пользовательских настроек по умолчанию, вы также можете использовать хук AddNewAccount для изменения пользовательских настроек при регистрации. Это позволяет устанавливать различные пользовательские настройки в будущем, не затрагивая существующих пользователей.
Смотрите Special:DisplayNotificationsConfiguration для получения локальных сведений.
Parameters
Параметр | По умолчанию | Комментарий |
---|---|---|
$wgEchoEnableEmailBatch
|
true | Следует ли включить функцию пакетной отправки электронной почты |
$wgEchoUseJobQueue
|
false |
|
$wgEchoEmailFooterAddress
|
'' | Адрес организации (или любой другой текст, который вы хотите видеть в нижнем колонтитуле уведомлений по электронной почте). Должно быть определено в LocalSettings.php |
$wgNotificationSender
|
$wgPasswordSender
|
Адрес электронной почты для обоих "от" и "ответить на" в уведомлениях по электронной почте. Должно быть определено в LocalSettings.php |
$wgNotificationSenderName
|
сообщение "emailsender" (MediaWiki) | Имя для "от" на уведомления по электронной почте. Должно быть определено в LocalSettings.php |
$wgNotificationReplyName
|
No Reply | Имя для "ответа на" в уведомлениях по электронной почте. Должно быть определено в LocalSettings.php |
$wgEchoCluster
|
false | Использует основную БД если это значение равно false; для использования конкретной внешней БД достаточно использовать любой ключ, определенный в $wgExternalServers |
$wgEchoSharedTrackingDB
|
false | Общая база данных для использования отслеживания непрочитанных уведомлений кросс-вики; false, чтобы не отслеживать это вообще |
$wgEchoSharedTrackingCluster
|
false | Кластер, в котором находится общая база данных отслеживания; false, если он находится на главном. Должен быть ключ, определенный в $wgExternalServers |
$wgEchoMaxUpdateCount
|
2000 | Максимальное количество уведомлений, разрешенных для пользователя, чтобы сделать живое обновление, это также число максимальных уведомлений, разрешенных для пользователя. |
$wgEchoMaxMentionsCount
|
50 | Максимальное количество упоминаний об уведомлениях, которые пользователь может отправить одновременно |
$wgEchoMentionStatusNotifications
|
false | Включить упоминания об успешных/сбойных уведомлениях |
$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 | Интервал времени между каждым пакетом электронной почты в секундах; установите небольшое число для тестовых вики. Это должно быть установлено в 0, чтобы отключить пакетирование электронной почты, если нет поддержки задержки очереди почты |
$wgEchoNewMsgAlert
|
true | Включение или отключение оповещения о новом сообщении на странице обсуждения для зарегистрированных пользователей. |
$wgEchoShowFooterNotice
|
false | Whether or not to show the footer feedback notice in the notifications popup |
$wgEchoFooterNoticeURL
|
'' | A URL for the survey that appears in the footer feedback notice in the notification popup |
$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 |
$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:
|
$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
|
See extension.json | Define the categories that notifications can belong to. Categories can be assigned the following parameters. All parameters are optional:
If a notifications type doesn't have a category parameter, it is automatically assigned to the |
$wgEchoNotificationIcons
|
See 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 The value of 'url' should be a URL. You should customize the site icon URL, which is: |
$wgEchoNotifications
|
See extension.json | Define the event types for echo. Event definitions are in the form of 'event-name' => [ ... ].
|
$wgEchoConfig
|
See extension.json | Configuration for EventLogging. Individual schemas can be disabled. |
$wgEchoPerUserBlacklist
|
null | Boolean that enabled Per User Blacklist. |
User preferences
Preference | Default | Comment |
---|---|---|
$wgDefaultUserOptions['echo-show-alert']
|
true | Default user preference for showing the special talk page alert bar |
$wgDefaultUserOptions['echo-email-frequency']
|
0 | How often to send emails, by default. By default, send emails for each notification as they come in |
$wgDefaultUserOptions['echo-dismiss-feedback-alert']
|
0 | Ensures the feedback alert is visible by default. Do not change; to disable, use $wgEchoShowFooterNotice .
|
$wgDefaultUserOptions['echo-email-format']
|
Depends on $wgAllowHTMLEmail
|
Default user preference for whether to use HTML or text email |
$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 = [ 'GonzoBot', 'CrazyGuy' ];
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:
GonzoBot CrazyGuy
- "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 - любое уведомление, кроме сообщения (message)
Смотри также
- Notifications/API
- Руководство:Echo - для получения подробной информации о требованиях упоминания
- Extension:Echo/Creating a new notification type (текущий)
- Notifications/Developer_guide (устарело)
![]() | Это расширение используется в одном или нескольких проектах Викимедиа. Вероятно, это означает, что расширение стабильно и работает достаточно хорошо, чтобы использоваться такими сайтами с высоким трафиком. Найдите название этого расширения в файлах конфигурации Викимедиа CommonSettings.php и InitialiseSettings.php, чтобы узнать, где оно установлено. Полный список расширений, установленных на конкретной вики, можно увидеть на странице Special:Version wiki. |
- Stable extensions/ru
- Notification extensions/ru
- MIT licensed extensions/ru
- Extensions in Wikimedia version control/ru
- AbortTalkPageEmailNotification extensions/ru
- ApiMain::moduleManager extensions/ru
- ArticleDeleteComplete extensions/ru
- ArticleUndelete extensions/ru
- BeforePageDisplay extensions/ru
- EchoAbortEmailNotification extensions/ru
- EchoGetBundleRules extensions/ru
- EmailUserComplete extensions/ru
- GetNewMessagesAlert extensions/ru
- GetPreferences extensions/ru
- LinksUpdateAfterInsert extensions/ru
- LoadExtensionSchemaUpdates extensions/ru
- LocalUserCreated extensions/ru
- LoginFormValidErrorMessages extensions/ru
- MergeAccountFromTo extensions/ru
- OutputPageCheckLastModified extensions/ru
- PageSaveComplete extensions/ru
- ParserTestTables extensions/ru
- PersonalUrls extensions/ru
- RecentChange save extensions/ru
- ResourceLoaderRegisterModules extensions/ru
- RollbackComplete extensions/ru
- SendWatchlistEmailNotification extensions/ru
- SkinMinervaReplaceNotificationsBadge extensions/ru
- SkinTemplateNavigation::Universal extensions/ru
- SpecialMuteModifyFormFields extensions/ru
- UserClearNewTalkNotification extensions/ru
- UserGetDefaultOptions extensions/ru
- UserGroupsChanged extensions/ru
- UserLoadOptions extensions/ru
- UserMergeAccountDeleteTables extensions/ru
- UserMergeAccountFields extensions/ru
- UserSaveOptions extensions/ru
- UserSaveSettings extensions/ru
- All extensions/ru
- Extensions used on Wikimedia/ru
- Echo/ru