AntonLV 13 anos atrás
pai
commit
e95ce4a11d

+ 8 - 4
inc/classes/BxDolCmts.php

@@ -140,6 +140,8 @@ class BxDolCmts extends BxDol
 	protected $_sTableImages;
 	protected $_sTableImages2Entries;
 
+	protected $_aImageUploaders;
+
 	protected $_sViewUrl = '';
 	protected $_sBaseUrl = '';
 
@@ -176,8 +178,8 @@ class BxDolCmts extends BxDol
         else
             return;
 
-		$this->_aSystem['table_images'] = 'sys_images_cmts';
-		$this->_aSystem['table_images2entries'] = 'sys_images_cmts2entries';
+		$this->_aSystem['table_images'] = 'sys_cmts_images';
+		$this->_aSystem['table_images2entries'] = 'sys_cmts_images2entries';
 
         $this->_iDpMaxLevel = (int)$this->_aSystem['number_of_levels'];
         $this->_sDisplayType = $this->_iDpMaxLevel == 0 ? BX_CMT_DISPLAY_FLAT : BX_CMT_DISPLAY_THREADED;
@@ -208,8 +210,10 @@ class BxDolCmts extends BxDol
 		$this->_sFormDisplayPost = 'sys_comment_post';
 		$this->_sFormDisplayEdit = 'sys_comment_edit';
 
-		$this->_sStorageObject = 'sys_images_cmts';
-		$this->_sTranscoderPreview = 'sys_images_cmts_preview';
+		$this->_sStorageObject = 'sys_cmts_images';
+		$this->_sTranscoderPreview = 'sys_cmts_images_preview';
+
+		$this->_aImageUploaders = array('sys_cmts_simple');
 
         if ($iInit)
             $this->init($iId);

+ 2 - 0
inc/classes/BxDolCmtsQuery.php

@@ -112,6 +112,7 @@ class BxDolCmtsQuery extends BxDolDb
                 `c`.`cmt_rate`,
                 `c`.`cmt_rate_count`,
                 `c`.`cmt_replies`,
+                `c`.`cmt_time`,
                 (? - `c`.`cmt_time`) AS `cmt_secs_ago`
             FROM `{$this->_sTable}` AS `c`
             $sJoin
@@ -150,6 +151,7 @@ class BxDolCmtsQuery extends BxDolDb
                 `c`.`cmt_rate`,
                 `c`.`cmt_rate_count`,
                 `c`.`cmt_replies`,
+                `c`.`cmt_time`,
                 ($iTimestamp - `c`.`cmt_time`) AS `cmt_secs_ago`
             FROM {$this->_sTable} AS `c`
             $sJoin

+ 4 - 0
inc/js/classes/BxDolCmts.js

@@ -313,6 +313,10 @@ BxDolCmts.prototype.showImage = function(oLink, iId) {
     );
 };
 
