Hi guys!
So... on our site, we had an especifc content and we want to show an "avatar block" with users that already post that content.
I tried that with views, but the close I got was only show the users's names (I marked the "user photo" in fieds but it doesn't show)
Any idea?

Thanks!

Comments

dawehner’s picture

Component: Miscellaneous » user data
Assigned: cledman » Unassigned
Category: task » support
Status: Active » Postponed (maintainer needs more info)

No.

Because you lack of informations

1) How do the users uplod the photo, is it the default drupal photo, or content profile.
2) Are you sure the users, uploaded photos already? etc.

The default user:picture field, works.

cledman’s picture

thanks to answer..
so..

1) Its default drupal photo (The one they upload to their profile).
2) Yeah, all them have photos (we have a default picture if the person dont have one).

I can show the pictures of all users from the site, but not the ones who wrote that content.

dawehner’s picture

Status: Postponed (maintainer needs more info) » Fixed

Add an argument.

Select "provide default argument", there you select node: nid from url.
Then just add the user:picture, thats it.

cledman’s picture

i´m gonna try that today at night, and so, i´ll tell you.
thanks for a while

cledman’s picture

Dereine,
I can´t got the with views...
So, i tried that manually and so, I Got that!

this is what I did. Thanks for your help.

$limit = 20;
$result = db_query_range('SELECT users.uid AS users_uid,
   users.name AS username,
   users.picture AS picture,   
   COUNT(node.nid) AS num_records,
   RAND() AS _random
 FROM node node 
 INNER JOIN users users ON node.uid = users.uid
 WHERE (node.type in (\'evteam\')) AND (node.status <> 0)
 GROUP BY username, users_uid
  ORDER BY _random ASC
', 0, $limit);
while ($account = db_fetch_object($result))
  {
    if ($account->picture)
      {
        $realname = theme('username', $account, array('plain' => TRUE));
        $output .= '<a href="' . url("user/" . $users_uid) . $account->users_uid .'"><img src="/sites/default/files/imagecache/comentarios/'.$account->picture.'" title="'. $realname .'" alt="'. $realname .'"></a>';
      }
    else if (!$account->picture) { $output .= ''; }
  }
return $output;

Status: Fixed » Closed (fixed)

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