The website is for sale. Check here for more information.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.
add avatar to menu area
is there a way to add a logged in users avatar to the area shown in the pic below

[Image: avatar_zps9a9ca829.png]
A list of logged in users there? Is that it?
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
no sorry...what I mean is I would like to have the whatever logged in members avatar show in the spot I boxed out in the pic above...SO the avatar would be next to the dropdown box and then the mail icon would be next to that
Please read the description of this forum:
Quote:Need help with PHP coding related to MyBB? We can help! We will NOT code anything for you. We will help you to achieve your goal (by providing examples or pointing you in the right direction).
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
ok fine nvm
Try this

Admin CP -> Templates & Style -> Templates -> *Template Set* -> Portal Templates -> portal_welcomeblock
Add this code where you want the avatar to be displayed.

<img src="{$mybb->user['avatar']}" alt="Avatar" width="50px" height="50px" />

Hope Pirata allow me to post it here Big Grin
thanks for the code although for me it was on the index I wanted it. The code does work Smile for reference for others mine was in header_welcomeblock_member

EDIT: after some playing around I was able to get it to work by adding a bit of css to make it look pretty Tongue

[Image: cool_zps127ea5ab.png]

If you just use the code above by itself its just gonna be a floating avatar lol....

Add this to end of Global.css
.panel {
background: #1f1b1b;
margin-right: 7px;
padding: 4px;
margin-top: 0px;
margin-bottom: 5px;
-moz-border-radius-bottomleft: 5px;
-moz-border-radius-bottomright: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
position: relative;
z-index: 99;

then place "Along's" code in div tags like this....(header_welcomeblock_member

<div class="left panel"><img src="{$mybb->user['avatar']}" alt="Avatar" width="50px" height="50px" /></div>

You can adjust the numbers and color above to better fit your theme.
yes zero5854 ...

by css u can edit the style by your own..

with the basic code its show the avatar and with the css it will styling the avatar like bordering and positioning.. its depend on our themes right. hehe

i use it at floating header .

btw nice share.
right and thats just what I needed was that code. thanks again
If the user does not have an avatar though it will display a broken image icon though, I tried an if statement but had no luck. Both the default avatar & user set avatar would should up. Did anyone deal with that?

  • View a Printable Version

Users browsing this thread: 1 Guest(s)

About MyBB-Plugins

Plug Yourself into the best MyBB AddOn.

Copyright © 2009-2021 MyBB-Plugins Forums.


  • 51,000+ Posts
  • 19,000+ Members
  • 3,600+ Threads

Impressed? For sure
Check Full Stats here