Comments

alex.k’s picture

Status: Active » Fixed
StatusFileSize
new11.36 KB
new63.06 KB

Committed to CVS. This is off by default, controlled by a checkbox in /admin/user/relationships/settings.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

michaeldrupal’s picture

Status: Closed (fixed) » Active

Hi alex, how did you configured the content profile/ user profile? 'Cause I tried the same but it doesn't work out for me. any advice?

alex.k’s picture

This feature doesn't use content profile or profile.module. It's the standard drupal user picture that gets shown.

drupalmind’s picture

Title: Add user pictures to My relationships page » Add user pictures to My relationships block.....

Add user pictures to My relationships block it works only on my relationship pages, how it will also work my relationship block ...could u have any track???

venusrising’s picture

Has anyone figured how to do this yet so it can be added to a panel.

nimzie’s picture

I used some theming tricks to do this. basically, I added the UID to the view, then in a theme override file for the field, I use that UID to load information, get the picture and display it through imagecache.
Effective and an excellent trick for getting things done if you want to have a manual handle on your code.
[code]

  $fanuser = user_load ( array( 'uid' => $view->result[$id - 1]->users_user_relationships_uid ));
  if ( empty ( $fanuser->picture )):
    //set a default picture if it's empty
    $fanuser->picture = 'files/blank_profile_pic.jpg';
  endif;
  $avatar = theme( 'imagecache', 'image_teaser', $fanuser->picture ); 
  print l($avatar, 'user/'. $view->result[$id - 1]->users_user_relationships_uid , array( 'html' => 'true' , 'attributes' => array('alt' => $node->title, 'title' => $node->title )));

[/code]

ajayg’s picture

@nimzie
are you saying that for each UID in the list, you are using user_load? Isn't user_load very expensive from load perspective? There may be simpler/less expensive ways to get user pictures?

nimzie’s picture

@ajayg - I'm sure there is - but i'm not sure of the best way to do that. The user object is quite large, and I'm sure Drupal has to do some extensive work to build it. Any advice would be great, thanks.

ajayg’s picture

OG (organic groups) module handles pictures of group members using view and view has builtin field to display pictures in block. So I am hoping some code there could be leveraged or the view reused/repurposed.

alex.k’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sotiris’s picture

Hi there and sorry for opening this again,
In order to show user pictures in User Relationships: friends block, can we use code from #7 to achieve this?
And as ajayg said, do we have any other solution more efficient than using user_load?

sotiris’s picture

Status: Closed (fixed) » Active
haopei’s picture

Hey alex,

Are you saying there is currently no way to display a user's picture from a content_profile instead of the default user image?

alex.k’s picture

Status: Active » Fixed

Why, you can show pictures from content_profile if you build the block in Views. It's more of a content_profile question than a UR one.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.