Restrict users to post certain words per category

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…

1 Like

Believe this may be global. You might need to create a plugin to “excuse” certain categories.

4 Likes

Can this official plugin help you?

Flag post on Words: flag a topic on creation/edition if it contains specific words

3 Likes

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: Watched Words tagging — enable by category?

2 Likes

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: