There is a patch, which enables the display of user pictures for the 6.x version at #616704: User picture support.

Is there also a patch for 7.x?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chipie’s picture

Issue summary: View changes
hiphiparray’s picture

+1

Advin’s picture

You can add somthing like this in theme_chatroom_message_username function

if (isset($chat_user->picture->uri)) {
$output .= theme(
    'image_style',
    array(
      'style_name' => 'thumbnail',
      'path' => $chat_user->picture->uri,
      'attributes' => array(
        'class' => 'avatar'
      )
    )
  );
}
hiphiparray’s picture

Thank you for the reply!

glekli’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Status: Active » Needs review
FileSize
10.37 KB

I have added support for user pictures. The attached patch adds options to enable/disable user pictures in chat and to select the image style to use.

giorgio79’s picture

Status: Needs review » Needs work
-sh-4.1$ git apply -v user_pictures-2160777-5.patch
Checking patch chatroom.chatroom.inc...
Checking patch chatroom.css...
Checking patch chatroom.install...
Checking patch chatroom.module...
error: while searching for:
 * Theme a chatroom message's username string.
 */
function theme_chatroom_message_username($variables) {
  $chat_user = $variables['message']->uid ? user_load($variables['message']->uid) : drupal_anonymous_user();
  $output = '<span class="chatroom-message-username">';
  $info = array(
    'account' => $chat_user,
    'name' => $chat_user->name,

error: patch failed: chatroom.module:856
error: chatroom.module: patch does not apply
giorgio79’s picture

Version: 7.x-2.x-dev » 8.x-1.x-dev
Category: Support request » Feature request

Looks like the effort is going now into 8x. so lets try there :)

perohu’s picture

Thx for patch #6! Last lines failed, but I figured out what they should have done :) It's working.

platinum1’s picture

@perohu Maybe you could share the correct patch, so this could be incorporated in the D8 version.

perohu’s picture

@platinum1 Sorry, but I don't know how to create a patch file.
Now i asked my friend, Google, and I found out that I can create one with the command "diff". Give me a little time, i will try to create the patch file very soon.

perohu’s picture

@platinum1 Sorry, but I failed to create the patch, but I attached the modified version of the function which the patch failed to patch.

platinum1’s picture

@perohu Thank you for your effort!

spelcheck’s picture

This patch adds user pictures, and a few other things for 7.x. I didn't go so far as to modify schema and add admin options, but I'd appreciate testers if anybody is up for it.

https://www.drupal.org/node/2871261