How i can change the Staff Icon

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

2 Likes

Check out this topic:

2 Likes

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

2 Likes

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

9 Likes

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”.

2 Likes

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

https://fontawesome.com/support

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

https://fontawesome.com/icons?d=gallery&m=free

1 Like

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

3 Likes

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:

2 Likes

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.

2 Likes

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:

3 Likes

Ok it works thank you.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.