2015-08-18, 05:06 AM
I would like anyone who is logged in to my forums to see their avatar at the user menu. http://puu.sh/jFqxi/b62775dde0.jpg I also want the avatar to link to the person's profile. How would I go about doing this?
<span style="text-align:left;"><a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: top; margin-top: 5px;" src="{$mybb->user['avatar']} /images/default_avatar.png" height="40" width="40"></a></span>
(2015-08-18, 06:25 AM)ArneVD Wrote: [ -> ]Add this code wherever you want;
<span style="text-align:left;"><a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: top; margin-top: 5px;" src="{$mybb->user['avatar']} /images/default_avatar.png" height="40" width="40"></a></span>
You must edit the code to let it work properly, because this one is the default code from the Square Theme.
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar">
(2015-08-18, 08:49 AM)Scumbag Lemon Wrote: [ -> ](2015-08-18, 06:25 AM)ArneVD Wrote: [ -> ]Add this code wherever you want;
<span style="text-align:left;"><a href="{$mybb->settings['bburl']}/usercp.php?action=avatar"><img class="panelavatar" style="vertical-align: top; margin-top: 5px;" src="{$mybb->user['avatar']} /images/default_avatar.png" height="40" width="40"></a></span>
You must edit the code to let it work properly, because this one is the default code from the Square Theme.
This worked! http://puu.sh/jFzlU/98f2c10af3.jpg Thank you very much I just have one more question. Would you happen to know the code that will link the person clicking it to their own profile?
It would be replacing this:
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar">
(2015-08-18, 09:23 AM)ArneVD Wrote: [ -> ]No problem and yes, thats the code where you are brought to when you click on the avatar.
-Arne.
(2015-08-19, 07:40 AM)ArneVD Wrote: [ -> ]Then just remove usercp.php?action=avatar and put your link in it.