Forráskód Böngészése

Ticket #2430 - Icons alignment, actions refactoring, etc.

AntonLV 7 éve
szülő
commit
956e4e9e16
62 módosított fájl, 526 hozzáadás és 342 törlés
  1. 25 0
      inc/classes/BxDolObject.php
  2. 10 10
      inc/classes/BxDolScore.php
  3. 24 3
      inc/classes/BxDolVote.php
  4. 1 1
      inc/classes/BxDolVoteReactions.php
  5. 9 9
      inc/js/classes/BxDolFavorite.js
  6. 15 17
      inc/js/classes/BxDolFeature.js
  7. 11 11
      inc/js/classes/BxDolReport.js
  8. 33 29
      inc/js/classes/BxDolScore.js
  9. 13 13
      inc/js/classes/BxDolView.js
  10. 3 0
      inc/js/classes/BxDolVote.js
  11. 11 2
      inc/js/classes/BxDolVoteLikes.js
  12. 5 3
      inc/js/classes/BxDolVoteReactions.js
  13. 1 1
      modules/boonex/ads/install/langs/en.xml
  14. 7 5
      modules/boonex/protean/data/template/system/css/menu.less
  15. 37 25
      modules/boonex/timeline/classes/BxTimelineMenuItemActions.php
  16. 9 4
      modules/boonex/timeline/classes/BxTimelineMenuItemCounters.php
  17. 5 0
      modules/boonex/timeline/template/css/repost.css
  18. 18 3
      modules/boonex/timeline/template/css/view.css
  19. 2 2
      modules/boonex/timeline/template/item_outline.html
  20. 2 2
      modules/boonex/timeline/template/item_timeline.html
  21. 1 1
      modules/boonex/timeline/template/menu_custom_item_hor.html
  22. 1 1
      modules/boonex/timeline/template/repost_do_repost_label.html
  23. 1 1
      modules/boonex/timeline/template/repost_element_block.html
  24. 1 1
      template/comment_counter.html
  25. 7 4
      template/css/cmts.css
  26. 10 2
      template/css/default.less
  27. 5 0
      template/css/favorite.css
  28. 5 0
      template/css/report.css
  29. 12 11
      template/css/score.css
  30. 8 5
      template/css/view.css
  31. 18 22
      template/css/vote.css
  32. 1 1
      template/favorite_do_favorite_label.html
  33. 1 1
      template/favorite_element_block.html
  34. 1 1
      template/favorite_element_inline.html
  35. 1 1
      template/feature_do_feature_label.html
  36. 1 1
      template/report_do_report_label.html
  37. 1 1
      template/report_element_block.html
  38. 1 1
      template/report_element_inline.html
  39. 1 1
      template/score_counter_label.html
  40. 1 1
      template/score_do_vote_label.html
  41. 6 6
      template/score_element_block.html
  42. 1 1
      template/score_element_inline.html
  43. 12 4
      template/scripts/BxBaseCmts.php
  44. 15 12
      template/scripts/BxBaseFavorite.php
  45. 24 21
      template/scripts/BxBaseFeature.php
  46. 1 0
      template/scripts/BxBaseReport.php
  47. 44 36
      template/scripts/BxBaseScore.php
  48. 2 0
      template/scripts/BxBaseView.php
  49. 17 14
      template/scripts/BxBaseVote.php
  50. 16 14
      template/scripts/BxBaseVoteLikes.php
  51. 56 26
      template/scripts/BxBaseVoteReactions.php
  52. 1 1
      template/view_counter_label.html
  53. 1 1
      template/view_do_view_label.html
  54. 1 1
      template/view_element_block.html
  55. 1 1
      template/view_element_inline.html
  56. 1 1
      template/vote_counter_label_likes.html
  57. 1 1
      template/vote_counter_label_reactions.html
  58. 3 1
      template/vote_counter_wrapper_reactions.html
  59. 1 1
      template/vote_do_vote_label_likes.html
  60. 1 1
      template/vote_do_vote_label_reactions.html
  61. 1 1
      template/vote_element_block.html
  62. 1 1
      template/vote_element_inline.html

+ 25 - 0
inc/classes/BxDolObject.php

@@ -305,6 +305,31 @@ class BxDolObject extends BxDolFactory implements iBxDolReplaceable
         return bx_replace_markers($mixed, $this->_aMarkers);
     }
 
+    
+    protected function _getRequestParamsData($aKeys = array())
+    {
+        $sParams = bx_get('params');
+        if($sParams === false)
+            return array();
+
+        $aParams = array();
+        parse_str(bx_process_input($sParams), $aParams);
+
+        return $aParams;
+    }
+
+    protected function _prepareRequestParamsData($aParams, $aParamsAdd = array())
+    {
+        $aRequestParams = array_intersect_key($aParams, $this->_aElementDefaults);
+        $aRequestParams = array_merge($aRequestParams, $aParamsAdd);
+
+        foreach($aRequestParams as $sKey => $mixedValue)
+            if(is_bool($mixedValue))
+                $aRequestParams[$sKey] = (int)$mixedValue;
+
+        return $aRequestParams;
+    }
+
     protected function _getTmplContentElementBlock()
     {
         return $this->_sTmplContentElementBlock;

+ 10 - 10
inc/classes/BxDolScore.php

@@ -206,8 +206,7 @@ class BxDolScore extends BxDolObject
         if (!$this->isEnabled())
            return '';
 
-        $aParams = $this->_decodeElementParams(bx_process_input(bx_get('element_params')));
-
+        $aParams = $this->_getRequestParamsData();
         return $this->_getVotedBy($aParams);
     }
 
@@ -266,8 +265,6 @@ class BxDolScore extends BxDolObject
         if(!$this->isAllowedVote(true))
             return echoJson(array('code' => 2, 'message' => $this->msgErrAllowedVote()));
 
-        $aParams = $this->_decodeElementParams(bx_process_input(bx_get('element_params')));
-
         $iObjectId = $this->getId();
         $iObjectAuthorId = $this->getObjectAuthorId($iObjectId);
         $iAuthorId = $this->_getAuthorId();
@@ -277,7 +274,7 @@ class BxDolScore extends BxDolObject
         if($bVoted)
             return echoJson(array('code' => 3, 'message' => _t('_sys_score_err_duplicate_vote')));
 
-		$iId = $this->_oQuery->putVote($iObjectId, $iAuthorId, $iAuthorIp, $sType);
+        $iId = $this->_oQuery->putVote($iObjectId, $iAuthorId, $iAuthorIp, $sType);
         if($iId === false)
             return echoJson(array('code' => 5));
 
@@ -287,6 +284,9 @@ class BxDolScore extends BxDolObject
         bx_alert($this->_sSystem, 'doVote' . $sTypeUc, $iObjectId, $iAuthorId, array('score_id' => $iId, 'score_author_id' => $iAuthorId, 'object_author_id' => $iObjectAuthorId));
         bx_alert('score', 'do' . $sTypeUc, $iId, $iAuthorId, array('object_system' => $this->_sSystem, 'object_id' => $iObjectId, 'object_author_id' => $iObjectAuthorId));
 
+        $aParams = $this->_getRequestParamsData();
+        $aParams['show_script'] = false;
+
         $aScore = $this->_oQuery->getScore($iObjectId);
         $iCup = (int)$aScore['count_up'];
         $iCdown = (int)$aScore['count_down'];
@@ -294,13 +294,13 @@ class BxDolScore extends BxDolObject
             'code' => 0,
             'type' => $sType,
             'score' => $aScore['score'],
-        	'scoref' => $iCup > 0 || $iCdown > 0 ? $this->_getCounterLabel($aScore['score']) : '',
+            'scoref' => $iCup > 0 || $iCdown > 0 ? $this->_getCounterLabel($aScore['score'], $aParams) : '',
             'cup' => $iCup,
-        	'cdown' => $iCdown,
+            'cdown' => $iCdown,
             'counter' => $this->getCounter($aParams),
-        	'label_icon' => $this->_getIconDo($sType),
-        	'label_title' => _t($this->_getTitleDo($sType)),
-        	'disabled' => !$bVoted,
+            'label_icon' => $this->_getIconDo($sType),
+            'label_title' => _t($this->_getTitleDo($sType)),
+            'disabled' => !$bVoted,
         ));
     }
 

+ 24 - 3
inc/classes/BxDolVote.php

@@ -82,6 +82,8 @@ class BxDolVote extends BxDolObject
     protected $_sType;
     protected $_aVote;
 
+    protected $_aElementDefaults;
+
     protected function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
     {
         parent::__construct($sSystem, $iId, $iInit, $oTemplate);
@@ -221,6 +223,7 @@ class BxDolVote extends BxDolObject
             return echoJson(array('code' => 3, 'message' => _t('_vote_err_duplicate_vote')));
 
         $aData = $this->_getVoteData();
+        $aParams = $this->_getRequestParamsData();
         if($aData === false)
             return echoJson(array('code' => 4));
 
@@ -236,7 +239,7 @@ class BxDolVote extends BxDolObject
         bx_alert($this->_sSystem, ($bPerformUndo ? 'un' : '') . 'doVote', $iObjectId, $iAuthorId, array_merge(array('vote_id' => $iId, 'vote_author_id' => $iAuthorId, 'object_author_id' => $iObjectAuthorId), $aData));
         bx_alert('vote', ($bPerformUndo ? 'un' : '') . 'do', $iId, $iAuthorId, array_merge(array('object_system' => $this->_sSystem, 'object_id' => $iObjectId, 'object_author_id' => $iObjectAuthorId), $aData));
 
-        echoJson($this->_returnVoteData($iObjectId, $iAuthorId, $iAuthorIp, $aData, !$bVoted));
+        echoJson($this->_returnVoteData($iObjectId, $iAuthorId, $iAuthorIp, $aData, !$bVoted, $aParams));
     }
 
     public function actionGetVotedBy()
@@ -329,7 +332,7 @@ class BxDolVote extends BxDolObject
         return $this->_oQuery->putVote($iObjectId, $iAuthorId, $iAuthorIp, $aData, $bPerformUndo);
     }
 
-    protected function _returnVoteData($iObjectId, $iAuthorId, $iAuthorIp, $aData, $bVoted)
+    protected function _returnVoteData($iObjectId, $iAuthorId, $iAuthorIp, $aData, $bVoted, $aParams = array())
     {
         $bUndo = $this->isUndo();
         $aVote = $this->_getVote($iObjectId, true);
@@ -338,13 +341,21 @@ class BxDolVote extends BxDolObject
             'code' => 0,
             'rate' => $aVote['rate'],
             'count' => $aVote['count'],
-            'countf' => (int)$aVote['count'] > 0 ? $this->_getCounterLabel($aVote['count']) : '',
+            'countf' => (int)$aVote['count'] > 0 ? $this->_getCounterLabel($aVote['count'], $aParams) : '',
             'label_icon' => $this->_getIconDo($bVoted),
             'label_title' => _t($this->_getTitleDo($bVoted)),
             'disabled' => $bVoted && !$bUndo,
         );
     }
 
+    protected function _prepareRequestParamsData($aParams, $aParamsAdd = array())
+    {
+        if(isset($aParams['is_voted']))
+            $aParamsAdd['is_voted'] = $aParams['is_voted'];
+
+        return parent::_prepareRequestParamsData($aParams, $aParamsAdd);
+    }
+
     protected function _getVote($iObjectId = 0, $bForceGet = false)
     {
         if(!empty($this->_aVote) && !$bForceGet)
@@ -357,6 +368,16 @@ class BxDolVote extends BxDolObject
         return $this->_aVote;
     }
 
+    protected function _isVote($iObjectId = 0, $bForceGet = false)
+    {
+        $aVote = $this->_getVote($iObjectId, $bForceGet);
+        foreach($aVote as $sKey => $iValue)
+            if(strpos($sKey, 'count_') !== false && !empty($iValue))
+                return true;
+
+        return false;
+    }
+
     protected function _getTrack($iObjectId, $iAuthorId)
     {
         return $this->_oQuery->getTrack($iObjectId, $iAuthorId);

+ 1 - 1
inc/classes/BxDolVoteReactions.php

@@ -153,7 +153,7 @@ class BxDolVoteReactions extends BxTemplVote
         return $aData;
     }
 
