2016-11-02, 03:31 PM
I want to display the members avatar in the header as shown in the photo1 below.
I have it working properly with the following code inserted into the top of the [header_welcomeblock_member] template as long as the member has uploaded his own avatar instead of using the default avatar.
If the member is still using the default avatar it isn't displayed as you can see in photo2. What can I do to get the default avatar to display in the header when an the member hasn't uploaded a custom avatar? - Thanks!
Photo1:
Photo2:
I have it working properly with the following code inserted into the top of the [header_welcomeblock_member] template as long as the member has uploaded his own avatar instead of using the default avatar.
<a href="usercp.php?action=avatar" title="click"><img src="{$mybb->user['avatar']}" id="headeravatar"></a><span class="welcome">{$lang->welcome_back} <a href="{$mybb->settings['bburl']}/member.php?action=logout&logoutkey={$mybb->user['logoutkey']}"><span id="logbutton">{$lang->welcome_logout}</span></a>
</div><span class="smalltext">Click to change avatar</span>
If the member is still using the default avatar it isn't displayed as you can see in photo2. What can I do to get the default avatar to display in the header when an the member hasn't uploaded a custom avatar? - Thanks!
Photo1:
Photo2: