MyBB Community Forums

Full Version: Avatar shown in the Panel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can someone help me? How can I make the user's avatar show in the panel?

Like this

http://img202.imageshack.us/img202/4812/44076565.png

Here is my header_welcomeblock_member

<span style="float:right;">{$lang->welcome_current_time}</span>
        {$lang->welcome_back} (<a href="{$mybb->settings['bburl']}/usercp.php"><strong>{$lang->welcome_usercp}</strong></a>{$modcplink}{$admincplink} &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a>)<br />
                <span class="links">
                    <b><a href="{$mybb->settings['bburl']}/newpoints.php">NewPoints</a></b> | 
                    <a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', 'buddyList', 350, 350);">{$lang->welcome_open_buddy_list}</a>
                </span>
                <a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a> | <a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a> | <a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}  |  <b><A HREF="javascript:popUp('http://www.thehdforums.co.cc/extras/uploader.html')">Image Uploader</A></b>  |  <b><A HREF="javascript:popUp2('http://www.pixlr.com/editor/')">Pixlr</A></b>

I want the user's avatar image itself to show on the left of the Welcome, Username Here parts in the panel
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img src="{$mybb->settings['bburl']}/{$mybb->user['avatar']}" class="avatar" align="left" alt="Avatar" /></a>
<span style="float:right;">{$lang->welcome_current_time}</span>
        {$lang->welcome_back} (<a href="{$mybb->settings['bburl']}/usercp.php"><strong>{$lang->welcome_usercp}</strong></a>{$modcplink}{$admincplink} &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a>)<br />
                <span class="links">
                    <b><a href="{$mybb->settings['bburl']}/newpoints.php">NewPoints</a></b> | 
                    <a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', 'buddyList', 350, 350);">{$lang->welcome_open_buddy_list}</a>
                </span>
                <a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a> | <a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a> | <a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}  |  <b><A HREF="javascript:popUp('http://www.thehdforums.co.cc/extras/uploader.html')">Image Uploader</A></b>  |  <b><A HREF="javascript:popUp2('http://www.pixlr.com/editor/')">Pixlr</A></b>

Srsly its not working. It only shows a link to the avatar settings, not the avatar itself
(2010-09-29, 05:13 AM)E-Hero Kyle Wrote: [ -> ]Srsly its not working. It only shows a link to the avatar settings, not the avatar itself

Does the link say "Avatar"?
have you tried this code?
<div class="float_left"><img src="{$mybb->user['avatar']}"></div>
(2010-09-29, 05:15 AM)Damion Wrote: [ -> ]
(2010-09-29, 05:13 AM)E-Hero Kyle Wrote: [ -> ]Srsly its not working. It only shows a link to the avatar settings, not the avatar itself

Does the link say "Avatar"?

Yes

(2010-09-29, 05:41 AM)Anurag Wrote: [ -> ]have you tried this code?
<div class="float_left"><img src="{$mybb->user['avatar']}"></div>

Yah, but what part or where will I add it?
in header template, inside the id panel division.
I did it now but the avatar is too big and it messes the panel
you can fix the avatar size then, with this:

<div class="float_left"><img src="{$mybb->user['avatar']}" width="60px" height="60px"></div>

you can change the values to fix it to the panel properly.