No, it has to be html. But you could probably render a template, like:
PHP Code:
if (is_member_of($vbulletin->userinfo, 1, 2, 3, 4))
{
static $code_replacement = '';
if (empty($code_replacement))
{
$templater = vB_Template::create('code_replacement');
$code_replacement = $templater->render();
unset($templater);
}
$post['message'] = preg_replace('#<!-- code -->.*?<!-- end code -->#s', $code_replacement, $post['message']);
}
That doesn't let you use bbcode, but it's a little more convenient. I suppose you could run the replacement text through the bbcode parser if you wanted, but it really doesn't let you do anything you couldn't do by inserting html.