+BxDolCmts.prototype.hideImage = function(oLink) {
+	$(".bx-popup-applied:visible").dolPopupHide();
+};
+
 BxDolCmts.prototype.toggleReply = function(e, iCmtParentId)
 {
 	var $this = this;

+ 2 - 2
install/index.php

@@ -124,7 +124,7 @@ define('BX_DOL_INT_MAX', 2147483647);
 define('BX_DOL_TRANSCODER_OBJ_ICON_APPLE', 'sys_icon_apple');
 define('BX_DOL_TRANSCODER_OBJ_ICON_FACEBOOK', 'sys_icon_facebook');
 define('BX_DOL_TRANSCODER_OBJ_ICON_FAVICON', 'sys_icon_favicon');
-define('BX_DOL_TRANSCODER_OBJ_IMAGE_PREVIEW_CMTS', 'sys_images_cmts_preview');
+define('BX_DOL_TRANSCODER_OBJ_CMTS_IMAGE_PREVIEW', 'sys_cmts_images_preview');
 
 //--- Module types ---//
 define('BX_DOL_MODULE_TYPE_MODULE', 'module');
@@ -1205,7 +1205,7 @@ function genMainDolphinPage() {
         BX_DOL_TRANSCODER_OBJ_ICON_APPLE, 
         BX_DOL_TRANSCODER_OBJ_ICON_FACEBOOK, 
         BX_DOL_TRANSCODER_OBJ_ICON_FAVICON,
-        BX_DOL_TRANSCODER_OBJ_IMAGE_PREVIEW_CMTS
+        BX_DOL_TRANSCODER_OBJ_CMTS_IMAGE_PREVIEW
     );
 
     bx_import('BxDolImageTranscoder');

+ 12 - 12
install/sql/v70.sql

@@ -5,7 +5,7 @@
 -- --------------------------------------------------------
 
 SET NAMES 'utf8';
-DROP TABLE IF EXISTS `sys_categories`, `sys_keys`, `sys_objects_editor`, `sys_objects_captcha`, `sys_objects_social_sharing`, `sys_objects_categories`, `sys_objects_cmts`, `sys_email_templates`, `sys_options`, `sys_options_cats`, `sys_ip_list`, `sys_ip_members_visits`, `sys_localization_categories`, `sys_localization_keys`, `sys_localization_languages`, `sys_localization_string_params`, `sys_localization_strings`, `sys_acl_actions`, `sys_acl_actions_track`, `sys_acl_matrix`, `sys_acl_level_prices`, `sys_acl_levels`, `sys_sessions`, `sys_acl_levels_members`, `sys_objects_search`, `sys_stat_site`, `sys_alerts`, `sys_alerts_handlers`, `sys_injections`, `sys_injections_admin`, `sys_modules`, `sys_modules_file_tracks`, `sys_permalinks`, `sys_objects_privacy`, `sys_privacy_defaults`, `sys_privacy_groups`, `sys_privacy_members`, `sys_tags`, `sys_objects_tag`, `sys_transactions`, `sys_objects_auths`, `sys_objects_vote`, `sys_objects_views`, `sys_cron_jobs`, `sys_dnsbl_rules`, `sys_dnsbl_block_log`, `sys_dnsbluri_zones`, `sys_menu_mobile`, `sys_menu_mobile_pages`, `sys_objects_storage`, `sys_objects_uploader`, `sys_storage_user_quotas`, `sys_storage_tokens`, `sys_storage_ghosts`, `sys_storage_mime_types`, `sys_objects_transcoder_images`, `sys_transcoder_images_files`, `sys_transcoder_images_filters`,`sys_accounts`,`sys_profiles`;
+DROP TABLE IF EXISTS `sys_categories`, `sys_keys`, `sys_objects_editor`, `sys_objects_captcha`, `sys_objects_social_sharing`, `sys_objects_categories`, `sys_objects_cmts`, `sys_cmts_images`, `sys_cmts_images_preview`, `sys_cmts_images2entries`, `sys_email_templates`, `sys_options`, `sys_options_cats`, `sys_ip_list`, `sys_ip_members_visits`, `sys_localization_categories`, `sys_localization_keys`, `sys_localization_languages`, `sys_localization_string_params`, `sys_localization_strings`, `sys_acl_actions`, `sys_acl_actions_track`, `sys_acl_matrix`, `sys_acl_level_prices`, `sys_acl_levels`, `sys_sessions`, `sys_acl_levels_members`, `sys_objects_search`, `sys_stat_site`, `sys_alerts`, `sys_alerts_handlers`, `sys_injections`, `sys_injections_admin`, `sys_modules`, `sys_modules_file_tracks`, `sys_permalinks`, `sys_objects_privacy`, `sys_privacy_defaults`, `sys_privacy_groups`, `sys_privacy_members`, `sys_tags`, `sys_objects_tag`, `sys_transactions`, `sys_objects_auths`, `sys_objects_vote`, `sys_objects_views`, `sys_cron_jobs`, `sys_dnsbl_rules`, `sys_dnsbl_block_log`, `sys_dnsbluri_zones`, `sys_menu_mobile`, `sys_menu_mobile_pages`, `sys_objects_storage`, `sys_objects_uploader`, `sys_storage_user_quotas`, `sys_storage_tokens`, `sys_storage_ghosts`, `sys_storage_mime_types`, `sys_objects_transcoder_images`, `sys_transcoder_images_files`, `sys_transcoder_images_filters`,`sys_accounts`,`sys_profiles`;
 ALTER DATABASE DEFAULT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci';
 
 
@@ -991,9 +991,9 @@ CREATE TABLE `sys_images` (
 -- --------------------------------------------------------
 
 --
--- Table structure for table `sys_images_cmts`
+-- Table structure for table `sys_cmts_images`
 --
-CREATE TABLE IF NOT EXISTS `sys_images_cmts` (
+CREATE TABLE IF NOT EXISTS `sys_cmts_images` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `profile_id` int(10) unsigned NOT NULL,
   `remote_id` varchar(255) NOT NULL,
@@ -1012,9 +1012,9 @@ CREATE TABLE IF NOT EXISTS `sys_images_cmts` (
 -- --------------------------------------------------------
 
 --
--- Table structure for table `sys_images_cmts_preview`
+-- Table structure for table `sys_cmts_images_preview`
 --
-CREATE TABLE IF NOT EXISTS `sys_images_cmts_preview` (
+CREATE TABLE IF NOT EXISTS `sys_cmts_images_preview` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `profile_id` int(10) unsigned NOT NULL,
   `remote_id` varchar(255) NOT NULL,
@@ -1033,9 +1033,9 @@ CREATE TABLE IF NOT EXISTS `sys_images_cmts_preview` (
 -- --------------------------------------------------------
 
 --
--- Table structure for table `sys_images_cmts2entries`
+-- Table structure for table `sys_cmts_images2entries`
 --
-CREATE TABLE IF NOT EXISTS `sys_images_cmts2entries` (
+CREATE TABLE IF NOT EXISTS `sys_cmts_images2entries` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `system_id` int(11) NOT NULL DEFAULT '0',
   `cmt_id` int(11) NOT NULL DEFAULT '0',
@@ -1318,8 +1318,8 @@ CREATE TABLE IF NOT EXISTS `sys_objects_storage` (
 
 INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
 ('sys_images', 'Local', '', 360, 2592000, 0, 'sys_images', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
-('sys_images_cmts', 'Local', '', 360, 2592000, 3, 'sys_images_cmts', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
-('sys_images_cmts_preview', 'Local', '', 360, 2592000, 3, 'sys_images_cmts_preview', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0);
+('sys_cmts_images', 'Local', '', 360, 2592000, 3, 'sys_cmts_images', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('sys_cmts_images_preview', 'Local', '', 360, 2592000, 3, 'sys_cmts_images_preview', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0);
 
 CREATE TABLE IF NOT EXISTS `sys_storage_user_quotas` (
   `profile_id` int(11) NOT NULL,
@@ -2273,7 +2273,7 @@ CREATE TABLE IF NOT EXISTS `sys_objects_uploader` (
 INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
 ('sys_simple', 1, 'BxTemplUploaderSimple', ''),
 ('sys_html5', 1, 'BxTemplUploaderHTML5', ''),
-('sys_simple_cmts', 1, 'BxTemplCmtsUploaderSimple', '');
+('sys_cmts_simple', 1, 'BxTemplCmtsUploaderSimple', '');
 
 
 -- --------------------------------------------------------
@@ -3191,7 +3191,7 @@ INSERT INTO `sys_objects_transcoder_images` (`object`, `storage_object`, `source
 ('sys_icon_apple', 'sys_images', 'Storage', 'a:1:{s:6:"object";s:10:"sys_images";}', 'no', '0', '0', '0'),
 ('sys_icon_facebook', 'sys_images', 'Storage', 'a:1:{s:6:"object";s:10:"sys_images";}', 'no', '0', '0', '0'),
 ('sys_icon_favicon', 'sys_images', 'Storage', 'a:1:{s:6:"object";s:10:"sys_images";}', 'no', '0', '0', '0'),
-('sys_images_cmts_preview', 'sys_images_cmts_preview', 'Storage', 'a:1:{s:6:"object";s:15:"sys_images_cmts";}', 'no', '1', '2592000', '0');
+('sys_cmts_images_preview', 'sys_cmts_images_preview', 'Storage', 'a:1:{s:6:"object";s:15:"sys_cmts_images";}', 'no', '1', '2592000', '0');
 
 
 CREATE TABLE IF NOT EXISTS `sys_transcoder_images_files` (
@@ -3217,7 +3217,7 @@ INSERT INTO `sys_transcoder_images_filters` (`transcoder_object`, `filter`, `fil
 ('sys_icon_apple', 'Resize', 'a:4:{s:1:"w";s:3:"129";s:1:"h";s:3:"129";s:13:"square_resize";s:1:"1";s:10:"force_type";s:3:"png";}', '0'),
 ('sys_icon_facebook', 'Resize', 'a:4:{s:1:"w";s:3:"100";s:1:"h";s:3:"100";s:13:"square_resize";s:1:"1";s:10:"force_type";s:3:"png";}', '0'),
 ('sys_icon_favicon', 'Resize', 'a:4:{s:1:"w";s:2:"16";s:1:"h";s:2:"16";s:13:"square_resize";s:1:"1";s:10:"force_type";s:3:"png";}', '0'),
-('sys_images_cmts_preview', 'Resize', 'a:4:{s:1:"w";s:3:"100";s:1:"h";s:3:"100";s:13:"square_resize";s:1:"1";s:10:"force_type";s:3:"jpg";}', '0');
+('sys_cmts_images_preview', 'Resize', 'a:4:{s:1:"w";s:3:"100";s:1:"h";s:3:"100";s:13:"square_resize";s:1:"1";s:10:"force_type";s:3:"jpg";}', '0');
 
 
 -- --------------------------------------------------------

+ 1 - 0
modules/boonex/english/data/langs/system.xml

@@ -1183,6 +1183,7 @@ Please click "Continue" below to navigate to the home page of the site.]]></stri
 	<string name="_cmt_page_view_title"><![CDATA[Comment to <a href="{0}">{1}</a>]]></string>
 	<string name="_cmt_block_comments_title"><![CDATA[Comments ({0})]]></string>
 	<string name="_cmt_view_attached_image"><![CDATA[View attached image]]></string>
+	<string name="_cmt_close_attached_image"><![CDATA[Close]]></string>
 	<string name="_cmt_err_cannot_perform_action"><![CDATA[Cannot perform action. Please report.]]></string>
 	<string name="_cmt_err_duplicate"><![CDATA[Duplicate vote.]]></string>
 	<string name="_Reply_to_this_comment"><![CDATA[Reply]]></string>

+ 1 - 1
template/bx_img.html

@@ -1 +1 @@
-<img <bx_if:class>class="__content__"</bx_if:class> src="__src__" alt="__alt__" title="__alt__" />
+<img src="__src__" <bx_repeat:attrs>__key__="__value__"</bx_repeat:attrs> />

+ 1 - 0
template/css/cmts.css

@@ -170,6 +170,7 @@
 		position: relative;
 		max-width: 600px;
 		max-height: 600px;
+		cursor: pointer;
 	}
 	
     /*--- Comment Actions ---*/

+ 44 - 44
template/scripts/BxBaseCmtsView.php

@@ -125,8 +125,8 @@ class BxBaseCmtsView extends BxDolCmts {
 			return '';
 
 		$sCmts = '';
-		foreach($aCmts as $k => $r)
-			$sCmts .= $this->getComment($r, $aBp, $aDp);
+		foreach($aCmts as $k => $aCmt)
+			$sCmts .= $this->getComment($aCmt, $aBp, $aDp);
 
 		$sCmts = $this->_getMoreLink($sCmts, $aBp, $aDp);
 		return $sCmts;
@@ -156,20 +156,20 @@ class BxBaseCmtsView extends BxDolCmts {
     	$oTemplate = BxDolTemplate::getInstance();
 
     	$iUserId = $this->_getAuthorId();
-    	$r = !is_array($mixedCmt) ? $this->getCommentRow((int)$mixedCmt) : $mixedCmt;
+    	$aCmt = !is_array($mixedCmt) ? $this->getCommentRow((int)$mixedCmt) : $mixedCmt;
 
-        list($sAuthorName, $sAuthorLink, $sAuthorIcon) = $this->_getAuthorInfo($r['cmt_author_id']);
+        list($sAuthorName, $sAuthorLink, $sAuthorIcon) = $this->_getAuthorInfo($aCmt['cmt_author_id']);
 
         $sClass = $sRet = '';
-        if($r['cmt_rated'] == -1 || $r['cmt_rate'] < $this->_aSystem['viewing_threshold']) {
+        if($aCmt['cmt_rated'] == -1 || $aCmt['cmt_rate'] < $this->_aSystem['viewing_threshold']) {
         	$oTemplate->pareseHtmlByName('comment_hidden.html', array(
         		'js_object' => $this->_sJsObjName,
-        		'id' => $r['cmt_id'],
+        		'id' => $aCmt['cmt_id'],
         		'title' => bx_process_output(_t('_hidden_comment', $sAuthorName)),
         		'bx_if:show_replies' => array(
-        			'condition' => $r['cmt_replies'] > 0,
+        			'condition' => $aCmt['cmt_replies'] > 0,
         			'content' => array(
-						'replies' => _t('_Show N replies', $r['cmt_replies'])
+						'replies' => _t('_Show N replies', $aCmt['cmt_replies'])
         			)
         		)
         	));
@@ -177,12 +177,12 @@ class BxBaseCmtsView extends BxDolCmts {
             $sClass = ' cmt-hidden';
         }
 
-		if($r['cmt_author_id'] == $iUserId)
+		if($aCmt['cmt_author_id'] == $iUserId)
 			$sClass .= ' cmt-mine';
 
-		$sActions = $this->_getActionsBox($r, $aDp);
+		$sActions = $this->_getActionsBox($aCmt, $aDp);
 
-		$sText = $r['cmt_text'];
+		$sText = $aCmt['cmt_text'];
 		$sTextMore = '';
 
 		$iMaxLength = (int)$this->_aSystem['chars_display_max'];
@@ -197,19 +197,19 @@ class BxBaseCmtsView extends BxDolCmts {
 		$sTextMore = $this->_prepareTextForOutput($sTextMore);
 
 		$aTmplReplyTo = array();
-		if((int)$r['cmt_parent_id'] != 0) {
-			$aParent = $this->getCommentRow($r['cmt_parent_id']);
+		if((int)$aCmt['cmt_parent_id'] != 0) {
+			$aParent = $this->getCommentRow($aCmt['cmt_parent_id']);
 			list($sParAuthorName, $sParAuthorLink, $sParAuthorIcon) = $this->_getAuthorInfo($aParent['cmt_author_id']);
 
 			$aTmplReplyTo = array(
 				'style_prefix' => $this->_sStylePrefix,
-        		'par_cmt_link' => $this->getBaseUrl() . '#' . $this->_sSystem . $r['cmt_parent_id'],
+        		'par_cmt_link' => $this->getBaseUrl() . '#' . $this->_sSystem . $aCmt['cmt_parent_id'],
         		'par_cmt_author' => $sParAuthorName
         	);
 		}
 
 		$aTmplImages = array();
-		$aImages = $this->_oQuery->getImages($this->_aSystem['system_id'], $r['cmt_id']);
+		$aImages = $this->_oQuery->getImages($this->_aSystem['system_id'], $aCmt['cmt_id']);
 		if(!empty($aImages) && is_array($aImages)) {
 			bx_import('BxDolImageTranscoder');
         	$oTranscoder = BxDolImageTranscoder::getObjectInstance($this->_sTranscoderPreview);
@@ -225,15 +225,15 @@ class BxBaseCmtsView extends BxDolCmts {
 		}
 
 		$sReplies = '';
-		if((int)$r['cmt_replies'] > 0 && !empty($aDp) && $aDp['type'] == BX_CMT_DISPLAY_THREADED)
-			$sReplies = $this->getComments(array('parent_id' => $r['cmt_id'], 'vparent_id' => $r['cmt_id'], 'type' => $aBp['type']), $aDp);
+		if((int)$aCmt['cmt_replies'] > 0 && !empty($aDp) && $aDp['type'] == BX_CMT_DISPLAY_THREADED)
+			$sReplies = $this->getComments(array('parent_id' => $aCmt['cmt_id'], 'vparent_id' => $aCmt['cmt_id'], 'type' => $aBp['type']), $aDp);
 
 		$bAuthorIcon = !empty($sAuthorIcon);
         return $oTemplate->parseHtmlByName('comment.html', array(
         	'system' => $this->_sSystem,
         	'style_prefix' => $this->_sStylePrefix,
         	'js_object' => $this->_sJsObjName,
-        	'id' => $r['cmt_id'],
+        	'id' => $aCmt['cmt_id'],
         	'class' => $sClass,
         	'bx_if:show_icon' => array(
         		'condition' => $bAuthorIcon,
@@ -265,15 +265,15 @@ class BxBaseCmtsView extends BxDolCmts {
         	'view_link' => bx_append_url_params($this->_sViewUrl, array(
         		'sys' => $this->_sSystem,
         		'id' => $this->_iId,
-        		'cmt_id' => $r['cmt_id']
+        		'cmt_id' => $aCmt['cmt_id']
         	)),
-        	'ago' => $r['cmt_ago'],
+        	'ago' => bx_time_js($aCmt['cmt_time']),
         	'bx_if:hide_rate_count' => array(
-        		'condition' => (int)$r['cmt_rate'] <= 0,
+        		'condition' => (int)$aCmt['cmt_rate'] <= 0,
         		'content' => array()
         	),
         	'title_plused_by' => bx_html_attribute(_t('_Plused_by_popup')),
-        	'points' => _t(in_array($r['cmt_rate'], array(-1, 0, 1)) ? '_N_point' : '_N_points', $r['cmt_rate']),
+        	'points' => _t(in_array($aCmt['cmt_rate'], array(-1, 0, 1)) ? '_N_point' : '_N_points', $aCmt['cmt_rate']),
         	'text' => $sText,
         	'bx_if:show_more' => array(
         		'condition' => !empty($sTextMore),
@@ -352,12 +352,12 @@ class BxBaseCmtsView extends BxDolCmts {
 
     	bx_import('BxTemplStudioFunctions');
         $sContent = BxTemplStudioFunctions::getInstance()->transBox($oTemplate->parseHtmlByName('bx_img.html', array(
-    		'bx_if:class' => array(
-        		'condition' => false,
-        		'content' => array()
-        	),
     		'src' => $oStorage->getFileUrlById($iImgId),
-        	'alt' => bx_html_attribute(_t('_cmt_view_attached_image'))
+        	'bx_repeat:attrs' => array(
+        		array('key' => 'alt', 'value' => bx_html_attribute(_t('_cmt_view_attached_image'))),
+        		array('key' => 'title', 'value' => bx_html_attribute(_t('_cmt_close_attached_image'))),
+        		array('key' => 'onclick', 'value' => $this->_sJsObjName . '.hideImage(this);')
+        	)
     	)));
 
         return $oTemplate->parseHtmlByName('comment_image.html', array(
@@ -416,19 +416,19 @@ class BxBaseCmtsView extends BxDolCmts {
 		));
     }
 
-	protected function _getActionsBox(&$a, $aDp = array())
+	protected function _getActionsBox(&$aCmt, $aDp = array())
     {
     	$oTemplate = BxDolTemplate::getInstance();
 
         $iUserId = $this->_getAuthorId();
-        $isEditAllowedPermanently = ($a['cmt_author_id'] == $iUserId && $this->isEditAllowed()) || $this->isEditAllowedAll();
-        $isRemoveAllowedPermanently = ($a['cmt_author_id'] == $iUserId && $this->isRemoveAllowed()) || $this->isRemoveAllowedAll();
+        $isEditAllowedPermanently = ($aCmt['cmt_author_id'] == $iUserId && $this->isEditAllowed()) || $this->isEditAllowedAll();
+        $isRemoveAllowedPermanently = ($aCmt['cmt_author_id'] == $iUserId && $this->isRemoveAllowed()) || $this->isRemoveAllowedAll();
 
 		$sManagePopupId = $sManagePopupText = '';
         if($isEditAllowedPermanently || $isRemoveAllowedPermanently) {
 			$aMenu = array(
-				array('name' => 'cmt-edit', 'icon' => 'pencil', 'onclick' => $this->_sJsObjName . ".cmtEdit(this, " . $a['cmt_id'] . ")", 'title' => _t('_Edit')),
-				array('name' => 'cmt-delete', 'icon' => 'remove', 'onclick' => $this->_sJsObjName . ".cmtRemove(this, " . $a['cmt_id'] . ")", 'title' => _t('_Delete')),
+				array('name' => 'cmt-edit', 'icon' => 'pencil', 'onclick' => $this->_sJsObjName . ".cmtEdit(this, " . $aCmt['cmt_id'] . ")", 'title' => _t('_Edit')),
+				array('name' => 'cmt-delete', 'icon' => 'remove', 'onclick' => $this->_sJsObjName . ".cmtRemove(this, " . $aCmt['cmt_id'] . ")", 'title' => _t('_Delete')),
 			);
 
         	bx_import('BxTemplStudioMenu');
@@ -441,24 +441,24 @@ class BxBaseCmtsView extends BxDolCmts {
 	        )));
         }
 
-        $bRated = (int)$a['cmt_rated'] > 0;
+        $bRated = (int)$aCmt['cmt_rated'] > 0;
         return $oTemplate->parseHtmlByName('comment_actions.html', array(
-        	'id' => $a['cmt_id'],
+        	'id' => $aCmt['cmt_id'],
         	'style_prefix' => $this->_sStylePrefix,
         	'view_link' => bx_append_url_params($this->_sViewUrl, array(
         		'sys' => $this->_sSystem,
         		'id' => $this->_iId,
-        		'cmt_id' => $a['cmt_id']
+        		'cmt_id' => $aCmt['cmt_id']
         	)),
-        	'ago' => $a['cmt_ago'],
-        	'points' => _t($a['cmt_rate'] == 1 || $a['cmt_rate'] == -1 ? '_N_point' : '_N_points', $a['cmt_rate']),
+        	'ago' => $aCmt['cmt_ago'],
+        	'points' => _t($aCmt['cmt_rate'] == 1 || $aCmt['cmt_rate'] == -1 ? '_N_point' : '_N_points', $aCmt['cmt_rate']),
         	'bx_if:show_reply' => array(
 				'condition' => $this->isPostReplyAllowed(),
         		'content' => array(
         			'js_object' => $this->_sJsObjName,
         			'style_prefix' => $this->_sStylePrefix,
-        			'id' => $a['cmt_id'],
-        			'title_reply' => bx_html_attribute(_t(isset($a['cmt_type']) && $a['cmt_type'] == 'comment' ? '_Comment_to_this_comment' : '_Reply_to_this_comment'))
+        			'id' => $aCmt['cmt_id'],
+        			'title_reply' => bx_html_attribute(_t(isset($aCmt['cmt_type']) && $aCmt['cmt_type'] == 'comment' ? '_Comment_to_this_comment' : '_Reply_to_this_comment'))
         		)
         	),
         	'bx_if:show_rate' => array(
@@ -466,7 +466,7 @@ class BxBaseCmtsView extends BxDolCmts {
         		'content' => array(
         			'js_object' => $this->_sJsObjName,
         			'style_prefix' => $this->_sStylePrefix,
-        			'id' => $a['cmt_id'],
+        			'id' => $aCmt['cmt_id'],
         			'bx_if:hide_rate_plus' => array(
         				'condition' => $bRated,
         				'content' => array()
@@ -484,9 +484,9 @@ class BxBaseCmtsView extends BxDolCmts {
         		'content' => array(
         			'js_object' => $this->_sJsObjName,
         			'style_prefix' => $this->_sStylePrefix,
-        			'id' => $a['cmt_id'],
+        			'id' => $aCmt['cmt_id'],
         			'title_manage' => bx_html_attribute(_t('_Manage')),
-        			'popup_id' => $this->_sSystem . '-manage' . $a['cmt_id'],
+        			'popup_id' => $this->_sSystem . '-manage' . $aCmt['cmt_id'],
         			'popup_text' => $sManagePopupText
         		)
         	)
@@ -574,7 +574,7 @@ class BxBaseCmtsView extends BxDolCmts {
 	    		$iCmtVisualParentId = $iLevel > $this->getMaxLevel() ? $aParent['cmt_vparent_id'] : $iCmtParentId;
 	    	}
 
-			$iCmtId = (int)$oForm->insert(array('cmt_vparent_id' => $iCmtVisualParentId, 'cmt_object_id' => $this->_iId, 'cmt_author_id' => $iCmtAuthorId, 'cmt_level' => $iLevel, 'cmt_time' => mktime()));
+			$iCmtId = (int)$oForm->insert(array('cmt_vparent_id' => $iCmtVisualParentId, 'cmt_object_id' => $this->_iId, 'cmt_author_id' => $iCmtAuthorId, 'cmt_level' => $iLevel, 'cmt_time' => time()));
 			if($iCmtId != 0) {
 				$aImages = $oForm->getCleanValue('cmt_image');
 				if(!empty($aImages) || is_array($aImages)) {
@@ -671,7 +671,7 @@ class BxBaseCmtsView extends BxDolCmts {
 	
 	        $oForm->aInputs['cmt_image']['storage_object'] = $this->_sStorageObject;
 	        $oForm->aInputs['cmt_image']['images_transcoder'] = $this->_sTranscoderPreview;
-	        $oForm->aInputs['cmt_image']['uploaders'] = array('sys_simple_cmts');
+	        $oForm->aInputs['cmt_image']['uploaders'] = $this->_aImageUploaders;
 	        $oForm->aInputs['cmt_image']['upload_buttons_titles'] = array('Simple' => 'camera');
 	        $oForm->aInputs['cmt_image']['multiple'] = true;
 	        $oForm->aInputs['cmt_image']['ghost_template'] = $oFormNested;