PDA

View Full Version : Parse HTML in just certain posts


007
08-30-2013, 03:58 AM
Hi,

I have a question that seems simple enough but I can't find which hooks to use. I have HTML disabled sitewide, but would like to enable it for select posts only, based on some conditions I can create myself.

I've found the following variables by searching around, but am not sure which hook to use them in, or if there's another variable or easier method to code this.

$dohtml
$html_allowed
$forum['allowhtml']

What am I missing? I'm pretty familiar with coding custom plugins for vBulletin. I guess it's the simple things that get me. Any help is appreciated.

Thanks!

kh99
09-02-2013, 10:19 PM
I think you might be able to use hook bbcode_parse_start and set $dohtml based on your conditions. But since that hook is inside a function of the bbcode class, it might be hard to check your conditions. Also, if you try it you'd probably want to check for $forumid being a number > 0 (see includes/class_bbcode.php, function parse() ).