MyBB Community Forums

Full Version: CSS User Badges
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I got it working, turns out my postbit was too small to display Administrators. Bumped it up a bit and it works fine now. Smile
Note: Make sure that the classes match your usergroup names. For example if your Administrators group is named "Admins", you'll change .Administrators to .Admins in the above CSS.


I've been using something similar to your suggestion for quite a while but will different approach - you can replace {$usergroup['title']} with group_{$usergroup['gid']} (under class) and instead of defining group names in global.css and changing them according to their names you can just add

.group_x in css (where is is group id)

.group_1 {
// Group styling 1 goes here

.group_2 {
// Group styling 2 goes here

.group_3 {
// Group styling 3 goes here
Oh, thanks a bunch Johnny. Big Grin I didn't see it mentioned here:

but it definitely should be. Though I like to think the ones I used are a little more semantic. xD
There a lot undocumented variables, you can use this code to dump all variables, you'll find some interesting stuff.
How to add your own icons?
demo link is dead Sad gives me 404 not found could some 1 putt new demo page with all of the difirent buttons on?
Updated the first post with a new demo link, sorry about that.

Edit: Updated the Font Awesome link.
My icons don't seem to show up, I've got the .administrator right and it matches my group name.


Also how do I make the badge a little smaller
It's likely a problem with Font Awesome being outdated. Also you can use the small class on the wrap to use smaller buttons. I plan on updating this at some point. Smile
How do you display the buttons in member profile and member list?
Pages: 1 2 3 4