Comment Notifications

You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!
greggles's picture

Following on from http://buytaert.net/comment-notifications-via-email

Here's a quick review table. Please provide advise on how to improve it. I only listed characteristics for which they are different - e.g. all have MySQL support so why bother listing it?

[Update - May 13, 2009] Comment Subscribe has been merged back with comment notify. The users of comment_subscribe have been provided an update that will migrate them seamlessly to comment_notify - #361449. Also see this discussion (#224782).

Metric comment_notify watcher notify / notify by views subscriptions notifications
Anonymous Yes Yes (D6) No No No
PostgreSQL support? Yes Yes (D6) Yes(D6) Yes? Yes?
"Lightweight" Yes Yes Yes No No
Actively supported Yes Yes Yes Yes Yes
Subscribe without comment Not Yet Yes Yes Yes Yes
One click AJAX-based "start/stop subscription" link No Yes N/A No No
Extensible? ? ? Not Yet Yes Yes
Supports message templates with tokens Yes ([kinda](http://drupal.org/node/273112) Yes Yes (Notify by Views) ? Yes
Users can share list of subscribed nodes No Yes ? ? ?
Scalable queue-based email dispatcher Yes [via Queuemail](http://drupal.org/project/queue_mail) Yes ? ? ?
Notify on node update/change No Yes Not Yet ? Yes
Integration with Node comments [Yes](http://drupal.org/cvs?commit=223730) ? ? ? ?
Brief description Lightweight. Provides a checkbox during comment submission allowing the commenter to get e-mails about a node they comment on (for either replies to their comment or all comments on the node). Allows any user to easily subscribe to comments and updates to a node. Sends mails to authorized users with notifications of new nodes and/or comments. Notify by Views adds the capability to use Views to designate which nodes should be sent to users. A generalized subscription and message sending framework. A generalized subscription and message sending framework.
  • All of these modules provide support for 5.x and 6.x versions of Drupal core.
  • None of these modules provide support for rss feeds for comments (though Views can).
Login to post comments

This table has been really

deviantintegral's picture
deviantintegral - Tue, 2008-10-21 16:59

This table has been really helpful. Might want to also add Comment Mail.

--Andrew


that's a tough call

greggles's picture
greggles - Tue, 2008-10-21 23:56

There's also http://drupal.org/project/notify

Both comment mail and notify have the drawback of being more for admins than for regular registered users (and neither is for anonymous).

I guess this table could reflect that - but my original scope for the table was "comment notification modules that are generally focused towards regular and/or anonymous users".

--
Growing Venture Solutions | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book


Very helpful

elv's picture
elv - Wed, 2008-10-22 16:01

This is timely for me too, a client just asked me to add these features on their website :) Thanks for the review Greggles!


Node Comments

Ntoronto - Sun, 2008-11-16 09:54

I think more importantly, is a metric which shows which of these notification modules work with node-comments:
http://drupalmodules.com/module/node-comments

Node-comments convert comments into nodes. (This opens the door for CCK types to be comments, for comments to have uploaded files, taxonomy, revisions, and anything else that comes from the goodness of nodes....)


.

Michelle - Sun, 2008-11-16 13:44

Nodecomments is neat but comes with a new set of problems. And the amount of people that need comments to be nodes is fairly small. Not saying it isn't something worth noting, but I don't think it's that terribly important.

Michelle

See my Drupal articles and tutorials or come check out the Coulee Region


as far as I know, none of them do

greggles's picture
greggles - Sun, 2008-11-16 20:54

I think that none of these modules provide integration with node comments "out of the box." I'd have to look at how node comments maintains the relationship to the node to see, but it would likely require custom code or a patch for all of them.

The Notifications/Subscriptions modules are most likely to be able to handle this somewhat natively or via an extension.

--
Growing Venture Solutions | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book


now possible

greggles's picture
greggles - Sun, 2009-07-19 19:48

This is now possible with comment notify thanks to some work by Merlinofchaos: http://drupal.org/cvs?commit=223730

--
http://growingventuresolutions.com | http://drupaldashboard.com | http://drupal.org/books


Greggles, Thanks for putting

matt2000's picture
matt2000 - Tue, 2008-12-16 06:05

Greggles,

Thanks for putting this together.

What would notify module need to do to earn your 'Lightweight' designation? IMO, it's a feather compared to Subscriptions, and my primary purpose in keeping it running is to provide a lighter, simpler alternative. Are you counting lines of code? Configuration options? (Comparing recommended D6 version tarballs, notify comes in at 27kb versus subscriptions at 101kb...)

Any thoughts?

Thanks,

Matt


more conceptual than filesize

greggles's picture
greggles - Tue, 2008-12-16 12:55

This is more of a conceptual difference than a filesize difference. The watcher module which is listed as "lightweight" is bigger than notify. It is listed as "lightweight" because it only does a single very simple thing.

I think that notify is probably "lightweight" so I've updated that. Is there anything else that's inaccurate?

--
Growing Venture Solutions | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book


I've updated the table as

solipsist's picture
solipsist - Sun, 2009-01-18 12:53

I've updated the table as Watcher is now available for D6 and allows anonymous users to subscribe to nodes.

Jakob Persson
NodeOne


Team Notifications

NonProfit's picture
NonProfit - Wed, 2009-02-25 05:34

http://drupal.org/project/notifications_team also offers similar admin-generated functionality. -NP


different goal (but included already)

greggles's picture
greggles - Thu, 2009-02-26 02:48

Team Notifications is an extension of the notifications module (which is in the table) to provide a specific UI for notifications module.

I don't think it really belongs in this comparison chart since it's purpose is quite different (most of these allow a user to subscribe themself, Team Notifications allows a user to send a notification to other people).

--
Growing Venture Solutions | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book


Comment notification is only the tip of the icebarg

levavie's picture
levavie - Fri, 2009-03-13 13:25

Comment notification modules are great, but what we really need is an auto subscription framework.

See what I've written in the Dries blog post.

Gabriel wrote "IMHO, it's essential to allow users to subscribe without having to post a comment"

His comment uncovers a much deeper issue which must be dealt with correctly - the issue of auto registration workflow - a term I've phrased more then two years ago.

Really, nobody wants to subscribe. Regular users wants to instantly post! That's why it's important to make the subscription process as smooth as possible, and a part of core.

We all want real users to easily post content. That's the whole point of a CMS. That's why subscription must be a SMOOTH, INVISIBLE part of the drupal CMS.

My design above is ready to use - to allow every user purchasing a product, adding a comment, subscribing or rating a post to be auto-subscribed. Otherwise it's a TOWER of BABEL. This is the real need! United framework!

This architectural point is essential to make drupal rule the world. And you can make it happen! It's really not a large task - but it's very important!

This can be done in D6 with an addon module. I've once asked Roshan Shah for an estimate and the investment is modest. Or a student can do it - under our mentoring. And you may have other ideas as well. This is one of the biggest drupal usability issues

Please forward this post to the people who can make it happen.

Thanks

Amnon Levav

Web Architect | Funder - Drupal Israel | Drupal Project Management | Ecological Entreprenour


Careful

Michelle - Fri, 2009-03-13 13:44

Be very careful with anything that auto subscribes. I just had a problem on my site with that. I had set subscriptions to default to auto subscribing because my site was so slow. Then it picked up suddenly and people were flooded with emails. They didn't realize they'd be auto subscribed and were not happy. They also didn't understand they could turn it off themselves. So whatever is done here needs to be very obvious and have an easy way of turning it off.

Michelle

See my Drupal articles and tutorials or come check out the Coulee Region


Comment Notifications on Organic Groups

pieterbezuijen's picture
pieterbezuijen - Sun, 2009-03-15 16:35

I'm looking to integrate Organic Groups to split forums on a small community website. On this I'd like to encourage users by notifying them of new content. Maybe there could be added a line with support for Organic Groups. I allready saw that notifications and subscriptions both support Organic Groups.

The table is of good help for selecting a module for notifications, but what's not completely clear is the difference between the last 2 modules. Maybe adding something about cron- and tokensupport could be added? Or something about notifications via other ways as e-mail? How do you think about that?


You sure?

Michelle - Sun, 2009-03-15 19:08

The last I checked, only notifications worked with OG. Has that changed recently?

Michelle

See my Drupal articles and tutorials or come check out the Coulee Region


You're right

pieterbezuijen's picture
pieterbezuijen - Sun, 2009-03-15 21:56

Sorry, you're right!

I looked to fast, that's only true for the 2.x release, which is not ready yet, or the extra addon...

Pieter


Suggestions:

webchick's picture
webchick - Mon, 2009-03-16 14:42
  1. Add a column to the table of which Drupal versions each module supports.
  2. Add a summary sentence for each module above the table that explains why it is unique ("If you want blah dee blah, use the foo module")

While this information isn't particularly relevant for core inclusion, it's a nice collection of data for people who are building sites and want to add comment notifications, and they would care about this.


below?

pieterbezuijen's picture
pieterbezuijen - Mon, 2009-03-16 19:02

I think it's better to add the summary below, than you'll get a quick overview and can read in more detail beneath it.


seems reasonable

greggles's picture
greggles - Tue, 2009-03-17 00:21

I added a row with a brief description to the best of my ability.

I didn't add a "core version support" since all modules support 5.x and 6.x. I also moved the row about providing an RSS feed of comments to a blanket statement. None of them do it so I don't see a reason to mention it.

--
Growing Venture Solutions | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book


Comment RSS

Michelle - Tue, 2009-03-17 02:51

As does Views; it installs a

Garrett Albright - Tue, 2009-03-17 15:45

As does Views; it installs a "comments_recent" view on installation, though I believe it's disabled by default. Enable it and create a feed view, and viola.

It's what I use to keep an eye on incoming comments to my site so I can baleet the man-made spam ones that sneak through Mollom.


Well, yes...

Michelle - Tue, 2009-03-17 18:53

But views is already mentioned so I was mentioning the other option. ;)

Michelle

See my Drupal articles and tutorials or come check out the Coulee Region


Multiple notifications ?

tsi - Thu, 2009-04-02 01:31

Does any of these will wait until a user checks a node before sending him another notification, I meen - if there are 7 new comments on a node a user should get only one notification message and not seven.
I think this is very important feature for not annoying users because they are flooded with emails and I don't think notification does it.


interesting idea...

greggles's picture
greggles - Thu, 2009-04-02 02:01

This would be somewhat tricky - you'd have to know
1) when did you last mail that person about this node
2) have they viewed the node since then

