ResourceWatcher
Последнее обновление not available | История страницы | Улучшить эту страницу | Сообщить о проблеме
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$204 per month—let's make that $500!
Learn moreЧто такое ResourceWatcher?¶
Resource Watcher это плагин для MODX Revolution, который отправляет email-уведомления при создании и/или обновлении ресурса.
Установка¶
- Установка через package manager
- Настройка system settings
Примечание: по умолчанию адрес отправителя задаётся в system settings (ключ emailsender). Имя отправителя это site name (ключ site_name).
Конфигурация. System Settings¶
Общие¶
| Name | Description | Default Value |
|---|---|---|
| resourcewatcher.prefix | (string) - Prefix for placeholders used in the message chunk | rw. |
Созданный ресурс¶
| Name | Description | Default Value |
|---|---|---|
| resourcewatcher.new_active | (boolean) - Sets whether the plugin is active upon resource creation | false |
| resourcewatcher.new_email | (string) - Email address(es) to send the notifications to | |
| resourcewatcher.new_hooks | (string) - List of hooks (snippets) to execute when a resource is created | |
| resourcewatcher.new_subject | (string) - Subject of the notification emails | A new resource has been created |
| resourcewatcher.new_tpl | (string) - Chunk to use as the message of the e-mail when creating new resources | message-create |
Обновлённый ресурс¶
| Name | Description | Default Value |
|---|---|---|
| resourcewatcher.upd_active | (boolean) - Sets whether the plugin is active upon resource edition/update | false |
| resourcewatcher.upd_email | (string) - Email address(es) to send the notifications to | |
| resourcewatcher.upd_hooks | (string) - List of hooks (snippets) to execute when a resource is updated | |
| resourcewatcher.upd_subject | (string) - Subject of the notification emails | A resource has been updated |
| resourcewatcher.upd_tpl | (string) - Chunk to use as the message of the e-mail when updating a resource | message-update |
Плейсхолдеры (message chunks)¶
В чанках сообщений можно использовать плейсхолдеры (по умолчанию с префиксом «rw.»). Доступны поля modUser, modUserProfile и modResource. Краткий список (неполный):
| Name | Description |
|---|---|
| prefix.id | ID of the resource |
| prefix.pagetitle | pagetitle field of the resource |
| prefix.username | name of the user who did the action |
| prefix.fullname | full name of the user who performed the action |
Hooks¶
По умолчанию отслеживаются все ресурсы во всех настройках. Ограничения задаются hooks (snippets).
Hooks суммируются и выполняются в порядке, указанном в System Setting.
Hook содержит ваши ограничения и возвращает true, если они выполнены (иначе false).
Ресурсы¶
Github: https://github.com/meltingmedia/ResourceWatcher Bug reports/feature requests: https://github.com/meltingmedia/ResourceWatcher/issues
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$204 per month—let's make that $500!
Learn more










