How to use an image for your username on MyBB

Ghost

Seasoned Veteran
Joined
Jun 25, 2009
Messages
3,585
Reaction score
348
FP$
3,264
Written and utilized by me on my site 🙂 Here is a screenshot if you don't want to visit my site to check it out:
cooluser.png



Admin CP > Users & Groups > Administrators > Username Style
Use this code for the username style:
Code:
<img src="http://yoursite.com/{username}.png" alt="Username"/>

MyBB forces you to have {username} in the style so simply make your image that you want as your username named 'yourusername.png'. The alt should be your username so if the image doesn't load for someone, it will just show your name as usual.

By being forced to use {username}.png it also helps us out in a way. As I currently use this trick to display only my name and I am the only admin, I just changed the administrator's Username Style. However, if you have more than one administrator this can make things difficult, but also easier. Here's how...
Simply replicate the same method above, but for your other admin(s) and make the file name otheradminsusername.png.
It will now show your other admin(s) cool new image for their username too!

If you do not want to create an image for the other admin(s) then you may have to create a new group for yourself in MyBB Admin CP.
 
That's a pretty cool trick! Thanks for sharing!

I wonder if it works on other hosts? :O
 
Thanks and yes it should! However, some of the code may have to be changed.
For example the {username} may be something else.
 
Could possibly allow for pretty fancy username images, good job with that.
 
I never like any decoration for usernames. That is not necessary and .. blah blah blah 🙂
 
Back
Top Bottom