? 222582.userpicturesinblocks2.patch
? 222582.userpicturesinblocks3.patch
Index: plugins/user_relationship_blocks/user_relationship_blocks.css
===================================================================
RCS file: plugins/user_relationship_blocks/user_relationship_blocks.css
diff -N plugins/user_relationship_blocks/user_relationship_blocks.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/user_relationship_blocks/user_relationship_blocks.css	13 May 2009 05:59:00 -0000
@@ -0,0 +1,22 @@
+.user_relationships_related {
+  overflow: hidden;
+}
+body ul.user_relationships_related li {
+  background: none;
+  float: left;
+  margin: .6em;
+  padding: 0;
+  text-align: center;
+}
+body ul.user_relationships_related .picture {
+  clear: both;
+  float: none;
+  padding: 0;
+}
+body ul.user_relationships_related li ul li {
+  margin: 0 1em 0 0;
+}
+body ul.user_relationships_related li ul li ul li {
+  float: none;
+  margin: 0;
+}
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	13 May 2009 05:59:00 -0000
@@ -284,18 +284,33 @@ 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)) {
+      drupal_add_css(drupal_get_path('module', 'user_relationship_blocks') .'/user_relationship_blocks.css');
+      // 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);
