Community Documentation

Notify the content author about new comments

Last updated July 29, 2008. Created by fago on July 3, 2007.
Edited by Michelle. Log in to edit this page.

Required modules: Comment Module

array (
  'cfg_1' =>
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'comment_insert',
    '#label' => 'Notify content author about new comments',
    '#active' => 1,
    '#module' => 'workflow-ng',
    0 =>
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_mail_to_user',
      '#settings' =>
      array (
        'message' => 'Hello [node_author:user]!

A new comment has been created by [comment:comment-author-name] at your [node:type-name] [node:title].
[node:site-url]/node/[node:nid]#comment-[comment:comment-cid]

Comment title: [comment:comment-title]
Comment body:
[comment:comment-body]

---[comment:site-name]',
        'subject' => 'A new comment has been created!',
        'from' => 'yourmail@example.com',
        'from_args' =>
        array (
        ),
        'message_args' =>
        array (
          0 => 'comment',
          1 => 'node',
          2 => 'node_author',
        ),
        'subject_args' =>
        array (
        ),
      ),
      '#label' => 'Notify the content author',
      '#argument map' =>
      array (
        'node_author' => 'user',
      ),
    ),
    '#name' => 'cfg_1',
  ),
)

About this page

Drupal version
Drupal 5.x
Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.