Is there any way to restrict users to post anything containing specified inappropriate words in a specific category only.
Ex. We have set up two categories A and B. Now we want to restrict the users to post anything containing “xyz” (example). in category A only although users should be able to post anything in Category B…
סיכום מבוסס בינה מלאכותית
In a discussion about restricting users from posting specific words in certain categories on Discourse, rajput7707 asks if it’s possible to block words like “xyz” only in Category A while allowing them in Category B. merefield notes that watched words are currently global and suggests creating a plugin to exempt certain categories. Lhc_fl recommends the official Discourse Automation plugin, which can flag posts containing specific words upon creation or edit — useful for category-specific enforcement. rajput7707 requests clarification on implementing this as a beginner. mattdm links to a related feature request for category-based watched word tagging. Canapin provides a step-by-step guide on installing plugins and shares an example automation that flags posts with specific words in targeted categories, hiding content by default (though users can reveal it). They also note potential workarounds via CSS and link to community discussions debating whether hidden posts should remain accessible to all users. The consensus leans toward using Discourse Automation with custom rules for category-specific word restrictions, despite current limitations in native functionality.
Believe this may be global. You might need to create a plugin to “excuse” certain categories.
Can this official plugin help you?
Flag post on Words: flag a topic on creation/edition if it contains specific words
Thanks @Lhc_fl , Since i am new to discourse so unable to understand how to create custom plugin or add our feature into any existing plugin. So could you please elaborate on that how exactly i can get my issue resolved.
Related feature request: https://meta.discourse.org/t/watched-words-tagging-enable-by-category/255620?u=mattdm
Here’s how to add a plugin to Discourse:
Here’s an example of an automated task with this plugin:
It will automatically flag a post that contains some words in a specific category.
The post’s content will be hidden, but anyone, even regular users, can click a button to show the hidden content.
This can be circumvented with a CSS solution:
But note his behavior (hidden message can be read by anyone) is discussed, have a look at:
