A simple but flexible module that uses the great flag module for email notifications of site activity and optionally integrates with organic groups.
Users will be able to choose to subscribe to own comments' replies, to all comments or to all activities in a given group.
Through an option field in their profile, users can choose the default notification when they post a comment, create a content or join a group (and you can set the site-wise default options for new users).
Flag Notify purposely do not build the flags in code (it just ask for the flags names to use), nor it creates views of elements that have been subscribed.
While this approach require little bit extra work from the site developer, it increases the flexibility and avoids potential problems if the og module is enabled/disabled after this module.
If necessary, I can provide an export of flags and/or "my subscribed content" view.
All these three "levels" are optional and if the og module is not installed the group level is just hidden.
Currently the notification email text is fixed (with a few customisation as footer and salutation). A token-based email may be developed in the next versions if there is enough request for that.
New in v 1.2 (Apr 2018): You can now allow users to be notified of their own generated events (but you'll need to implement a hook for that: set $notifyActingUser=True in the hook_flag_notify_event_alter() ).
New Jul 2017: Sorry, porting to Drupal 8 is a bit too much as I work in other areas now. I remain committed to bugfix the 7.x-1.x version, and a scheleton of a drupal 8.x port is already in git, but completing the porting would require going a bit too much in deep in d8 jargos for me. If you are a developer with d8 experience however a porting should be frankly easy. Please consider co-maintain this project!
New in v 1.1: You can now personalise the content of the notification messages implementing the hook_flag_notify_notification_alter().
It's very simple and powerful. Just download and enable the provided example module on the documentation page and change the function that build the message to suit your needs. Both a simple and an advanced example are provided.
New in v 1.0: You can "intercept" the notification chain and change the event data or "break" it using the hooks defined by the module (see flag_notify.api.php).
For example, if you have a chat_room node type where comments are chat posts and you don't want to bother all group users with notification of each chat message you could create a module and write:
/**
* Implement hook_flag_notify_event_alter()
*
*/
function MYMODULE_flag_notify_event_alter(&$break, &$event, &$groups, &$node, &$comment, &$user) {
if($node->type == 'chat_room' && $event == 'new_comment'){
$break=TRUE;
}
}
#D8: Work on the porting of the module to D8 has started, as the dependent Flag module for D8 has reached a sufficient maturity. At the moment however the code of Flag Notify on git in the 8.x-2.x branch is completely unusable!
The initial development of this project was sponsored by the Associazione Alessandro Bartola and Università Politecnica delle Marche that paid for my time :-)
Project information
Seeking co-maintainer(s)
Maintainers are looking for help reviewing issues.- Project categories: Integrations, Developer tools
17 sites report using this module
- Created by sylvaticus on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.


