شريط صورة المستوى الثقة

يتيح مكون السمة هذا للمدير إضافة لمسات جمالية لصور رمزية للمستخدمين بناءً على مستوى الثقة الخاص بالمستخدم. تُعرض لمسات مستوى الثقة في أي مكان في الموقع حيث تظهر عادةً لمسات المجموعة. توجد إعدادات سمة قليلة لضبط موضع اللمسة الجمالية بالنسبة للصورة الرمزية.

أمثلة أساسية (مع وجود لمسات المجموعة)

توجد أيضًا موضع في الزاوية اليمنى السفلية سيستبدل إما لمسات المجموعة أو يتم استبداله بها اعتمادًا على كيفية تعيين إعداد “تكون لمسات المجموعة دائمًا في الأعلى”.

الإعداد الرئيسي

استخدام الصور كـ لمسات جمالية

ستحتاج إلى إضافة صورك الخاصة لللمسات الجمالية إلى مكون السمة. الحجم الجيد هو حوالي 100×100 بكسل. الصورة التي استخدمتها في المثال أعلاه هي 88×88 بكسل. يمكنك تنزيل صورة قالب شفافة هنا للبدء إذا كان ذلك مفيدًا:

أسهل طريقة لرفع صورة هي إنشاء مكون محلي منفصل باسم “Trust Level Avatar Flair Assets” (تعليمات هنا لأولئك غير الملمين). عند عرض مكون الأصول، حدد زر + إضافة تحت قسم الuploads في مكون السمة واختر ملف صورة اللمسة الجمالية الخاص بك. كرر ذلك لكل صورة لمسة جمالية تريد تضمينها. بمجرد رفع الصور، انقر بزر الماوس الأيمن على رابط الصورة وانسخ عنوان URL للصورة. أخيرًا، الصق عنوان URL في حقل مستوى الثقة الذي تختاره.



استخدام Font Awesome لللمسات الجمالية الخاصة بك

يمكنك استخدام أيقونات Font Awesome بدلاً من استخدام الصور المرفوعة. يمكن العثور على قائمة كاملة بالأيقونات المتاحة هنا. كل ما عليك فعله هو تحديد الإعداد لاستخدام Font Awesome ثم إضافة اسم الأيقونة إلى حقل صورة اللمسة الجمالية المناسب:

ملاحظة مهمة: حاليًا لا يمكنك دمج Font Awesome والصور معًا، إذا كان هناك اهتمام قوي بذلك، يمكنني البحث في الأمر أكثر.

الإعدادات

ستجد أن هناك العديد من الإعدادات المتاحة داخل مكون السمة هذا. تحتوي على أوصاف تشرح وظيفتها وكيفية استخدامها، ولكن إذا كان لدى أي شخص اقتراحات حول كيفية تحسينها لجعل الأمور أكثر وضوحًا، فالرجاء إخباري!

عند تمرير الماوس فوق لمسة الصورة الرمزية لمستوى الثقة، سيظهر اسم مستوى الثقة. إذا كنت ترغب في تغيير اسم مستوى الثقة، فيمكنك الذهاب إلى Admin > Customize > Text والبحث عن التالي لتغيير الأسماء:

  • 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

لا تتردد في النشر إذا كانت هناك أي أسئلة أو مشاكل أو اقتراحات!

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

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)

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 إعجابات

: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 إعجابات

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)

I’m currently using this:

إعجابَين (2)

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 إعجابات

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 إعجابات

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.

مرحباً تايلور،

شكراً لك على هذا الـ TC. ألاحظ تحذير الإهمال هذا الذي قد يسبب مشاكل بعد التحديث إلى Ember CLI. سأكون ممتناً لو أمكنك إصلاحه. شكراً لك :slightly_smiling_face:

Screenshot 2021-11-08 at 23.06.17

3 إعجابات

شكرا على التنبيه! يجب أن تكون جاهزًا بمجرد تحديث المكون:

3 إعجابات

هل يمكن تعطيله للموظفين؟

إعجاب واحد (1)

مستويات ثقة المستخدمين معروضة الآن في أسفل يسار منشور المستخدم بدلاً من تضمينها ضمن شارة صورة/صورة رمزية للمستخدم.

هل يواجه أي شخص نفس الشيء؟

إعجاب واحد (1)

أهلاً آلان :wave:

هل تتحدث عن مكون السمة هذا؟

إعجابَين (2)

هذا هو @ondrej

بدلاً من وضعه داخل الصورة - تم وضعه في أسفل اليسار.

لذلك حيث قمت بالدائرة أعلاه.

إعجاب واحد (1)

مرحباً @Arduous! :wave:
يسرني أن @ondrej قد حدد المكون المتأثر. :tada:
هل تحققت من وحدة تحكم الويب لمعرفة ما إذا كانت هناك أي أخطاء في الموقع؟ هل من الممكن مشاركة رابط للموقع المتأثر لنتمكن من إلقاء نظرة عليه؟ :slight_smile:

3 إعجابات