AntonLV hace 13 años
padre
commit
37b80f0aef

+ 31 - 17
inc/classes/BxDolCmts.php

@@ -9,7 +9,7 @@
 
 
 bx_import('BxDolCmtsQuery');
 bx_import('BxDolCmtsQuery');
 
 
-define('BX_OLD_CMT_VOTES', 365*86400); ///< comment votes older than this number of seconds will be deleted automatically 
+define('BX_CMT_OLD_VOTES', 365*86400); ///< comment votes older than this number of seconds will be deleted automatically 
 
 
 define('BX_CMT_ACTION_POST', 'post');
 define('BX_CMT_ACTION_POST', 'post');
 define('BX_CMT_ACTION_EDIT', 'edit');
 define('BX_CMT_ACTION_EDIT', 'edit');
@@ -306,6 +306,29 @@ class BxDolCmts extends BxDol
         return $GLOBALS['bx_dol_cmts_systems'];
         return $GLOBALS['bx_dol_cmts_systems'];
     }
     }
 
 
+	/**
+     * it is called on cron every day or similar period to clean old comment votes
+     */
+    public static function maintenance() {        
+        $iResult = 0;
+        $oDb = BxDolDb::getInstance();
+
+        $aSystems = self::getSystems();
+        foreach($aSystems as $aSystem) {
+			if(!$aSystem['is_on'])
+				continue;
+
+            $sQuery = $oDb->prepare("DELETE FROM `{$aSystem['table_track']}` WHERE `cmt_rate_ts` < (UNIX_TIMESTAMP() - ?)", BX_CMT_OLD_VOTES);
+            $iDeleted = (int)$oDb->query($sQuery);
+            if($iDeleted > 0)
+            	$oDb->query("OPTIMIZE TABLE `{$aSystem['table_track']}`");
+
+			$iResult += $iDeleted;
+        }
+
+        return $iResult;
+    }
+
     public function init ($iId)
     public function init ($iId)
     {
     {
         if (!$this->isEnabled()) 
         if (!$this->isEnabled()) 
@@ -415,21 +438,6 @@ class BxDolCmts extends BxDol
         $this->_iId = $iId;
         $this->_iId = $iId;
     }
     }
 
 
