Nisutec
(Niclas)
5 Diciembre, 2019 05:43
1
Hola,
¿Es posible cambiar el icono del personal de Admins y Mods por otro icono?
Echa un vistazo a este tema:
Custom descriptions for automatic groups (admin/moderator/trust levels) will be available soon along with a new groups directory design.
I don’t think there’s a reason to not have flair for those groups, there’s just a bit of a complication where flair is currently used to show a user’s primary group, and automatic groups can’t be set as primary groups… so it’s a little more complicated than it seems on the surface.
There’s some related discussion about this here: Avatar Flair Image for Staff…
Nisutec
(Niclas)
5 Diciembre, 2019 06:51
3
Gracias por esta información, pero cambiaré el ícono del escudo detrás del nombre de usuario de un miembro del personal.
Si esto es lo que deseas cambiar, el icono junto al nombre de usuario
Agrega esto al encabezado común
<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('shield-alt', 'terminal');
</script>
“terminal” es lo que yo elegí; reemplázalo con tu propia elección.
También agrega lo que hayas elegido al “subconjunto de iconos SVG” en tu panel de administración.
Si te pierdes, probablemente solo tengas que buscar “subconjunto de iconos SVG” aquí.
Nisutec
(Niclas)
6 Diciembre, 2019 06:12
5
He agregado el siguiente código al encabezado
Pero ahora el icono del escudo está oculto. ¿Cómo puedo usar otro icono de FA?
¿Es posible agregar iconos FA Pro al “subconjunto de iconos SVG”?
No lo sé, definitivamente tendrías que suscribirte/pagar y probablemente necesites modificar el script para adaptarlo a eso.
Quizás debas contactarlos y preguntar. Por favor, informa tus hallazgos. No estoy seguro de que valga la pena los 99 dólares al año, pero si suficiente gente lo solicita, tal vez Discourse pueda obtener/agregar una licencia.
Mientras tanto, puedes usar los gratuitos.
Canapin
(Coin-coin le Canapin)
6 Diciembre, 2019 14:54
7
No estoy seguro de si eso puede ayudar, pero tal vez puedas echar un vistazo a esto:
You can replace a Discourse’s default SVG icons individually or as a whole with your own custom SVG and override them within a theme or theme component.
Step 1 - Create an SVG Spritesheet
To get started, you must create an SVG Spritesheet. This can contain anything from a single additional custom SVG icon up to an entire replacement set of hundreds.
The spritesheet should be saved as an SVG file. In principle, you are nesting the <svg> tag contents from the original SVG icon file into <symbol> …
See also: We're upgrading our icons to Font Awesome 6!
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…
Nisutec
(Niclas)
6 Diciembre, 2019 18:43
8
Bien, la primera línea de mi encabezado es para la posibilidad de usar todos los iconos de FA. Pero en este momento, la API probablemente no pueda acceder a ellos.
Voy a intentar hacer una solicitud de función para eso.
Gracias a todos por su ayuda
Nisutec
(Niclas)
6 Diciembre, 2019 21:29
9
¿Cómo puedo usar un archivo SVG personalizado como icono?
He subido el archivo SVG en Dark Design.
Y tengo el siguiente encabezado personalizado
<script type="text/discourse-plugin" version="0.8">
api.replaceIcon('shield-alt', '$shield-alt-duotone');
</script>
Pero el icono no es visible.
Canapin
(Coin-coin le Canapin)
6 Diciembre, 2019 21:45
10
No es así como funciona. $shield-alt-duotone es una variable diseñada para usarse en tu CSS personalizado. El primer tema que enlacé anteriormente explica cómo reemplazar los iconos con otros nuevos utilizando un archivo SVG:
You can replace a Discourse’s default SVG icons individually or as a whole with your own custom SVG and override them within a theme or theme component.
Step 1 - Create an SVG Spritesheet
To get started, you must create an SVG Spritesheet. This can contain anything from a single additional custom SVG icon up to an entire replacement set of hundreds.
The spritesheet should be saved as an SVG file. In principle, you are nesting the <svg> tag contents from the original SVG icon file into <symbol> …