How i can change the Staff Icon

AI-generated summary

The discussion revolves around changing the Staff Icon in Discourse. Nisutec wants to replace the default shield icon behind staff usernames with a custom icon. anon48433008 provides a script to replace the shield icon with a Font Awesome (FA) icon. However, Nisutec encounters issues with hiding the shield icon and using a custom FA icon.

anon48433008 suggests that adding FA Pro Icons to the “svg icon subset” might require a subscription and script changes. Canapin shares links to meta topics on customizing icons in Discourse. Nisutec decides to make a feature request to use all FA Icons.

Nisutec then tries to use a custom SVG file as an icon but encounters issues. Canapin clarifies that Nisutec is using the incorrect method and provides a link to a topic explaining how to replace icons with custom SVG files. Ultimately, Nisutec succeeds in changing the Staff Icon with the help of the community.

Hallo,
Is it possible to change the staff Icon from Admins and Mods to an other icon ?

Check out this topic:

Thanks for this information but i will change the shield icon behind the username of an staff member.

If this is what you want changed, icon by the username

image

Add this to the common header

<script type="text/discourse-plugin" version="0.8">
  api.replaceIcon('shield-alt', 'terminal');
</script>

“terminal” is what I chose you replace that with your choice

And also add whatever you chose to the “svg icon subset” in your admin panel

if you get lost likely just search “svg icon subset” here

I have added the following code to the header


But now the shield Icon is hidden how i can use a other FA Icon ?

Is it possible to add FA Pro Icons to the “svg icon subset”.

IDK, certainly you’d need to subscribe/pay & likely need to change the script to accommodate having done that

maybe contact them and ask, please report your findings, not sure its worth the $99 a year but if enough people ask for it maybe Discourse can obtain/add a license ?

until then you can use the free ones

Not sure if that can help, but maybe you can have a look at this:

Ok the first line of my header is for the possibility to use all FA Icons. But at the moment the api probably can’t aceess it.
I will try to make a feature request for that.

thank you all for your help :+1:

How i can use a custome svg file as Icon
I have uploaded the svg file on the Dark Design.


And i have the following custome header

<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('shield-alt', '$shield-alt-duotone');
</script>

But the Icon is not visible.

This it not how it works. $shield-alt-duotone is a variable meant to be used in your custom CSS. The first topic I linked earlier explains how to replace icons with new ones with an SVG file:

Ok it works thank you.