Item 2 is tracked by core. #1 is probably possible to determine based on some other data...but would be slow to calculate and so it's best stored in it's own table. That means this is more complex than what I'd like to do in comment_notify, but it's an interesting idea for something like notifications/subscriptions.

--
Growing Venture Solutions | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book


It's on my wishlist for

solipsist's picture
solipsist - Mon, 2009-05-18 21:22

It's on my wishlist for Watcher. It makes a lot of sense, why I wish to implement it.

Jakob Persson - NodeOne


suggestion...

tsi - Thu, 2009-04-02 12:36

I am no programmer, so tell me if this makes any sense : Drupal core tracks how many new (not viewed) comments a user have on each node, what I suggest is that the module will check :
- if there is 1 new comment - send notification mail.
- if there are 2 or more - wait for the user to view the thread.
I know that I will go with any module that will provide this feature even if it means loosing all the corrent subscriptions.
BTW there is a surprisingly quiet thread about exactly this issue here : http://drupal.org/node/359883


.

Michelle - Thu, 2009-04-02 13:40

Drupal core tracks how many new (not viewed) comments a user have on each node

No it doesn't. It just tracks the time the user last visited the node and assumes any comment with a later timestamp is new. It would probably make more sense to compare the timestamp of the notification against the timestamp of the last node view.

