MyBB-Plugins Forums
Exclude BB code from posts - Printable Version

+- MyBB-Plugins Forums (http://forums.mybb-plugins.com)
+-- Forum: Archived Forums (http://forums.mybb-plugins.com/Forum-Archived-Forums)
+--- Forum: MyBB 1.6.x (http://forums.mybb-plugins.com/Forum-MyBB-1-6-x)
+---- Forum: Free Plugins (http://forums.mybb-plugins.com/Forum-Free-Plugins--29)
+----- Forum: Requests (http://forums.mybb-plugins.com/Forum-Requests--16)
+----- Thread: Exclude BB code from posts (/Thread-Exclude-BB-code-from-posts)

Pages: 1 2


Exclude BB code from posts - Xeronations - 01-21-2013

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?


RE: Exclude BB code from posts - Diogo Parrinha - 01-21-2013

You want to disable bbcode on every post?


RE: Exclude BB code from posts - Xeronations - 01-23-2013

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.


RE: Exclude BB code from posts - Diogo Parrinha - 01-23-2013

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).


RE: Exclude BB code from posts - Omar G. - 01-24-2013

I think it is possible if we hook at datahandler_post_validate_thread, datahandler_post_validate_post.


RE: Exclude BB code from posts - Diogo Parrinha - 01-24-2013

Probably yes, probably not.

Maybe removing "message_too_long" from $this->errors may work, but I haven't tried it.


RE: Exclude BB code from posts - Xeronations - 01-25-2013

(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.


RE: Exclude BB code from posts - Diogo Parrinha - 01-25-2013

Either that or he simply patched the MyBB code.


RE: Exclude BB code from posts - Omar G. - 01-25-2013

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.


RE: Exclude BB code from posts - Diogo Parrinha - 01-25-2013

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.