Originally got the idea from this topic: Limit one post per person? though I had a slightly different use case for it.
On a community that I’m a forum moderator for, I got tired of people creating multiple advertisement topics in the advertising section. At first, I created a feature request on these forums, but after some trial and error I came up with my own plugin that does the job.
Current features list
- Configurable list of enabled categories is availalbe in the admin settings page.
- Configurable message that will be used to notify the user that their post was closed.
- Configurable amount of allowed topics one can post in a category before it is blocked.
- Configurable toggle to ignore staff members creating topics.
- Configurable toggle to delete the closed topic after 24 hours.
Of course there are plenty of things that can/need to be improved but considering this is my first plugin that I tried to make myself (instead of editing others) I feel like it was worth releasing for anyone that wants to use or improve it.
This is what you’ll see when you create an excess topic:
And this is what the admin settings look like:
Feel free to fork, pr or edit it however you like. I’d love to see some improvements by the community. This would also help me out while starting to learn more about discourse plugin development.
Something I would like to add later on is an option to auto-delete the closed topics 24 hours after being closed. But so far I’ve not been able to figure out how to set a Topic Timer when using Ruby. If anyone can help me figure this out: that’d be great!
This has been added in a recent update (13-04-2018), it now has a configurable toggle in the admin settings page to enable/disable topic deleting after 24 hours.
- Not sure if this will be added anytime soon, but I’m hoping to implement these features into the UI itself to prevent users from creating the topic in the first place, instead of locking the new topic they just created. If anyone wants to help me create this then please let me know because I could use some help figuring this out.
- Add configuration options in the category settings page and allow for category-specific limits and options.