Nisutec
(Niclas)
December 5, 2019, 5:43am
1
Hallo,
Is it possible to change the staff Icon from Admins and Mods to an other icon ?
2 Likes
Nisutec
(Niclas)
December 5, 2019, 6:51am
3
Thanks for this information but i will change the shield icon behind the username of an staff member.
2 Likes
Full30
(Robert)
December 5, 2019, 12:51pm
4
If this is what you want changed, icon by the username
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
Nisutec
(Niclas)
December 6, 2019, 6:12am
5
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
Full30
(Robert)
December 6, 2019, 2:25pm
6
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
Canapin
(Coin-coin le Canapin)
December 6, 2019, 2:54pm
7
Not sure if that can help, but maybe you can have a look at this:
As of Discourse 2.3.0.beta6 (and thanks to @pmusaraj ) you can now add custom SVG icons and override the defaults within a theme. You can replace a single icon, or the entire set. Here’s how:
Create an SVG Spritesheet
To get started, you must combine your SVG icons into a single spritesheet. If you have a few icons it’s easy enough to do this manually. If you have many icons, there are ways to automate this. If you’re not already familiar with some of the Grunt tools to combine SVGs, the simple…
We will shortly merge into master a branch that upgrades Discourse to Font Awesome 5.5.0 (the free version) and switches to using SVG icons instead of an icon font. This is a substantial change, with lots of benefits, and one significant change for developers.
Here is a quick rundown of the changes:
using SVG icons will provide crisper icons, better for accessibility and easier to customize, see this Github article for more details
since the Font Awesome icon set has grown to 1300+ icons in v…
3 Likes
Nisutec
(Niclas)
December 6, 2019, 6:43pm
8
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
2 Likes
Nisutec
(Niclas)
December 6, 2019, 9:29pm
9
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
Canapin
(Coin-coin le Canapin)
December 6, 2019, 9:45pm
10
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:
As of Discourse 2.3.0.beta6 (and thanks to @pmusaraj ) you can now add custom SVG icons and override the defaults within a theme. You can replace a single icon, or the entire set. Here’s how:
Create an SVG Spritesheet
To get started, you must combine your SVG icons into a single spritesheet. If you have a few icons it’s easy enough to do this manually. If you have many icons, there are ways to automate this. If you’re not already familiar with some of the Grunt tools to combine SVGs, the simple…
3 Likes
system
(system)
Closed
January 6, 2020, 9:31am
12
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.