Index: token.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/token/Attic/token.inc,v
retrieving revision 1.1.2.7
diff -u -F^f -r1.1.2.7 token.inc
--- token.inc	14 Apr 2007 12:39:58 -0000	1.1.2.7
+++ token.inc	3 May 2007 03:54:07 -0000
@@ -121,6 +121,7 @@ function token_get_values($type = 'globa
 
   $path = drupal_get_path('module', 'token');
   include_once("$path/token_node.inc");
+  include_once("$path/token_comment.inc");
   include_once("$path/token_user.inc");
   if (module_exists('content')) {
     include_once("$path/token_cck.inc");
Index: token.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/token/token.module,v
retrieving revision 1.5.2.6
diff -u -F^f -r1.5.2.6 token.module
--- token.module	14 Apr 2007 12:39:58 -0000	1.5.2.6
+++ token.module	3 May 2007 03:54:07 -0000
@@ -31,6 +31,7 @@ function token_init() {
 function theme_token_help($type = 'all', $prefix = '[', $suffix = ']') {
   $path = drupal_get_path('module', 'token');
   include_once("$path/token_node.inc");
+  include_once("$path/token_comment.inc");
   include_once("$path/token_user.inc");
   if (module_exists('content')) {
     include_once("$path/token_cck.inc");
Index: token_comment.inc
===================================================================
RCS file: token_comment.inc
diff -N token_comment.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ token_comment.inc	3 May 2007 03:54:07 -0000
@@ -0,0 +1,68 @@
+<?php
+// $Id$
+
+/**
+ * Implementation of hook_token_values()
+ */
+function comment_token_values($type, $object = NULL) {
+  switch ($type) {
+    case 'comment':
+      
+      // cast to an object just in case fussy drupal gave us an array
+      $comment = (object)$object;
+
+      $values['comment-nid']            = $comment->nid;
+      $values['comment-title']          = check_plain($comment->subject);
+      $values['comment-body']           = check_markup($comment->comment, $comment->format);
+      $values['comment-body-raw']       = $comment->comment;
+
+      $values['comment-author-uid']     = $comment->uid;
+      $values['comment-author-name']    = $comment->name;
+
+      $values['comment-yyyy']           = date('Y', $comment->timestamp);
+      $values['comment-yy']             = date('y', $comment->timestamp);
+      $values['comment-month']          = date('F', $comment->timestamp);
+      $values['comment-mon']            = date('M', $comment->timestamp);
+      $values['comment-mm']             = date('m', $comment->timestamp);
+      $values['comment-m']              = date('n', $comment->timestamp);
+      $values['comment-ww']             = date('W', $comment->timestamp);
+      $values['comment-date']           = date('N', $comment->timestamp);
+      $values['comment-day']            = date('l', $comment->timestamp);
+      $values['comment-ddd']            = date('D', $comment->timestamp);
+      $values['comment-dd']             = date('d', $comment->timestamp);
+      $values['comment-d']              = date('j', $comment->timestamp);
+      break;
+  }
+  
+  return $values;
+}
+
+/**
+ * Implementation of hook_token_list()
+ */
+function comment_token_list($type = 'all') {
+  if ($type == 'comment' || $type == 'all') {
+    $tokens['comment']['comment-nid']            = t('Comment ID');
+    $tokens['comment']['comment-title']          = t('Comment title');
+    $tokens['comment']['comment-body']           = t('Comment body');
+    $tokens['comment']['comment-body-raw']       = t('Comment body. WARNING - raw user input');
+
+    $tokens['comment']['comment-author-uid']     = t("Comment author's user id");
+    $tokens['comment']['comment-author-name']    = t("Comment author's user name");
+
+    $tokens['comment']['comment-yyyy']           = t("Comment creation year (four digit)");
+    $tokens['comment']['comment-yy']             = t("Comment creation year (two digit)");
+    $tokens['comment']['comment-month']          = t("Comment creation month (full word)");
+    $tokens['comment']['comment-mon']            = t("Comment creation month (abbreviated)");
+    $tokens['comment']['comment-mm']             = t("Comment creation month (two digit, zero padded)");
+    $tokens['comment']['comment-m']              = t("Comment creation month (one or two digit)");
+    $tokens['comment']['comment-ww']             = t("Comment creation week (two digit)");
+    $tokens['comment']['comment-date']           = t("Comment creation date (day of month)");
+    $tokens['comment']['comment-day']            = t("Comment creation day (full word)");
+    $tokens['comment']['comment-ddd']            = t("Comment creation day (abbreviation)");
+    $tokens['comment']['comment-dd']             = t("Comment creation day (two digit, zero-padded)");
+    $tokens['comment']['comment-d']              = t("Comment creation day (one or two digit)");
+
+    return $tokens;
+  }
+}
\ No newline at end of file
