Trust-Level Avatar Flair

This theme component allows an admin to add flair to user avatars based on the user’s trust level. Trust level flair displays anywhere on the site that you would normally see group flair. There are a few theme settings to adjust the position of the flair in relation to the avatar.

Basic Examples (with group flair in place)

There is also a bottom-right position that will either replace group flair or be replaced by group flair depending on how you set the “group flair always on top” setting.

Main setup

Using images as flair

You will need to add your own flair images to the theme component. A good size is around 100×100px. The one I used in the example above is 88×88px. You can download a transparent template image here to get started if that’s helpful:

The easiest way to upload an image is to create a separate “Trust Level Avatar Flair Assets” local component (instructions here for those unfamiliar). When viewing the assets component, select the + Add button under the Uploads section of the theme component and choose your flair image file. Repeat this for each flair image you want to include. Once you have the images uploaded, right click on the image link and copy the url of the image. Finally, paste the url into the trust level field of your choice.



Using Font Awesome for your flair

You can use Font Awesome icons instead of using uploaded images. A full list of available icons can be found here. All you need to do is check the setting to use Font Awesome then add the name of the icon to the appropriate flair image field:

IMPORTANT NOTE: Currently you cannot mix Font Awesome and images, if there is a strong interest in doing so, I can look into it further.

Settings

You will find that there are several settings available within this theme component. They have descriptions explaining what they do and how to use them, but if anyone has an suggestions on how to improve them to make things more clear, please let me know!

Hovering over the trust-level avatar flair will display the name of the trust level. If you wish to change the name of the trust level, you can go to Admin > Customize > Text and search for the following to change the names:

  • 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

Please feel free to post if there are any questions, problems, or suggestions!

60개의 좋아요

Is there any chance of this eventually supporting group flair?

2개의 좋아요

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개의 좋아요

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개의 좋아요

Taylor

관리자 옵션이나 사용자 옵션을 통해 개별 요청 시 이를 제거할 수 있는 가능성이 있을까요?

그것이 다소 무리한 요청이라면, 개인을 위해 이를 제거할 수 있는 CSS를 제공해 주실 수 있을까요?

감사합니다 :slightly_smiling_face:

1개의 좋아요

사용자나 관리자용 새로운 설정은 당장 추가할 만큼 관심이 많지 않습니다. 하지만 방금 트러스트 레벨 아바타 플라이어 요소에 새로운 클래스를 추가하는 업데이트를 배포했습니다. 이를 통해 특정 사용자를 지정할 수 있습니다. 해당 사용자의 아바타에서 플라이어를 숨기려면 USERNAME을 관련 사용자의 사용자 이름으로 교체하세요:

tl-flair-USERNAME {
    display: none !important;
}
5개의 좋아요

:warning: 중요: 이전에 이 컴포넌트에 플레어 이미지 파일을 직접 업로드했다면, 업데이트 전에 플레어 이미지를 별도 컴포넌트에 다시 업로드해야 합니다. 아래 내용을 확인해 주세요.

방금 작은 업데이트를 적용하고 이 주제의 첫 게시글을 수정했습니다. 이제 이 컴포넌트에 아이콘 자산을 직접 추가하는 방식은 더 이상 지원되지 않습니다. 원격 테마 컴포넌트가 업데이트되면 원격 GitHub 저장소와 동기화하려는 과정에서 수동으로 업로드된 모든 자산이 삭제됩니다. 이는 관리자에게 혼란과 번거로움을 줄 수 있으므로, 이제 원격 테마에 업로드를 추가하는 것을 완전히 차단했습니다.

새로운 권장 사항은 다음과 같습니다:

새로운 설정에 대해 질문이 있거나 설정하는 데 어려움을 겪는 부분이 있다면 알려 주세요.

3개의 좋아요

@tshenry 안녕하세요, 그동안 수고 많으셨습니다 :slightly_smiling_face:
저는 포럼에서 이미 기본적으로 표시되는 그룹 외에 두 번째 그룹의 플레어를 추가로 표시해야 합니다.
이 Trust-Level Avatar Flair 테마 컴포넌트가 딱 맞을 것 같은데, 제 Discourse의 접근 권한 수준인 10개 그룹을 표시할 수 있도록 해 주시면 좋겠습니다.

2018년에 이 아이디어에 긍정적인 반응을 주셨던 것으로 기억하는데, 지금도 가능하다고 생각하시나요? :slightly_smiling_face:

2개의 좋아요

현재 이 것을 사용하고 있습니다:

2개의 좋아요

네, 저도 그렇게 생각했고 시도해 봤는데, 이 컴포넌트의 배지가 너무 작아서 잘 안 보입니다…
두 번째 그룹에서도 플레어와 아바타를 사용할 수 있으면 좋겠어요 :slightly_smiling_face:

3개의 좋아요

안타깝게도 현재 테마 컴포넌트로는 불가능하다고 생각합니다. 아바타 플레어 컨텍스트 세 가지 모두에서 필요한 그룹 데이터를 직렬화하지 않고, 1차 그룹만 직렬화하는 것으로 보입니다. 시점에서 이 작업은 플러그인으로 구현해야 할 것 같습니다. 불행히도 현재는 이런 작업을 할 여유가 없습니다. 사이트에 맞는 솔루션을 구축하는 데 도움이 필요하시다면 Marketplace 채널을 통해 도움을 요청해 보실 수 있습니다.

3개의 좋아요

이 기능을 사용하되, 특정 그룹에 속하는 경우에만 다른 신뢰 플레어를 표시할 수 있나요?

예: 한 그룹에 속한 사람에게는 플레어를 표시하고, 다른 그룹에 속한 사람에게는 표시하지 않고 싶습니다.

Taylor님, 안녕하세요.

이 TC에 감사드립니다. Ember CLI로 업데이트한 후에 문제가 될 수 있는 이 Deprecation 경고를 발견했습니다. 수정해 주시면 감사하겠습니다. 감사합니다 :slightly_smiling_face:

Screenshot 2021-11-08 at 23.06.17

3개의 좋아요

알려줘서 감사합니다! 해당 컴포넌트를 업데이트하면 모든 것이 정상적으로 작동할 것입니다:

3개의 좋아요

직원들에게 비활성화할 수 있나요?

1개의 좋아요

사용자의 신뢰도 레벨이 이제 사용자 사진/아바타 플레어 안에 표시되는 대신, 게시물 왼쪽 하단에 표시됩니다.

같은 현상을 겪고 계신 분 계신가요?

1개의 좋아요

안녕하세요, Alan :wave:

이 테마 컴포넌트에 대해 말씀하시는 건가요?

2개의 좋아요

그거 맞아요 @ondrej

이미지 안에 넣는 대신, 왼쪽 아래에 배치됩니다.

위에서 동그라미 친 곳입니다.

1개의 좋아요

안녕하세요, @Arduous! :wave:

@ondrej 님이 문제의 컴포넌트를 정확히 찾아내 주셔서 기쁩니다. :tada:

웹 콘솔을 확인해 보셨나요? 사이트에 오류가 있는지 살펴볼 수 있을까요? 문제가 있는 사이트의 링크를 공유해 주실 수 있을까요? :slight_smile:

3개의 좋아요