Преглед изворни кода

#104 - Integration with Comments.

AntonLV пре 12 година
родитељ
комит
a29c8f2587
2 измењених фајлова са 7 додато и 8 уклоњено
  1. 0 8
      modules/base/text/classes/BxBaseModTextModule.php
  2. 7 0
      template/scripts/BxBaseCmts.php

+ 0 - 8
modules/base/text/classes/BxBaseModTextModule.php

@@ -155,14 +155,6 @@ class BxBaseModTextModule extends BxBaseModGeneralModule
         if (!$oCmts || !$oCmts->isEnabled())
             return false;
 
-		//add transient live update
-		$sName = $this->_oConfig->getName();
-		$sServiceCall = BxDolService::getSerializedService('system', 'get_live_updates_comments', array($this->_oConfig->CNF['OBJECT_COMMENTS'], $iContentId, $this->_iProfileId), 'TemplCmtsServices');
-
-		bx_import('BxDolLiveUpdates');
-		BxDolLiveUpdates::getInstance()->add($sName . '_live_updates_cmts', 1, $sServiceCall);
-		//add transient live update
-
         return $oCmts->getCommentsBlock(0, 0, false);
     }
 

+ 7 - 0
template/scripts/BxBaseCmts.php

@@ -81,6 +81,13 @@ class BxBaseCmts extends BxDolCmts
         $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,