Jump to main content Jump to doc navigation

What is ResourceWatcher?

Resource Watcher is a plugin for MODX Revolution allowing you to send notification emails when a resource is created and/or updated.

Installation

  1. Installing from package manager
  2. Configure the proper system settings

Note: By default, the email address used to send the notifications is defined in the system settings (emailsender key). The name of the sender is the site name, defined in the system settings (site_name key).

Configuration - System Settings

General

Name Description Default Value
resourcewatcher.prefix (string) - Prefix for placeholders used in the message chunk rw.

Created resource

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

Updated resource

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

Placeholders (message chunks)

Placeholders (prefixed by default with "rw.") can be used in chunks used as a message. The available information/placeholders are the modUser, modUserProfile and modResource fields. Here is a small list (not exhaustive)

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

By default, all resources in all settings are "monitored". You can add constraints by using hooks (snippets).

The hooks are cumulative (and executed in the order in which you have filled in the System Setting).

Your hook should contain your constraints and return true if they are satisfied (otherwise false).

Resources

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

  • modmore
  • STERC
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Digital Penguin
  • Dannevang Digital
  • Sepia River Studios
  • CrewMark
  • Chris Fickling
  • deJaya
  • Following Sea
  • Anton Tarasov
  • eydolan
  • Raffy
  • Lefthandmedia
  • Murray Wood
  • Snow Creative
  • Nick Clark
  • Helen
  • JT Skaggs
  • krisznet
  • YJ
  • Yanni
  • Richard

Budget

$366 per month—let's make that $500!

Learn more