Fierro dell'avatar a livello di fiducia

Questo componente del tema permette a un amministratore di aggiungere un flair agli avatar degli utenti in base al loro livello di fiducia. Il flair del livello di fiducia viene visualizzato ovunque nel sito in cui normalmente si vede il flair del gruppo. Sono presenti alcune impostazioni del tema per regolare la posizione del flair rispetto all’avatar.

Esempi di base (con il flair del gruppo attivo)

Esiste anche una posizione in basso a destra che sostituirà il flair del gruppo o sarà sostituita da esso, a seconda di come imposti la voce “il flair del gruppo è sempre in primo piano”.

Configurazione principale

Utilizzo di immagini come flair

Dovrai aggiungere le tue immagini flair al componente del tema. Una buona dimensione è di circa 100×100 px. Quella utilizzata nell’esempio sopra è di 88×88 px. Puoi scaricare un’immagine modello trasparente qui per iniziare, se ti è utile:

Il modo più semplice per caricare un’immagine è creare un componente locale separato chiamato “Asset del Flair dell’Avatar del Livello di Fiducia” (istruzioni qui per chi non è familiare). Quando visualizzi il componente delle risorse, seleziona il pulsante + Aggiungi nella sezione Caricamenti del componente del tema e scegli il file dell’immagine flair. Ripeti l’operazione per ogni immagine flair che desideri includere. Una volta caricate le immagini, fai clic con il tasto destro sul link dell’immagine e copia l’URL. Infine, incolla l’URL nel campo del livello di fiducia di tua scelta.



Utilizzo di Font Awesome per il tuo flair

Puoi utilizzare le icone di Font Awesome invece di immagini caricate. Un elenco completo delle icone disponibili si trova qui. Tutto quello che devi fare è selezionare l’impostazione per utilizzare Font Awesome e poi aggiungere il nome dell’icona nel campo dell’immagine flair corrispondente:

NOTA IMPORTANTE: Attualmente non è possibile mescolare Font Awesome e immagini; se c’è un forte interesse a farlo, potrò valutare la possibilità di implementarlo.

Impostazioni

Troverai diverse impostazioni disponibili all’interno di questo componente del tema. Hanno descrizioni che spiegano cosa fanno e come utilizzarle, ma se qualcuno ha suggerimenti su come migliorarle per renderle più chiare, fammelo sapere!

Passando il mouse sopra il flair dell’avatar del livello di fiducia verrà visualizzato il nome del livello di fiducia. Se desideri modificare il nome del livello di fiducia, puoi andare su Admin > Personalizza > Testo e cercare quanto segue per cambiare i nomi:

  • js.trust_levels.names.newuser
  • js.trust_levels.names.basic
  • js.trust_levels.names.member
  • js.trust_levels.names.regular
  • js.trust_levels.names.leader

Sentiti libero di pubblicare se hai domande, problemi o suggerimenti!

60 Mi Piace

Is there any chance of this eventually supporting group flair?

2 Mi Piace

I’d like this particular component to remain focused on trust-level, but that doesn’t mean I’m not open to exploring something similar for group flair.

I looked back at your original request.

I’ll need to look into how doable this is with a theme component. I suspect that accessing the full list of groups a user belongs to would require a plugin that adds that info to the appropriate serializer, but I could be wrong. I will let you know if/when I have good news. I have a pretty full plate at the moment, so it could be a while before I have an update.

6 Mi Piace

That’s very kind of you. I’m not familiar enough yet to know what can be done with themes vs plugins.

wow, i love it, i’m using it only for my trust level 4 leaders.

i have so many groups, and they all have different flairs, and so many colored name tags, that this is nice so the community and the new users know who are the leaders and the mods and are there to help them out

2 Mi Piace

Taylor

Whats the chances an admin option, or user option could be added to remove this per individual request?

If that’s a bit much to ask could you provide the css to add that might remove for an individual?

Thank you :slightly_smiling_face:

1 Mi Piace

A new setting for users or admins is a bit more than I am interested in adding at this time, but I have just pushed a update that will add a new class to the trust level avatar flair element so you can target a specific user. Replace USERNAME with the username of the relevant user to hide the flair from their avatar:

tl-flair-USERNAME {
    display: none !important;
}
5 Mi Piace

:warning: IMPORTANT: if you had previously uploaded flair image files directly to this component you will need to re-upload your flair images to a separate component before updating. Please see below.

I’ve just pushed a small update and edited the OP of this topic. Adding the icon assets directly to this component is no longer supported. When a remote theme component is updated all of the manually uploaded assets are deleted as it tries to sync with the remote GitHub repository. This can create a confusing/annoying situation for admins so we now block adding uploads to remote themes altogether.

The new reccomendaation is as follows:

Please let me know if you have any question or trouble figuring out the new setup.

3 Mi Piace

Hi @tshenry and thanks for all the work :slightly_smiling_face:
I need for my forum to display a second flair (I already have the primararly displayed group) from a second group.
This Trust-Level Avatar Flair theme component would be perfect, I just need it to be able to display 10 groups (levels of access of my Discourse).

I read you were opened to that idea in 2018, do you still think it is possible ? :slightly_smiling_face:

2 Mi Piace

I’m currently using this:

2 Mi Piace

Yes, I thought so and I tried but the badges with this component are so small they are hard to see…
I trully wish we could use flairs and avatars with second groups :slightly_smiling_face:

3 Mi Piace

Sadly, I don’t think it is possible with a theme component at the moment. I don’t believe we serialize the required group data in all three of of the avatar flair contexts, only the primary group. At this point I think it would need to be done as a plugin. Unfortunately, I don’t have the bandwidth to work on something like that at the moment. You could always try the marketplace if you need someone to help you build a solution for your site.

3 Mi Piace

Is it possible to use this feature but have different trust flairs ONLY if someone ALSO belongs to a particular group?

Example: I want flair for people in one group and not another.

Ciao Taylor,

Grazie per questo TC. Ho notato questo avviso di deprecazione che potrebbe causare problemi dopo l’aggiornamento a Ember CLI. Ti sarei grato se potessi risolverlo. Grazie :slightly_smiling_face:

Screenshot 2021-11-08 at 23.06.17

3 Mi Piace

Grazie per l’avviso! Dovresti essere a posto una volta aggiornato il componente:

3 Mi Piace

Può essere disabilitato per i membri dello staff?

1 Mi Piace

I livelli di fiducia degli utenti vengono ora visualizzati nell’angolo in basso a sinistra di un post dell’utente anziché essere inclusi nel distintivo della foto/avatar dell’utente.

Qualcuno sta riscontrando lo stesso problema?

1 Mi Piace

Ciao Alan :wave:

Stai parlando di questo componente del tema?

2 Mi Piace

È quello giusto @ondrej

Invece di essere posizionato all’interno dell’immagine, è posizionato in basso a sinistra.

Quindi dove ho cerchiato sopra.

1 Mi Piace

Ciao @Arduous! :wave:

Sono contento che @ondrej abbia individuato il componente interessato. :tada:

Hai controllato la console web per vedere se ci sono errori sul sito? È possibile condividere un link al sito interessato che potremmo esaminare? :slight_smile:

3 Mi Piace