MyBB-Plugins Forums

Full Version: Exclude BB code from posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
When users do things like quoting, or posting a video, they easily bypass the character limit. Disabling BB code would fix this problem, and I've yet to see a plugin for it.

Could someone do this?
You want to disable bbcode on every post?
I meant excluding it from the character count. I believe I already posted this under support, but I figured that the request section would be better. Feel free to close the other thread.
Oh, it's impossible to write a plugin to do such thing (I'm remembering the code, that's why I'm saying that, I may not be 100% sure).
I think it is possible if we hook at datahandler_post_validate_thread, datahandler_post_validate_post.
Probably yes, probably not.

Maybe removing "message_too_long" from $this->errors may work, but I haven't tried it.
(01-23-2013, 06:31 AM)Pirata Nervo Wrote: [ -> ]Oh, it's impossible to write a plugin to do such thing (I'm remembering the code, that's why I'm saying that, I may not be 100% sure).

Hmm. Hackforums has a plugin like this, but I believe Labrocca made it just for himself.
Either that or he simply patched the MyBB code.
I think we aren't in the same page here Pirata Nervo Tongue

Upon post/thread validation you can strip the HTML/MyCode/Quotes from the $this->data['message'] variable, then count the remaining characters to validate it against the core settings for minimum and/or maximum characters.
Well IIRC when you add something to datahandler_post_validate_post the validator has already run, thus you can't strip it and hope for it to work. However, you could turn off the error, strip BB code and then count the characters yourself and set the error if it goes over the limit Smile But this is only what my memory tells me.
Pages: 1 2