I want to use Flags and Rules to allow visitors to flag items they want to be kept informed by email of changes to Posts, Articles, and Comments.
My general question is: Can anyone shed light on the functional logic that these modules, for instance, would be following to achieve my aim ?? I would really appreciate someone explaining how the mechanism should work between flagging an item to be watched and an email being fired off.
Inside this general question are two more detailed ones:
1. Anonymous users aren't registered (by definition) so how can they be notified ??
2. If content is changed then Rules needs to access the list of email addresses of users associated with the relevant Flag. I don't understand how a token eg [user:mail] of a user that is logged in comes into this. By which module would the email list be created and how would it then get used by it ??
In addition to Flags and Rules, I've also sequentially installed: Token, Entity, VBO, Views, and Ctools modules and activated Actions primarily to allow Rules to work. However, I'm lost. Flags has worked fine, and buttons/links/checkboxes have appeared as hoped. Rules is a deeper journey .... consequently I have flags set but have been unable to find the functionality to fire off the notifying emails.
It has been suggested on another forum post that I need to use VBO to do this, but from what I see it seems that both Views and VBO are ways for the administrator to carry out operations (views = UI?) and this seems very different to having Flag or Rules carry out the operations automatically.
Comments
I guess I was the one who
I guess I was the one who mentioned VBO for this.
Fago's videos from nodeone.se (sorry I don't have a link at the moment) is very clear and explains what i'm saying(it's a free video set).
VBO itself cannot play the game.
First, we need a View that returns a list of users(make the View on Users as main content in first step in add view form).
You can do this by adding an NID contextual filter and a relationship to the flag to only return flagged users.
Also please note that this works only for registered users.
Add an action for the View as a VBO action to send the email to the user.
Then, in Rules, you will see an action execute a VBO programatically.
So yiu can choose a View and set the node ID as the argument(so now rules have a list of users who have flagged the given content).
Set the View to execute that action now(the action could be send an email).
I'm sure this reply is not very helpful. If you have any questions, I'd sugges watchng those videos. Or post here so let's try to get it done.
What's new and changing in PHP 8.4
Flags must create a list of users and flags
On the contrary Ayesh, it is very helpful ! Thank you very much indeed.
At the moment I'm stuck, in the middle of setting an Action to email a user and an advanced Action to send an email. I got lost as to why and what I was doing.
Perhaps I need to clarify .....
Say I have three users A, B, and C and four Nodes 1, 2, 3, and 4. User A could flag Node 1 and Node 2, User B only Node 1, and User C Nodes 2 and 4.
To function as it is doing Flags must itself create a list of users together with the content that they've flagged. The problem is only how then to get that list of users read, each time an edit is carried out or a comment added, and emails sent out to those users who've set the flags that relate to that content. Emails could easily be autogenerated from a simple template consisting of tokens and text.
On the other hand I would need to manually set up different views for each of these scenarios, unless VBO can be set up to read the flags without further input from me (and send the emails out)
This must be something really elementary to achieve but I just can't see clearly what is doing what :( Rules, Actions, Triggers, and Views, all seem to overlap somehow. Am I misunderstanding?
Watching this vid:
Watching this vid: http://nodeone.se/sv/learning-library?field_nc_learning_version_tid=254&...
Skip through (as flags have been set ok) to: 07:16
I'm stuck: the data selector field is not prefilled. (I am editing an action but for content eg Articles or Basic pages not for comments)
Any ideas ??
RESOLVED - easi peazi
Yaay! All seems to be working fine. Check-out this video: http://nodeone.se/sv/learning-library?field_nc_learning_version_tid=254&.... It seems that only the Flags and Rules are needed.
My problem was that in Rules I'd set up two events for the rule: "After updating existing content" and "A node has been flagged under 'name of flag'". I am thinking this resulted in no available data item associated with both events as on deleting the second of the two actions the data selector was pre-filled with "node" and from then all went smoothly again.
If anyone is still reading this, I am confused as to why Rules allowed me to drill down under the data selector: "node", but then rejected the parameters as valid eg node:body. Academic now but interesting for me anyway.
Byeee! :)
For those still interested,
For those still interested, there is now a module for email notification of comments and contents that have been flagged for subscription: Flag Notify.
(Disclaimer: I am its maintainer)