Considering I don't like to bump pretty old threads, thought I'd make a new one. I've been focusing on getting the avatar to display properly in showgroups.php; it should also update as staff members change the avatar.
So far I've gotten pretty far, although I'm a bit stuck now. From my understanding, I can use the fetch_avatar_url() function as to fetch the current avatar url. As such, I did the following:
PHP Code:
# Require the user functions in includes
require_once('./includes/functions_user.php');
# Declare variable for global userid and username
$userid = $vbulletin->userinfo['userid'];
$uname = $vbulletin->userinfo['username'];
# Fetch the avatar URI
$avauri = fetch_avatar_url($userid);
# Using an if condition to check whether there is an uri available or not. If not, change uri to that of the 'No avatar' avatar.
if(!empty($avauri)) {
$dh_avauri = '<a href="member.php?'.$session[sessionurl].'u='.$userid.'"><img src="image.php?u='.$userid.'" width="120" height="120" border="0" alt="'.$uname.'\'s avatar"></a>';
} else {
$dh_avauri = '<a href="member.php?'.$session[sessionurl].'u='.$userid.'"><img src="$stylevar[imgdir_misc]/noavatar/noavatar.gif" width="120" height="120" border="0" alt="'.$uname.'\'s avatar"></a>';
}
And here in the template; used it only to test so the layout isn't as intended ATM (showgroups_usergroup):