Have a look at the attached pictures. I have imported my vBulletin into XenForo and all the color tags are converted to literal HTML. What's up with that? Shouldn't we just strip the BB Code or keep it as is and not render it?
$formatter = XenForo_BbCode_Formatter_Base::create('XenForo_BbCode_Formatter_Text');
$parser = XenForo_BbCode_Parser::create($formatter);
foreach ($vms AS $vm)
{
// [...]
$import = array(
'profile_user_id' => $profileUserId,
'user_id' => $postUserId,
'username' => $this->_convertToUtf8($vm['postusername'], true),
'post_date' => $vm['dateline'],
'message' => $parser->render($this->_convertToUtf8($vm['pagetext'])),
'ip' => XenForo_Helper_Ip::convertIpBinaryToString($vm['ipaddress'])
);
// [...]
}
Removing the code entered? That doesn't really make sense to me. This is parsing to a plain text representation and the code itself would fit as that.Shouldn't they just evaluate to [CODE] and [PHP]?
Aside from creating a test script for your needs, the text parser is used to create textual versions of posts/conversation messages for emails (the text version rather than the HTML version). It is also used for the thread quick preview.Is there a good way to test this?
We use essential cookies to make this site work, and optional cookies to enhance your experience.