-    protected function _returnVoteData($iObjectId, $iAuthorId, $iAuthorIp, $aData, $bVoted)
+    protected function _returnVoteData($iObjectId, $iAuthorId, $iAuthorIp, $aData, $bVoted, $aParams = array())
     {
         $aReactions = $this->getReactions();
         $sReaction = $aData['reaction'];

+ 9 - 9
inc/js/classes/BxDolFavorite.js

@@ -56,19 +56,19 @@ BxDolFavorite.prototype.onFavorite = function(oData, oElement)
 {
 	var $this = this;
 	var fContinue = function() {
-		if(oData && oData.code != 0)
+            if(oData && oData.code != 0)
 	        return;
 
-		if(oData && oData.label_icon)
-			$(oElement).find('.sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
+            if(oData && oData.label_icon)
+                $(oElement).find('.sys-action-do-icon .sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
 
-		if(oData && oData.label_title) {
-			$(oElement).attr('title', oData.label_title);
-			$(oElement).find('span:not(.sys-action-do-icon)').html(oData.label_title);
-		}
+            if(oData && oData.label_title) {
+                $(oElement).attr('title', oData.label_title);
+                $(oElement).find('.sys-action-do-text').html(oData.label_title);
+            }
 
-		if(oData && oData.disabled)
-			$(oElement).removeAttr('onclick').addClass($(oElement).hasClass('bx-btn') ? 'bx-btn-disabled' : 'bx-favorite-disabled');
+            if(oData && oData.disabled)
+                $(oElement).removeAttr('onclick').addClass($(oElement).hasClass('bx-btn') ? 'bx-btn-disabled' : 'bx-favorite-disabled');
 
 	    var oCounter = $this._getCounter(oElement);
 	    if(oCounter && oCounter.length > 0) {

+ 15 - 17
inc/js/classes/BxDolFeature.js

@@ -43,28 +43,26 @@ BxDolFeature.prototype.feature = function(oLink) {
 
 BxDolFeature.prototype.onFeature = function(oData, oElement)
 {
-	var fContinue = function() {
-		if(oData && oData.code != 0)
-	        return;
+    var fContinue = function() {
+        if(oData && oData.code != 0)
+            return;
 
-		if(oData && oData.label_icon)
-			$(oElement).find('.sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
+        if(oData && oData.label_icon)
+            $(oElement).find('.sys-action-do-icon .sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
 
-		if(oData && oData.label_title) {
-			$(oElement).attr('title', oData.label_title);
-			$(oElement).find('span:not(.sys-action-do-icon)').html(oData.label_title);
-		}
+        if(oData && oData.label_title) {
+            $(oElement).attr('title', oData.label_title);
+            $(oElement).find('.sys-action-do-text').html(oData.label_title);
+        }
 
-		if(oData && oData.disabled)
-			$(oElement).removeAttr('onclick').addClass($(oElement).hasClass('bx-btn') ? 'bx-btn-disabled' : 'bx-feature-disabled');
-	};
+        if(oData && oData.disabled)
+            $(oElement).removeAttr('onclick').addClass($(oElement).hasClass('bx-btn') ? 'bx-btn-disabled' : 'bx-feature-disabled');
+    };
 
-	if(oData && oData.msg != undefined && oData.msg.length > 0)
+    if(oData && oData.msg != undefined && oData.msg.length > 0)
         bx_alert(oData.msg, fContinue);
-	else
-		fContinue();
-
-	
+    else
+        fContinue();	
 };
 
 BxDolFeature.prototype.processJson = function(oData, oElement) {

+ 11 - 11
inc/js/classes/BxDolReport.js

@@ -56,19 +56,19 @@ BxDolReport.prototype.onReport = function(oData, oElement)
 {
 	var $this = this;
 	var fContinue = function() {
-		if(oData && oData.code != 0)
+            if(oData && oData.code != 0)
 	        return;
 
-		if(oData && oData.label_icon)
-			$(oElement).find('.sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
+            if(oData && oData.label_icon)
+                $(oElement).find('.sys-action-do-icon .sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
 
-		if(oData && oData.label_title) {
-			$(oElement).attr('title', oData.label_title);
-			$(oElement).find('span:not(.sys-action-do-icon)').html(oData.label_title);
-		}
+            if(oData && oData.label_title) {
+                $(oElement).attr('title', oData.label_title);
+                $(oElement).find('.sys-action-do-text').html(oData.label_title);
+            }
 
-		if(oData && oData.disabled)
-			$(oElement).removeAttr('onclick').addClass($(oElement).hasClass('bx-btn') ? 'bx-btn-disabled' : 'bx-report-disabled');
+            if(oData && oData.disabled)
+                $(oElement).removeAttr('onclick').addClass($(oElement).hasClass('bx-btn') ? 'bx-btn-disabled' : 'bx-report-disabled');
 
 	    var oCounter = $this._getCounter(oElement);
 	    if(oCounter && oCounter.length > 0) {
@@ -79,9 +79,9 @@ BxDolReport.prototype.onReport = function(oData, oElement)
 	};
 
 	if(oData && oData.msg != undefined)
-        bx_alert(oData.msg, fContinue);
+            bx_alert(oData.msg, fContinue);
 	else
-		fContinue();
+            fContinue();
 };
 
 BxDolReport.prototype.processJson = function(oData, oElement) {

+ 33 - 29
inc/js/classes/BxDolScore.js

@@ -6,21 +6,21 @@
  * @{
  */
 
-function BxDolScore(options)
+function BxDolScore(oOptions)
 {
-    this._sObjName = undefined == options.sObjName ? 'oScore' : options.sObjName; // javascript object name, to run current object instance from onTimer
-    this._sSystem = options.sSystem; // current score system
-    this._iAuthorId = options.iAuthorId; // score's author ID.
-    this._iObjId = options.iObjId; // object id the scores are collected for
-    this._sElementParams = options.sElementParams;
+    this._sObjName = undefined == oOptions.sObjName ? 'oScore' : oOptions.sObjName; // javascript object name, to run current object instance from onTimer
+    this._sSystem = oOptions.sSystem; // current score system
+    this._iAuthorId = oOptions.iAuthorId; // score's author ID.
+    this._iObjId = oOptions.iObjId; // object id the scores are collected for
 
     this._sActionsUri = 'score.php';
-    this._sActionsUrl = options.sRootUrl + this._sActionsUri; // actions url address
+    this._sActionsUrl = oOptions.sRootUrl + this._sActionsUri; // actions url address
 
     this._sAnimationEffect = 'fade';
     this._iAnimationSpeed = 'slow';
-    this._sSP = undefined == options.sStylePrefix ? 'bx-score' : options.sStylePrefix;
-    this._aHtmlIds = options.aHtmlIds;
+    this._sSP = undefined == oOptions.sStylePrefix ? 'bx-score' : oOptions.sStylePrefix;
+    this._aHtmlIds = oOptions.aHtmlIds;
+    this._aRequestParams = oOptions.aRequestParams;
 
     this._iSaveWidth = -1;
 }
@@ -30,10 +30,10 @@ BxDolScore.prototype.toggleByPopup = function(oLink) {
     var oData = this._getDefaultParams();
     oData['action'] = 'GetVotedBy';
 
-	$(oLink).dolPopupAjax({
-		id: this._aHtmlIds['by_popup'], 
-		url: bx_append_url_params(this._sActionsUri, oData)
-	});
+    $(oLink).dolPopupAjax({
+        id: this._aHtmlIds['by_popup'], 
+        url: bx_append_url_params(this._sActionsUri, oData)
+    });
 };
 
 BxDolScore.prototype.voteUp = function (oLink, onComplete)
@@ -61,11 +61,11 @@ BxDolScore.prototype._vote = function (oLink, sType, onComplete)
                 return;
 
             if(oData && oData.label_icon)
-                $(oLink).find('.sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
+                $(oLink).find('.sys-action-do-icon .sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
 
             if(oData && oData.label_title) {
                 $(oLink).attr('title', oData.label_title);
-                $(oLink).find('span:not(.sys-action-do-icon)').html(oData.label_title);
+                $(oLink).find('.sys-action-do-text').html(oData.label_title);
             }
 
             if(oData && oData.disabled)
@@ -93,34 +93,38 @@ BxDolScore.prototype._vote = function (oLink, sType, onComplete)
 };
 
 BxDolScore.prototype._getActions = function(oElement) {
-	var oParent = $(oElement);
-	if(!oParent.hasClass(this._sSP))
-		oParent = $(oElement).parents('.' + this._sSP + ':first');
+    var oParent = $(oElement);
+    if(!oParent.hasClass(this._sSP))
+        oParent = $(oElement).parents('.' + this._sSP + ':first');
 
-	return oParent.find('.' + this._sSP + '-do-vote');
+    return oParent.find('.' + this._sSP + '-do-vote');
 };
 
 BxDolScore.prototype._getCounter = function(oElement) {
-	var oParent = $(oElement);
-	if(!oParent.hasClass(this._sSP))
-		oParent = $(oElement).parents('.' + this._sSP + ':first');
+    var oParent = $(oElement);
+    if(!oParent.hasClass(this._sSP))
+        oParent = $(oElement).parents('.' + this._sSP + ':first');
 
-	return oParent.find('.' + this._sSP + '-counter');
+    var oCounter = oParent.find('.' + this._sSP + '-counter');
+    if(oCounter && oCounter.length > 0)
+        return oCounter;
+
+    return $('#' + this._aHtmlIds['counter'] + '.' + this._sSP + '-counter');
 };
 
 BxDolScore.prototype._loadingInButton = function(e, bShow) {
-	if($(e).length)
-		bx_loading_btn($(e), bShow);
-	else
-		bx_loading($('body'), bShow);	
+    if($(e).length)
+        bx_loading_btn($(e), bShow);
+    else
+        bx_loading($('body'), bShow);
 };
 
 BxDolScore.prototype._getDefaultParams = function() {
-	var oDate = new Date();
+    var oDate = new Date();
     return {
         sys: this._sSystem,
         id: this._iObjId,
-        element_params: this._sElementParams,
+        params: $.param(this._aRequestParams),
         _t: oDate.getTime()
     };
 };

+ 13 - 13
inc/js/classes/BxDolView.js

@@ -8,9 +8,9 @@
 
 function BxDolView(options)
 {
-	this._sObjName = undefined == options.sObjName ? 'oView' : options.sObjName; // javascript object name, to run current object instance from onTimer
-	this._sSystem = options.sSystem; // current comment system
-	this._iAuthorId = options.iAuthorId; // this comment's author ID.
+    this._sObjName = undefined == options.sObjName ? 'oView' : options.sObjName; // javascript object name, to run current object instance from onTimer
+    this._sSystem = options.sSystem; // current comment system
+    this._iAuthorId = options.iAuthorId; // this comment's author ID.
     this._iObjId = options.iObjId; // this object id comments
 
     this._sActionsUri = 'view.php';
@@ -23,25 +23,25 @@ function BxDolView(options)
 }
 
 BxDolView.prototype.toggleByPopup = function(oLink) {
-	var $this = this;
+    var $this = this;
     var oData = this._getDefaultParams();
     oData['action'] = 'GetViewedBy';
 
-	$(oLink).dolPopupAjax({
-		id: this._aHtmlIds['by_popup'], 
-		url: bx_append_url_params(this._sActionsUri, oData)
-	});
+    $(oLink).dolPopupAjax({
+        id: this._aHtmlIds['by_popup'], 
+        url: bx_append_url_params(this._sActionsUri, oData)
+    });
 };
 
 BxDolView.prototype._loadingInButton = function(e, bShow) {
-	if($(e).length)
-		bx_loading_btn($(e), bShow);
-	else
-		bx_loading($('body'), bShow);	
+    if($(e).length)
+        bx_loading_btn($(e), bShow);
+    else
+        bx_loading($('body'), bShow);
 };
 
 BxDolView.prototype._getDefaultParams = function() {
-	var oDate = new Date();
+    var oDate = new Date();
     return {
         sys: this._sSystem,
         id: this._iObjId,

+ 3 - 0
inc/js/classes/BxDolVote.js

@@ -23,6 +23,7 @@ function BxDolVote(oOptions)
     this._iAnimationSpeed = 'slow';
     this._sSP = oOptions.sStylePrefix === undefined ? 'bx-vote' : oOptions.sStylePrefix;
     this._aHtmlIds = oOptions.aHtmlIds;
+    this._aRequestParams = oOptions.aRequestParams;
 }
 
 BxDolVote.prototype.init = function()
@@ -69,6 +70,7 @@ BxDolVote.prototype.onVote = function(oLink, oData, onComplete)
         return;
 
     var oCounter = this._getCounter(oLink);
+    console.log(oCounter);
     if(oCounter && oCounter.length > 0) {
         oCounter.html(oData.countf);
 
@@ -101,6 +103,7 @@ BxDolVote.prototype._getDefaultParams = function()
     return {
         sys: this._sSystem,
         id: this._iObjId,
+        params: $.param(this._aRequestParams),
         _t: oDate.getTime()
     };
 };

+ 11 - 2
inc/js/classes/BxDolVoteLikes.js

@@ -20,11 +20,11 @@ BxDolVoteLikes.prototype.onVote = function (oLink, oData, onComplete)
         return;
 
     if(oData && oData.label_icon)
-        $(oLink).find('.sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
+        $(oLink).find('.sys-action-do-icon .sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
 
     if(oData && oData.label_title) {
         $(oLink).attr('title', oData.label_title);
-        $(oLink).find('span:not(.sys-action-do-icon)').html(oData.label_title);
+        $(oLink).find('.sys-action-do-text').html(oData.label_title);
     }
 
     if(oData && oData.disabled)
@@ -33,4 +33,13 @@ BxDolVoteLikes.prototype.onVote = function (oLink, oData, onComplete)
     BxDolVote.prototype.onVote.call(this, oLink, oData, onComplete);
 };
 
+BxDolVoteLikes.prototype._getCounter = function(oElement)
+{
+    var oCounter = BxDolVote.prototype._getCounter.call(this, oElement);
+    if(oCounter && oCounter.length > 0)
+        return oCounter;
+
+    return $('#' + this._aHtmlIds['counter'] + '.' + this._sSP + '-counter');
+};
+
 /** @} */

+ 5 - 3
inc/js/classes/BxDolVoteReactions.js

@@ -82,11 +82,11 @@ BxDolVoteReactions.prototype.onVote = function (oLink, oData, onComplete)
 
     //--- Update Do button.
     if(oData && oData.label_icon)
-        oLink.find('.sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
+        oLink.find('.sys-action-do-icon .sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
 
     if(oData && oData.label_title) {
         oLink.attr('title', oData.label_title);
-        oLink.find('span:not(.sys-action-do-icon)').html(oData.label_title);
+        oLink.find('.sys-action-do-text').html(oData.label_title);
     }
 
     if(oData && oData.label_click)
@@ -103,8 +103,10 @@ BxDolVoteReactions.prototype.onVote = function (oLink, oData, onComplete)
         oCounter.filter('.' + oData.reaction).html(oData.countf).toggleClass('bx-vc-hidden', !oData.count);
 
         //--- Update Total.
-        if(oData.total)
+        if(oData.total) {
+            oCounter.parents('.' + this._sSP + '-counter-wrapper:first').toggleClass('bx-vc-hidden', !oData.total.count);
             oCounter.filter('.total-count').html(oData.total.countf).toggleClass('bx-vc-hidden', !oData.total.count);
+        }
     }
 
     if(typeof onComplete == 'function')

+ 1 - 1
modules/boonex/ads/install/langs/en.xml

@@ -264,7 +264,7 @@
     <string name="_bx_ads_menu_item_title_system_manage_account"><![CDATA[Manage account]]></string>
     <string name="_bx_ads_menu_item_title_manage_account"><![CDATA[Manage account]]></string>
     <string name="_bx_ads_menu_item_title_system_admt_posts"><![CDATA[Ads]]></string>
-    <string name="_bx_ads_menu_item_title_admt_posts"><![CDATA[Ads - {addon} hidden]]></string>
+    <string name="_bx_ads_menu_item_title_admt_ads"><![CDATA[Ads - {addon} hidden]]></string>
     <string name="_bx_ads_menu_item_title_manage_my"><![CDATA[My Ads]]></string>
     <string name="_bx_ads_menu_item_title_manage_all"><![CDATA[All Ads]]></string>
     <string name="_bx_ads_menu_item_title_categories"><![CDATA[Categories]]></string>

+ 7 - 5
modules/boonex/protean/data/template/system/css/menu.less

@@ -87,8 +87,10 @@ ul.bx-menu-ver.bx-menu-profile-stats li.bx-menu-item-profile-stats-profile .bx-m
     padding: 0;
 }
 .bx-popup ul.bx-menu-ver li a > div > span,
-.bx-popup ul.bx-menu-custom.bx-menu-ver li a > span:not(.sys-action-do-icon),
-.bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a > span:not(.sys-action-do-icon) {
+.bx-popup ul.bx-menu-custom.bx-menu-ver li a > span:not(.sys-action-do),
+.bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a > span:not(.sys-action-do),
+.bx-popup ul.bx-menu-custom.bx-menu-ver li a span.sys-action-do-text,
+.bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a span.sys-action-do-text {
     margin-left: 1.0rem;
     line-height: 1.5rem;
 }
@@ -100,11 +102,11 @@ ul.bx-menu-ver.bx-menu-profile-stats li.bx-menu-item-profile-stats-profile .bx-m
 .bx-popup ul.bx-menu-ver li a > div .sys-icon,
 .bx-popup ul.bx-menu-custom.bx-menu-ver li a > img,
 .bx-popup ul.bx-menu-custom.bx-menu-ver li a > .sys-icon,
-.bx-popup ul.bx-menu-custom.bx-menu-ver li a > span.sys-action-do-icon,
-.bx-popup ul.bx-menu-custom.bx-menu-ver li a > span.sys-action-do-icon .sys-icon,
+.bx-popup ul.bx-menu-custom.bx-menu-ver li a span.sys-action-do-icon,
+.bx-popup ul.bx-menu-custom.bx-menu-ver li a span.sys-action-do-icon > .sys-icon,
 .bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a > img,
 .bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a > .sys-icon,
-.bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a > span.sys-action-do-icon .sys-icon {
+.bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a span.sys-action-do-icon > .sys-icon {
     width: 1.0rem;
     height: 1.0rem;
     line-height: 1.0rem;

+ 37 - 25
modules/boonex/timeline/classes/BxTimelineMenuItemActions.php

@@ -28,6 +28,7 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
     protected $_sMode;
     protected $_bShowTitles;
     protected $_bShowCounters;
+    protected $_bShowCountersIcons;
 
     protected $_sTmplNameItem;
 
@@ -42,6 +43,8 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
         $this->_sMode = self::$_sModeActions;
         $this->_bShowTitles = true;
         $this->_bShowCounters = false;
+        $this->_bShowCountersEmpty = false;
+        $this->_bShowCountersIcons = true;
         $this->_sTmplNameItem = 'menu_custom_item_hor.html';
     }
 
@@ -119,19 +122,20 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
 
         $sViewsSystem = $this->_aEvent['views']['system'];
         $iViewsObject = $this->_aEvent['views']['object_id'];
-        $aViewsParams = array('dynamic_mode' => $this->_bDynamicMode);
+        $aViewsParams = array(
+            'show_do_view_label' => $this->_bShowTitles,
+            'show_counter' => $this->_bShowCounters, 
+            'show_counter_label_icon' => $this->_bShowCountersIcons,
+            'dynamic_mode' => $this->_bDynamicMode
+        );
 
         switch($this->_sMode) {
             case self::$_sModeActions:
                 $sViewsMethod = 'getElementInline';
-                $aViewsParams['show_do_view_label'] = $this->_bShowTitles;
-                $aViewsParams['show_counter'] = $this->_bShowCounters;
                 break;
 
             case self::$_sModeCounters:
                 $sViewsMethod = 'getCounter';
-                $aViewsParams['show_counter'] = true;
-                $aViewsParams['show_counter_label_icon'] = true;
                 break;
         }
 
@@ -145,19 +149,21 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
 
         $sVotesSystem = $this->_aEvent['votes']['system'];
         $iVotesObject = $this->_aEvent['votes']['object_id'];
-        $aVotesParams = array('dynamic_mode' => $this->_bDynamicMode);
+        $aVotesParams = array(
+            'show_do_vote_label' => $this->_bShowTitles,
+            'show_counter' => $this->_bShowCounters,
+            'show_counter_empty' => $this->_bShowCountersEmpty,
+            'show_counter_label_icon' => $this->_bShowCountersIcons,
+            'dynamic_mode' => $this->_bDynamicMode
+        );
 
         switch($this->_sMode) {
             case self::$_sModeActions:
                 $sVotesMethod = 'getElementInline';
-                $aVotesParams['show_do_vote_label'] = $this->_bShowTitles;
-                $aVotesParams['show_counter'] = $this->_bShowCounters;
                 break;
 
             case self::$_sModeCounters:
                 $sVotesMethod = 'getCounter';
-                $aVotesParams['show_counter'] = true;
-                $aVotesParams['show_counter_empty'] = true;
                 break;
         }
 
@@ -171,19 +177,22 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
 
         $sReactionsSystem = $this->_aEvent['reactions']['system'];
         $iReactionsObject = $this->_aEvent['reactions']['object_id'];
-        $aReactionsParams = array('dynamic_mode' => $this->_bDynamicMode);
+        $aReactionsParams = array(
+            'show_do_vote_label' => $this->_bShowTitles,
+            'show_counter' => $this->_bShowCounters,
+            'show_counter_empty' => $this->_bShowCountersEmpty,
+            'show_counter_style' => 'compound',
+            'show_counter_label_icon' => $this->_bShowCountersIcons,
+            'dynamic_mode' => $this->_bDynamicMode
+        );
         
         switch($this->_sMode) {
             case self::$_sModeActions:
                 $sReactionsMethod = 'getElementInline';
-                $aReactionsParams['show_do_vote_label'] = $this->_bShowTitles;
-                $aReactionsParams['show_counter'] = $this->_bShowCounters;
                 break;
 
             case self::$_sModeCounters:
                 $sReactionsMethod = 'getCounter';
-                $aReactionsParams['show_counter'] = true;
-                $aReactionsParams['show_counter_style'] = 'compound';
                 break;
         }
 
@@ -197,19 +206,21 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
 
         $sScoresSystem = $this->_aEvent['scores']['system'];
         $iScoresObject = $this->_aEvent['scores']['object_id'];
-        $aScoresParams = array('dynamic_mode' => $this->_bDynamicMode);
-        
+        $aScoresParams = array(
+            'show_do_vote_label' => $this->_bShowTitles,
+            'show_counter' => $this->_bShowCounters,
+            'show_counter_empty' => $this->_bShowCountersEmpty,
+            'show_counter_label_icon' => $this->_bShowCountersIcons,
+            'dynamic_mode' => $this->_bDynamicMode
+        );
+
         switch($this->_sMode) {
             case self::$_sModeActions:
                 $sScoresMethod = 'getElementInline';
-                $aScoresParams['show_do_vote_label'] = $this->_bShowTitles;
-                $aScoresParams['show_counter'] = $this->_bShowCounters;
                 break;
 
             case self::$_sModeCounters:
                 $sScoresMethod = 'getCounter';
-                $aScoresParams['show_counter'] = true;
-                $aScoresParams['show_counter_empty'] = true;
                 break;
         }
 
@@ -223,18 +234,19 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
 
         $sReportsSystem = $this->_aEvent['reports']['system'];
         $iReportsObject = $this->_aEvent['reports']['object_id'];
-        $aReportsParams = array('dynamic_mode' => $this->_bDynamicMode);
+        $aReportsParams = array(
+            'show_do_report_label' => $this->_bShowTitles,
+            'show_counter' => $this->_bShowCounters,
+            'dynamic_mode' => $this->_bDynamicMode
+        );
         
         switch($this->_sMode) {
             case self::$_sModeActions:
                 $sReportsMethod = 'getElementInline';
-                $aReportsParams['show_do_report_label'] = $this->_bShowTitles;
-                $aReportsParams['show_counter'] = $this->_bShowCounters;
                 break;
 
             case self::$_sModeCounters:
                 $sReportsMethod = 'getCounter';
-                $aReportsParams['show_counter'] = true;
                 break;
         }
 

+ 9 - 4
modules/boonex/timeline/classes/BxTimelineMenuItemCounters.php

@@ -21,6 +21,7 @@ class BxTimelineMenuItemCounters extends BxTimelineMenuItemActions
         parent::__construct($aObject, $oTemplate);
 
         $this->_sMode = self::$_sModeCounters;
+        $this->_bShowCounters = true;
     }
 
     protected function _getMenuItemItemComment($aItem)
@@ -30,18 +31,22 @@ class BxTimelineMenuItemCounters extends BxTimelineMenuItemActions
 
         $sCommentsSystem = $this->_aEvent['comments']['system'];
         $iCommentsObject = $this->_aEvent['comments']['object_id'];
-        $aCommentsParams = array('dynamic_mode' => $this->_bDynamicMode);
+        $aCommentsParams = array(
+            'overwrite_counter_link_href' => 'javascript:void(0)',
+            'overwrite_counter_link_onclick' => bx_replace_markers('{comment_onclick}', $this->_aMarkers),
+            'show_do_comment_label' => $this->_bShowTitles,
+            'show_counter' => $this->_bShowCounters,
+            'show_counter_label_icon' => true,
+            'dynamic_mode' => $this->_bDynamicMode,
+        );
 
         switch($this->_sMode) {
             case self::$_sModeActions:
                 $sCommentsMethod = 'getElementInline';
-                $aCommentsParams['show_do_comment_label'] = $this->_bShowTitles;
-                $aCommentsParams['show_counter'] = $this->_bShowCounters;
                 break;
 
             case self::$_sModeCounters:
                 $sCommentsMethod = 'getCounter';
-                $aCommentsParams['show_counter'] = true;
                 break;
         }
 

+ 5 - 0
modules/boonex/timeline/template/css/repost.css

@@ -46,3 +46,8 @@ div.bx-tl-repost div.bx-tl-repost-counter-holder {
 	position: relative;
 	float: left;
 }
+
+/*--- Counter Styles ---*/
+.bx-tl-repost-counter-holder .bx-tl-repost-counter {
+    line-height: normal;
+}

+ 18 - 3
modules/boonex/timeline/template/css/view.css

@@ -404,9 +404,17 @@ div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom::before,
 div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom::after {
     display: none;
 }
+div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li > a,
+div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li > span {
+    display: block;
+}
 div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li > span {
     margin-right: 0;
 }
+div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li > span.bx-def-margin-thd-topbottom {
+    margin-top: 0;
+    margin-bottom: 0;
+}
 div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li > span img {
     background-size: contain;
     background-repeat: no-repeat;
@@ -415,20 +423,27 @@ div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li > span img {
 
 div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li .sys-action-do-icon,
 div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li .bx-menu-item-icon {
-    display: inline-block;
     box-sizing: border-box;
 
     width: 2.0rem;
     height: 2.0rem;
 
-    background-color: rgba(0, 0, 0, 0.1);
+    background-color: rgba(232, 232, 232, 1.0);
     border: 1px solid #ffffff;
     border-radius: 1rem;
 
+    font-size: 1.0rem;
+}
+/*
+div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li .sys-action-do-icon:not(.bx-def-align-center),
+div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li .bx-menu-item-icon:not(.bx-def-align-center) {
+    display: inline-block;
+
     text-align: center;
     line-height: 1.9rem;
-    font-size: 1.0rem;
 }
+*/
+
 div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li .sys-action-do-icon .sys-icon,
 div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li .bx-menu-item-icon .sys-icon {
     vertical-align: top;

+ 2 - 2
modules/boonex/timeline/template/item_outline.html

@@ -59,8 +59,8 @@
                 <div class="__style_prefix__-item-activity __style_prefix__-ia-counters bx-def-margin-leftright bx-def-margin-sec-top bx-clearfix">__menu_item_counters__</div>
             </bx_if:show_menu_item_counters>
             <bx_if:show_menu_item_actions>
-                <div class="__style_prefix__-item-activity-divider bx-def-hr bx-def-margin-sec-top"></div>
-                <div class="__style_prefix__-item-activity bx-def-margin-leftright bx-def-margin-sec-top bx-clearfix">__menu_item_actions__</div>
+                <div class="__style_prefix__-item-activity-divider bx-def-hr bx-def-margin-top"></div>
+                <div class="__style_prefix__-item-activity bx-def-margin-leftright bx-def-margin-top bx-clearfix">__menu_item_actions__</div>
             </bx_if:show_menu_item_actions>
             <div class="__style_prefix__-item-comments-holder bx-def-margin-leftright">__comments__</div>
         </div>

+ 2 - 2
modules/boonex/timeline/template/item_timeline.html

@@ -63,8 +63,8 @@
             <div class="__style_prefix__-item-activity __style_prefix__-ia-counters bx-def-margin-leftright bx-def-margin-sec-top bx-clearfix">__menu_item_counters__</div>
         </bx_if:show_menu_item_counters>
         <bx_if:show_menu_item_actions>
-            <div class="__style_prefix__-item-activity-divider bx-def-hr bx-def-margin-sec-top"></div>
-            <div class="__style_prefix__-item-activity bx-def-margin-leftright bx-def-margin-sec-top bx-clearfix">__menu_item_actions__</div>
+            <div class="__style_prefix__-item-activity-divider bx-def-hr bx-def-margin-top"></div>
+            <div class="__style_prefix__-item-activity bx-def-margin-leftright bx-def-margin-top bx-clearfix">__menu_item_actions__</div>
         </bx_if:show_menu_item_actions>
         <div class="__style_prefix__-item-comments-holder bx-def-margin-leftright">__comments__</div>
     </div>

+ 1 - 1
modules/boonex/timeline/template/menu_custom_item_hor.html

@@ -1,4 +1,4 @@
 <span class="__class_wrp__ bx-def-margin-thd-topbottom">
-    <a class="__class_link__" href="__link__" target="__target__" onclick="__onclick__" title="__title_attr__"><bx_if:icon><span class="bx-menu-item-icon"><i class="sys-icon __icon__"></i></span></bx_if:icon><bx_if:image><img style="background-image:url(__icon_url__)" src="<bx_icon_url:spacer.gif />" /></bx_if:image><bx_if:title><span class="bx-menu-item-title bx-def-margin-sec-left-auto">__title__</span></bx_if:title></a>
+    <a class="__class_link__" href="__link__" target="__target__" onclick="__onclick__" title="__title_attr__"><span class="bx-def-valign-center"><bx_if:icon><span class="bx-menu-item-icon bx-def-align-center"><i class="sys-icon __icon__"></i></span></bx_if:icon><bx_if:image><img style="background-image:url(__icon_url__)" src="<bx_icon_url:spacer.gif />" /></bx_if:image><bx_if:title><span class="bx-menu-item-title bx-def-margin-sec-left-auto">__title__</span></bx_if:title></span></a>
     <bx_if:addon>__addon__</bx_if:addon>
 </span>

+ 1 - 1
modules/boonex/timeline/template/repost_do_repost_label.html

@@ -1 +1 @@
-<bx_if:show_image><span class="sys-action-do-icon __style_prefix__-do-image"><img src="__src__" /></span></bx_if:show_image><bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_image><span class="sys-action-do-icon __style_prefix__-do-image bx-def-align-center"><img src="__src__" /></span></bx_if:show_image><bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-do-text __style_prefix__-do-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 1 - 1
modules/boonex/timeline/template/repost_element_block.html

@@ -1,4 +1,4 @@
-<div id="__html_id__" class="sys-action __style_prefix__-repost __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-clearfix" bx_repost_data_count="__count__">
+<div id="__html_id__" class="sys-action __style_prefix__-repost __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-def-valign-center bx-clearfix" bx_repost_data_count="__count__">
     <div class="sys-action-element-holder __style_prefix__-repost-element-holder">__do_repost__</div>
     <bx_if:show_counter>
         <div class="sys-action-counter-holder __style_prefix__-repost-counter-holder bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</div>

+ 1 - 1
template/comment_counter.html

@@ -1 +1 @@
-<div id="__id__" class="__class__"><bx_repeat:profiles>__icon__</bx_repeat:profiles><bx_if:show_icon><div class="__sp__-counter-icon bx-def-icon-size bx-def-margin-sec-right"><i class="__sp__-counter-icon sys-icon comment"></i></div></bx_if:show_icon>__content__</div>
+<div id="__id__" class="__class__"><a class="bx-def-valign-center" href="__href__"<bx_if:show_onclick> onclick="__onclick__"</bx_if:show_onclick>><bx_repeat:profiles>__icon__</bx_repeat:profiles><bx_if:show_icon><div class="sys-action-counter-icon __sp__-counter-icon bx-def-icon-size bx-def-margin-sec-right bx-def-align-center"><i class="__sp__-counter-icon sys-icon comment"></i></div></bx_if:show_icon>__content__</a></div>

+ 7 - 4
template/css/cmts.css

@@ -405,15 +405,17 @@ span.cmt span.cmt-counter-holder {
     align-items: center;
     -webkit-flex-wrap:nowrap;
     flex-wrap:nowrap;
-
-    padding-left: 4px;
 }
 .cmt-counter > * {
     position: relative;
 }
 .cmt-counter div.cmt-counter-icon,
 .cmt-counter div.bx-base-pofile-unit-wo-info {
-    margin: 4px 0 4px -8px;
+    margin-left: -0.5rem;
+}
+.cmt-counter div.cmt-counter-icon:first-child,
+.cmt-counter div.bx-base-pofile-unit-wo-info:first-child {
+    margin-left: 0;
 }
 .cmt-counter div.cmt-counter-icon {
     margin-right: 0.5rem;
@@ -431,8 +433,9 @@ span.cmt span.cmt-counter-holder {
 .cmt-counter .bx-def-icon-size {
     width: 2.0rem;
     height: 2.0rem;
+
+    font-size: 1.0rem;
 }
-.cmt-counter .bx-def-icon-size,
 .cmt-counter p.bx-base-pofile-unit-thumb.bx-def-icon-size {
     display: -webkit-flex;
     display: flex;

+ 10 - 2
template/css/default.less

@@ -9,8 +9,8 @@
 }
 
 .bx-def-align-center {
-    display: -webkit-flex;
-    display: flex;
+    display: -webkit-flex !important;
+    display: flex !important;
 
     -webkit-justify-content: center;
     justify-content: center;
@@ -19,6 +19,14 @@
     align-items: center;
 }
 
+.bx-def-valign-center {
+    display: -webkit-flex !important;
+    display: flex !important;
+
+    -webkit-align-items: center;
+    align-items: center;
+}
+
 /* margins */
 .bx-def-centered {
 	margin: 0px auto;

+ 5 - 0
template/css/favorite.css

@@ -61,3 +61,8 @@ div.bx-favorite div.bx-favorite-counter-holder {
 .bx-favorite-link .bx-favorite-counter-holder.bx-btn-border {
 	border-width: 0px;
 }
+
+/*--- Counter Styles ---*/
+.bx-favorite-counter-holder .bx-favorite-counter {
+    line-height: normal;
+}

+ 5 - 0
template/css/report.css

@@ -65,3 +65,8 @@ div.bx-report div.bx-report-counter-holder {
 .bx-report-button-small .bx-report-counter-holder {
 	font-size: 1.5rem;
 }
+
+/*--- Counter Styles ---*/
+.bx-report-counter-holder .bx-report-counter {
+    line-height: normal;
+}

+ 12 - 11
template/css/score.css

@@ -73,28 +73,29 @@ div.bx-score-counter-holder {
 }
 
 /*--- Counter Styles ---*/
-.bx-score-counter > span {
-    vertical-align: middle;
+.bx-score-counter .bx-score-counter-label.bx-def-valign-center .bx-score-counter-text {
+    line-height: normal;
 }
 .bx-score-counter span.bx-score-counter-icon {
     position: relative;
-    display: inline-block;
     box-sizing: border-box;
 
-    width: 1.25rem;
-    height: 1.25rem;
-    margin-top: 4px;
-    margin-bottom: 4px;
+    width: 2.0rem;
+    height: 2.0rem;
 
-    background-color: rgba(215, 215, 215, 1.0);
+    background-color: rgba(232, 232, 232, 1.0);
     border: 1px solid #ffffff;
     border-radius: 1rem;
 
-    line-height: 1.125rem;
+    line-height: normal;
+    font-size: 1.0rem;
+}
+.bx-score-counter span.bx-score-counter-icon:not(.bx-def-align-center) {
+    display: inline-block;
+
+    line-height: 1.9rem;
     text-align: center;
-    font-size: 0.625rem;
 }
 .bx-score-counter span.bx-score-counter-icon .sys-icon {
     vertical-align: top;
-    color: #334455;
 }

+ 8 - 5
template/css/view.css

@@ -65,25 +65,28 @@ div.bx-view-counter-holder {
 }
 
 /*--- Counter Styles ---*/
+.bx-view-counter .bx-view-counter-label.bx-def-valign-center .bx-view-counter-text {
+    line-height: normal;
+}
 .bx-view-counter span.bx-view-counter-icon {
     position: relative;
-    display: inline-block;
     box-sizing: border-box;
 
     width: 2.0rem;
     height: 2.0rem;
-    margin-top: 4px;
-    margin-bottom: 4px;
 
     background-color: rgba(232, 232, 232, 1.0);
     border: 1px solid #ffffff;
     border-radius: 1rem;
 
+    font-size: 1.0rem;
+}
+.bx-view-counter span.bx-view-counter-icon:not(.bx-def-align-center) {
+    display: inline-block;
+
     line-height: 1.9rem;
     text-align: center;
-    font-size: 1.0rem;
 }
 .bx-view-counter span.bx-view-counter-icon .sys-icon {
     vertical-align: top;
-    color: #334455;
 }

+ 18 - 22
template/css/vote.css

@@ -97,12 +97,7 @@ div.bx-vote div.bx-vote-counter-holder {
 }
 .bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound {
     position: relative;
-    display: -webkit-flex;
-    display: flex;
-    -webkit-align-items: center;
-    align-items: center;
-
-    padding-left: 4px;
+    padding-left: 8px;
 }
 .bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound .bx-vote-counter {
     display: block;
@@ -110,35 +105,34 @@ div.bx-vote div.bx-vote-counter-holder {
 .bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-divided a.bx-vote-counter {
     margin-right: 0.5rem;
 }
-.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound a.bx-vote-counter {
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound a.bx-vote-counter.total-count,
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter.total-count {
     margin-left: 0.5rem;
 }
-.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter {
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter:not(.total-count) {
     width: 2.0rem;
     height: 2.0rem;
     box-sizing: border-box;
 
-    margin: 4px 0 4px -8px;
+    margin-left: -0.5rem;
 }
-.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter:first-child {
-    margin-left: 0;
-}
-.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter > span {
-    vertical-align: top;
-}
-.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter > span:not(.bx-vote-counter-icon) {
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter:not(.total-count) span.bx-vote-counter-text {
     display: none;
 }
+.bx-vote-counter-wrapper-reactions.bx-vc-hidden,
 .bx-vote-counter-wrapper-reactions .bx-vote-counter.bx-vc-hidden {
     display: none;
 }
 
 
 /*--- Counter Styles ---*/
+.bx-vote-counter .bx-vote-counter-label.bx-def-valign-center .bx-vote-counter-text {
+    line-height: normal;
+}
+
 .bx-vote-counter.bx-vote-counter-likes span.bx-vote-counter-icon,
 .bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound .bx-vote-counter.bx-vote-counter-reactions span.bx-vote-counter-icon {
     position: relative;
-    display: inline-block;
     box-sizing: border-box;
 
     width: 2.0rem;
@@ -148,13 +142,15 @@ div.bx-vote div.bx-vote-counter-holder {
     border: 1px solid #ffffff;
     border-radius: 1rem;
 
-    line-height: 1.9rem;
-    text-align: center;
+    line-height: normal;
     font-size: 1.0rem;
 }
-.bx-vote-counter.bx-vote-counter-likes span.bx-vote-counter-icon {
-    margin-top: 4px;
-    margin-bottom: 4px;
+.bx-vote-counter.bx-vote-counter-likes span.bx-vote-counter-icon:not(.bx-def-align-center),
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound .bx-vote-counter.bx-vote-counter-reactions span.bx-vote-counter-icon:not(.bx-def-align-center) {
+    display: inline-block;
+
+    line-height: 1.9rem;
+    text-align: center;
 }
 .bx-vote-counter span.bx-vote-counter-icon .sys-icon {
     vertical-align: top;

+ 1 - 1
template/favorite_do_favorite_label.html

@@ -1 +1 @@
-<bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-do-text __style_prefix__-do-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 1 - 1
template/favorite_element_block.html

@@ -1,4 +1,4 @@
-<div id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-clearfix" bx_favorite_data_count="__count__">
+<div id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-def-valign-center bx-clearfix" bx_favorite_data_count="__count__">
     <div class="sys-action-element-holder __style_prefix__-element-holder">__do_favorite__</div>
     <bx_if:show_counter>
         <div class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-sec-left bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</div>

+ 1 - 1
template/favorite_element_inline.html

@@ -1,3 +1,3 @@
-<span id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_favorite_data_count="__count__">
+<span id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-def-valign-center" bx_favorite_data_count="__count__">
     <span class="sys-action-element-holder __style_prefix__-element-holder">__do_favorite__</span><bx_if:show_counter><span class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-thd-left bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter>__script__
 </span>

+ 1 - 1
template/feature_do_feature_label.html

@@ -1 +1 @@
-<bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-do-text __style_prefix__-do-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 1 - 1
template/report_do_report_label.html

@@ -1 +1 @@
-<bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-do-text __style_prefix__-do-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 1 - 1
template/report_element_block.html

@@ -1,4 +1,4 @@
-<div id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-clearfix" bx_report_data_count="__count__">
+<div id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-def-valign-center bx-clearfix" bx_report_data_count="__count__">
     <div class="sys-action-element-holder __style_prefix__-element-holder">__do_report__</div>
     <bx_if:show_counter>
         <div class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-sec-left bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</div>

+ 1 - 1
template/report_element_inline.html

@@ -1,3 +1,3 @@
-<span id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_report_data_count="__count__">
+<span id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-def-valign-center" bx_report_data_count="__count__">
     <span class="sys-action-element-holder __style_prefix__-element-holder">__do_report__</span><bx_if:show_counter><span class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-thd-left bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter>__script__
 </span>

+ 1 - 1
template/score_counter_label.html

@@ -1 +1 @@
-<bx_if:show_icon><span class="__style_prefix__-counter-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="sys-action-counter-label __style_prefix__-counter-label bx-def-valign-center"><bx_if:show_icon><span class="sys-action-counter-icon __style_prefix__-counter-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-counter-text __style_prefix__-counter-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 1 - 1
template/score_do_vote_label.html

@@ -1 +1 @@
-<bx_if:show_image><span class="sys-action-do-image __style_prefix__-do-image"><img src="__src__" /></span></bx_if:show_image><bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_image><span class="sys-action-do-image __style_prefix__-do-image bx-def-align-center"><img src="__src__" /></span></bx_if:show_image><bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-do-text __style_prefix__-do-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 6 - 6
template/score_element_block.html

@@ -1,15 +1,15 @@
 <div id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_score_data_score="__score__" bx_score_data_cup="__cup__" bx_score_data_cdown="__cdown__">
-	<div class="sys-action-do __style_prefix__-do bx-clearfix">
+    <div class="sys-action-do __style_prefix__-do bx-def-valign-center bx-clearfix">
         <bx_if:show_do_vote_up>
-                <div class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-up">__do_vote__</div>
+            <div class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-up">__do_vote__</div>
         </bx_if:show_do_vote_up>
         <bx_if:show_counter>
-                <div class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-sec-left-auto bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</div>
+            <div class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-sec-left-auto bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</div>
         </bx_if:show_counter>
         <bx_if:show_do_vote_down>
             <div class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-down bx-def-margin-sec-left-auto">__do_vote__</div>
         </bx_if:show_do_vote_down>
-	</div>
-	<bx_if:show_legend>__legend__</bx_if:show_legend>
-	__script__
+    </div>
+    <bx_if:show_legend>__legend__</bx_if:show_legend>
+    __script__
 </div>

+ 1 - 1
template/score_element_inline.html

@@ -1,3 +1,3 @@
 <span id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_score_data_score="__score__" bx_score_data_cup="__cup__" bx_score_data_cdown="__cdown__">
-    <span class="sys-action-do __style_prefix__-do"><bx_if:show_do_vote_up><span class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-up">__do_vote__</span></bx_if:show_do_vote_up><bx_if:show_counter><span class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-thd-left-auto bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter><bx_if:show_do_vote_down><span class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-down bx-def-margin-thd-left-auto">__do_vote__</span></bx_if:show_do_vote_down></span>__script__
+    <span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_do_vote_up><span class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-up">__do_vote__</span></bx_if:show_do_vote_up><bx_if:show_counter><span class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-sec-left-auto bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter><bx_if:show_do_vote_down><span class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-down bx-def-margin-sec-left-auto">__do_vote__</span></bx_if:show_do_vote_down></span>__script__
 </span>

+ 12 - 4
template/scripts/BxBaseCmts.php

@@ -606,14 +606,22 @@ class BxBaseCmts extends BxDolCmts
             );
         }
 
-        $sContent = $iCount != 0 || $bShowEmpty ? $this->_getCounterLabel($iCount) : '';
-        if(!empty($sContent))
-            $sContent = $this->_oTemplate->parseLink($this->getListUrl(), $sContent);
+        $sHref = !empty($aParams['overwrite_counter_link_href']) ? $aParams['overwrite_counter_link_href'] : $this->getListUrl();
+        $sOnclick = '';
+        if(!empty($aParams['overwrite_counter_link_onclick']))
+            $sOnclick = $aParams['overwrite_counter_link_onclick'];
 
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplCounter(), array(
             'id' => $this->_aHtmlIds['counter'],
             'class' => $sClass,
-            'content' => $sContent,
+            'href' => $sHref,
+            'bx_if:show_onclick' => array(
+                'condition' => !empty($sOnclick),
+                'content' => array(
+                    'onclick' => $sOnclick
+                )
+            ),
+            'content' => $iCount != 0 || $bShowEmpty ? $this->_getCounterLabel($iCount) : '',
             'bx_repeat:profiles' => $aTmplVarsProfiles,
             'bx_if:show_icon' => array(
                 'condition' => $bShowEmpty || !empty($aTmplVarsProfiles),

+ 15 - 12
template/scripts/BxBaseFavorite.php

@@ -188,18 +188,21 @@ class BxBaseFavorite extends BxDolFavorite
     {
     	$bFavorited = isset($aParams['is_favorited']) && $aParams['is_favorited'] === true;
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
-        	'bx_if:show_icon' => array(
-        		'condition' => isset($aParams['show_do_favorite_icon']) && $aParams['show_do_favorite_icon'] == true,
-        		'content' => array(
-        			'name' => $this->_getIconDoFavorite($bFavorited)
-        		)
-        	),
-        	'bx_if:show_text' => array(
-        		'condition' => isset($aParams['show_do_favorite_label']) && $aParams['show_do_favorite_label'] == true,
-        		'content' => array(
-        			'text' => _t($this->_getTitleDoFavorite($bFavorited))
-        		)
-        	)
+            'style_prefix' => $this->_sStylePrefix,
+            'bx_if:show_icon' => array(
+                'condition' => isset($aParams['show_do_favorite_icon']) && $aParams['show_do_favorite_icon'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'name' => $this->_getIconDoFavorite($bFavorited)
+                )
+            ),
+            'bx_if:show_text' => array(
+                'condition' => isset($aParams['show_do_favorite_label']) && $aParams['show_do_favorite_label'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'text' => _t($this->_getTitleDoFavorite($bFavorited))
+                )
+            )
         ));
     }
 

+ 24 - 21
template/scripts/BxBaseFeature.php

@@ -125,22 +125,22 @@ class BxBaseFeature extends BxDolFeature
     	$bFeatured = isset($aParams['is_featured']) && $aParams['is_featured'] === true;
         $bShowDoFeatureAsButtonSmall = isset($aParams['show_do_feature_as_button_small']) && $aParams['show_do_feature_as_button_small'] == true;
         $bShowDoFeatureAsButton = !$bShowDoFeatureAsButtonSmall && isset($aParams['show_do_feature_as_button']) && $aParams['show_do_feature_as_button'] == true;
-		$bDisabled = !$bAllowedFeature || ($bFeatured  && !$this->isUndo());
+        $bDisabled = !$bAllowedFeature || ($bFeatured  && !$this->isUndo());
 
         $sClass = '';
-		if($bShowDoFeatureAsButton)
-			$sClass = 'bx-btn';
-		else if ($bShowDoFeatureAsButtonSmall)
-			$sClass = 'bx-btn bx-btn-small';
+        if($bShowDoFeatureAsButton)
+            $sClass = 'bx-btn';
+        else if ($bShowDoFeatureAsButtonSmall)
+            $sClass = 'bx-btn bx-btn-small';
 
-		if($bDisabled)
-			$sClass .= $bShowDoFeatureAsButton || $bShowDoFeatureAsButtonSmall ? ' bx-btn-disabled' : 'bx-feature-disabled';
+        if($bDisabled)
+            $sClass .= $bShowDoFeatureAsButton || $bShowDoFeatureAsButtonSmall ? ' bx-btn-disabled' : 'bx-feature-disabled';
 
         return $this->_oTemplate->parseLink('javascript:void(0)', $this->_getLabelDoFeature($aParams), array(
-        	'id' => $this->_aHtmlIds['do_link'],
+            'id' => $this->_aHtmlIds['do_link'],
             'class' => $this->_sStylePrefix . '-do-feature ' . $sClass,
             'title' => _t($this->_getTitleDoFeature($bFeatured)),
-        	'onclick' => !$bDisabled ? $this->getJsClick() : ''
+            'onclick' => !$bDisabled ? $this->getJsClick() : ''
         ));
     }
 
@@ -148,18 +148,21 @@ class BxBaseFeature extends BxDolFeature
     {
     	$bFeatured = isset($aParams['is_featured']) && $aParams['is_featured'] === true;
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
-        	'bx_if:show_icon' => array(
-        		'condition' => isset($aParams['show_do_feature_icon']) && $aParams['show_do_feature_icon'] == true,
-        		'content' => array(
-        			'name' => $this->_getIconDoFeature($bFeatured)
-        		)
-        	),
-        	'bx_if:show_text' => array(
-        		'condition' => isset($aParams['show_do_feature_label']) && $aParams['show_do_feature_label'] == true,
-        		'content' => array(
-        			'text' => _t($this->_getTitleDoFeature($bFeatured))
-        		)
-        	)
+            'style_prefix' => $this->_sStylePrefix,
+            'bx_if:show_icon' => array(
+                'condition' => isset($aParams['show_do_feature_icon']) && $aParams['show_do_feature_icon'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'name' => $this->_getIconDoFeature($bFeatured)
+                )
+            ),
+            'bx_if:show_text' => array(
+                'condition' => isset($aParams['show_do_feature_label']) && $aParams['show_do_feature_label'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'text' => _t($this->_getTitleDoFeature($bFeatured))
+                )
+            )
         ));
     }
 }

+ 1 - 0
template/scripts/BxBaseReport.php

@@ -198,6 +198,7 @@ class BxBaseReport extends BxDolReport
     {
     	$bReported = isset($aParams['is_reported']) && $aParams['is_reported'] === true;
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
+            'style_prefix' => $this->_sStylePrefix,
             'bx_if:show_icon' => array(
                 'condition' => isset($aParams['show_do_report_icon']) && $aParams['show_do_report_icon'] == true,
                 'content' => array(

+ 44 - 36
template/scripts/BxBaseScore.php

@@ -47,7 +47,10 @@ class BxBaseScore extends BxDolScore
             'show_do_vote_label' => false,
             'show_counter' => true,
             'show_counter_empty' => true,
-            'show_legend' => false
+            'show_counter_label_icon' => false,
+            'show_counter_label_text' => true,
+            'show_legend' => false,
+            'show_script' => true
         );
 
         $this->_sTmplNameLegend = 'score_legend.html';
@@ -68,17 +71,17 @@ class BxBaseScore extends BxDolScore
     {
         $sJsObjName = $this->getJsObjectName();
 
-        $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
+        $bDynamicMode = isset($aParams['dynamic_mode']) && (bool)$aParams['dynamic_mode'] === true;
 
         $aParamsJs = array(
             'sObjName' => $sJsObjName,
             'sSystem' => $this->getSystemName(),
             'iAuthorId' => $this->_getAuthorId(),
             'iObjId' => $this->getId(),
-            'sElementParams' => $this->_encodeElementParams($aParams),
             'sRootUrl' => BX_DOL_URL_ROOT,
             'sStylePrefix' => $this->_sStylePrefix,
-            'aHtmlIds' => $this->_aHtmlIds
+            'aHtmlIds' => $this->_aHtmlIds,
+            'aRequestParams' => $this->_prepareRequestParamsData($aParams)
         );
         $sCode = "if(window['" . $sJsObjName . "'] == undefined) var " . $sJsObjName . " = new BxDolScore(" . json_encode($aParamsJs) . ");";
 
@@ -97,13 +100,13 @@ class BxBaseScore extends BxDolScore
 
     public function getCounter($aParams = array())
     {
-        $sJsObject = $this->getJsObjectName();
+        $aParams = array_merge($this->_aElementDefaults, $aParams);
 
-        $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
-        $bShowEmpty = isset($aParams['show_counter_empty']) && $aParams['show_counter_empty'] == true;
-        $bShowDoVoteAsButtonSmall = isset($aParams['show_do_vote_as_button_small']) && $aParams['show_do_vote_as_button_small'] == true;
-        $bShowDoVoteAsButton = !$bShowDoVoteAsButtonSmall && isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true;
-        $bShowScript = !isset($aParams['show_script']) || $aParams['show_script'] == true;
+        $bDynamicMode = isset($aParams['dynamic_mode']) && (bool)$aParams['dynamic_mode'] === true;
+        $bShowEmpty = isset($aParams['show_counter_empty']) && (bool)$aParams['show_counter_empty'] === true;
+        $bShowDoVoteAsButtonSmall = isset($aParams['show_do_vote_as_button_small']) && (bool)$aParams['show_do_vote_as_button_small'] === true;
+        $bShowDoVoteAsButton = !$bShowDoVoteAsButtonSmall && isset($aParams['show_do_vote_as_button']) && (bool)$aParams['show_do_vote_as_button'] === true;
+        $bShowScript = !isset($aParams['show_script']) || (bool)$aParams['show_script'] === true;
 
         $bAllowedViewViewVoters = $this->isAllowedVoteViewVoters();
 
@@ -120,7 +123,7 @@ class BxBaseScore extends BxDolScore
             $sClass .= ' bx-btn-height';
 
         $bLink = $bAllowedViewViewVoters && !$bEmpty;
-        $sCounter = !$bEmpty || $bShowEmpty ? $this->_getCounterLabel($iCup - $iCdown) : '';
+        $sCounter = !$bEmpty || $bShowEmpty ? $this->_getCounterLabel($iCup - $iCdown, $aParams) : '';
 
         $aTmplVars = array(
             'id' => $this->_aHtmlIds['counter'],
@@ -142,7 +145,7 @@ class BxBaseScore extends BxDolScore
                 'condition' => !$bLink,
                 'content' => $aTmplVars
             ),
-            'script' => $bShowScript ? $this->getJsScript($bDynamicMode) : ''
+            'script' => $bShowScript ? $this->getJsScript($aParams) : ''
         ));
     }
 
@@ -156,16 +159,16 @@ class BxBaseScore extends BxDolScore
 
         $aTmplVarsItems = array();
         foreach($aTypes as $sType)
-	        $aTmplVarsItems[] = array(
-	        	'style_prefix' => $this->_sStylePrefix,
-	            'value' => $this->_getLabelDo($sType, $aParams),
-	        	'label' => isset($aLegend[$sType]['count']) ? (int)$aLegend[$sType]['count'] : 0
-	        );
+            $aTmplVarsItems[] = array(
+                'style_prefix' => $this->_sStylePrefix,
+                'value' => $this->_getLabelDo($sType, $aParams),
+                'label' => isset($aLegend[$sType]['count']) ? (int)$aLegend[$sType]['count'] : 0
+            );
 
         return $this->_oTemplate->parseHtmlByName($this->_sTmplNameLegend, array(
-        	'style_prefix'  => $this->_sStylePrefix,
-        	'html_id' => $this->_aHtmlIds['legend'],
-        	'bx_repeat:items' => $aTmplVarsItems
+            'style_prefix'  => $this->_sStylePrefix,
+            'html_id' => $this->_aHtmlIds['legend'],
+            'bx_repeat:items' => $aTmplVarsItems
         ));
     }
 
@@ -187,9 +190,9 @@ class BxBaseScore extends BxDolScore
     {
     	$aParams = array_merge($this->_aElementDefaults, $aParams);
 
-        $bShowDoVoteAsButtonSmall = isset($aParams['show_do_vote_as_button_small']) && $aParams['show_do_vote_as_button_small'] == true;
-        $bShowDoVoteAsButton = !$bShowDoVoteAsButtonSmall && isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true;
-        $bShowCounterEmpty = isset($aParams['show_counter_empty']) && $aParams['show_counter_empty'] == true;
+        $bShowDoVoteAsButtonSmall = isset($aParams['show_do_vote_as_button_small']) && (bool)$aParams['show_do_vote_as_button_small'] === true;
+        $bShowDoVoteAsButton = !$bShowDoVoteAsButtonSmall && isset($aParams['show_do_vote_as_button']) && (bool)$aParams['show_do_vote_as_button'] === true;
+        $bShowCounterEmpty = isset($aParams['show_counter_empty']) && (bool)$aParams['show_counter_empty'] === true;
 
         $iObjectId = $this->getId();
         $iAuthorId = $this->_getAuthorId();
@@ -270,10 +273,10 @@ class BxBaseScore extends BxDolScore
 
     protected function _getDoVote($sType, $aParams = array(), $isAllowedVote = true)
     {
-    	$bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
-        $bShowDoVoteAsButtonSmall = isset($aParams['show_do_vote_as_button_small']) && $aParams['show_do_vote_as_button_small'] == true;
-        $bShowDoVoteAsButton = !$bShowDoVoteAsButtonSmall && isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true;
-		$bDisabled = !$isAllowedVote || $bVoted;
+    	$bVoted = isset($aParams['is_voted']) && (bool)$aParams['is_voted'] === true;
+        $bShowDoVoteAsButtonSmall = isset($aParams['show_do_vote_as_button_small']) && (bool)$aParams['show_do_vote_as_button_small'] === true;
+        $bShowDoVoteAsButton = !$bShowDoVoteAsButtonSmall && isset($aParams['show_do_vote_as_button']) && (bool)$aParams['show_do_vote_as_button'] === true;
+        $bDisabled = !$isAllowedVote || $bVoted;
 
         $sClass = '';
         if($bShowDoVoteAsButton)
@@ -291,18 +294,19 @@ class BxBaseScore extends BxDolScore
         ));
     }
 
-    protected function _getCounterLabel($iCount)
+    protected function _getCounterLabel($iCount, $aParams = array())
     {
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterLabel(), array(
+            'style_prefix' => $this->_sStylePrefix,
             'bx_if:show_icon' => array(
-                'condition' => !isset($aParams['show_counter_label_icon']) || $aParams['show_counter_label_icon'] === true,
+                'condition' => !isset($aParams['show_counter_label_icon']) || (bool)$aParams['show_counter_label_icon'] === true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
                     'name' => $this->_getIconDo()
                 )
             ),
             'bx_if:show_text' => array(
-                'condition' => !isset($aParams['show_counter_label_text']) || $aParams['show_counter_label_text'] === true,
+                'condition' => !isset($aParams['show_counter_label_text']) || (bool)$aParams['show_counter_label_text'] === true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
                     'text' => _t('_sys_score_counter', $iCount)
@@ -314,21 +318,25 @@ class BxBaseScore extends BxDolScore
     protected function _getLabelDo($sType, $aParams = array())
     {
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
+            'style_prefix' => $this->_sStylePrefix,
             'bx_if:show_image' => array(
-                'condition' => isset($aParams['show_do_vote_image']) && $aParams['show_do_vote_image'] == true,
+                'condition' => isset($aParams['show_do_vote_image']) && (bool)$aParams['show_do_vote_image'] === true,
                 'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
                     'src' => $this->_getImageDo($sType)
                 )
             ),
             'bx_if:show_icon' => array(
-                'condition' => isset($aParams['show_do_vote_icon']) && $aParams['show_do_vote_icon'] == true,
+                'condition' => isset($aParams['show_do_vote_icon']) && (bool)$aParams['show_do_vote_icon'] === true,
                 'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
                     'name' => $this->_getIconDo($sType)
                 )
             ),
             'bx_if:show_text' => array(
-                'condition' => isset($aParams['show_do_vote_label']) && $aParams['show_do_vote_label'] == true,
+                'condition' => isset($aParams['show_do_vote_label']) && (bool)$aParams['show_do_vote_label'] === true,
                 'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
                     'text' => _t($this->_getTitleDo($sType))
                 )
             )
@@ -364,19 +372,19 @@ class BxBaseScore extends BxDolScore
 
     protected function _isShowDoVote($aParams, $isAllowedVote, $bCount)
     {
-        $bShowDoVote = !isset($aParams['show_do_vote']) || $aParams['show_do_vote'] == true;
+        $bShowDoVote = !isset($aParams['show_do_vote']) || (bool)$aParams['show_do_vote'] === true;
 
         return $bShowDoVote && ($isAllowedVote || $bCount);
     }
 
     protected function _isShowCounter($aParams, $isAllowedVote, $isAllowedVoteView, $bCount)
     {
-        return isset($aParams['show_counter']) && $aParams['show_counter'] === true && $isAllowedVoteView && ($isAllowedVote || $bCount);
+        return isset($aParams['show_counter']) && (bool)$aParams['show_counter'] === true && $isAllowedVoteView && ($isAllowedVote || $bCount);
     }
 
     protected function _isShowLegend($aParams, $isAllowedVote, $isAllowedVoteView, $bCount)
     {
-        return isset($aParams['show_legend']) && $aParams['show_legend'] === true && $isAllowedVoteView;
+        return isset($aParams['show_legend']) && (bool)$aParams['show_legend'] === true && $isAllowedVoteView;
     }
 }
 

+ 2 - 0
template/scripts/BxBaseView.php

@@ -231,6 +231,7 @@ class BxBaseView extends BxDolView
     protected function _getCounterLabel($iCount, $aParams = array())
     {
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterLabel(), array(
+            'style_prefix' => $this->_sStylePrefix,
             'bx_if:show_icon' => array(
                 'condition' => !isset($aParams['show_counter_label_icon']) || $aParams['show_counter_label_icon'] === true,
                 'content' => array(
@@ -251,6 +252,7 @@ class BxBaseView extends BxDolView
     protected function _getLabelDo($aParams = array())
     {
         return $this->_oTemplate->parseHtmlByContent($this->_sTmplContentDoViewLabel, array(
+            'style_prefix' => $this->_sStylePrefix,
             'bx_if:show_icon' => array(
                 'condition' => isset($aParams['show_do_view_icon']) && $aParams['show_do_view_icon'] == true,
                 'content' => array(

+ 17 - 14
template/scripts/BxBaseVote.php

@@ -12,8 +12,6 @@
  */
 class BxBaseVote extends BxDolVote
 {
-    protected $_aElementDefaults;
-
     protected $_bCssJsAdded;
 
     protected $_sJsClsName;
@@ -61,11 +59,13 @@ class BxBaseVote extends BxDolVote
         return $this->_sJsObjName;
     }
 
-    public function getJsScript($bDynamicMode = false)
+    public function getJsScript($aParams = array())
     {
         $sJsObjName = $this->getJsObjectName();
         $sJsObjClass = $this->getJsClassName();
 
+        $bDynamicMode = isset($aParams['dynamic_mode']) && (bool)$aParams['dynamic_mode'] === true;
+
         $aParams = array(
             'sObjName' => $sJsObjName,
             'sSystem' => $this->getSystemName(),
@@ -73,7 +73,8 @@ class BxBaseVote extends BxDolVote
             'iObjId' => $this->getId(),
             'sRootUrl' => BX_DOL_URL_ROOT,
             'sStylePrefix' => $this->_sStylePrefix,
-            'aHtmlIds' => $this->_aHtmlIds
+            'aHtmlIds' => $this->_aHtmlIds,
+            'aRequestParams' => $this->_prepareRequestParamsData($aParams)
         );
         $sCode = "if(window['" . $sJsObjName . "'] == undefined) var " . $sJsObjName . " = new " . $sJsObjClass . "(" . json_encode($aParams) . ");";
 
@@ -92,10 +93,12 @@ class BxBaseVote extends BxDolVote
 
     public function getCounter($aParams = array())
     {
-        $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
-        $bShowEmpty = isset($aParams['show_counter_empty']) && $aParams['show_counter_empty'] == true;
-        $bShowActive = $this->isAllowedVoteViewVoters() && (!isset($aParams['show_counter_active']) || $aParams['show_counter_active'] === true);
-        $bShowScript = !isset($aParams['show_script']) || $aParams['show_script'] == true;
+        $aParams = array_merge($this->_aElementDefaults, $aParams);
+
+        $bDynamicMode = isset($aParams['dynamic_mode']) && (bool)$aParams['dynamic_mode'] === true;
+        $bShowEmpty = isset($aParams['show_counter_empty']) && (bool)$aParams['show_counter_empty'] === true;
+        $bShowActive = $this->isAllowedVoteViewVoters() && (!isset($aParams['show_counter_active']) || (bool)$aParams['show_counter_active'] === true);
+        $bShowScript = !isset($aParams['show_script']) || (bool)$aParams['show_script'] === true;
 
         $sClass = $this->_sStylePrefix . '-counter ' . $this->_sStylePrefix . '-counter-' . $this->_sType;
         if(!empty($aParams['class_counter']))
@@ -136,7 +139,7 @@ class BxBaseVote extends BxDolVote
             ),
             'bx_repeat:attrs' => $aTmplVarsAttrs,
             'content' => $sContent,
-            'script' => $bShowScript ? $this->getJsScript($bDynamicMode) : ''
+            'script' => $bShowScript ? $this->getJsScript($aParams) : ''
         ));
     }
 
@@ -181,8 +184,8 @@ class BxBaseVote extends BxDolVote
     {
     	$aParams = array_merge($this->_aElementDefaults, $aParams);
 
-    	$bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
-        $bShowCounterEmpty = isset($aParams['show_counter_empty']) && $aParams['show_counter_empty'] == true;
+    	$bDynamicMode = isset($aParams['dynamic_mode']) && (bool)$aParams['dynamic_mode'] === true;
+        $bShowCounterEmpty = isset($aParams['show_counter_empty']) && (bool)$aParams['show_counter_empty'] === true;
 
         $iObjectId = $this->getId();
         $iAuthorId = $this->_getAuthorId();
@@ -250,7 +253,7 @@ class BxBaseVote extends BxDolVote
             	'condition' => $bTmplVarsLegend,
             	'content' => $aTmplVarsLegend
             ),
-            'script' => $this->getJsScript($bDynamicMode)
+            'script' => $this->getJsScript($aParams)
         );
     }
 
@@ -289,12 +292,12 @@ class BxBaseVote extends BxDolVote
 
     protected function _isShowDoVote($aParams, $isAllowedVote, $bCount)
     {
-        return !isset($aParams['show_do_vote']) || $aParams['show_do_vote'] == true;
+        return !isset($aParams['show_do_vote']) || (bool)$aParams['show_do_vote'] === true;
     }
 
     protected function _isShowCounter($aParams, $isAllowedVote, $isAllowedVoteView, $bCount)
     {
-        return isset($aParams['show_counter']) && $aParams['show_counter'] === true && $isAllowedVoteView && ($isAllowedVote || $bCount);
+        return isset($aParams['show_counter']) && (bool)$aParams['show_counter'] === true && $isAllowedVoteView && ($isAllowedVote || $bCount);
     }
 
     protected function _isShowLegend($aParams, $isAllowedVote, $isAllowedVoteView, $bCount)

+ 16 - 14
template/scripts/BxBaseVoteLikes.php

@@ -51,9 +51,9 @@ class BxBaseVoteLikes extends BxDolVoteLikes
     public function getCounter($aParams = array())
     {
         $sClass = '';
-        if(isset($aParams['show_do_vote_as_button_small']) && $aParams['show_do_vote_as_button_small'] == true)
+        if(isset($aParams['show_do_vote_as_button_small']) && (bool)$aParams['show_do_vote_as_button_small'] === true)
             $sClass = 'bx-btn-small-height';
-        else if(isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true)
+        else if(isset($aParams['show_do_vote_as_button']) && (bool)$aParams['show_do_vote_as_button'] === true)
             $sClass = 'bx-btn-height';
 
         $aParams['class_counter'] = isset($aParams['class_counter']) ? $aParams['class_counter'] : '';
@@ -65,9 +65,9 @@ class BxBaseVoteLikes extends BxDolVoteLikes
     public function getElement($aParams = array())
     {
         $sClass = $this->_sStylePrefix . '-' . $this->_sType;
-        if(isset($aParams['show_do_vote_as_button_small']) && $aParams['show_do_vote_as_button_small'] == true)
+        if(isset($aParams['show_do_vote_as_button_small']) && (bool)$aParams['show_do_vote_as_button_small'] === true)
             $sClass .=  '-button-small';
-        else if(isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true)
+        else if(isset($aParams['show_do_vote_as_button']) && (bool)$aParams['show_do_vote_as_button'] === true)
             $sClass .= '-button';
 
         $aParams['class_element'] = isset($aParams['class_element']) ? $aParams['class_element'] : '';
@@ -81,9 +81,9 @@ class BxBaseVoteLikes extends BxDolVoteLikes
      */
     protected function _getDoVote($aParams = array(), $isAllowedVote = true)
     {
-    	$bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
-        $bShowDoVoteAsButtonSmall = isset($aParams['show_do_vote_as_button_small']) && $aParams['show_do_vote_as_button_small'] == true;
-        $bShowDoVoteAsButton = !$bShowDoVoteAsButtonSmall && isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true;
+    	$bVoted = isset($aParams['is_voted']) && (bool)$aParams['is_voted'] === true;
+        $bShowDoVoteAsButtonSmall = isset($aParams['show_do_vote_as_button_small']) && (bool)$aParams['show_do_vote_as_button_small'] === true;
+        $bShowDoVoteAsButton = !$bShowDoVoteAsButtonSmall && isset($aParams['show_do_vote_as_button']) && (bool)$aParams['show_do_vote_as_button'] === true;
         $bDisabled = !$isAllowedVote || ($bVoted && !$this->isUndo());
 
         $sClass = '';
@@ -104,17 +104,18 @@ class BxBaseVoteLikes extends BxDolVoteLikes
 
     protected function _getDoVoteLabel($aParams = array())
     {
-    	$bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
+    	$bVoted = isset($aParams['is_voted']) && (bool)$aParams['is_voted'] === true;
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
+            'style_prefix' => $this->_sStylePrefix,
             'bx_if:show_icon' => array(
-                'condition' => isset($aParams['show_do_vote_icon']) && $aParams['show_do_vote_icon'] == true,
+                'condition' => isset($aParams['show_do_vote_icon']) && (bool)$aParams['show_do_vote_icon'] === true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
                     'name' => $this->_getIconDo($bVoted)
                 )
             ),
             'bx_if:show_text' => array(
-                'condition' => isset($aParams['show_do_vote_label']) && $aParams['show_do_vote_label'] == true,
+                'condition' => isset($aParams['show_do_vote_label']) && (bool)$aParams['show_do_vote_label'] === true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
                     'text' => _t($this->_getTitleDo($bVoted))
@@ -125,20 +126,21 @@ class BxBaseVoteLikes extends BxDolVoteLikes
 
     protected function _getCounterLabel($iCount, $aParams = array())
     {
-        $bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
+        $bVoted = isset($aParams['is_voted']) && (bool)$aParams['is_voted'] === true;
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterLabel(), array(
+            'style_prefix' => $this->_sStylePrefix,
             'bx_if:show_icon' => array(
-                'condition' => !isset($aParams['show_counter_label_icon']) || $aParams['show_counter_label_icon'] === true,
+                'condition' => !isset($aParams['show_counter_label_icon']) || (bool)$aParams['show_counter_label_icon'] === true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
                     'name' => $this->_getIconDo($bVoted)
                 )
             ),
             'bx_if:show_text' => array(
-                'condition' => !isset($aParams['show_counter_label_text']) || $aParams['show_counter_label_text'] === true,
+                'condition' => !isset($aParams['show_counter_label_text']) || (bool)$aParams['show_counter_label_text'] === true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
-                    'text' => parent::_getCounterLabel($iCount)
+                    'text' => parent::_getCounterLabel($iCount, $aParams)
                 )
             )
         ));

+ 56 - 26
template/scripts/BxBaseVoteReactions.php

@@ -91,16 +91,18 @@ class BxBaseVoteReactions extends BxDolVoteReactions
 
     public function _getCounterDivided($aParams = array())
     {
-        $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
-        $bShowScript = !isset($aParams['show_script']) || $aParams['show_script'] == true;
+        $bDynamicMode = isset($aParams['dynamic_mode']) && (bool)$aParams['dynamic_mode'] === true;
+        $bShowCounterEmpty = isset($aParams['show_counter_empty']) && (bool)$aParams['show_counter_empty'] === true;
+        $bShowScript = !isset($aParams['show_script']) || (bool)$aParams['show_script'] === true;
 
+        $bVote = $this->_isVote();
         $aVote = $this->_getVote();
         $aReactions = $this->getReactions();
 
         $sClass = isset($aParams['class_counter']) ? $aParams['class_counter'] : '';
-        if(isset($aParams['show_do_vote_as_button_small']) && $aParams['show_do_vote_as_button_small'] == true)
+        if(isset($aParams['show_do_vote_as_button_small']) && (bool)$aParams['show_do_vote_as_button_small'] === true)
             $sClass .= ' bx-btn-small-height';
-        else if(isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true)
+        else if(isset($aParams['show_do_vote_as_button']) && (bool)$aParams['show_do_vote_as_button'] === true)
             $sClass .= ' bx-btn-height';
         $sClass .= ' bx-def-margin-sec-right';
 
@@ -108,10 +110,12 @@ class BxBaseVoteReactions extends BxDolVoteReactions
 
         $sResult = '';
         foreach($aReactions as $sName) {
-            $aParams['class_counter'] = ((int)$aVote['count_' . $sName] == 0 ? ' bx-vc-hidden' : '') . ' ' . $sName . ' ' . $sClass;
+            $iCount = (int)$aVote['count_' . $sName];
+
+            $aParams['class_counter'] = ($iCount == 0 && (!$bShowCounterEmpty || $sName != $this->_sDefault || $bVote) ? ' bx-vc-hidden' : '') . ' ' . $sName . ' ' . $sClass;
             $aParams['reaction'] = $sName;
             $aParams['vote'] = array(
-                'count' => $aVote['count_' . $sName],
+                'count' => $iCount,
                 'sum' => $aVote['sum_' . $sName],
                 'rate' => $aVote['rate_' . $sName],
             );
@@ -124,23 +128,34 @@ class BxBaseVoteReactions extends BxDolVoteReactions
             'style_prefix' => $this->_sStylePrefix,
             'type' => $this->_sType,
             'style' => self::$_sCounterStyleDivided,
-            'counter' => $sResult,
-            'script' => $bShowScript ? $this->getJsScript($bDynamicMode) : ''
+            'bx_if:show_link' => array(
+                'condition' => false,
+                'content' => array()
+            ),
+            'bx_if:show_text' => array(
+                'condition' => true,
+                'content' => array(
+                    'counter' => $sResult,
+                )
+            ),
+            'script' => $bShowScript ? $this->getJsScript($aParams) : ''
         ));
     }
 
     public function _getCounterCompound($aParams = array())
     {
-        $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
-        $bShowScript = !isset($aParams['show_script']) || $aParams['show_script'] == true;
+        $bDynamicMode = isset($aParams['dynamic_mode']) && (bool)$aParams['dynamic_mode'] === true;
+        $bShowCounterEmpty = isset($aParams['show_counter_empty']) && (bool)$aParams['show_counter_empty'] === true;
+        $bShowScript = !isset($aParams['show_script']) || (bool)$aParams['show_script'] === true;
 
+        $bVote = $this->_isVote();
         $aVote = $this->_getVote();
         $aReactions = $this->getReactions();
 
         $sClass = isset($aParams['class_counter']) ? $aParams['class_counter'] : '';
-        if(isset($aParams['show_do_vote_as_button_small']) && $aParams['show_do_vote_as_button_small'] == true)
+        if(isset($aParams['show_do_vote_as_button_small']) && (bool)$aParams['show_do_vote_as_button_small'] === true)
             $sClass .= ' bx-btn-small-height';
-        else if(isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true)
+        else if(isset($aParams['show_do_vote_as_button']) && (bool)$aParams['show_do_vote_as_button'] === true)
             $sClass .= ' bx-btn-height';
 
         $aParams['id_counter'] = '';
@@ -154,7 +169,7 @@ class BxBaseVoteReactions extends BxDolVoteReactions
                 'show_counter_active' => false,
                 'show_counter_label_icon' => true,
                 'show_counter_label_text' => false,
-                'class_counter' => ($iCount == 0 ? ' bx-vc-hidden' : '') . ' ' . $sName . ' ' . $sClass,
+                'class_counter' => ($iCount == 0 && (!$bShowCounterEmpty || $sName != $this->_sDefault || $bVote) ? ' bx-vc-hidden' : '') . ' ' . $sName . ' ' . $sClass,
                 'reaction' => $sName,
                 'vote' => array(
                     'count' => $iCount,
@@ -169,7 +184,7 @@ class BxBaseVoteReactions extends BxDolVoteReactions
         }
 
         $aParams = array_merge($aParams, array(
-            'show_counter_active' => true,
+            'show_counter_active' => false,
             'show_counter_label_icon' => false,
             'show_counter_label_text' => true,
             'class_counter' => ' total-count ' . $sClass,
@@ -185,19 +200,32 @@ class BxBaseVoteReactions extends BxDolVoteReactions
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterWrapper(), array(
             'html_id' => $this->_aHtmlIds['counter'],
             'style_prefix' => $this->_sStylePrefix,
+            'class' => !$bVote && !$bShowCounterEmpty ? 'bx-vc-hidden' : '',
             'type' => $this->_sType,
             'style' => self::$_sCounterStyleCompound,
-            'counter' => $sResult,
-            'script' => $bShowScript ? $this->getJsScript($bDynamicMode) : ''
+            'bx_if:show_link' => array(
+                'condition' => true,
+                'content' => array(
+                    'href' => 'javascript:void(0)',
+                    'onclick' => 'javascript:' . $this->getJsClickCounter($aParams),
+                    'title' => bx_html_attribute($this->_getTitleDoBy($aParams)),
+                    'counter' => $sResult,
+                )
+            ),
+            'bx_if:show_text' => array(
+                'condition' => false,
+                'content' => array()
+            ),
+            'script' => $bShowScript ? $this->getJsScript($aParams) : ''
         ));
     }
 
     public function getElement($aParams = array())
     {
         $sClass = $this->_sStylePrefix . '-' . $this->_sType;
-        if(isset($aParams['show_do_vote_as_button_small']) && $aParams['show_do_vote_as_button_small'] == true)
+        if(isset($aParams['show_do_vote_as_button_small']) && (bool)$aParams['show_do_vote_as_button_small'] === true)
             $sClass .=  '-button-small';
-        else if(isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true)
+        else if(isset($aParams['show_do_vote_as_button']) && (bool)$aParams['show_do_vote_as_button'] === true)
             $sClass .= '-button';
 
         $aParams['class_element'] = isset($aParams['class_element']) ? $aParams['class_element'] : '';
@@ -221,9 +249,9 @@ class BxBaseVoteReactions extends BxDolVoteReactions
     protected function _getDoVote($aParams = array(), $isAllowedVote = true)
     {
         $bUndo = $this->isUndo();
-    	$bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
-        $bShowDoVoteAsButtonSmall = isset($aParams['show_do_vote_as_button_small']) && $aParams['show_do_vote_as_button_small'] == true;
-        $bShowDoVoteAsButton = !$bShowDoVoteAsButtonSmall && isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true;
+    	$bVoted = isset($aParams['is_voted']) && (bool)$aParams['is_voted'] === true;
+        $bShowDoVoteAsButtonSmall = isset($aParams['show_do_vote_as_button_small']) && (bool)$aParams['show_do_vote_as_button_small'] === true;
+        $bShowDoVoteAsButton = !$bShowDoVoteAsButtonSmall && isset($aParams['show_do_vote_as_button']) && (bool)$aParams['show_do_vote_as_button'] === true;
         $bDisabled = !$isAllowedVote || ($bVoted && !$bUndo);
 
         $sClass = '';
@@ -253,18 +281,19 @@ class BxBaseVoteReactions extends BxDolVoteReactions
 
     protected function _getDoVoteLabel($aParams = array())
     {
-    	$bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
+    	$bVoted = isset($aParams['is_voted']) && (bool)$aParams['is_voted'] === true;
 
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
+            'style_prefix' => $this->_sStylePrefix,
             'bx_if:show_icon' => array(
-                'condition' => isset($aParams['show_do_vote_icon']) && $aParams['show_do_vote_icon'] == true,
+                'condition' => isset($aParams['show_do_vote_icon']) && (bool)$aParams['show_do_vote_icon'] === true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
                     'name' => $this->_getIconDoWithTrack($bVoted, $aParams['track'])
                 )
             ),
             'bx_if:show_text' => array(
-                'condition' => isset($aParams['show_do_vote_label']) && $aParams['show_do_vote_label'] == true,
+                'condition' => isset($aParams['show_do_vote_label']) && (bool)$aParams['show_do_vote_label'] === true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
                     'text' => _t($this->_getTitleDoWithTrack($bVoted, $aParams['track']))
@@ -294,15 +323,16 @@ class BxBaseVoteReactions extends BxDolVoteReactions
         $sReaction = !empty($aParams['reaction']) ? $aParams['reaction'] : $this->_sDefault;
 
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterLabel(), array(
+            'style_prefix' => $this->_sStylePrefix,
             'bx_if:show_icon' => array(
-                'condition' => !isset($aParams['show_counter_label_icon']) || $aParams['show_counter_label_icon'] === true,
+                'condition' => !isset($aParams['show_counter_label_icon']) || (bool)$aParams['show_counter_label_icon'] === true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
                     'name' => $this->_aDataList[$sReaction]['icon']
                 )
             ),
             'bx_if:show_text' => array(
-                'condition' => !isset($aParams['show_counter_label_text']) || $aParams['show_counter_label_text'] === true,
+                'condition' => !isset($aParams['show_counter_label_text']) || (bool)$aParams['show_counter_label_text'] === true,
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
                     'text' => parent::_getCounterLabel($iCount)

+ 1 - 1
template/view_counter_label.html

@@ -1 +1 @@
-<bx_if:show_icon><span class="__style_prefix__-counter-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="__style_prefix__-counter-label bx-def-valign-center"><bx_if:show_icon><span class="sys-action-counter-icon __style_prefix__-counter-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-counter-text __style_prefix__-counter-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 1 - 1
template/view_do_view_label.html

@@ -1 +1 @@
-<bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-do-text __style_prefix__-do-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 1 - 1
template/view_element_block.html

@@ -1,5 +1,5 @@
 <div id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_view_data_count="__count__">
-    <div class="sys-action-do __style_prefix__-do bx-clearfix">
+    <div class="sys-action-do __style_prefix__-do bx-def-valign-center bx-clearfix">
         <bx_if:show_do_view>
             <div class="sys-action-element-holder __style_prefix__-element-holder">__do_view__</div>
         </bx_if:show_do_view>

+ 1 - 1
template/view_element_inline.html

@@ -1,3 +1,3 @@
 <span id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_view_data_count="__count__">
-    <span class="sys-action-do __style_prefix__-do"><bx_if:show_do_view><span class="sys-action-element-holder __style_prefix__-element-holder">__do_view__</span></bx_if:show_do_view><bx_if:show_counter><span class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-thd-left-auto bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter></span>__script__
+    <span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_do_view><span class="sys-action-element-holder __style_prefix__-element-holder">__do_view__</span></bx_if:show_do_view><bx_if:show_counter><span class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-thd-left-auto bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter></span>__script__
 </span>

+ 1 - 1
template/vote_counter_label_likes.html

@@ -1 +1 @@
-<bx_if:show_icon><span class="__style_prefix__-counter-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="sys-action-counter-label __style_prefix__-counter-label bx-def-valign-center"><bx_if:show_icon><span class="sys-action-counter-icon __style_prefix__-counter-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-counter-text __style_prefix__-counter-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 1 - 1
template/vote_counter_label_reactions.html

@@ -1 +1 @@
-<bx_if:show_icon><span class="__style_prefix__-counter-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="__style_prefix__-counter-label bx-def-valign-center"><bx_if:show_icon><span class="sys-action-counter-icon __style_prefix__-counter-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-counter-text __style_prefix__-counter-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 3 - 1
template/vote_counter_wrapper_reactions.html

@@ -1 +1,3 @@
-<div id="__html_id__" class="__style_prefix__-counter-wrapper __style_prefix__-counter-wrapper-__type__ __style_prefix__-counter-wrapper-__type__-__style__">__counter____script__</div>
+<div id="__html_id__" class="__style_prefix__-counter-wrapper __style_prefix__-counter-wrapper-__type__ __style_prefix__-counter-wrapper-__type__-__style__ __class__">
+    <div class="__style_prefix__-counter-wrapper-cnt bx-def-valign-center"><bx_if:show_link><a class="bx-def-valign-center" href="__href__" onclick="__onclick__" title="__title__">__counter__</a></bx_if:show_link><bx_if:show_text>__counter__</bx_if:show_text>__script__</div>
+</div>

+ 1 - 1
template/vote_do_vote_label_likes.html

@@ -1 +1 @@
-<bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-do-text __style_prefix__-do-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 1 - 1
template/vote_do_vote_label_reactions.html

@@ -1 +1 @@
-<bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_icon><span class="sys-action-do-icon __style_prefix__-do-icon bx-def-align-center"><i class="sys-icon __name__"></i></span></bx_if:show_icon><bx_if:show_text><span class="sys-action-do-text __style_prefix__-do-text bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text></span>

+ 1 - 1
template/vote_element_block.html

@@ -1,5 +1,5 @@
 <div id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom"<bx_if:show_vote_data> bx_vote_data_rate="__rate__" bx_vote_data_count="__count__"</bx_if:show_vote_data>>
-    <div class="sys-action-do __style_prefix__-do bx-clearfix">
+    <div class="sys-action-do __style_prefix__-do bx-def-valign-center bx-clearfix">
         <bx_if:show_do_vote>
             <div class="sys-action-element-holder __style_prefix__-element-holder">__do_vote__</div>
         </bx_if:show_do_vote>

+ 1 - 1
template/vote_element_inline.html

@@ -1,3 +1,3 @@
 <span id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom"<bx_if:show_vote_data> bx_vote_data_rate="__rate__" bx_vote_data_count="__count__"</bx_if:show_vote_data>>
-    <span class="sys-action-do __style_prefix__-do"><bx_if:show_do_vote><span class="sys-action-element-holder __style_prefix__-element-holder">__do_vote__</span></bx_if:show_do_vote><bx_if:show_counter><span class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-thd-left-auto bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter></span>__script__
+    <span class="sys-action-do __style_prefix__-do bx-def-valign-center"><bx_if:show_do_vote><span class="sys-action-element-holder __style_prefix__-element-holder">__do_vote__</span></bx_if:show_do_vote><bx_if:show_counter><span class="sys-action-counter-holder __style_prefix__-counter-holder bx-def-margin-thd-left-auto bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter></span>__script__
 </span>