OK, so I ported my old Word Count Limits plugin to Wedge, and I did some overhauling in the process.
The idea of the plugin is to limit posts that are either too short or too long, and do something about it. In this case, it hooks into the moderation filters stuff, so you can make moderation systems as flexible as you like.
Want to enforce a minimum of 5 words on every post? Easy.
Want to enforce a minimum of 100 words on every new topic (not just replies), but only in a certain board? Almost as easy. (Moderation Filters > New Rule > Prevent the post when... a new topic is started... where board is <given board> and the number of words in the post is less than 100 words)
Yup, moderation filters is damn awesome, even if I do say so myself haha. Screenshot of this feature is attached.
Also, I made it so it could be both words and individual characters (where a complex accented letter or other multi-byte character is counted as 1) could be handled, through the same facility.
There is one caveat: right now moderation filters has one major flaw, in that the 'prevent the post being made' message is not very helpful - it just says 'The post contained content that is not permitted on this forum'. I know about that, I just don't know yet how best to fix it - I've been wrestling with it since I added mod filters months and months ago. The problem is that the combination of rules that could be causing a post to be denied is extremely complicated and potentially multiple rules could all cause the same result.
Imagine a rule that says the post will be prevented if the word 'fuzzlewuck' is in the post, but only if it's in the posted in certain boards, and they have less than 100 posts. How best to convey that to the user? (But the moderation filters can trivially enough create that set of rules.)
Anyway. I digress. Have at it. (It's in the plugin area for beta testers)
Posted: December 5th, 2012, 03:58 AM
Also, the API for extending moderation filters needs cleaning up. I know live627 kind of hinted at that, but damn it is ugly. When I figure out the above problem, I'll clean up the API while I'm at it, it'll probably need it.