-    /**
-     * it is called on cron every day or similar period to clean old comment votes
-     */
-    public function maintenance () {
-        $iDeletedRecords = 0;
-        foreach ($this->_aSystems as $aSystem) {
-            if (!$aSystem['is_on'])                
-                continue;
-            $oQuery = new BxDolCmtsQuery($aSystem);
-            $iDeletedRecords += $oQuery->maintenance();
-            unset($oQuery);
-        }
-        return $iDeletedRecords;
-    }
-
 	/**
 	/**
      * Add replace markers.
      * Add replace markers.
      * @param $a array of markers as key => value
      * @param $a array of markers as key => value
@@ -815,10 +823,16 @@ class BxDolCmts extends BxDol
 
 
     protected function _prepareTextForOutput ($s)
     protected function _prepareTextForOutput ($s)
     {
     {
+    	$sHttp = '';
     	$iDataAction = $this->isNl2br() ? BX_DATA_TEXT_MULTILINE : BX_DATA_TEXT;
     	$iDataAction = $this->isNl2br() ? BX_DATA_TEXT_MULTILINE : BX_DATA_TEXT;
+		$sPattern = "/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*\.)+(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|[a-z]{2})|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&amp;]*)?)?(#[a-z][a-z0-9_]*)?/";
+
+    	$aMatches = array();
+    	if(preg_match($sPattern, $s, $aMatches) && empty($aMatches[1]))
+    		$sHttp = 'http://';
 
 
 		$s = bx_process_output($s, $iDataAction);
 		$s = bx_process_output($s, $iDataAction);
-		$s = preg_replace("/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*\.)+(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|[a-z]{2})|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&amp;]*)?)?(#[a-z][a-z0-9_]*)?/", '<a href="$0" target="_blank">$0</a>', $s);
+		$s = preg_replace($sPattern, '<a href="' . $sHttp . '$0" target="_blank">$0</a>', $s);
 
 
 		return $s; 
 		return $s; 
     }
     }

+ 0 - 9
inc/classes/BxDolCmtsQuery.php

@@ -282,13 +282,4 @@ class BxDolCmtsQuery extends BxDolDb
         $sQuery = $this->prepare("UPDATE `{$this->_sTriggerTable}` SET `{$this->_sTriggerFieldComments}` = ? WHERE `{$this->_sTriggerFieldId}` = ? LIMIT 1", $iCount, $iId);
         $sQuery = $this->prepare("UPDATE `{$this->_sTriggerTable}` SET `{$this->_sTriggerFieldComments}` = ? WHERE `{$this->_sTriggerFieldId}` = ? LIMIT 1", $iCount, $iId);
         return $this->query($sQuery);
         return $this->query($sQuery);
     }
     }
-
-    function maintenance()
-    {
-        $iTimestamp = time();
-        $iDeletedRecords = $this->query("DELETE FROM {$this->_sTableTrack} WHERE `cmt_rate_ts` < ($iTimestamp - " . (int)BX_OLD_CMT_VOTES . ")");
-        if ($iDeletedRecords)
-            $this->query("OPTIMIZE TABLE {$this->_sTableTrack}");
-        return $iDeletedRecords;
-    }
 }
 }

+ 3 - 3
modules/boonex/english/data/langs/system.xml

@@ -3365,11 +3365,11 @@ More info about URI DNSBL: <br />
 	<string name="_sys_menu_item_title_system_cmts_item_delete"><![CDATA[Delete]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_delete"><![CDATA[Delete]]></string>
 	<string name="_sys_menu_item_title_cmts_item_delete"><![CDATA[Delete]]></string>
 	<string name="_sys_menu_item_title_cmts_item_delete"><![CDATA[Delete]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_reply"><![CDATA[Reply]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_reply"><![CDATA[Reply]]></string>
-	<string name="_sys_menu_item_title_cmts_item_reply"><![CDATA[Reply]]></string>
+	<string name="_sys_menu_item_title_cmts_item_reply"><![CDATA[]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_rate_plus"><![CDATA[Plus]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_rate_plus"><![CDATA[Plus]]></string>
-	<string name="_sys_menu_item_title_cmts_item_rate_plus"><![CDATA[Plus]]></string>
+	<string name="_sys_menu_item_title_cmts_item_rate_plus"><![CDATA[]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_rate_minus"><![CDATA[Minus]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_rate_minus"><![CDATA[Minus]]></string>
-	<string name="_sys_menu_item_title_cmts_item_rate_minus"><![CDATA[Minus]]></string>
+	<string name="_sys_menu_item_title_cmts_item_rate_minus"><![CDATA[]]></string>
 
 
     <string name="_sys_menu_item_title_home"><![CDATA[Home]]></string>
     <string name="_sys_menu_item_title_home"><![CDATA[Home]]></string>
     <string name="_sys_menu_item_title_about"><![CDATA[About]]></string>    
     <string name="_sys_menu_item_title_about"><![CDATA[About]]></string>    

+ 2 - 2
modules/boonex/uni/data/template/system/scripts/BxTemplMenuCmts.php → modules/boonex/uni/data/template/system/scripts/BxTemplCmtsMenu.php

@@ -7,12 +7,12 @@
  * @{
  * @{
  */
  */
 
 
-bx_import('BxBaseMenuCmts');
+bx_import('BxBaseCmtsMenu');
 
 
 /**
 /**
  * @see BxDolMenu
  * @see BxDolMenu
  */
  */
-class BxTemplMenuCmts extends BxBaseMenuCmts {
+class BxTemplCmtsMenu extends BxBaseCmtsMenu {
 
 
     public function __construct ($aObject, $oTemplate = false) {
     public function __construct ($aObject, $oTemplate = false) {
         parent::__construct ($aObject, $oTemplate);
         parent::__construct ($aObject, $oTemplate);

+ 0 - 5
template/comment.html

@@ -15,12 +15,7 @@
 					<bx_if:show_author_link><a href="__author_link__">__author_name__</a> </bx_if:show_author_link>
 					<bx_if:show_author_link><a href="__author_link__">__author_name__</a> </bx_if:show_author_link>
 					<bx_if:show_author_text>__author_name__ </bx_if:show_author_text>
 					<bx_if:show_author_text>__author_name__ </bx_if:show_author_text>
 				</div>
 				</div>
-				<div class="bullet">&#183;</div>
-				<div class="__style_prefix__-ago">
-					<a class="__style_prefix__-ago" href="__view_link__" rel="nofollow">__ago__</a>
-				</div>
 				<bx_if:show_reply_to>
 				<bx_if:show_reply_to>
-					<div class="bullet">&#183;</div>
 					<div class="__style_prefix__-reply-to">
 					<div class="__style_prefix__-reply-to">
 						<span class="bx-def-font-grayed"><bx_text:_in_reply_to />&nbsp;</span><a href="__par_cmt_link__">__par_cmt_author__</a>
 						<span class="bx-def-font-grayed"><bx_text:_in_reply_to />&nbsp;</span><a href="__par_cmt_link__">__par_cmt_author__</a>
 					</div>
 					</div>

+ 7 - 0
template/comment_actions.html

@@ -1,8 +1,15 @@
 <div class="__style_prefix__-actions bx-def-margin-sec-top bx-clearfix">
 <div class="__style_prefix__-actions bx-def-margin-sec-top bx-clearfix">
+	<div class="__style_prefix__-ago">
+		<a class="__style_prefix__-ago" href="__view_link__" rel="nofollow">__ago__</a>
+	</div>
+	<div class="bullet bx-def-padding-thd-leftright">&#183;</div>
 	__menu_actions__
 	__menu_actions__
+	<!--
+	//TODO: Move counters inside menu
 	<div class="__style_prefix__-points-wrp bx-def-margin-left" <bx_if:hide_rate_count>style="display:none;"</bx_if:hide_rate_count>>
 	<div class="__style_prefix__-points-wrp bx-def-margin-left" <bx_if:hide_rate_count>style="display:none;"</bx_if:hide_rate_count>>
 		<a class="__style_prefix__-points" href="javascript:void(0)" onclick="__js_object__.togglePlusedByPopup(this, __id__); return false;" title="<bx_text_attribute:_Plused_by_popup />">__points__</a>
 		<a class="__style_prefix__-points" href="javascript:void(0)" onclick="__js_object__.togglePlusedByPopup(this, __id__); return false;" title="<bx_text_attribute:_Plused_by_popup />">__points__</a>
 	</div>
 	</div>
+	 -->
 </div>
 </div>
 <bx_if:show_menu_manage>
 <bx_if:show_menu_manage>
 	<div class="__style_prefix__-comment-manage-link bx-def-font-large">
 	<div class="__style_prefix__-comment-manage-link bx-def-font-large">

+ 0 - 1
template/comment_more.html

@@ -1,6 +1,5 @@
 <li class="__style_prefix__-more<bx_if:is_root>-root</bx_if:is_root> bx-def-margin-topbottom">
 <li class="__style_prefix__-more<bx_if:is_root>-root</bx_if:is_root> bx-def-margin-topbottom">
 	<div class="__style_prefix__-more-cont">
 	<div class="__style_prefix__-more-cont">
-		<div class="__style_prefix__-more-line bx-def-hr"></div>
 		<a class="<bx_if:is_button>bx-btn</bx_if:is_button>" href="javascript:void(0)" onclick="javascript:__js_object__.cmtLoad(this, __parent_id__, __start__, __per_view__)">__title__</a>
 		<a class="<bx_if:is_button>bx-btn</bx_if:is_button>" href="javascript:void(0)" onclick="javascript:__js_object__.cmtLoad(this, __parent_id__, __start__, __per_view__)">__title__</a>
 	</div>
 	</div>
 </li>
 </li>

+ 5 - 3
template/css/cmts.css

@@ -13,14 +13,15 @@
     }
     }
     ul.cmts-margin,
     ul.cmts-margin,
     div.cmt-reply-margin {
     div.cmt-reply-margin {
-		padding-left: 42px;
+		padding-left: 60px;
     }
     }
     li.cmt,
     li.cmt,
     ul.cmts-margin li.cmt {
     ul.cmts-margin li.cmt {
     	position: relative;
     	position: relative;
     }
     }
     ul.cmts-margin li.cmt:first-child {
     ul.cmts-margin li.cmt:first-child {
-		margin-top: 20px;
+		margin-top: 30px;
+    	margin-top: 2rem;
     }
     }
     li.cmt-err {
     li.cmt-err {
         color: red;
         color: red;
@@ -64,7 +65,6 @@
 	
 	
     li.cmt-more-root div.cmt-more-cont {
     li.cmt-more-root div.cmt-more-cont {
     	position: relative;
     	position: relative;
-		text-align: center;
     }
     }
     li.cmt-more-root div.cmt-more-line {
     li.cmt-more-root div.cmt-more-line {
     	position: absolute;
     	position: absolute;
@@ -166,6 +166,8 @@
 	div.cmt-actions {
 	div.cmt-actions {
 		position: relative;
 		position: relative;
 	}
 	}
+	div.cmt-ago,
+	div.cmt-actions div.bullet,
 	div.cmt-actions ul.bx-menu-hor,
 	div.cmt-actions ul.bx-menu-hor,
 	div.cmt-points-wrp {
 	div.cmt-points-wrp {
 		position: relative;
 		position: relative;

+ 26 - 26
template/css/default.css

@@ -1,53 +1,53 @@
 
 
 /* margins */
 /* margins */
 .bx-def-margin {
 .bx-def-margin {
-    margin:20px;
-    margin:1.2rem;
+    margin:30px;	/* 27.11.13 old value:20px; */ 
+    margin:2rem;	/* 27.11.13 old value:1.2rem; */
 }
 }
 .bx-def-margin-rightbottomleft {
 .bx-def-margin-rightbottomleft {
-    margin-right:20px;
-    margin-right:1.2rem;
-    margin-bottom:20px;
-    margin-bottom:1.2rem;
-    margin-left:20px;
-    margin-left:1.2rem;
+    margin-right:30px;
+    margin-right:2rem;
+    margin-bottom:30px;
+    margin-bottom:2rem;
+    margin-left:30px;
+    margin-left:2rem;
 }
 }
 .bx-def-margin-leftright {
 .bx-def-margin-leftright {
-    margin: 0px 20px;
-    margin: 0 1.2rem;
+    margin: 0px 30px;
+    margin: 0 2rem;
 }
 }
 .bx-def-margin-topbottom {
 .bx-def-margin-topbottom {
-    margin-top:20px;
-    margin-top:1.2rem;
-    margin-bottom:20px;
-    margin-bottom:1.2rem;
+    margin-top:30px;
+    margin-top:2rem;
+    margin-bottom:30px;
+    margin-bottom:2rem;
 }
 }
 .bx-def-margin-top {
 .bx-def-margin-top {
-    margin-top:20px;
-    margin-top:1.2rem;
+    margin-top:30px;
+    margin-top:2rem;
 }
 }
 .bx-def-margin-top-auto {
 .bx-def-margin-top-auto {
-    margin-top:20px;
-    margin-top:1.2rem;
+    margin-top:30px;
+    margin-top:2rem;
 }
 }
 .bx-def-margin-top-auto:first-child {
 .bx-def-margin-top-auto:first-child {
     margin-top:0;
     margin-top:0;
 }
 }
 .bx-def-margin-right {
 .bx-def-margin-right {
-    margin-right:20px;
-    margin-right:1.2rem;
+    margin-right:30px;
+    margin-right:2rem;
 }
 }
 .bx-def-margin-bottom {
 .bx-def-margin-bottom {
-    margin-bottom:20px;
-    margin-bottom:1.2rem;
+    margin-bottom:30px;
+    margin-bottom:2rem;
 }
 }
 .bx-def-margin-left {
 .bx-def-margin-left {
-    margin-left:20px;
-    margin-left:1.2rem;
+    margin-left:30px;
+    margin-left:2rem;
 }
 }
 .bx-def-margin-left-auto {
 .bx-def-margin-left-auto {
-    margin-left:20px;
-    margin-left:1.2rem;
+    margin-left:30px;
+    margin-left:2rem;
 }
 }
 .bx-def-margin-left-auto:first-child {
 .bx-def-margin-left-auto:first-child {
     margin-left:0;
     margin-left:0;

+ 7 - 0
template/css/menu.css

@@ -31,6 +31,13 @@ ul.bx-menu-hor {
     color:#000;
     color:#000;
 }
 }
 
 
+.bx-menu-hor.bx-menu-hor-inline li {
+	margin-left:0px;
+}
+.bx-menu-hor.bx-menu-hor-inline li:first-child {
+	display: none;
+}
+
 /* --------------- vertical menu */
 /* --------------- vertical menu */
 
 
 ul.bx-menu-ver {
 ul.bx-menu-ver {

+ 2 - 1
template/menu_inline.html

@@ -1,5 +1,6 @@
-<ul id="bx-menu-inline" class="bx-menu-hor bx-menu-object-__object__ bx-clearfix">
+<ul id="bx-menu-inline" class="bx-menu-hor bx-menu-hor-inline bx-menu-object-__object__ bx-clearfix">
     <bx_repeat:menu_items>
     <bx_repeat:menu_items>
+    	<li class="bullet bx-def-padding-thd-leftright">&#183;</li>
         <li class="__class_add__">
         <li class="__class_add__">
         	<a href="__link__" target="__target__" onclick="__onclick__">
         	<a href="__link__" target="__target__" onclick="__onclick__">
 				<bx_if:icon><i class="sys-icon __icon__"></i></bx_if:icon>
 				<bx_if:icon><i class="sys-icon __icon__"></i></bx_if:icon>

+ 7 - 1
template/scripts/BxBaseMenuCmts.php → template/scripts/BxBaseCmtsMenu.php

@@ -13,7 +13,7 @@ bx_import('BxTemplMenu');
  * Menu representation.
  * Menu representation.
  * @see BxDolMenu
  * @see BxDolMenu
  */
  */
-class BxBaseMenuCmts extends BxTemplMenu 
+class BxBaseCmtsMenu extends BxTemplMenu 
 {
 {
 	protected $_oCmts;
 	protected $_oCmts;
 	protected $_aCmt;
 	protected $_aCmt;
@@ -66,18 +66,24 @@ class BxBaseMenuCmts extends BxTemplMenu
                 break;
                 break;
 
 
 			case 'item-rate-plus':
 			case 'item-rate-plus':
+				/*
+				//TODO: remove if Minus won't be used
 				if(!empty($this->_aCmt) && (int)$this->_aCmt['cmt_rated'] > 0)
 				if(!empty($this->_aCmt) && (int)$this->_aCmt['cmt_rated'] > 0)
 					return false;
 					return false;
+				*/
 
 
 				$sCheckFuncName = 'isRateAllowed';
 				$sCheckFuncName = 'isRateAllowed';
                 break;
                 break;
 
 
+			/*
+			//TODO: remove if Minus won't be used
 			case 'item-rate-minus':
 			case 'item-rate-minus':
 				if(!empty($this->_aCmt) && (int)$this->_aCmt['cmt_rated'] <= 0)
 				if(!empty($this->_aCmt) && (int)$this->_aCmt['cmt_rated'] <= 0)
 					return false;
 					return false;
 
 
                 $sCheckFuncName = 'isRateAllowed';
                 $sCheckFuncName = 'isRateAllowed';
                 break;
                 break;
+			*/
         }
         }
 
 
         if(!$sCheckFuncName || !method_exists($this->_oCmts, $sCheckFuncName))
         if(!$sCheckFuncName || !method_exists($this->_oCmts, $sCheckFuncName))

+ 11 - 9
template/scripts/BxBaseCmtsView.php

@@ -14,8 +14,8 @@ bx_import('BxTemplPaginate');
  * @see BxDolCmts
  * @see BxDolCmts
  */
  */
 class BxBaseCmtsView extends BxDolCmts {
 class BxBaseCmtsView extends BxDolCmts {
-	var $_sJsObjName;
-    var $_sStylePrefix;
+	protected $_sJsObjName;
+    protected $_sStylePrefix;
 
 
     function BxBaseCmtsView( $sSystem, $iId, $iInit = 1 ) {
     function BxBaseCmtsView( $sSystem, $iId, $iInit = 1 ) {
         BxDolCmts::BxDolCmts( $sSystem, $iId, $iInit );
         BxDolCmts::BxDolCmts( $sSystem, $iId, $iInit );
@@ -77,6 +77,8 @@ class BxBaseCmtsView extends BxDolCmts {
     	$aBp = array('parent_id' => $iParentId, 'vparent_id' => $iVParentId);
     	$aBp = array('parent_id' => $iParentId, 'vparent_id' => $iVParentId);
 
 
     	$sCmts = $this->getComments($aBp);
     	$sCmts = $this->getComments($aBp);
+    	if(empty($sCmts))
+			$sCmts = $this->_getEmpty();
 
 
     	$sCaption = _t('_cmt_block_comments_title', $this->getCommentsCount());
     	$sCaption = _t('_cmt_block_comments_title', $this->getCommentsCount());
     	$sContent = BxDolTemplate::getInstance()->parseHtmlByName('comments_block.html', array(
     	$sContent = BxDolTemplate::getInstance()->parseHtmlByName('comments_block.html', array(
@@ -110,7 +112,7 @@ class BxBaseCmtsView extends BxDolCmts {
 
 
 		$aCmts = $this->getCommentsArray($aBp['vparent_id'], $aBp['filter'], $aBp['order'], $aBp['start'], $aBp['per_view']);
 		$aCmts = $this->getCommentsArray($aBp['vparent_id'], $aBp['filter'], $aBp['order'], $aBp['start'], $aBp['per_view']);
 		if(empty($aCmts) || !is_array($aCmts))
 		if(empty($aCmts) || !is_array($aCmts))
-			return $this->_getEmpty();
+			return '';
 
 
 		$sCmts = '';
 		$sCmts = '';
 		foreach($aCmts as $k => $aCmt)
 		foreach($aCmts as $k => $aCmt)
@@ -251,12 +253,6 @@ class BxBaseCmtsView extends BxDolCmts {
         		'condition' => !empty($aTmplReplyTo),
         		'condition' => !empty($aTmplReplyTo),
         		'content' => $aTmplReplyTo
         		'content' => $aTmplReplyTo
         	),
         	),
-        	'view_link' => bx_append_url_params($this->_sViewUrl, array(
-        		'sys' => $this->_sSystem,
-        		'id' => $this->_iId,
-        		'cmt_id' => $aCmt['cmt_id']
-        	)),
-        	'ago' => bx_time_js($aCmt['cmt_time']),
         	'text' => $sText,
         	'text' => $sText,
         	'bx_if:show_more' => array(
         	'bx_if:show_more' => array(
         		'condition' => !empty($sTextMore),
         		'condition' => !empty($sTextMore),
@@ -451,6 +447,12 @@ class BxBaseCmtsView extends BxDolCmts {
         	'id' => $aCmt['cmt_id'],
         	'id' => $aCmt['cmt_id'],
         	'js_object' => $this->_sJsObjName,
         	'js_object' => $this->_sJsObjName,
         	'style_prefix' => $this->_sStylePrefix,
         	'style_prefix' => $this->_sStylePrefix,
+        	'view_link' => bx_append_url_params($this->_sViewUrl, array(
+        		'sys' => $this->_sSystem,
+        		'id' => $this->_iId,
+        		'cmt_id' => $aCmt['cmt_id']
+        	)),
+        	'ago' => bx_time_js($aCmt['cmt_time']),
         	'menu_actions' => $oMenuActions->getCode(),
         	'menu_actions' => $oMenuActions->getCode(),
         	'bx_if:hide_rate_count' => array(
         	'bx_if:hide_rate_count' => array(
         		'condition' => (int)$aCmt['cmt_rate'] <= 0,
         		'condition' => (int)$aCmt['cmt_rate'] <= 0,