Quote:
Originally Posted by lucky64
Any chance of being able to control what vbcode can be used?
I don't want html, or img for example, but do want smilies..
|
Don't know whether this has been answered already, but I achieved it with the following...
In vbshout.php, find the function "bbcodeparser", and specifically the following code in that function:
Code:
if ($vbulletin->options['shout_bbcode'])
{
return $vbulletin->vbshout_parse->parse(convert_url_to_bbcode($text), 'nonforum');
}
Replace with:
Code:
if ($vbulletin->options['shout_bbcode'])
{
$text = preg_replace('/\[\/?(img|size|quote|html|code|center|spoiler|anchor|link|blockquote)(=[^\]]*)?\]/', '', $text);
return $vbulletin->vbshout_parse->parse(convert_url_to_bbcode($text), 'nonforum');
}
As you can see, I've removed a whole bunch of BB codes - just add or remove the keywords as necessary. Brackets and options etc for the codes should be handled automatically by the regular expression.
Hope it's self-explanatory.