Custom Icons for admins and moderators (and other groups)

Ok, I have spent 12 hours straight trying to figure this out and I am about to lose my mind. I’ve read dozens of posts here, and nothing works.

I want to assign icons to specific groups (mod and admin included) and have an icon I chose display next to the name, just like the default “shield-halved” does for mods and admins. Like this:

I tried this:

Doesn’t work. Tried everything, but even if it did work it looks like it places them outside of the original spot.

There HAS to be a way to change the admin and mod icons and assign icons to groups I make, and have them display next to the name.

Does anyone know how to accomplish this? I’m mentally exhausted and coffee doesn’t even work any more lol

Trying to get this wrapped so we can launch this.

You should be able to adapt the methods in Make staff users more recognizable with customized avatars, posts, and mentions by using the group-GroupName class present on grouped members’ usernames in posts for non-staff.

Yeah, saw that. Can’t figure out how to replace the icon as well as add to other groups.

we are also interested in doing this. basically, have small images next to specific user groups.

1 like

I may not be clear on exactly what you want, but it sounds like some combination of:

  1. Manually assign badges:
    Grant a badge to individual users manually
    Includes the steps for creating a new badge and optionally uploading a custom icon.

  2. Automatically grant badges to groups:
    Creating triggered custom badge queries

  3. Show author badges on every post:
    Post Badges

  4. Change default admin & mod icons:
    Replace Discourse’s default SVG icons with custom icons in a theme

(Anyone just getting started with this should probably begin at Understanding and using badges)

2 likes

I just want to assign an icon to certain groups to display next to the users name, like admins and mods (and also change the icons for admins and mods). So it’s like this on the user profile and next to their names on all posts:

All of this should be doable, but it’s not out of the box.

You say:

But you don’t show us what you tried or what the result is?

Have you tried the steps that Toddz lined out?

Say, by “change icons for admins and mods”, do you happen to mean just the color change you’re showing? Because that’s just a CSS thing. Simple if you’re locked into one theme & color scheme; a bit trickier if you offer multiple themes and light/dark mode.

image

1 like

I think the request is more about other groups having an icon like moderators have on posts.

While I can still imagine that using post badges and an sql-triggered-bade can result in something similar, I think this is not really what @long wants, because badges on posts still don’t show for example on usercards

3 places where this is discussed make it a little difficult to keep track of what has already been clarified and suggested

1 like

Yes, definitely multiple requests embedded here.

  • assign badges to user groups
  • display badges on posts
  • display badges on profile pages
  • display badges on profile cards
  • change badge icon for admin/mods

It just occured to me that the last one might be easy depending on what “change” means.

2 likes

This may have been covered in one of the other topics (or you may have already dismissed the idea), but just in case you’ve not come across it yet the inbuilt ‘mark someone as a member of a group’ is by adding a flair to the avatar. You can see it here on meta for a few groups, including @team.

This doesn’t require any extra customising, so may be an easier option? There’s more info in this topic:

1 like

Yeah, not interested in the flair. Just don’t look great. I’m stubborn and determined to make the other option work lol

1 like

I mean change the actual icon on admin and mod. The color change I did via css. We only have a dark mode theme, not the ability to switch back and forth.

In simpler terms, just want to swap out the admin/mid icons to different ones….and have the abilirty to assign icons to other groups cereated, and place them in that same location next to profile names and have them display in the same areas that the admin/mod icons currently display – posts, profiles, profile cards, etc.

Ah, ok - didn’t know if your example used CSS or was a mockup.

1 like

Yeah, used css to change them. Now determined to figure this out. I’m stubborn lol