Index: postcard.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/postcard/postcard.module,v
retrieving revision 1.23.2.10
diff -u -p -r1.23.2.10 postcard.module
--- postcard.module	19 Apr 2007 00:58:21 -0000	1.23.2.10
+++ postcard.module	1 May 2007 20:45:08 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: postcard.module,v 1.23.2.10 2007/04/19 00:58:21 add1sun Exp $
+// $Id: postcard.module,v 1.23.2.8 2007/04/04 23:22:18 add1sun Exp $
 
 /**
  * @file
@@ -153,7 +153,7 @@ global $user;
         return drupal_access_denied();
       }
       // view postcard
-      $card = db_fetch_object(db_query("SELECT p.pid, p.nid, p.sender_name, p.sender_mail, p.recp_name, p.recp_mail, p.body, p.send_time, f.nid FROM {postcard} p INNER JOIN {files} f ON p.nid = f.nid INNER JOIN {node} n ON n.nid = p.nid  WHERE p.pid = '%s'", $arg2));
+      $card = db_fetch_object(db_query("SELECT p.pid, p.nid, p.uid, p.sender_name, p.sender_mail, p.recp_name, p.recp_mail, p.body, p.send_time, f.nid FROM {postcard} p INNER JOIN {files} f ON p.nid = f.nid INNER JOIN {node} n ON n.nid = p.nid  WHERE p.pid = '%s'", $arg2));
         $title = t('A Postcard for you');
         $output = theme('postcard_image', $card);
       if (isset($card)) {
@@ -493,10 +493,17 @@ function theme_postcard_gallery($galleri
  *  HTML for postcard node
  */
 function theme_postcard_image($card) {
+  // get the node and user info
   $node = node_load(array('nid' => $card->nid));
+  $account = user_load(array('uid' => $card->uid));
+  // build the postcard page
   $output .= image_display($node, 'preview') ."<br />";
   $output .= '<br />'. t('To: ') . check_plain($card->recp_name);
   $output .= '<hr />'. check_plain($card->body) .'<hr />';
+  // this shows the user picture if the "display in node" setting is checked on the theme
+  if (theme_get_setting('toggle_node_user_picture')) {
+    $output .= theme('user_picture', $account);
+  }
   $output .= t('Sent: ') . format_date($card->send_time);
   $output .= '<br />'. t('From: ') . check_plain($card->sender_name);
   $output .= '<br />'. t('Email: ') . check_plain($card->sender_mail);
