Good day, I did an integration between XF and Wordpress and I'm using the XenForo_FrontController class to process tha data and render the views.
My problem is that when I show a post in a view the quotations are simple and not the same as the forum which are more complex, I'm doing this to wrap the messages (Notice that I don't pass a view renderer):
And I noticed the following code in the next file:
File: XenForo_BbCode_Formatter_Base
So my problem is that I need to pass a viewRenderer to this function and it needs to be an instance of XenForo_View and the view renderer I'm using in this controller is an instance of XenForo_ViewRenderer_HtmlPublic which is not valid, can someone please help me so I can get the correct quotation html when wrapping the messages?
Thank you.
My problem is that when I show a post in a view the quotations are simple and not the same as the forum which are more complex, I'm doing this to wrap the messages (Notice that I don't pass a view renderer):
Code:
$bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base'));
$bbCodeOptions = array(
'states' => array(
'viewAttachments' => $params['canViewAttachments']
),
'contentType' => 'post',
'contentIdKey' => 'post_id'
);
XenForo_ViewPublic_Helper_Message::bbCodeWrapMessages($params['posts'], $bbCodeParser, $bbCodeOptions);
And I noticed the following code in the next file:
File: XenForo_BbCode_Formatter_Base
Code:
public function renderTagQuote
...
if ($this->_view)
{
$template = $this->_view->createTemplateObject('bb_code_tag_quote', array(
'content' => $content,
'nameHtml' => $name,
'source' => $source,
'attributes' => $attributes,
'ignored' => (isset($attributes['member']) && isset($this->_ignoredUsers[intval($attributes['member'])]))
));
return $template->render();
}
else
{
return $this->_renderTagQuoteFallback($name, $content);
}
So my problem is that I need to pass a viewRenderer to this function and it needs to be an instance of XenForo_View and the view renderer I'm using in this controller is an instance of XenForo_ViewRenderer_HtmlPublic which is not valid, can someone please help me so I can get the correct quotation html when wrapping the messages?
Thank you.