Расширение:Echo

From mediawiki.org
This page is a translated version of the page Extension:Echo and the translation is 53% complete.
Outdated translations are marked like this.
Это расширение поставляется с MediaWiki 1.40 и выше. Таким образом, вам не нужно загружать его снова. Тем не менее, вы всё равно должны следовать другим инструкциям.
Справка по расширениям MediaWiki
Echo
Статус релиза: стабильно
Реализация Уведомлять
Описание Предоставляет встроенную систему уведомлений вики, которая может использоваться другими расширениями.
Автор(ы)
Последняя версия постоянные обновления
Политика совместимости Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki >= 1.42.0
Изменения в БД Да
Таблицы 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 License
Скачать
  • $wgEchoNotificationCategories
  • $wgEchoMaxMentionsCount
  • $wgEchoPerUserWhitelistFormat
  • $wgEchoPushMaxSubscriptionsPerUser
  • $wgEchoMentionOnChanges
  • $wgEchoPollForUpdates
  • $wgEchoUseJobQueue
  • $wgEchoBundleEmailInterval
  • $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
Ежеквартальные загрузки 166 (Ranked 42nd)
Использование общедоступными вики 2,698 (Ranked 187th)
Переведите расширение Echo, если оно доступно на translatewiki.net
Проблемы Открытые задачи · Сообщить об ошибке

Расширение Echo предоставляет встроенную систему уведомлений вики, которая может использоваться другими расширениями. Расширение:Thanks и StructuredDiscussions это два расширения MediaWiki, которые используют Echo. Смотрите Уведомления для полного описания того, что делает это расширение.

Установка

  • The database user must have been granted the "REFERENCES" right for the database.
  • Скачайте и распакуйте файл(ы) в папку с названием Echo в вашей папке extensions/.
    Вместо этого разработчикам и соавторам кода следует установить расширение из Git, используя:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
  • Добавьте следующий код в конце вашего файла LocalSettings.php :
    wfLoadExtension( 'Echo' );
    
  • Выполните скрипт обновления, который автоматически создаст необходимые таблицы, используемые расширением.
  • Можно настроить позже, если необходимо что-то поменять из этого.
  • Yes Готово – Перейдите на страницу 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 '' Адрес организации (или любой другой текст, который вы хотите видеть в нижнем колонтитуле уведомлений по электронной почте). Должно быть определено в 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 Максимальное число участников, которым придут уведомления, о то, что их упомянули в описании правки или 0 для выключения
$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,
	],
]
Определяет, какие типы уведомлений доступны для каждой категории. Если какие-то типы уведомлений опущены, то по умолчанию используется $wgDefaultNotifyTypeAvailability.
$wgEchoNotifiers
[
	'web' => [ 'EchoNotifier', 'notifyWithNotification' ],
	'email' => [ 'EchoNotifier', 'notifyWithEmail' ],
]
Определения различных возможных типов доставки уведомлений. Каждое определение состоит из имени класса и имени функции. См. также класс EchoNotificationController.
$wgEchoAgentBlacklist [] Список имён пользователей, которые не будут вызывать уведомления.
$wgEchoOnWikiBlacklist Echo-blacklist Расположение поддерживаемой сообществом страницы в пространстве NS_MEDIAWIKI, на которой содержится чёрный список имён участников по одному в строку, которые не будут вызывать уведомления. Чтобы выключить, установите в null.
$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 Включать ли опцию кросс-вики уведомлений. Чтобы включить эту возможность, необходимо:
  • иметь глобальную систему участников (например, CentralAuth или общую таблицу участников)
  • располагать общими $wgMainStash и $wgMainWANCache между проектами
  • сконфигурировать $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 See extension.json Define the categories that notifications can belong to. Categories can be assigned the following parameters. Все параметры необязательны:
  • priority - Контролирует порядок, в котором отображаются уведомления в настройках и письмах. Приоритет от 1 до 10. Если приоритет не указан, по умолчанию берётся значение 10, минимальное из возможных.
  • 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 See extension.json Определяет иконки, изображения 30x30. Эта опция передаётся BeforeCreateEchoEvent, поэтому расширения могут определять свои собственные иконки с той же структурой. Рекомендуется использовать префикс с именем расширения для ключей иконок. Например, myextension-name. Это поможет избежать конфликтов пространств имён.

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 See 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. 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 extend EchoEventPresentationModel.
$wgEchoConfig See extension.json Configuration for EventLogging. Individual schemas can be disabled.
$wgEchoPerUserBlacklist null Boolean that enabled Per User Blacklist.

Пользовательские настройки

Параметры конфигурации (значения по умолчанию определены в extension.json)
Настройки По умолчанию Комментарий
$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:
  • 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-dismiss-feedback-alert'] 0 Ensures the feedback alert is visible by default. Не изменять; чтобы отключить, используйте $wgEchoShowFooterNotice.
$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 - любое уведомление, кроме сообщения (message)

Смотри также