Cupara
Well-known member
Ok so I figured out thanks to Jaxel that I need to include parsing in my ViewPublic file.
So I keep getting this error:
I removed the code for a simpler view, but I'm trying to use this:
Not sure where I can place this without it breaking. I'm trying to parse bbcode used in the news block when it pulls a thread using bbcode but needs to parse no matter which column its in. So any help with this would be great as this is the last step before RC release.
Thanks
So I keep getting this error:
This is my ViewPublic file:An exception occurred: Argument 1 passed to XenForo_ViewPublic_Helper_Message::bbCodeWrapMessages() must be an array, null given, called in /home/xen/public_html/library/xPortal/ViewPublic/Portal.php on line 25 and defined in /home/xen/public_html/library/XenForo/ViewPublic/Helper/Message.php on line 64
- XenForo_Application::handlePhpError()inXenForo/ViewPublic/Helper/Message.phpat line64
- XenForo_ViewPublic_Helper_Message::bbCodeWrapMessages()inxPortal/ViewPublic/Portal.phpat line25
- xPortal_ViewPublic_Portal->renderHtml()inXenForo/ViewRenderer/Abstract.phpat line222
- XenForo_ViewRenderer_Abstract->renderViewObject()inXenForo/ViewRenderer/HtmlPublic.phpat line67
- XenForo_ViewRenderer_HtmlPublic->renderView()inXenForo/FrontController.phpat line533
- XenForo_FrontController->renderView()inXenForo/FrontController.phpat line156
- XenForo_FrontController->run()in/home/xen/public_html/index.phpat line13
PHP:
class xPortal_ViewPublic_Portal extends XenForo_ViewPublic_Base
{
public function renderHtml()
{
// Get the blocks info in a local variable
$blocks = $this->_params['blocks'];
// We don't need the blocks being passed to individual templates
unset($this->_params['blocks']);
// These are the params that'll be passed to the child templates
$params = $this->_params;
// Initialize the arrays keys for storing block content
$this->_params['leftBlocks'] = '';
$this->_params['midBlocks'] = '';
$this->_params['rightBlocks'] = '';
foreach ($blocks['left'] AS $left)
{
$this->_params['leftBlocks'] .= $this->createTemplateObject($left['temp_template'], $params);
}
foreach ($blocks['mid'] AS $mid)
{
$mid .= $this->createTemplateObject($mid['temp_template'], $params);
$bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
$bbCodeOptions = array('viewAttachments' => true);
$this->_params['midBlocks'] = new XenForo_BbCode_TextWrapper($mid, $bbCodeParser, $bbCodeOptions);
}
foreach ($blocks['right'] AS $right)
{
$this->_params['rightBlocks'] .= $this->createTemplateObject($right['temp_template'], $params);
}
}
}
I removed the code for a simpler view, but I'm trying to use this:
Not sure where I can place this without it breaking. I'm trying to parse bbcode used in the news block when it pulls a thread using bbcode but needs to parse no matter which column its in. So any help with this would be great as this is the last step before RC release.
Thanks