كيفية عرض إخلاء مسؤولية لكل موضوع في فئة؟

I would like to display a disclaimer to every topic in a category. Such as “Nothing in this forum is financial advice, and all the posts here are for entertainment purpose only.” What is the best way to do this?

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

have a look at category banners

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

Thanks! However this theme component seems not ideal for a boring legal disclaimer…

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

Hey there

I’d recommend this theme component as its displayed at the bottom of the page its less intrusive but easily readable.

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

I needed to do something like this myself recently, so used a custom theme component:

<script type="text/discourse-plugin" version="0.8">
api.decorateWidget("post:before", helper => {
    const { iconNode } = require("discourse-common/lib/icon-library");
    let topic = helper.widget.model.topic;
    if (topic.category_id == 6 && topic.tags.includes('stub')) {
        let text = "This page is a stub. You can help by ";
        text += helper.attrs.canEdit ? "adding to it." : "suggesting additions.";
      return helper.h("div.post-notice", [iconNode('book-open'), text]);
    }

});
</script>
إعجابَين (2)