--- watcher.module +++ (clipboard) @@ -2031,7 +2031,8 @@ if (!isset($comment_excerpt)) { $comment_excerpt = _watcher_email_notifications_create_excerpt($comment['comment']); } - $comment_url = url('node/'. $comment['nid'], null, 'comment-'. $comment['cid'], true); + $comment_page = _watcher_comment_page($node->comment_count); + $comment_url = url('node/'. $comment['nid'], $comment_page , 'comment-'. $comment['cid'], true); $comment_reply_url = url('comment/reply/'. $comment['nid'] .'/'. $comment['cid'], null, null, true); $node_url = url('node/'. $comment['nid'], null, null, true); @@ -2048,6 +2049,17 @@ } /** + * Return a page number for the + * comment in the email notification + */ +function _watcher_comment_page($num_comments){ + $comments_per_page = _comment_get_display_setting('comments_per_page'); + $page = floor($num_comments/$comments_per_page); + $query = ($page > 0) ? "page=$page" : NULL; + return $query; +} + +/** * Return a message header or footer */ function _watcher_email_notifications_replace_tokens_header_and_footer($recipient, $nid, $type = 'header') {