I am trying to show the user's current avatar in the forum header (version 3.7). I used this code in my vB 3.6 setup, which displays the users' current avatar, or the default avatar if they do not have one or aren't logged in.
HTML Code:
<if condition="$vbulletin->userinfo['avatarid']">
<img src="$bbuserinfo[avatarpath]" alt="$bbuserinfo[username]'s Avatar" border="0" width="64" height="64" />
<else />
<if condition="$vbulletin->userinfo['hascustomavatar']">
<if condition="$vbulletin->options['usefileavatar']">
<a href="profile.php?do=editavatar"><img src="$vboptions[avatarurl]/avatar$bbuserinfo[userid]_$bbuserinfo[avatarrevision].gif" title="$bbuserinfo[username]'s Avatar" alt="Avatar" border="0" width="64" height="64" /></a>
<else />
<a href="profile.php?do=editavatar"><img src="image.php?u=$bbuserinfo[userid]&dateline=$avatar[dateline]" title="$bbuserinfo[username]'s Avatar" alt="Avatar" border="0" width="64" height="64" /></a>
</if>
<else />
<a href="profile.php?do=editavatar"><img src="$stylevar[imgdir_misc]/noavatar.gif" alt="guestavatar.gif" title="No Avatar Specified" border="0" width="64" height="64" /></a>
</if>
</if>
The above code works in determining if someone has a custom avatar or not, but does not return the img src for the avatar - while it did in vB 3.6
Any help on fetching the users current avatar in the header template?
Thanks,
Freek