Admin Alert

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
dnotes's picture

I am thinking of creating a module to notify all site administrators (by role, not just user 1 or site email) of various site events. The alert would be sent by email, and a block on the website would list all pending alerts. A user could mark an alerts as "read" and it would not show up anymore for that user, or he/she could mark it as "done" and then it would not show up for anyone.

The reason this would be useful for me is that I maintain a distribution profile that is used on multiple sites, so I need ways to notify the site administrators to things, such as:

Use cases:

  1. When a new site is created, site administrators would have a checklist of some tasks necessary to site setup, e.g. setting the site default location. The status report page is simply not good enough.
  2. When new accounts are created, the notification would be sent to site administrators instead of the site email, since that is almost always a no-reply address.
  3. When I update the install profile, I could simply include in one of the hook_update_N functions a new alert detailing any new features or bug fixes. Thus, in one line of code, I could notify all administrators of all sites who are using my install profile, everywhere.

Implementation plans:

  1. A new node type or possibly entity type for administrative alerts, with title and body, as well as a "send" flag.
  2. A table for tracking which alerts have been marked viewed by which users.
  3. An action implementation for notifying all site administrators.
  4. Built-in support for notifications of new user accounts that need approval, and perhaps for a few other things.
  5. Choices for administrators to determine how they want to receive updates.

I know that I could patch this functionality together from existing modules, and I would probably do that if it were for one site, but as I said it is for an install profile, so I want a lean module that is easily deployable and has very limited external dependencies. I plan to put something together next week, unless someone knows of a module that already does something like this. Also I'm open to modifying this idea if I get some good input.

Contributed Module Ideas

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: