I was just wondering, is there a way to add the user picture to the profile page, so that it looks like it does when you click on My Account in drupal and see your profile and image?

Thanks,
Becky

Comments

manoloka’s picture

Go to /admin/user/settings scroll down and enable pictures

beckyjohnson’s picture

I did but that didn't make them show up on the actual profile page. for example here is a profile page but no pic: http://www.wimaxforum.org/about/profiles/paul-senior

CinemaSaville’s picture

subscribing.

chalu’s picture

I am very interested in this thread, please I'd like to know if anyone has found a solution this this issue ??
Thanks

jamesmcd’s picture

Also interested. Anyone solved this yet?

roball’s picture

Title: How to add the user account picture into the corresponding profile content node » Is there a way to add the user pictures to the profile content page?

Yes, I solved that as follows:

01. Look if your theme (or parent theme) ships a "node.tpl.php" file. If not, copy it from Drupal's core modules/node directory into your theme directory. Rename it to "node-profile.tpl.php".

02. Below the line

<?php print $picture ?>

insert

<?php
if (arg(0) == 'node' && ! empty($node->picture)) {
  $picture_url = base_path() . $node->picture;
  $picture_alt = 'User\'s picture';
  print '<span class="picture">' . "\n" . '<img src="' . $picture_url . '" alt="' . $picture_alt . '" title="' . $picture_alt . '" />' . "\n" . '</span>';
}
?>

03. Flush the caches

roball’s picture

Title: Is there a way to add the user pictures to the profile content page? » How to add the user account picture into the corresponding profile content node
Version: 6.x-1.0-beta3 » 6.x-1.0-beta4
beckyjohnson’s picture

Oh wow! Thanks so much! How did you figure this out?
Becky

roball’s picture

I've just compared the result of print_r($node) written into node.tpl.php, on both user/[UID] and node/[NID] profiles. This showed me that $node->picture was available to both. Then applied a filter so just node/[NID] would be affected.

Happy that I could help out!

Liliplanet’s picture

That is absolutely fabulous, thank you!

Is there any way that we can have the profile picture click back to the user profile please?

kevinquillen’s picture

Is there a way to have a CCK imagefield point to the user picture, so that when a user updates their account picture, its synced with the profile node?

This is important if you have a site that makes use of public profiles, and user account data.

goose2000’s picture

Great, funny that print $picture use to work just fine within my .tpl file. Then it stopped for some (update) reason. Thank you. I'm also trying to have the core image show on a view, teaser list of content-profile types.

How can we get this to work in views?

goose2000’s picture

Duh, I just took out a condition:

if ($node->type == $my_node_type && !empty($node->picture)) {

}

Sorry.