הענקת תג מותאם אישית עם קריאת ToS

Continuing the discussion from How does the reader / read guideline badges work?:

How would someone repurpose this for a custom badge, where the user will be automatically awarded upon reading the terms?


Resource found:

This for the “read guidelines” badge:

and also this… although I don’t know where to insert the SQL for the badge:

…as well as the underlying question if /tos is considered a topic if users can only see it from the view of the tabs:

2 לייקים

Does this help?

3 לייקים

אוו, נראה שזה יעזור/או ידריך אותי בכיוון הנכון!
תודה!

2 לייקים

I’m not sure it’s possible to link a similar one up to the ToS instead in the same way. :thinking: The Read Guidelines one relies on the read_faq being recorded in the user_stats table and there isn’t currently a mechanism to do the same for the ToS.

As the user viewable version isn’t the actual topic, I don’t think viewing that page is recorded anywhere (like topic_views etc).

2 לייקים

האם אפשר לשנות את מסד הנתונים/טבלאות כדי לכלול read_tos חדש?


ישנו פתרון עוקף פוטנציאלי ומכוער…
…לפרסם נושא כעמוד שפורסם במקום להשתמש באינטגרציה חלקה כמו שאלות נפוצות ואודות. אני לא יודע אם זה באמת יעבוד…

בדיקות וממצאים:

  • שאילתת ה-SQL מחזירה משתמשים שקראו את הנושא ולכן אמורים לקבל את התג, אבל לא קיבלתי את ההודעה הזו.

  • אני יכול לאשר שביקורים ב-/pub/slug מבלי לבקר בנושא ישירות יעדכנו את ספירת הצפיות של הנושא… עם זאת, אפילו עם זמן קריאה נמוך באופן אבסורדי, התג לא הוענק אוטומטית.

  • יש לציין גם שהנושא עצמו עדיין מצוין כחדש ולא נקרא למשתמש.

  • בדיקות בידוד נוספות מראות ששאילתת ה-SQL מרמזת שמשתמשים חייבים לבקר בנושא ישירות כדי להיחשב כמי שקראו את הנושא. אני לא יכול לאשר או להכחיש, מכיוון שהתג לא הוענק, אבל זה הכי סביר.

מתי הטריגר “עדכן יומי” פועל?

2 לייקים

האם אתה יודע מה הצוות עשה כשהם עדכנו את התנאים וההגבלות שבהם היינו צריכים לאשר שבדקנו אותם? למרות שלא מדובר בתג, האם זה אולי הפלאגין של מדיניות?

You can speed this bit up by manually triggering jobs::BadgeGrant from your /sidekiq/scheduler page (for those with access). Mine ran 3 hours ago, but it will differ from site to site.

If you didn’t mind just having them in a regular old topic you could create a new one and add the link to it to your tos url admin setting so it shows up in the tabs still. You could then grant a badge quite easily based on people viewing that topic (though your experiments with published pages may also bear fruit as well :crossed_fingers:)

I think to do it the same as the Read Guidelines one you’d need to create a plugin to replicate the behaviour for the ToS (not my forte though, so take that with a pinch of salt :slight_smile:)

This is a required custom field, which I think works out quite nicely for that. Though you only say you’ve read them rather than actually reading them, so it may depend on what the main thrust of granting the badge is for.

3 לייקים

Wait this is actually smart!

You could then also close and unlist the topic so it cannot be replied to and must be accessed by direct link.

Unfortunately, that wouldn’t be working as straightforward as the above.

לייק 1

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.