? 222582.userpicturesinblocks.patch
? 222582.userpicturesinblocks2.patch
Index: plugins/user_relationship_blocks/user_relationship_blocks.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/user_relationships/plugins/user_relationship_blocks/Attic/user_relationship_blocks.module,v
retrieving revision 1.1.2.13
diff -u -p -r1.1.2.13 user_relationship_blocks.module
--- plugins/user_relationship_blocks/user_relationship_blocks.module	20 Apr 2008 08:05:14 -0000	1.1.2.13
+++ plugins/user_relationship_blocks/user_relationship_blocks.module	1 May 2009 02:29:38 -0000
@@ -284,18 +284,32 @@ function theme_user_relationship_block_c
 
     $title = "{$relationship->plural_name}{$extra}";
 
+    $user_picture = theme('user_picture', $relatee);
     $username = theme('username', $relatee);
+    if (variable_get('user_relationships_show_user_pictures', FALSE)) {
+      // If we need to show pictures instead of user names, add a nested list
+      // containing the picture and username.
+      $display_relatee = array(
+        'children' => array($user_picture, $username),
+        // Need to provide blank 'data' element, so theme_item_list resets its
+        // internal $data variable, instead of adding onto the end of it.
+        'data' => '',
+      );
+    }
+    else {
+      $display_relatee = $username;
+    }
     if ($rtid == UR_BLOCK_ALL_TYPES) {
       $rows[$title]['data'] = $title;
-      $rows[$title]['children'][] = $username;
+      $rows[$title]['children'][] = $display_relatee;
     }
     else {
-      $rows[$title][] = $username;
+      $rows[$title][] = $display_relatee;
     }
   }
 
   foreach ($rows as $title => $users) {
-    $output[] = theme('item_list', ($rtid == UR_BLOCK_ALL_TYPES ? array($users) : $users));
+    $output[] = theme('item_list', ($rtid == UR_BLOCK_ALL_TYPES ? array($users) : $users), NULL, 'ul', array('class' => 'user_relationships_related'));
   }
 
   return implode('', $output);
