/** * get full comments block with initializations */ function getCommentsBlock($iParentId = 0, $iVParentId = 0, $bInDesignbox = true) { $aBp = array('parent_id' => $iParentId, 'vparent_id' => $iVParentId); $aDp = array('show_empty' => true); //add live update $sServiceCall = BxDolService::getSerializedService('system', 'get_live_updates_comments', array($this->_sSystem, $this->_iId, $this->_getAuthorId()), 'TemplCmtsServices'); bx_import('BxDolLiveUpdates'); BxDolLiveUpdates::getInstance()->add($this->_sSystem . '_live_updates_cmts', 1, $sServiceCall); //add live update $sCaption = _t('_cmt_block_comments_title', $this->getCommentsCount()); $sContent = BxDolTemplate::getInstance()->parseHtmlByName('comments_block.html', array('system' => $this->_sSystem, 'list_anchor' => $this->getListAnchor(), 'id' => $this->getId(), 'comments' => $this->getComments($aBp, $aDp), 'post_form_top' => $this->getFormBoxPost($aBp, array('type' => $this->_sDisplayType, 'position' => BX_CMT_PFP_TOP)), 'post_form_bottom' => $this->getFormBoxPost($aBp, array('type' => $this->_sDisplayType, 'position' => BX_CMT_PFP_BOTTOM)), 'view_image_popup' => $this->_getViewImagePopup(), 'script' => $this->getJsScript())); return $bInDesignbox ? DesignBoxContent($sCaption, $sContent, BX_DB_PADDING_DEF, $this->_getControlsBox()) : array('title' => $sCaption, 'content' => $sContent, 'designbox_id' => BX_DB_PADDING_DEF, 'menu' => $this->_getControlsBox()); }