Does someone know how to make a rule which allerts ALL commenters of a node when a new comment is made?

CommentFileSizeAuthor
#2 vbo.txt8.74 KBbaff
#2 rule_which_calls_a_vbo.txt1.79 KBbaff

Comments

baff’s picture

Project: Rules » Application Toolbar (Appbar)
Version: 6.x-1.2 » 6.x-2.x-dev

Maybe one has to make a VBO view which is called by a Rule (with or without view rules integration module)?

baff’s picture

Component: User Interface » User interface
StatusFileSize
new1.79 KB
new8.74 KB

OK - I have tried this.
Made a rule with a nid argument which lists all commenters emails of this node. Set it to vbo with action send_mail.

Made a rule wich calls a node VBO promatically. Set the views parameter.

Tried id. Log entr says %author as recipient email adresss is invalid.

Then I tried in VBO view the action send_tokenized_mail, but within the rule those tokens are not clickable as help text says.

I attach vbo + rule. Someone who is more experienced maybe gets the problem ver fast.

With such a rule and some flags one could avoid notifications+messaging module.

PS: tried in vbo the action send_mass_mail provided b views_send module, gives an error (bug)

baff’s picture

Project: Application Toolbar (Appbar) » Rules and Views Integration
Version: 6.x-2.x-dev » 6.x-1.x-dev
baff’s picture

Project: Rules and Views Integration » Rules
Version: 6.x-1.x-dev » 6.x-1.2
baff’s picture

Project: Application Toolbar (Appbar) » Rules
Version: 6.x-2.x-dev » 6.x-1.x-dev
itangalo’s picture

Status: Active » Fixed

This is a pretty tricky task for Rules, but it can be done and the general approach is pretty close to what you already have done.

* You say that you have done a rule that takes nid and lists all comments, but I don't really know what you mean by this. Are all the comments loaded as objects in the rule?

The approach I would suggest is the following:

* A rule set that takes a user and a node as arguments, and sends an e-mail to the user saying something about the relevant node.
* A view that takes a nid as argument and lists all (non-anonymous) users who have commented on the node. This in itself is pretty tricky, but start with a *comment view* and dig around at the relationships and it will hopefulle work out.
* Turn the view into a VBO, and check the rule set as the action you want to call. (I think you actually have to have this check, even when calling the VBO from Rules later on.)
* A triggered rule reacting on a new comment being posted, calling the VBO in question with the relevant NID as argument. The tricky part here will be to configure the two arguments that the VBO in turn must provide to the rule set -- that should be one user object and one node object. I'm not sure of how to do this straight off, I'm afraid. There are some leads on how to set these arguments found here: http://nodeone.se/blogg/learn-rules-with-nodeone-part-16-vbo-rule-sets-a...

If you manage to pull this off you're a hero.
//Johan Falk
I'm a part of the Rules Issue Squad, helping out in the issue queue. You can join, too!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

baff’s picture

Status: Active » Closed (fixed)

I could do it, but before I post it here I have to solve one problem - double entries - so if one has commented 3 times a node you only get one email not 3

But there is one undertanding problem:

If I check my comments table in phpadmin I can see that the column mail is empty.
Does someone understand why?

baff’s picture

Status: Closed (fixed) » Active
itangalo’s picture

Status: Closed (fixed) » Fixed

Concerning #8: I think this is a new issue, and I'm not sure it is at all related to Rules. Closing this issue again.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.