Jump to:
| Project: | Node Comments |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
Hi, I'm using this module in replacement of Drupal comments. One of the requirements I have is to send notifications to a specified email (the sysdamin) every time a comment is posted in the site in order to review them.
The best way to do this is using a custom action for sending an email every time a comment is posted, but since the "beta 2" version of this module don't have integration with actions/triggers at the moment, I wrote the attached patch that will fire a trigger every time a comment is inserted / modified.
Also, since nodecomments are basically nodes I added a hook_action_info_alter for making this trigger to work with node and system actions since it should be compatible.
I'm posting this in case it's useful to anyone else, also I'll be glad to extend it in order to implement custom actions, for instance sending an email with the option of using relevant tokens like parent node or parent node author.
| Attachment | Size |
|---|---|
| nodecomment_actions.patch | 2.12 KB |
Comments
#1
I would also like a feature like this. Especially with rules, so I can use it with the Flag module to send a user an e-mail every time someone has commented on a bookmarked thread.
#2
@Jaizhanju
If you like this feature why not help with testing the patch ?
#3
Why do you need this ? Nodecomments are processed by nodeapi same way as ordinary nodes, so you can use actions/rulesets triggered on node events.
#4
The problem is that you need to install Rules module in order to trigger an action for a specified type of node, otherwise it will send notifications every time any node is posted (unless I missing something and you actually can trigger conditional actions from core).
In that particular project we were trying to avoid installing Rules and just using the core actions API, that's why we needed the actions integration.
#5
#6
#7
I would like to see this feature added as well. I'm using the node type as a comment but have to handle it as a node in rules which means...
when users comment on a node using a node comment the "New comment saved" trigger isn't applied and when executing trigger when the NODE COMMENT TYPE is saved I am unable to assign points to the commented contents author because it doesn't fit the context.