? overlay_subtabs_invisible.png
Index: privatemsg.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privatemsg/privatemsg.module,v
retrieving revision 1.70.2.30.2.91.2.64.2.61
diff -u -p -r1.70.2.30.2.91.2.64.2.61 privatemsg.module
--- privatemsg.module	6 Jun 2010 15:15:43 -0000	1.70.2.30.2.91.2.64.2.61
+++ privatemsg.module	16 Jun 2010 08:08:35 -0000
@@ -48,6 +48,10 @@ function privatemsg_permission() {
       'title' => t('Allow disabling privatemsg'),
       'description' => t("Allows user to disable privatemsg so that they can't recieve any private messages.")
     ),
+    'use tokens in privatemsg' => array(
+      'title' => t('Use tokens in private messages'),
+      'description' => t("Allows user to use available tokens when sending private messages.")
+    ),
   );
 }
 
@@ -589,6 +593,9 @@ function privatemsg_preprocess_privatems
    */
   $vars['message_timestamp'] = format_date($message['timestamp'], 'small');
   $vars['message_body'] = check_markup($message['body'], $message['format']);
+  if (privatemsg_user_access('use tokens in privatemsg', $message['author'])) {
+    $vars['message_body'] = token_replace($vars['message_body']);
+  }
   if (isset($vars['mid']) && isset($vars['thread_id']) && privatemsg_user_access('delete privatemsg')) {
     $vars['message_actions'][] = array('title' => t('Delete message'), 'href' => 'messages/delete/' . $vars['thread_id'] . '/' . $vars['mid']);
   }
Index: privatemsg.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privatemsg/privatemsg.pages.inc,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 privatemsg.pages.inc
--- privatemsg.pages.inc	6 Jun 2010 15:15:43 -0000	1.1.2.7
+++ privatemsg.pages.inc	16 Jun 2010 08:08:36 -0000
@@ -335,6 +335,11 @@ function privatemsg_new($form, &$form_st
     '#resizable'          => TRUE,
     '#format'             => isset($format) ? $format : NULL,
   );
+  if (privatemsg_user_access('use tokens in privatemsg') && module_exists('token')) {
+    $form['privatemsg']['token'] = array(
+      '#theme' => 'token_tree',
+    );
+  }
   $form['privatemsg']['preview'] = array(
     '#type'               => 'submit',
     '#value'              => t('Preview message'),
