Hey everyone
I've used the code below to place the content profile pictures in posts, basically overridng the core user pictures and replacing them with the content profile pictures. The code works perfectly but I would like the pictures to link back to the users profile. Currently the profile is at profile/username. I'm new to coding, so if anyone can help to add to the code, it would really be appreciated.
Thanks
Rick
<?php
$pict = $content_profile->get_variable('profile', 'field_profilepic');
$title = $content_profile->get_variable('profile', 'title');
if (is_array($pict[0])) {
print theme('imagecache','minipost', "user_pictures/user".check_plain($account->uid)."/".$pict[0]['filename'], $title, $title);
}
else {
print theme('imagecache','minipost', "sites/default/files/nobody1.jpg", $title, $title);
}
?>
Comments
Comment #1
rickh commented