Michelle

See my Drupal articles and tutorials or come check out the Coulee Region


Maybe this is what you're

matt2000's picture
matt2000 - Thu, 2009-04-02 18:08

Maybe this is what you're saying, but it seems tsi's suggestion could still be implemented via

<?psuedocode
  $count = db_result(db_query("SELECT COUNT(*) FROM {comments} WHERE nid=$nid and timestamp > $last_node_view_time"));

  if ($count == 1) {
     $send_notification = TRUE;
   } elseif ($count > 1) {
     $send_notification = check_user_preference_re_subsequent_comments();
   }
?>

(Just trying to communicate the idea; obviously I'm not too concerned with standards and best practice at this point.)

Best,

Matt

Drupal.org user profile
Portfolio: http://www.NinjitsuWeb.com
Drupal Micro-blogging: http://twitter.com/matt2000


great idea - though limited

greggles's picture
greggles - Fri, 2009-04-03 14:27

This is a great idea.

This would work for some modules if they just send notifications of all comments on a nid, but it doesn't work if they are selectively sent (for comment_notify/subscribe it can optionally send responses to a thread).

--
Growing Venture Solutions | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book


Then those modules must

matt2000's picture
matt2000 - Sat, 2009-04-04 01:12

Then those modules must store rules for determining which comments to send. It wouldn't be hard to dynamically generate a JOIN and the WHERE clause in the above query.

Are sub-selects kosher in Drupal core?

<?psudeocode
$mailing->uid = user_we_are_mailing();
$mailing->nid = node_we_are_checking for comments();

if ($comment_filters = module_invoke_all('define_comment_filters', &$comment_filters, $mailing->uid, $mailing->nid) {
   foreach ($comment_filters AS $table['#fields'] => $fields) {
     if ($where_clause) $where_clause .= " OR ";
     $unset($last_comment_field);
     foreach ($fields AS $comment_field => $module_field) {
        if ($comment_field != $last_comment_field) {
           if ($where_clause) $where_clause .= ")";
           $operator = $table['#operator'] ? $table['#operator'] : 'IN' ;
           $where_clause .= " {comments}.{$comment_field} {$operator} (SELECT {$comment_field} FROM {$table} WHERE ";
       } else {
           $where_clause .= " AND "
       }
        $where_clause .= $module_field['#field'] . " = " . $module_field['#value'];
     }
}

$comments_to_send = db_query($base_query .  "AND (" . $where_clause . ")" );

?>

So then comment_notify could implement:

/**
* Implementation of theoretical hook_define_comment_filters
*/
function comment_notify_define_comment_filters($filters, $uid, $nid) {
  $filters['comment_notify']['#fields] = array(
        'pid' => array( '#field') => 'uid', '#value' => $uid),
        );
}

So if we have comment_notify and some theoretical module that notifies me of my buddies' comments, our resulting query might look like:

"SELECT count(*) FROM {comments} WHERE timestamp > $last_notification_ts
  AND  ( {comments}.pid IN (SELECT pid FROM {comment_notify} WHERE uid={$mailing->uid})
             OR {comments}.uid IN (SELECT uid FROM {buddy_comment_blast} WHERE buddy_id = $mailing->uid)
            )"

And if we don't have any comment notification contrib modules, we just get notification of all new comments since the last mailing

Of course, after writing all of that, it almost seems more trouble than it's worth and I've forgotten what exactly it allows us to do that we couldn't do before without having to learn yet another structured array syntax.

That might be the most complex dynamic query generator I've written, so I guess it wasn't as easy as I first thought; although that says more about me than it does about the problem at hand. I'm surely no Earl.

But it was a fun exercise to distract me from the work I should be doing, and has renewed my faith in the need for Notify by Views.

Matt

Drupal.org user profile
Portfolio: http://www.NinjitsuWeb.com
Drupal Micro-blogging: http://twitter.com/matt2000


FWIW, my reference to Core

matt2000's picture
matt2000 - Sat, 2009-04-04 19:28

FWIW, my reference to Core above was because I confused this thread with this one.


Notify Roadmap

matt2000's picture
matt2000 - Thu, 2009-04-02 18:23

FYI, There is a proposal on the table to either discontinue Notify and provide it's features under Notifications, or else rewrite it for better integration with notify_by_views. At that point, views could be used to set up some fairly complex rules for comment notifications, if desired.

Details are here:

http://drupal.org/project/notify_by_views

Best,

Matt

Drupal.org user profile
Portfolio: http://www.NinjitsuWeb.com
Drupal Micro-blogging: http://twitter.com/matt2000


The comparison table is

duncanmc - Thu, 2009-04-09 10:34

The comparison table is useful, but needs more information. For example, both "subscriptions" and "notifications" modules look exactly the same on the table, but I am sure they have important differences. Could you please add more information? For example, an important question is "which modules have an option to select whether you want to be notified about comments and updates to nodes?". A comment on the page http://groups.drupal.org/node/12645 says that "Notifications there is no option to select whether you get notified on an update", but subscriptions module has. However, the comment was written 8 months ago, so situation may have changed. Uptodate information on this table would be very helpful.


I've added some defining

solipsist's picture
solipsist - Thu, 2009-04-09 17:13

I've added some defining features of Watcher. It may be useful if authors of the other modules listed do the same.

Jakob Persson - NodeOne


What does "Extensible" in

solipsist's picture
solipsist - Thu, 2009-04-09 17:04

What does "Extensible" in the table above mean?

Each row header should have a description.

Jakob Persson - NodeOne


Has API?

mradcliffe - Thu, 2009-04-09 22:03

I assume it means that the module provides some sort of API or works well if someone creates a contrib module that extends functionality.


Merging Comment Subscribe to Comment Notify

anoopjohn's picture
anoopjohn - Wed, 2009-05-13 05:44

Comment Subscribe is being merged back with Comment Notify. The users of comment_subscribe is being provided an update that will migrate them seamlessly to comment_notify - #361449. Also see the discussion (#224782) and the work greggles have done to convince us of this merge.


With Watcher module I can't

Mr.Alinaki - Fri, 2009-07-03 14:42

With Watcher module I can't subscribe to replies to comment, only to node :(


suggestions

jeffschuler's picture
jeffschuler - Wed, 2009-07-29 16:29

Thanks much for this, greggles!

A few suggestions:

It'd be great to have project info in the table, such as:

  • last commit,
  • # of commits, and
  • # of open and closed issues

Dunno if it's possible to gather this dynamically...

Module dependencies would also be helpful.
I might reorder rows to put Extensible directly after Lightweight, too, since they seem somewhat [cor]related...

Regardless, it's a tough decision to make. There's quite a lot of overlap here, which is, I assume, why the generalized frameworks cropped up... But they're not scratching everyone's itch, and they're heavy. Maybe something lightweight and extensible is what the solution space needs?


Happy to find out this

chamont's picture
chamont - Mon, 2009-09-07 11:09

Happy to find out this subject !

I would like my users be notified about any new node in my site (powered by drupal 5.12), and then be able to subscribe to the ones they find interesting to them. For this, I currently use modules notify+subscriptions, but notify is clearly not made for simple users and send too much details. I also lack the ability to set default notification options for my users.

What would you use for sending notification of new nodes to the users ? The "notifications" module ?

Actually, in the table at the top, I lack the following row : "can notify about new nodes on the site".


Two reasons I'd consider

sharplesa's picture
sharplesa - Mon, 2009-09-07 12:27

Two reasons I'd consider going to Drupal 6 to do this if I were you:

  1. If I understand right, when Drupal 7 comes out, 5 will no longer be supported.
  2. Using Drupal 6's built-in Actions and Workflow modules in conjunction with Notifications and Messaging modules you will be able to detect and notify about any event (like new comments), not just new node creation. (How about node updates? deletes? How about new users joining the site?)

For other events (new

chamont's picture
chamont - Mon, 2009-09-07 13:01

For other events (new comments, node updates, etc.), I am happy enough with "subscriptions", that's why I focus today only on "new node". Also, for those other events, I really wants to notify only the users which explicitly asked for. Our philisophy is that any users should be warned once about any new page, but later should not receive any more information unless he explicitly subscribe to the page.

Whatsoever, we (site administrators) actually consider the move to Drupal 6, and I thanks you for your comment. I understand that I should have a look at modules Actions, Workflow, Notifications and Messaging.


Correction: Triggers and Actions

sharplesa's picture
sharplesa - Mon, 2009-09-07 14:20

In the above, I should've said Triggers and Actions, not Workflow and Actions.