/* Get the front controller instance */
$fc = $GLOBALS['fc'];
/* Get the view rendered */
$viewRenderer = $fc->getDependencies()->getViewRenderer($fc->getResponse(), $controller->getResponseType(), $fc->getRequest());
/* Create a new view */
$view = new XenForo_ViewPublic_Base($viewRenderer, $fc->getResponse());
/* Create the parser */
$bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $view)));
/* Parse options */
$bbCodeOptions = array(
'states' => array(
'viewAttachments' => true
)
);
/* parse the post message */
$post['messageParsed'] = XenForo_ViewPublic_Helper_Message::getBbCodeWrapper($post, $bbCodeParser, $bbCodeOptions);