Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
manoloka CreditAttribution: manoloka commentedGo to /admin/user/settings scroll down and enable pictures
Comment #2
beckyjohnson CreditAttribution: beckyjohnson commentedI 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
Comment #3
CinemaSaville CreditAttribution: CinemaSaville commentedsubscribing.
Comment #4
chalu CreditAttribution: chalu commentedI am very interested in this thread, please I'd like to know if anyone has found a solution this this issue ??
Thanks
Comment #5
jamesmcd CreditAttribution: jamesmcd commentedAlso interested. Anyone solved this yet?
Comment #6
roball CreditAttribution: roball commentedYes, 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
insert
03. Flush the caches
Comment #7
roball CreditAttribution: roball commentedComment #8
beckyjohnson CreditAttribution: beckyjohnson commentedOh wow! Thanks so much! How did you figure this out?
Becky
Comment #9
roball CreditAttribution: roball commentedI'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!
Comment #10
Liliplanet CreditAttribution: Liliplanet commentedThat is absolutely fabulous, thank you!
Is there any way that we can have the profile picture click back to the user profile please?
Comment #11
kevinquillen CreditAttribution: kevinquillen commentedIs 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.
Comment #12
goose2000 CreditAttribution: goose2000 commentedGreat, 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?
Comment #13
goose2000 CreditAttribution: goose2000 commentedDuh, I just took out a condition:
if ($node->type == $my_node_type && !empty($node->picture)) {
}
Sorry.