48
Ok, I have edited the original function to create this:
(as a note, I didn't replace the original function, it is still there, I copied it, and then edited the copy in order to create a new function)
function xoops_getLinkedUserAvatarFromId($userid)
{
$userid = intval($userid);
if ($userid > 0) {
$member_handler =& xoops_gethandler('member');
$user =& $member_handler->getUser($userid);
if (is_object($user)) {
$linkedavatar = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$userid.'">'.'<img src="'.XOOPS_URL.'/uploads/'.$user->getVar('user_avatar').'">'.'</a>';
return $linkedavatar;
}
}
return $GLOBALS['xoopsConfig']['anonymous'];
}
That's where I'm at right now. I don't know where to go from there. Can anyone help me with this?
My goal is then to be able to put
<{linkedavatar}>
in whatever template you want the users avatars to appear in.