summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg (greggles) Knaddison2009-11-17 15:20:10 (GMT)
committer Greg (greggles) Knaddison2009-11-17 15:20:10 (GMT)
commit0e6cfb3e3379f72bd7944c51c25b73097ed567fd (patch)
treecfdeedf1d043208a8b61d66ddbf7f4f6bdaf9c54
parent4f5ece7bd0b59695d3960749f72ded34aba664ee (diff)
feature #314630 by greggles and heyrocker: Add nid and cid replacements to allow things like a reply link
-rw-r--r--comment_notify.module8
1 files changed, 8 insertions, 0 deletions
diff --git a/comment_notify.module b/comment_notify.module
index 3e0e28f..2903dbe 100644
--- a/comment_notify.module
+++ b/comment_notify.module
@@ -411,6 +411,7 @@ function _comment_notify_mailalert($comment) {
$message['body'] = t(
variable_get('node_notify_default_mailtext', AUTHOR_MAILTEXT),
array(
+ '!cid' => $cid,
'!commname' => $comment->name,
'!commtext' => drupal_html_to_text($comment_text),
'!commsubj' => $comment->subject,
@@ -418,6 +419,7 @@ function _comment_notify_mailalert($comment) {
'!node_title' => $node->title,
'!node_teaser' => drupal_html_to_text($node_teaser),
'!mission' => variable_get('site_mission', ''),
+ '!nid' => $nid,
'!node_body' => drupal_html_to_text($node_body),
'!name' => $author->name,
'!site' => variable_get('site_name', 'drupal'),
@@ -469,6 +471,7 @@ function _comment_notify_mailalert($comment) {
$message['body'] = t(
variable_get('comment_notify_default_mailtext', DEFAULT_MAILTEXT),
array(
+ '!cid' => $cid,
'!commname' => $comment->name,
'!commtext' => drupal_html_to_text($comment_text),
'!commsubj' => $comment->subject,
@@ -476,6 +479,7 @@ function _comment_notify_mailalert($comment) {
'!node_title' => $node->title,
'!node_teaser' => drupal_html_to_text($node_teaser),
'!mission' => variable_get('site_mission', ''),
+ '!nid' => $nid,
'!node_body' => drupal_html_to_text($node_body),
'!name' => $alert->name,
'!site' => variable_get('site_name', 'drupal'),
@@ -646,10 +650,12 @@ function comment_notify_settings() {
'#description' => t(
'You can use the following variables to be replaced:
<ul>
+ <li>!cid = the comment id for the comment
<li>!commname = the username who posted the comment
<li>!commtext = the text of the posted comment
<li>!commsubj = the subject of the posted comment
<li>!comment_url = the full url of the post and comment - note: if you have paging enabled, this does not work correct - set your max comments per page so that all fit on one page or reverse order them
+ <li>!nid = the node id the comment was posted on
<li>!node_title = the title of the node that was commented on
<li>!node_teaser = the teaser of the node that was commented on
<li>!node_body = the body of the node that was commented on
@@ -676,10 +682,12 @@ function comment_notify_settings() {
'#description' => t(
'You can use the following variables to be replaced:
<ul>
+ <li>!cid = the comment id for the comment
<li>!commname = the username who posted the comment
<li>!commtext = the text of the posted comment
<li>!commsubj = the subject of the posted comment
<li>!comment_url = the full url of the post and comment - note: if you have paging enabled, this does not work correct - set your max comments per page so that all fit on one page or reverse order them
+ <li>!nid = the node id the comment was posted on
<li>!node_title = the title of the node that was commented on
<li>!node_teaser = the teaser of the node that was commented on
<li>!node_body = the body of the node that was commented on