Rules as a complete replacement for comment notifications?

Events happening in the community are now at Drupal community events on www.drupal.org.
Gurpartap Singh's picture

Rules is superb! -pause- Is there an existing solution(rule-action or token) to send e-mail to:

a) Anonymous commenter (mailing to created comment author returns "Unable to send e-mail..." warning for anon. commenting).
b) Thread participants or the "rest of"(other than comment author and/or content author) participants. Thread may be whole or parent + siblings + children comment.
c) Author of parent comment (if it is a reply to an existing comment).

We are missing the subscribe/unsubscribe option with this approach. But I'm not sure if rules can handle something like that, since I haven't yet played a lot with it. Not an issue for me as of now. Also, I'm not aware of any existing discussions regarding making rules as a replacement for comment notifications.

So.. if there's no good solution for at least point (a) and some of (b), I'll build one :)

Comments

a) Hm, yep it would just try

fago's picture

a) Hm, yep it would just try to send mail to the anonymous users. I don't know whether the mail address is in $comment somewhere? If not, you'd have to manually read out the form value.
b) For now, probably best would be to just write an action "mail to thread participants". Once there is support for "data lists" in rules, one could just do an action for "get thread participants" and rely on the usual mail send action.
c) An action which gets the author of a parent comment, if there is on, would be sufficient here.

@subscribe/unsubscribe:
Yep, that's not really a thing which rules deals with. You basically need something that provides the settings for you - possible a profile field. If you prefer using CCK you can just create a content profile type for settings and add a CCK field for it, then check it's value by the available conditions.. (there is also an load content profile action).

@replacement:
I don't think rules is a good replacement for everyone, as it's no out of the box solution. But yes, I think it would be great to have an out of the box solution built on top of it, by just importing some rules or enabling a "glue module", which e.g. provides a field for the settings + the pre-configured rules.

We are missing the subscribe/unsubscribe ...

baff's picture

I think this could be done with a flag. This flag is checked within a rule. I am very interested in this issue too. Why installing a notification moduel?

As there are no actions / tokens available at the moment, one would need to take custom php code, or maybe views rules integration module http://drupal.org/project/rules_views

+vbo http://drupal.org/project/views_bulk_operations,
+ views send http://drupal.org/project/views_send

One could make a vbo view listing all comments with comment author email of a node. And vbo action send mass email. Then one could execute this by a rule.

But I did not succeed as views rules integration module seems to be a bit buggy and / or there is no documentation.

Rules Book

baff's picture

Please post rules here: http://drupal.org/node/1120898

I have set up a book page

How about a sandbox or project instead?

rfay's picture

Wouldn't a sandbox or project be better?

With features created for each of these?

It would be far more maintainable, and very useful.

Call it "Rules Notifications Examples"?

The doc page could point to the project. The project page could be maintained.

Thanks for your suggestion.

baff's picture

Thanks for your suggestion. Didn't think about that.

Contributed Module Ideas

Group organizers

Group notifications

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