Explorar el Código

Merge branch 'master' of https://github.com/unaio/una

RomanL hace 7 años
padre
commit
f00d2bfe13
Se han modificado 100 ficheros con 1770 adiciones y 784 borrados
  1. 1 1
      inc/classes/BxDolCmtsQuery.php
  2. 5 4
      inc/classes/BxDolFavorite.php
  3. 4 3
      inc/classes/BxDolFeature.php
  4. 5 0
      inc/classes/BxDolModuleProxy.php
  5. 41 4
      inc/classes/BxDolObject.php
  6. 12 11
      inc/classes/BxDolReport.php
  7. 10 5
      inc/classes/BxDolScore.php
  8. 4 3
      inc/classes/BxDolView.php
  9. 5 4
      inc/classes/BxDolVote.php
  10. 37 7
      inc/classes/BxDolVoteReactions.php
  11. 14 4
      inc/classes/BxDolVoteReactionsQuery.php
  12. 1 1
      inc/js/classes/BxDolFavorite.js
  13. 1 1
      inc/js/classes/BxDolFeature.js
  14. 1 1
      inc/js/classes/BxDolReport.js
  15. 35 35
      inc/js/classes/BxDolScore.js
  16. 1 1
      inc/js/classes/BxDolVoteLikes.js
  17. 17 4
      inc/js/classes/BxDolVoteReactions.js
  18. 19 32
      inc/js/functions.js
  19. 3 1
      modules/base/text/classes/BxBaseModTextFormPoll.php
  20. 1 1
      modules/base/text/classes/BxBaseModTextVotePollAnswers.php
  21. 1 0
      modules/boonex/ads/classes/BxAdsConfig.php
  22. 1 1
      modules/boonex/ads/install/config.php
  23. 17 27
      modules/boonex/ads/template/images/icons/std-icon.svg
  24. 1 0
      modules/boonex/albums/classes/BxAlbumsModule.php
  25. 7 1
      modules/boonex/decorous/data/template/system/_header_js_custom.html
  26. 21 16
      modules/boonex/decorous/data/template/system/css/general.css
  27. 6 3
      modules/boonex/decorous/data/template/system/css/menu.less
  28. 4 2
      modules/boonex/english/data/langs/system/en.xml
  29. 14 11
      modules/boonex/forum/classes/BxForumModule.php
  30. 2 2
      modules/boonex/forum/template/css/main.css
  31. 1 1
      modules/boonex/market/classes/BxMarketVoteStars.php
  32. 0 2
      modules/boonex/notifications/install/langs/en.xml
  33. 1 1
      modules/boonex/polls/classes/BxPollsVoteSubentries.php
  34. 1 0
      modules/boonex/posts/classes/BxPostsConfig.php
  35. 0 8
      modules/boonex/protean/data/template/bx_timeline/css/view.less
  36. 7 1
      modules/boonex/protean/data/template/system/css/common.css
  37. 67 60
      modules/boonex/protean/data/template/system/css/default.less
  38. 6 3
      modules/boonex/protean/data/template/system/css/menu.less
  39. 4 0
      modules/boonex/russian/data/langs/bx_notifications/ru.xml
  40. 7 2
      modules/boonex/russian/data/langs/bx_timeline/ru.xml
  41. 3 1
      modules/boonex/russian/data/langs/system/ru.xml
  42. 1 1
      modules/boonex/shopify/install/sql/install.sql
  43. 28 2
      modules/boonex/timeline/classes/BxTimelineConfig.php
  44. 9 1
      modules/boonex/timeline/classes/BxTimelineDb.php
  45. 94 16
      modules/boonex/timeline/classes/BxTimelineMenuItemActions.php
  46. 52 0
      modules/boonex/timeline/classes/BxTimelineMenuItemCounters.php
  47. 2 0
      modules/boonex/timeline/classes/BxTimelineMenuItemManage.php
  48. 6 5
      modules/boonex/timeline/classes/BxTimelineModule.php
  49. 9 2
      modules/boonex/timeline/classes/BxTimelineResponse.php
  50. 121 32
      modules/boonex/timeline/classes/BxTimelineTemplate.php
  51. 7 2
      modules/boonex/timeline/install/langs/en.xml
  52. 1 1
      modules/boonex/timeline/install/sql/disable.sql
  53. 19 2
      modules/boonex/timeline/install/sql/enable.sql
  54. 2 0
      modules/boonex/timeline/js/main.js
  55. 116 48
      modules/boonex/timeline/js/view.js
  56. 24 6
      modules/boonex/timeline/template/css/view.css
  57. 4 3
      modules/boonex/timeline/template/item_outline.html
  58. 4 3
      modules/boonex/timeline/template/item_timeline.html
  59. 1 2
      modules/boonex/timeline/template/jump_to.html
  60. 4 0
      modules/boonex/timeline/template/menu_custom_item_hor.html
  61. 1 1
      modules/boonex/timeline/template/repost_do_repost_label.html
  62. 3 3
      modules/boonex/timeline/template/repost_element_block.html
  63. 1 1
      template/comment_counter.html
  64. 81 12
      template/css/cmts.css
  65. 7 16
      template/css/menu.css
  66. 27 0
      template/css/score.css
  67. 24 0
      template/css/view.css
  68. 195 12
      template/css/vote.css
  69. 1 1
      template/favorite_do_favorite_label.html
  70. 3 3
      template/favorite_element_block.html
  71. 2 2
      template/favorite_element_inline.html
  72. 1 1
      template/feature_do_feature_label.html
  73. 2 2
      template/feature_element_block.html
  74. 2 2
      template/feature_element_inline.html
  75. 1 1
      template/report_do_report_label.html
  76. 6 6
      template/report_element_block.html
  77. 2 2
      template/report_element_inline.html
  78. 2 6
      template/score_counter.html
  79. 1 0
      template/score_counter_label.html
  80. 1 1
      template/score_do_vote_label.html
  81. 10 10
      template/score_element_block.html
  82. 2 2
      template/score_element_inline.html
  83. 27 2
      template/scripts/BxBaseCmts.php
  84. 14 23
      template/scripts/BxBaseFavorite.php
  85. 11 20
      template/scripts/BxBaseFeature.php
  86. 53 63
      template/scripts/BxBaseReport.php
  87. 41 28
      template/scripts/BxBaseScore.php
  88. 88 71
      template/scripts/BxBaseView.php
  89. 21 38
      template/scripts/BxBaseVote.php
  90. 30 11
      template/scripts/BxBaseVoteLikes.php
  91. 173 31
      template/scripts/BxBaseVoteReactions.php
  92. 2 1
      template/scripts/BxBaseVoteStars.php
  93. 2 6
      template/view_counter.html
  94. 1 0
      template/view_counter_label.html
  95. 1 1
      template/view_do_view_label.html
  96. 4 4
      template/view_element_block.html
  97. 2 2
      template/view_element_inline.html
  98. 8 8
      template/vote_by_list.html
  99. 14 0
      template/vote_by_list_reactions.html
  100. 11 0
      template/vote_by_summary_reactions.html

+ 1 - 1
inc/classes/BxDolCmtsQuery.php

@@ -221,7 +221,7 @@ class BxDolCmtsQuery extends BxDolDb
 
 
                 $sWhereClause .= " AND `{$this->_sTable}`.`cmt_object_id` = :cmt_object_id";
                 $sWhereClause .= " AND `{$this->_sTable}`.`cmt_object_id` = :cmt_object_id";
 
 
-                $sOrderClause = "`{$this->_sTable}`.`cmt_time` ASC";
+                $sOrderClause = "`{$this->_sTable}`.`cmt_time` " . (!empty($aParams['order_way']) ? strtoupper($aParams['order_way']) : "ASC");
                 $sLimitClause = "";
                 $sLimitClause = "";
                 if(isset($aParams['per_page']))
                 if(isset($aParams['per_page']))
                     $sLimitClause = $this->prepareAsString("?, ?", $aParams['start'], $aParams['per_page']);
                     $sLimitClause = $this->prepareAsString("?, ?", $aParams['start'], $aParams['per_page']);

+ 5 - 4
inc/classes/BxDolFavorite.php

@@ -70,8 +70,9 @@ class BxDolFavorite extends BxDolObject
      */
      */
     public static function getObjectInstance($sSys, $iId, $iInit = true)
     public static function getObjectInstance($sSys, $iId, $iInit = true)
     {
     {
-        if(isset($GLOBALS['bxDolClasses']['BxDolFavorite!' . $sSys . $iId]))
-            return $GLOBALS['bxDolClasses']['BxDolFavorite!' . $sSys . $iId];
+        $sKey = 'BxDolFavorite!' . $sSys . $iId;
+        if(isset($GLOBALS['bxDolClasses'][$sKey]))
+            return $GLOBALS['bxDolClasses'][$sKey];
 
 
         $aSystems = self::getSystems();
         $aSystems = self::getSystems();
         if(!isset($aSystems[$sSys]))
         if(!isset($aSystems[$sSys]))
@@ -85,7 +86,7 @@ class BxDolFavorite extends BxDolObject
         }
         }
 
 
         $o = new $sClassName($sSys, $iId, $iInit);
         $o = new $sClassName($sSys, $iId, $iInit);
-        return ($GLOBALS['bxDolClasses']['BxDolFavorite!' . $sSys . $iId] = $o);
+        return ($GLOBALS['bxDolClasses'][$sKey] = $o);
     }
     }
 
 
     public static function &getSystems()
     public static function &getSystems()
@@ -224,7 +225,7 @@ class BxDolFavorite extends BxDolObject
         	'eval' => $this->getJsObjectName() . '.onFavorite(oData, oElement)',
         	'eval' => $this->getJsObjectName() . '.onFavorite(oData, oElement)',
         	'code' => 0, 
         	'code' => 0, 
         	'count' => $aFavorite['count'],
         	'count' => $aFavorite['count'],
-        	'countf' => (int)$aFavorite['count'] > 0 ? $this->_getLabelCounter($aFavorite['count']) : '',
+        	'countf' => (int)$aFavorite['count'] > 0 ? $this->_getCounterLabel($aFavorite['count']) : '',
             'label_icon' => $this->_getIconDoFavorite(!$bPerformed),
             'label_icon' => $this->_getIconDoFavorite(!$bPerformed),
             'label_title' => _t($this->_getTitleDoFavorite(!$bPerformed)),
             'label_title' => _t($this->_getTitleDoFavorite(!$bPerformed)),
             'disabled' => !$bPerformed && !$bUndo
             'disabled' => !$bPerformed && !$bUndo

+ 4 - 3
inc/classes/BxDolFeature.php

@@ -60,8 +60,9 @@ class BxDolFeature extends BxDolObject
      */
      */
     public static function getObjectInstance($sSys, $iId, $iInit = true)
     public static function getObjectInstance($sSys, $iId, $iInit = true)
     {
     {
-        if(isset($GLOBALS['bxDolClasses']['BxDolFeature!' . $sSys . $iId]))
-            return $GLOBALS['bxDolClasses']['BxDolFeature!' . $sSys . $iId];
+        $sKey = 'BxDolFeature!' . $sSys . $iId;
+        if(isset($GLOBALS['bxDolClasses'][$sKey]))
+            return $GLOBALS['bxDolClasses'][$sKey];
 
 
         $aSystems = self::getSystems();
         $aSystems = self::getSystems();
         if(!isset($aSystems[$sSys]))
         if(!isset($aSystems[$sSys]))
@@ -75,7 +76,7 @@ class BxDolFeature extends BxDolObject
         }
         }
 
 
         $o = new $sClassName($sSys, $iId, $iInit);
         $o = new $sClassName($sSys, $iId, $iInit);
-        return ($GLOBALS['bxDolClasses']['BxDolFeature!' . $sSys . $iId] = $o);
+        return ($GLOBALS['bxDolClasses'][$sKey] = $o);
     }
     }
 
 
     public static function &getSystems()
     public static function &getSystems()

+ 5 - 0
inc/classes/BxDolModuleProxy.php

@@ -54,6 +54,11 @@ class BxDolModuleProxy
         }
         }
     }
     }
 
 
+    public function getClassName()
+    {
+        return get_class($this->_oProxifiedObject);
+    }
+
     public function isMethodExists($s)
     public function isMethodExists($s)
     {
     {
         return method_exists($this->_oProxifiedObject, $s);
         return method_exists($this->_oProxifiedObject, $s);

+ 41 - 4
inc/classes/BxDolObject.php

@@ -14,7 +14,7 @@
 class BxDolObject extends BxDolFactory implements iBxDolReplaceable
 class BxDolObject extends BxDolFactory implements iBxDolReplaceable
 {
 {
     protected $_oTemplate = null;
     protected $_oTemplate = null;
-	protected $_oQuery = null;
+    protected $_oQuery = null;
 
 
     protected $_iId = 0; ///< item id the action to be performed with
     protected $_iId = 0; ///< item id the action to be performed with
     protected $_sSystem = ''; ///< current system name
     protected $_sSystem = ''; ///< current system name
@@ -22,6 +22,13 @@ class BxDolObject extends BxDolFactory implements iBxDolReplaceable
 
 
     protected $_aMarkers = array ();
     protected $_aMarkers = array ();
 
 
+    protected $_sTmplContentElementBlock = '';
+    protected $_sTmplContentElementInline = '';
+    protected $_sTmplContentDoAction;
+    protected $_sTmplContentDoActionLabel = '';
+    protected $_sTmplContentCounter = '';
+    protected $_sTmplContentCounterLabel = '';
+
     protected function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
     protected function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
     {
     {
         parent::__construct();
         parent::__construct();
@@ -207,15 +214,15 @@ class BxDolObject extends BxDolFactory implements iBxDolReplaceable
         return $a[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $a[CHECK_ACTION_MESSAGE] : '';
         return $a[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $a[CHECK_ACTION_MESSAGE] : '';
     }
     }
 
 
-	/**
+    /**
      * Actions' response functions
      * Actions' response functions
      */
      */
-	public function onObjectDelete($iObjectId = 0)
+    public function onObjectDelete($iObjectId = 0)
     {
     {
         $this->_oQuery->deleteObjectEntries($iObjectId ? $iObjectId : $this->getId());
         $this->_oQuery->deleteObjectEntries($iObjectId ? $iObjectId : $this->getId());
     }
     }
 
 
-	/**
+    /**
      * Internal functions
      * Internal functions
      */
      */
 	protected function _getAuthorId ()
 	protected function _getAuthorId ()
@@ -297,6 +304,36 @@ class BxDolObject extends BxDolFactory implements iBxDolReplaceable
     {
     {
         return bx_replace_markers($mixed, $this->_aMarkers);
         return bx_replace_markers($mixed, $this->_aMarkers);
     }
     }
+
+    protected function _getTmplContentElementBlock()
+    {
+        return $this->_sTmplContentElementBlock;
+    }
+
+    protected function _getTmplContentElementInline()
+    {
+        return $this->_sTmplContentElementInline;
+    }
+
+    protected function _getTmplContentDoAction()
+    {
+        return $this->_sTmplContentDoAction;
+    }
+
+    protected function _getTmplContentDoActionLabel()
+    {
+        return $this->_sTmplContentDoActionLabel;
+    }
+
+    protected function _getTmplContentCounter()
+    {
+        return $this->_sTmplContentCounter;
+    }
+
+    protected function _getTmplContentCounterLabel()
+    {
+        return $this->_sTmplContentCounterLabel;
+    }
 }
 }
 
 
 /** @} */
 /** @} */

+ 12 - 11
inc/classes/BxDolReport.php

@@ -68,14 +68,14 @@ define('BX_DOL_REPORT_USAGE_DEFAULT', BX_DOL_REPORT_USAGE_BLOCK);
 
 
 class BxDolReport extends BxDolObject
 class BxDolReport extends BxDolObject
 {
 {
-	protected $_oTemplate;
+    protected $_oTemplate;
 
 
-	protected $_sBaseUrl;
+    protected $_sBaseUrl;
 
 
-	protected $_sFormObject;
+    protected $_sFormObject;
     protected $_sFormDisplayPost;
     protected $_sFormDisplayPost;
 
 
-	protected $_aTypes;
+    protected $_aTypes;
 
 
     protected function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
     protected function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
     {
     {
@@ -90,14 +90,14 @@ class BxDolReport extends BxDolObject
         else
         else
             $this->_oTemplate = BxDolTemplate::getInstance();
             $this->_oTemplate = BxDolTemplate::getInstance();
 
 
-		$this->_sBaseUrl = BxDolPermalinks::getInstance()->permalink($this->_aSystem['base_url']);
+        $this->_sBaseUrl = BxDolPermalinks::getInstance()->permalink($this->_aSystem['base_url']);
         if(get_mb_substr($this->_sBaseUrl, 0, 4) != 'http')
         if(get_mb_substr($this->_sBaseUrl, 0, 4) != 'http')
             $this->_sBaseUrl = BX_DOL_URL_ROOT . $this->_sBaseUrl;
             $this->_sBaseUrl = BX_DOL_URL_ROOT . $this->_sBaseUrl;
 
 
-		$this->_sFormObject = 'sys_report';
-		$this->_sFormDisplayPost = 'sys_report_post';
+        $this->_sFormObject = 'sys_report';
+        $this->_sFormDisplayPost = 'sys_report_post';
 
 
-		$this->_aTypes = array('spam', 'scam', 'fraud', 'nude', 'other');
+        $this->_aTypes = array('spam', 'scam', 'fraud', 'nude', 'other');
     }
     }
 
 
     /**
     /**
@@ -109,8 +109,9 @@ class BxDolReport extends BxDolObject
      */
      */
     public static function getObjectInstance($sSys, $iId, $iInit = true, $oTemplate = false)
     public static function getObjectInstance($sSys, $iId, $iInit = true, $oTemplate = false)
     {
     {
-        if(isset($GLOBALS['bxDolClasses']['BxDolReport!' . $sSys . $iId]))
-            return $GLOBALS['bxDolClasses']['BxDolReport!' . $sSys . $iId];
+        $sKey = 'BxDolReport!' . $sSys . $iId . ($oTemplate ? $oTemplate->getClassName() : '');
+        if(isset($GLOBALS['bxDolClasses'][$sKey]))
+            return $GLOBALS['bxDolClasses'][$sKey];
 
 
         $aSystems = self::getSystems();
         $aSystems = self::getSystems();
         if(!isset($aSystems[$sSys]))
         if(!isset($aSystems[$sSys]))
@@ -124,7 +125,7 @@ class BxDolReport extends BxDolObject
         }
         }
 
 
         $o = new $sClassName($sSys, $iId, $iInit, $oTemplate);
         $o = new $sClassName($sSys, $iId, $iInit, $oTemplate);
-        return ($GLOBALS['bxDolClasses']['BxDolReport!' . $sSys . $iId] = $o);
+        return ($GLOBALS['bxDolClasses'][$sKey] = $o);
     }
     }
 
 
     public static function &getSystems()
     public static function &getSystems()

+ 10 - 5
inc/classes/BxDolScore.php

@@ -98,8 +98,9 @@ class BxDolScore extends BxDolObject
      */
      */
     public static function getObjectInstance($sSys, $iId, $iInit = true, $oTemplate = false)
     public static function getObjectInstance($sSys, $iId, $iInit = true, $oTemplate = false)
     {
     {
-        if(isset($GLOBALS['bxDolClasses']['BxDolScore!' . $sSys . $iId]))
-            return $GLOBALS['bxDolClasses']['BxDolScore!' . $sSys . $iId];
+        $sKey = 'BxDolScore!' . $sSys . $iId . ($oTemplate ? $oTemplate->getClassName() : '');
+        if(isset($GLOBALS['bxDolClasses'][$sKey]))
+            return $GLOBALS['bxDolClasses'][$sKey];
 
 
         $aSystems = self::getSystems();
         $aSystems = self::getSystems();
         if(!isset($aSystems[$sSys]))
         if(!isset($aSystems[$sSys]))
@@ -113,7 +114,7 @@ class BxDolScore extends BxDolObject
         }
         }
 
 
         $o = new $sClassName($sSys, $iId, $iInit, $oTemplate);
         $o = new $sClassName($sSys, $iId, $iInit, $oTemplate);
-        return ($GLOBALS['bxDolClasses']['BxDolScore!' . $sSys . $iId] = $o);
+        return ($GLOBALS['bxDolClasses'][$sKey] = $o);
     }
     }
 
 
     public static function &getSystems()
     public static function &getSystems()
@@ -293,7 +294,7 @@ class BxDolScore extends BxDolObject
             'code' => 0,
             'code' => 0,
             'type' => $sType,
             'type' => $sType,
             'score' => $aScore['score'],
             'score' => $aScore['score'],
-        	'scoref' => $iCup > 0 || $iCdown > 0 ? $this->_getLabelCounter($aScore['score']) : '',
+        	'scoref' => $iCup > 0 || $iCdown > 0 ? $this->_getCounterLabel($aScore['score']) : '',
             'cup' => $iCup,
             'cup' => $iCup,
         	'cdown' => $iCdown,
         	'cdown' => $iCdown,
             'counter' => $this->getCounter($aParams),
             'counter' => $this->getCounter($aParams),
@@ -323,7 +324,7 @@ class BxDolScore extends BxDolObject
     	return $sResult;
     	return $sResult;
     }
     }
 
 
-    protected function _getIconDo($sType)
+    protected function _getIconDo($sType = '')
     {
     {
         $sResult = '';
         $sResult = '';
 
 
@@ -331,9 +332,13 @@ class BxDolScore extends BxDolObject
             case BX_DOL_SCORE_DO_UP:
             case BX_DOL_SCORE_DO_UP:
                 $sResult = 'arrow-up';
                 $sResult = 'arrow-up';
                 break;
                 break;
+
             case BX_DOL_SCORE_DO_DOWN:
             case BX_DOL_SCORE_DO_DOWN:
                 $sResult = 'arrow-down';
                 $sResult = 'arrow-down';
                 break;
                 break;
+
+            default:
+                $sResult = 'arrows-alt-v';
         }
         }
 
 
     	return $sResult;
     	return $sResult;

+ 4 - 3
inc/classes/BxDolView.php

@@ -68,8 +68,9 @@ class BxDolView extends BxDolObject
      */
      */
     public static function getObjectInstance($sSys, $iId, $iInit = true)
     public static function getObjectInstance($sSys, $iId, $iInit = true)
     {
     {
-        if(isset($GLOBALS['bxDolClasses']['BxDolView!' . $sSys . $iId]))
-            return $GLOBALS['bxDolClasses']['BxDolView!' . $sSys . $iId];
+        $sKey = 'BxDolView!' . $sSys . $iId;
+        if(isset($GLOBALS['bxDolClasses'][$sKey]))
+            return $GLOBALS['bxDolClasses'][$sKey];
 
 
         $aSystems = self::getSystems();
         $aSystems = self::getSystems();
         if(!isset($aSystems[$sSys]))
         if(!isset($aSystems[$sSys]))
@@ -83,7 +84,7 @@ class BxDolView extends BxDolObject
         }
         }
 
 
         $o = new $sClassName($sSys, $iId, $iInit);
         $o = new $sClassName($sSys, $iId, $iInit);
-        return ($GLOBALS['bxDolClasses']['BxDolView!' . $sSys . $iId] = $o);
+        return ($GLOBALS['bxDolClasses'][$sKey] = $o);
     }
     }
 
 
     public static function &getSystems()
     public static function &getSystems()

+ 5 - 4
inc/classes/BxDolVote.php

@@ -100,8 +100,9 @@ class BxDolVote extends BxDolObject
      */
      */
     public static function getObjectInstance($sSys, $iId, $iInit = true, $oTemplate = false)
     public static function getObjectInstance($sSys, $iId, $iInit = true, $oTemplate = false)
     {
     {
-        if(isset($GLOBALS['bxDolClasses']['BxDolVote!' . $sSys . $iId]))
-            return $GLOBALS['bxDolClasses']['BxDolVote!' . $sSys . $iId];
+        $sKey = 'BxDolVote!' . $sSys . $iId . ($oTemplate ? $oTemplate->getClassName() : '');
+        if(isset($GLOBALS['bxDolClasses'][$sKey]))
+            return $GLOBALS['bxDolClasses'][$sKey];
 
 
         $aSystems = self::getSystems();
         $aSystems = self::getSystems();
         if(!isset($aSystems[$sSys]))
         if(!isset($aSystems[$sSys]))
@@ -118,7 +119,7 @@ class BxDolVote extends BxDolObject
         if($iInit && method_exists($o, 'init'))
         if($iInit && method_exists($o, 'init'))
             $o->init($iId);
             $o->init($iId);
 
 
-        return ($GLOBALS['bxDolClasses']['BxDolVote!' . $sSys . $iId] = $o);
+        return ($GLOBALS['bxDolClasses'][$sKey] = $o);
     }
     }
 
 
     public static function &getSystems()
     public static function &getSystems()
@@ -337,7 +338,7 @@ class BxDolVote extends BxDolObject
             'code' => 0,
             'code' => 0,
             'rate' => $aVote['rate'],
             'rate' => $aVote['rate'],
             'count' => $aVote['count'],
             'count' => $aVote['count'],
-            'countf' => (int)$aVote['count'] > 0 ? $this->_getLabelCounter($aVote['count']) : '',
+            'countf' => (int)$aVote['count'] > 0 ? $this->_getCounterLabel($aVote['count']) : '',
             'label_icon' => $this->_getIconDo($bVoted),
             'label_icon' => $this->_getIconDo($bVoted),
             'label_title' => _t($this->_getTitleDo($bVoted)),
             'label_title' => _t($this->_getTitleDo($bVoted)),
             'disabled' => $bVoted && !$bUndo,
             'disabled' => $bVoted && !$bUndo,

+ 37 - 7
inc/classes/BxDolVoteReactions.php

@@ -12,6 +12,9 @@
  */
  */
 class BxDolVoteReactions extends BxTemplVote
 class BxDolVoteReactions extends BxTemplVote
 {
 {
+    protected static $_sCounterStyleDivided = 'divided';
+    protected static $_sCounterStyleCompound = 'compound';
+
     protected $_sMenuDoVote; //--- Do vote (reaction)  menu name.
     protected $_sMenuDoVote; //--- Do vote (reaction)  menu name.
 
 
     protected $_sDataList; //--- Reactions list name.
     protected $_sDataList; //--- Reactions list name.
@@ -97,13 +100,23 @@ class BxDolVoteReactions extends BxTemplVote
 
 
     public function actionGetVotedBy()
     public function actionGetVotedBy()
     {
     {
-        if (!$this->isEnabled())
+        if(!$this->isEnabled())
            return '';
            return '';
 
 
+        $aParams = array();
+
         $sReaction = bx_get('reaction');
         $sReaction = bx_get('reaction');
-        $sReaction = $sReaction !== false ? bx_process_input($sReaction) : $this->_sDefault;
+        if($sReaction !== false) {
+            $sReaction = bx_process_input($sReaction);
+            
+            $aReactions = $this->getReactions();
+            if(!in_array($sReaction, $aReactions))
+                $sReaction = $this->_sDefault;
+
+            $aParams['reaction'] = $sReaction;
+        }
 
 
-        return $this->_getVotedBy(array('reaction' => $sReaction));
+        return $this->_getVotedBy($aParams);
     }
     }
 
 
     /**
     /**
@@ -142,6 +155,7 @@ class BxDolVoteReactions extends BxTemplVote
 
 
     protected function _returnVoteData($iObjectId, $iAuthorId, $iAuthorIp, $aData, $bVoted)
     protected function _returnVoteData($iObjectId, $iAuthorId, $iAuthorIp, $aData, $bVoted)
     {
     {
+        $aReactions = $this->getReactions();
         $sReaction = $aData['reaction'];
         $sReaction = $aData['reaction'];
 
 
         $bUndo = $this->isUndo();
         $bUndo = $this->isUndo();
@@ -154,18 +168,32 @@ class BxDolVoteReactions extends BxTemplVote
         if(!$bDisabled)
         if(!$bDisabled)
             $sJsClick = $bVoted && $bUndo ? $this->getJsClickDo($sReaction) : $this->getJsClick();
             $sJsClick = $bVoted && $bUndo ? $this->getJsClickDo($sReaction) : $this->getJsClick();
 
 
+        $iTotalC = $iTotalS = 0;
+        foreach($aReactions as $sName) {
+            $iTotalC += (int)$aVote['count_' . $sName];
+            $iTotalS += (int)$aVote['sum_' . $sName];
+        }
+        $fTotalR = $iTotalC != 0 ? round($iTotalS / $iTotalC, 2) : 0;
+
         $iCount = (int)$aVote['count_' . $sReaction];
         $iCount = (int)$aVote['count_' . $sReaction];
-        return array(
+        $aResult = array(
             'code' => 0,
             'code' => 0,
             'reaction' => $sReaction,
             'reaction' => $sReaction,
             'rate' => $aVote['rate_' . $sReaction],
             'rate' => $aVote['rate_' . $sReaction],
             'count' => $iCount,
             'count' => $iCount,
-            'countf' => $iCount > 0 ? $this->_getLabelCounter($iCount, array('reaction' => $sReaction)) : '',
+            'countf' => $iCount > 0 ? $this->_getCounterLabel($iCount, array('reaction' => $sReaction)) : '',
             'label_icon' => $this->_getIconDoWithTrack($bVoted, $aTrack),
             'label_icon' => $this->_getIconDoWithTrack($bVoted, $aTrack),
             'label_title' => _t($this->_getTitleDoWithTrack($bVoted, $aTrack)),
             'label_title' => _t($this->_getTitleDoWithTrack($bVoted, $aTrack)),
             'label_click' => $sJsClick,
             'label_click' => $sJsClick,
             'disabled' => $bVoted && !$this->isUndo(),
             'disabled' => $bVoted && !$this->isUndo(),
+            'total' => array(
+                'rate' => $fTotalR,
+                'count' => $iTotalC,
+                'countf' => $iTotalC > 0 ? $this->_getCounterLabel($iTotalC, array('show_counter_label_icon' => false, 'reaction' => '')) : '',
+            )
         );
         );
+
+        return $aResult;
     }
     }
 
 
     protected function _getIconDoWithTrack($bVoted, $aTrack = array())
     protected function _getIconDoWithTrack($bVoted, $aTrack = array())
@@ -184,9 +212,11 @@ class BxDolVoteReactions extends BxTemplVote
     
     
     protected function _getTitleDoBy($aParams = array())
     protected function _getTitleDoBy($aParams = array())
     {
     {
-        $sReaction = !empty($aParams['reaction']) ? $aParams['reaction'] : $this->_sDefault;
+        if(isset($aParams['show_counter_style']) && $aParams['show_counter_style'] == self::$_sCounterStyleCompound)
+            return _t('_vote_do_by_reactions');
 
 
-    	return _t('_vote_do_by_reactions', _t($this->_aDataList[$sReaction]['title']));
+        $sReaction = !empty($aParams['reaction']) ? $aParams['reaction'] : $this->_sDefault;
+    	return _t('_vote_do_by_x_reaction', _t($this->_aDataList[$sReaction]['title']));
     }
     }
 }
 }
 
 

+ 14 - 4
inc/classes/BxDolVoteReactionsQuery.php

@@ -103,12 +103,22 @@ class BxDolVoteReactionsQuery extends BxDolVoteQuery
     	if(!empty($aParams['type']))
     	if(!empty($aParams['type']))
             switch($aParams['type']) {
             switch($aParams['type']) {
                 case 'by':
                 case 'by':
-                    $aMethod['name'] = 'getColumn';
                     $aBindings['object_id'] = $aParams['object_id'];
                     $aBindings['object_id'] = $aParams['object_id'];
-                    $aBindings['reaction'] = $aParams['reaction'];
 
 
-                    $sSelectClause = '`author_id`';
-                    $sWhereClause = 'AND `object_id` = :object_id AND `reaction`=:reaction';
+                    $sWhereClause = 'AND `object_id` = :object_id';
+
+                    if(!empty($aParams['reaction'])) {
+                        $aMethod['name'] = 'getColumn';
+                        $aBindings['reaction'] = $aParams['reaction'];
+
+                        $sSelectClause = '`author_id`';
+                        $sWhereClause .= ' AND `reaction`=:reaction';
+                    }
+                    else {
+                        $aMethod['name'] = 'getAll';
+
+                        $sSelectClause = '`author_id`, `reaction`';
+                    }
                     break;
                     break;
             }
             }
 
 

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

@@ -64,7 +64,7 @@ BxDolFavorite.prototype.onFavorite = function(oData, oElement)
 
 
 		if(oData && oData.label_title) {
 		if(oData && oData.label_title) {
 			$(oElement).attr('title', oData.label_title);
 			$(oElement).attr('title', oData.label_title);
-			$(oElement).find('span').html(oData.label_title);
+			$(oElement).find('span:not(.sys-action-do-icon)').html(oData.label_title);
 		}
 		}
 
 
 		if(oData && oData.disabled)
 		if(oData && oData.disabled)

+ 1 - 1
inc/js/classes/BxDolFeature.js

@@ -52,7 +52,7 @@ BxDolFeature.prototype.onFeature = function(oData, oElement)
 
 
 		if(oData && oData.label_title) {
 		if(oData && oData.label_title) {
 			$(oElement).attr('title', oData.label_title);
 			$(oElement).attr('title', oData.label_title);
-			$(oElement).find('span').html(oData.label_title);
+			$(oElement).find('span:not(.sys-action-do-icon)').html(oData.label_title);
 		}
 		}
 
 
 		if(oData && oData.disabled)
 		if(oData && oData.disabled)

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

@@ -64,7 +64,7 @@ BxDolReport.prototype.onReport = function(oData, oElement)
 
 
 		if(oData && oData.label_title) {
 		if(oData && oData.label_title) {
 			$(oElement).attr('title', oData.label_title);
 			$(oElement).attr('title', oData.label_title);
-			$(oElement).find('span').html(oData.label_title);
+			$(oElement).find('span:not(.sys-action-do-icon)').html(oData.label_title);
 		}
 		}
 
 
 		if(oData && oData.disabled)
 		if(oData && oData.disabled)

+ 35 - 35
inc/js/classes/BxDolScore.js

@@ -8,10 +8,10 @@
 
 
 function BxDolScore(options)
 function BxDolScore(options)
 {
 {
-	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._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._sElementParams = options.sElementParams;
 
 
     this._sActionsUri = 'score.php';
     this._sActionsUri = 'score.php';
@@ -26,7 +26,7 @@ function BxDolScore(options)
 }
 }
 
 
 BxDolScore.prototype.toggleByPopup = function(oLink) {
 BxDolScore.prototype.toggleByPopup = function(oLink) {
-	var $this = this;
+    var $this = this;
     var oData = this._getDefaultParams();
     var oData = this._getDefaultParams();
     oData['action'] = 'GetVotedBy';
     oData['action'] = 'GetVotedBy';
 
 
@@ -56,37 +56,37 @@ BxDolScore.prototype._vote = function (oLink, sType, onComplete)
     	this._sActionsUrl,
     	this._sActionsUrl,
     	oParams,
     	oParams,
     	function(oData) {
     	function(oData) {
-    		var fContinue = function() {
-    			if(oData && oData.code != 0)
-                    return;
-
-	    		if(oData && oData.label_icon)
-	    			$(oLink).find('.sys-icon').attr('class', 'sys-icon ' + oData.label_icon);
-
-	    		if(oData && oData.label_title) {
-	    			$(oLink).attr('title', oData.label_title);
-	    			$(oLink).find('span').html(oData.label_title);
-	    		}
-
-	    		if(oData && oData.disabled)
-	    			$this._getActions(oLink).removeAttr('onclick').addClass($(oLink).hasClass('bx-btn') ? 'bx-btn-disabled' : 'bx-score-disabled');
-
-                var oCounter = $this._getCounter(oLink);
-                if(oCounter && oCounter.length > 0) {
-                	if(oData && oData.counter)
-                		oCounter.replaceWith(oData.counter);
-                	else
-	                	oCounter.html(oData.scoref).parents('.' + $this._sSP + '-counter-holder:first:hidden').bx_anim('show');
-                }
-
-                if(typeof onComplete == 'function')
-                	onComplete(oLink, oData);
-    		};
-
-    		if(oData && oData.message != undefined)
+            var fContinue = function() {
+            if(oData && oData.code != 0)
+                return;
+
+            if(oData && oData.label_icon)
+                $(oLink).find('.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);
+            }
+
+            if(oData && oData.disabled)
+                $this._getActions(oLink).removeAttr('onclick').addClass($(oLink).hasClass('bx-btn') ? 'bx-btn-disabled' : 'bx-score-disabled');
+
+            var oCounter = $this._getCounter(oLink);
+            if(oCounter && oCounter.length > 0) {
+                if(oData && oData.counter)
+                    oCounter.replaceWith(oData.counter);
+                else
+                    oCounter.html(oData.scoref).parents('.' + $this._sSP + '-counter-holder:first:hidden').bx_anim('show');
+            }
+
+            if(typeof onComplete == 'function')
+                onComplete(oLink, oData);
+            };
+
+            if(oData && oData.message != undefined)
                 bx_alert(oData.message, fContinue);
                 bx_alert(oData.message, fContinue);
-    		else
-    			fContinue();
+            else
+                fContinue();
         },
         },
         'json'
         'json'
     );
     );

+ 1 - 1
inc/js/classes/BxDolVoteLikes.js

@@ -24,7 +24,7 @@ BxDolVoteLikes.prototype.onVote = function (oLink, oData, onComplete)
 
 
     if(oData && oData.label_title) {
     if(oData && oData.label_title) {
         $(oLink).attr('title', oData.label_title);
         $(oLink).attr('title', oData.label_title);
-        $(oLink).find('span').html(oData.label_title);
+        $(oLink).find('span:not(.sys-action-do-icon)').html(oData.label_title);
     }
     }
 
 
     if(oData && oData.disabled)
     if(oData && oData.disabled)

+ 17 - 4
inc/js/classes/BxDolVoteReactions.js

@@ -86,7 +86,7 @@ BxDolVoteReactions.prototype.onVote = function (oLink, oData, onComplete)
 
 
     if(oData && oData.label_title) {
     if(oData && oData.label_title) {
         oLink.attr('title', oData.label_title);
         oLink.attr('title', oData.label_title);
-        oLink.find('span').html(oData.label_title);
+        oLink.find('span:not(.sys-action-do-icon)').html(oData.label_title);
     }
     }
 
 
     if(oData && oData.label_click)
     if(oData && oData.label_click)
@@ -99,9 +99,14 @@ BxDolVoteReactions.prototype.onVote = function (oLink, oData, onComplete)
 
 
     //--- Update Counter.
     //--- Update Counter.
     var oCounter = this._getCounter(oLink);
     var oCounter = this._getCounter(oLink);
-    if(oCounter && oCounter.length > 0)
+    if(oCounter && oCounter.length > 0) {
         oCounter.filter('.' + oData.reaction).html(oData.countf).toggleClass('bx-vc-hidden', !oData.count);
         oCounter.filter('.' + oData.reaction).html(oData.countf).toggleClass('bx-vc-hidden', !oData.count);
 
 
+        //--- Update Total.
+        if(oData.total)
+            oCounter.filter('.total-count').html(oData.total.countf).toggleClass('bx-vc-hidden', !oData.total.count);
+    }
+
     if(typeof onComplete == 'function')
     if(typeof onComplete == 'function')
         onComplete(oLink, oData);
         onComplete(oLink, oData);
 };
 };
@@ -208,15 +213,23 @@ BxDolVoteReactions.prototype.toggleByPopup = function(oLink, sReaction)
 {
 {
     var oParams = this._getDefaultParams();
     var oParams = this._getDefaultParams();
     oParams['action'] = 'GetVotedBy';
     oParams['action'] = 'GetVotedBy';
-    oParams['reaction'] = sReaction;
+    if(sReaction)
+        oParams['reaction'] = sReaction;
 
 
     $(oLink).dolPopupAjax({
     $(oLink).dolPopupAjax({
-        id: this._aHtmlIds['by_popup'], 
+        id: {value: this._aHtmlIds['by_popup'], force: true}, 
         url: bx_append_url_params(this._sActionsUri, oParams),
         url: bx_append_url_params(this._sActionsUri, oParams),
         removeOnClose: true
         removeOnClose: true
     });
     });
 };
 };
 
 
+BxDolVoteReactions.prototype.changeVotedBy = function(oLink, sReaction)
+{
+    var oContent = $('#' + this._aHtmlIds['by_popup'] + ' .' + this._sSP + '-bls-content');
+    if(oContent.length > 0)
+        oContent.children(':visible').hide().siblings('.' + this._sSP + '-bl-' + sReaction).show();
+};
+
 BxDolVoteReactions.prototype._getCounter = function(oElement)
 BxDolVoteReactions.prototype._getCounter = function(oElement)
 {
 {
     var oCounter = BxDolVote.prototype._getCounter.call(this, oElement);
     var oCounter = BxDolVote.prototype._getCounter.call(this, oElement);

+ 19 - 32
inc/js/functions.js

@@ -1046,45 +1046,32 @@ function bx_prompt(sMessage, sValue, fOnClickOk, fOnClickCancel, oParams)
  * In case when this function is called for dynamic loading of the same file but many times (like Plyr video init)
  * In case when this function is called for dynamic loading of the same file but many times (like Plyr video init)
  * it allows to avoid multiply loadings of the same file.
  * it allows to avoid multiply loadings of the same file.
  */
  */
+
 function bx_get_scripts (aFiles, fCallback)
 function bx_get_scripts (aFiles, fCallback)
 {
 {
     let iCounter = 0;
     let iCounter = 0;
-    const iLength = aFiles.length,
-          // this function is called every time when each file with unique name is started to load
-          fDone = (iCounter) => {
-              let sFile = aFiles[iCounter];
-              // init file's record in global scope with loaded = false, means that file is not loaded yet
-              glBxLoadedScripts[sFile] = { loaded: false, queue: []};
-              $.bxGetCachedScript(sFile).done(() => {
-                  // set "loaded" flag to true when the file is loaded
-                  glBxLoadedScripts[sFile].loaded = true;
-                  // executes the all callback functions which was attached to queue
-                  // during multiple loadings of the same file
-                  glBxLoadedScripts[sFile].queue.map(sFunc => sFunc());
-                  // This part is executed only when the last file from the list is loaded
-                   if (((iLength-1) === iCounter) && typeof fCallback === 'function')
-                       fCallback();
-                   else
-                        fDone(iCounter + 1);
-              });
-          };
+    const
+        iLength = aFiles.length,
+        fHandler = function() {
+            if (iCounter++ >= (iLength-1) && typeof(fCallback) === 'function')
+                fCallback();
+            else
+                fExecute(aFiles[iCounter]);
+        },
+        // Check if js file is not loaded yet then start to load it and returns Promise.
+        // All functions which try to load the same file will wait for loading of the file
+        // and then continue to work
+        fExecute = function(sFile) {
+            if ('undefined' === typeof(glBxLoadedScripts[sFile]))
+                glBxLoadedScripts[sFile] = { complete : $.bxGetCachedScript(sFile).done(fHandler) };
+            else
+                glBxLoadedScripts[sFile].complete.then(fHandler);
+        };
 
 
     if ('undefined' === typeof(glBxLoadedScripts))
     if ('undefined' === typeof(glBxLoadedScripts))
         glBxLoadedScripts = {};
         glBxLoadedScripts = {};
 
 
-        let sFile = aFiles[iCounter];
-        if ('undefined' === typeof(glBxLoadedScripts[sFile])) {
-            // call the function if the file doesn't exist in global scope yet
-            fDone(iCounter);
-        }
-        else if (typeof fCallback === 'function') {
-            // this condition is executed only in case when there are many files with the same name are loading
-            // and current file already exists in global scope, but is not completely loaded (loaded = false)
-            if (glBxLoadedScripts[sFile].loaded === false)
-                glBxLoadedScripts[sFile].queue.push(fCallback); // attache callback to queue
-            else
-                fCallback(); // executes callback only in case when the file is completely loaded and exists in global scope
-        }
+    fExecute(aFiles[iCounter]);
 }
 }
 
 
 jQuery.bxGetCachedScript = function(sUrl, oOptions) 
 jQuery.bxGetCachedScript = function(sUrl, oOptions) 

+ 3 - 1
modules/base/text/classes/BxBaseModTextFormPoll.php

@@ -179,11 +179,13 @@ class BxBaseModTextFormPoll extends BxTemplFormView
 
 
     protected function genCustomInputAnswersButton($aInput)
     protected function genCustomInputAnswersButton($aInput)
     {
     {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
         $sName = $aInput['name'];
         $sName = $aInput['name'];
 
 
         $aInput['type'] = 'button';
         $aInput['type'] = 'button';
         $aInput['name'] .= '_add';
         $aInput['name'] .= '_add';
-        $aInput['value'] = _t('_bx_posts_form_poll_input_answers_add');
+        $aInput['value'] = _t($CNF['T']['txt_poll_form_answers_add']);
         $aInput['attrs']['class'] = 'bx-def-margin-sec-top';
         $aInput['attrs']['class'] = 'bx-def-margin-sec-top';
         $aInput['attrs']['onclick'] = $this->_oModule->_oConfig->getJsObject('poll') . ".addPollAnswer(this, '" . $sName . "');";
         $aInput['attrs']['onclick'] = $this->_oModule->_oConfig->getJsObject('poll') . ".addPollAnswer(this, '" . $sName . "');";
 
 

+ 1 - 1
modules/base/text/classes/BxBaseModTextVotePollAnswers.php

@@ -138,7 +138,7 @@ class BxBaseModTextVotePollAnswers extends BxTemplVoteLikes
     	return _t($CNF['T']['txt_poll_answer_vote_do_by']);
     	return _t($CNF['T']['txt_poll_answer_vote_do_by']);
     }
     }
 
 
-    protected function _getLabelCounter($iCount, $aParams = array())
+    protected function _getCounterLabel($iCount, $aParams = array())
     {
     {
         $CNF = &$this->_oModule->_oConfig->CNF;
         $CNF = &$this->_oModule->_oConfig->CNF;
 
 

+ 1 - 0
modules/boonex/ads/classes/BxAdsConfig.php

@@ -191,6 +191,7 @@ class BxAdsConfig extends BxBaseModTextConfig
                 'txt_all_entries_by_author' => '_bx_ads_page_title_browse_by_author',
                 'txt_all_entries_by_author' => '_bx_ads_page_title_browse_by_author',
                 'txt_all_entries_by_context' => '_bx_ads_page_title_browse_by_context',
                 'txt_all_entries_by_context' => '_bx_ads_page_title_browse_by_context',
                 'txt_err_cannot_perform_action' => '_bx_ads_txt_err_cannot_perform_action',
                 'txt_err_cannot_perform_action' => '_bx_ads_txt_err_cannot_perform_action',
+                'txt_poll_form_answers_add' => '_bx_ads_form_poll_input_answers_add',
                 'txt_poll_menu_view_answers' => '_bx_ads_txt_poll_view_answers',
                 'txt_poll_menu_view_answers' => '_bx_ads_txt_poll_view_answers',
                 'txt_poll_menu_view_results' => '_bx_ads_txt_poll_view_results',
                 'txt_poll_menu_view_results' => '_bx_ads_txt_poll_view_results',
                 'txt_poll_answer_vote_do_by' => '_bx_ads_txt_poll_answer_vote_do_by',
                 'txt_poll_answer_vote_do_by' => '_bx_ads_txt_poll_answer_vote_do_by',

+ 1 - 1
modules/boonex/ads/install/config.php

@@ -18,7 +18,7 @@ $aConfig = array(
     'name' => 'bx_ads',
     'name' => 'bx_ads',
     'title' => 'Ads',
     'title' => 'Ads',
     'note' => 'Ads module.',
     'note' => 'Ads module.',
-    'version' => '10.0.0.DEV',
+    'version' => '10.0.1.DEV',
     'vendor' => 'BoonEx',
     'vendor' => 'BoonEx',
     'help_url' => 'http://feed.una.io/?section={module_name}',
     'help_url' => 'http://feed.una.io/?section={module_name}',
 
 

+ 17 - 27
modules/boonex/ads/template/images/icons/std-icon.svg

@@ -1,27 +1,17 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
-<svg version="1.1" id="Слой_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 viewBox="0 0 64 64" style="enable-background:new 0 0 64 64;" xml:space="preserve">
-<style type="text/css">
-	.st0{fill:#00B356;}
-	.st1{fill:#FFFFFF;}
-</style>
-<title>directory</title>
-<desc>Created with Sketch.</desc>
-<g id="Page-1">
-	<g id="Artboard" transform="translate(-1717.000000, -511.000000)">
-		<g id="directory" transform="translate(1717.000000, 511.000000)">
-			<g id="Path">
-				<path id="path-1_1_" class="st0" d="M32,64c14,0,21.8,0,26.9-5.1C64,53.8,64,46,64,32s0-21.8-5.1-26.9C53.8,0,46,0,32,0
-					S10.2,0,5.1,5.1C0,10.2,0,18,0,32s0,21.8,5.1,26.9C10.2,64,18,64,32,64z"/>
-			</g>
-		</g>
-	</g>
-</g>
-<path class="st1" d="M23.7,33.3h3.1l-1.6-4.5L23.7,33.3z M40.1,32c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S41.2,32,40.1,32z
-	 M49.5,15.9h-35c-2.2,0-4,1.8-4,4v24.2c0,2.2,1.8,4,4,4h35c2.2,0,4-1.8,4-4V19.9C53.5,17.7,51.7,15.9,49.5,15.9z M31.5,40.1h-1.4
-	c-0.6,0-1.1-0.4-1.3-0.9l-0.6-1.8h-5.9l-0.6,1.8c-0.2,0.5-0.7,0.9-1.3,0.9H19c-0.9,0-1.6-0.9-1.3-1.8l4.5-13c0.3-0.8,1-1.4,1.9-1.4
-	h2.2c0.9,0,1.6,0.5,1.9,1.4l4.5,13C33.1,39.2,32.5,40.1,31.5,40.1z M46.1,38.7c0,0.7-0.6,1.3-1.3,1.3h-1.3c-0.4,0-0.8-0.2-1-0.5
-	c-0.7,0.3-1.5,0.5-2.4,0.5c-3.3,0-6.1-2.7-6.1-6.1s2.7-6.1,6.1-6.1c0.7,0,1.4,0.1,2,0.4v-3.1c0-0.7,0.6-1.3,1.3-1.3h1.3
-	c0.7,0,1.3,0.6,1.3,1.3V38.7z"/>
-</svg>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
+    <g id="discussions">
+        <path id="Path" d="M32,64C46.022,64 53.817,64 58.909,58.909C64,53.817 64,46.022 64,32C64,17.978 64,10.183 58.909,5.091C53.817,0 46.022,0 32,0C17.978,0 10.183,0 5.091,5.091C0,10.183 0,17.978 0,32C0,46.022 0,53.817 5.091,58.909C10.183,64 17.978,64 32,64Z" style="fill:rgb(0,179,86);"/>
+        <g transform="matrix(0.09375,0,0,0.09375,8,7)">
+            <path d="M157.52,272L194.48,272L176,218.78L157.52,272ZM352,256C338.77,256 328,266.77 328,280C328,293.23 338.77,304 352,304C365.23,304 376,293.23 376,280C376,266.77 365.23,256 352,256ZM464,64L48,64C21.5,64 0,85.5 0,112L0,400C0,426.5 21.5,448 48,448L464,448C490.5,448 512,426.5 512,400L512,112C512,85.5 490.5,64 464,64ZM250.58,352L233.64,352C226.83,352 220.76,347.68 218.52,341.25L211.15,320L140.86,320L133.48,341.25C131.249,347.672 125.158,352.002 118.36,352L101.42,352C90.41,352 82.69,341.15 86.3,330.75L140,176.12C143.345,166.492 152.477,159.998 162.67,160L189.33,160C199.526,159.998 208.659,166.497 212,176.13L265.69,330.75C269.3,341.15 261.58,352 250.58,352ZM424,336C424,344.84 416.84,352 408,352L392,352C387.15,352 382.96,349.73 380.02,346.32C371.4,349.98 361.93,352 352,352C312.3,352 280,319.7 280,280C280,240.3 312.3,208 352,208C360.46,208 368.46,209.73 376,212.42L376,176C376,167.16 383.16,160 392,160L408,160C416.84,160 424,167.16 424,176L424,336Z" style="fill:white;fill-opacity:0.81;fill-rule:nonzero;"/>
+            <clipPath id="_clip1">
+                <path d="M157.52,272L194.48,272L176,218.78L157.52,272ZM352,256C338.77,256 328,266.77 328,280C328,293.23 338.77,304 352,304C365.23,304 376,293.23 376,280C376,266.77 365.23,256 352,256ZM464,64L48,64C21.5,64 0,85.5 0,112L0,400C0,426.5 21.5,448 48,448L464,448C490.5,448 512,426.5 512,400L512,112C512,85.5 490.5,64 464,64ZM250.58,352L233.64,352C226.83,352 220.76,347.68 218.52,341.25L211.15,320L140.86,320L133.48,341.25C131.249,347.672 125.158,352.002 118.36,352L101.42,352C90.41,352 82.69,341.15 86.3,330.75L140,176.12C143.345,166.492 152.477,159.998 162.67,160L189.33,160C199.526,159.998 208.659,166.497 212,176.13L265.69,330.75C269.3,341.15 261.58,352 250.58,352ZM424,336C424,344.84 416.84,352 408,352L392,352C387.15,352 382.96,349.73 380.02,346.32C371.4,349.98 361.93,352 352,352C312.3,352 280,319.7 280,280C280,240.3 312.3,208 352,208C360.46,208 368.46,209.73 376,212.42L376,176C376,167.16 383.16,160 392,160L408,160C416.84,160 424,167.16 424,176L424,336Z" clip-rule="nonzero"/>
+            </clipPath>
+            <g clip-path="url(#_clip1)">
+                <path d="M157.52,272L194.48,272L176,218.78L157.52,272ZM352,256C338.77,256 328,266.77 328,280C328,293.23 338.77,304 352,304C365.23,304 376,293.23 376,280C376,266.77 365.23,256 352,256ZM464,64L48,64C21.5,64 0,85.5 0,112L0,224L512,112C512,85.5 490.5,64 464,64ZM250.58,352L233.64,352C226.83,352 220.76,347.68 218.52,341.25L211.15,320L140.86,320L133.48,341.25C131.249,347.672 125.158,352.002 118.36,352L101.42,352C90.41,352 82.69,341.15 86.3,330.75L140,176.12C143.345,166.492 152.477,159.998 162.67,160L189.33,160C199.526,159.998 208.659,166.497 212,176.13L265.69,330.75C269.3,341.15 261.58,352 250.58,352ZM424,336C424,344.84 416.84,352 408,352L392,352C387.15,352 382.96,349.73 380.02,346.32C371.4,349.98 361.93,352 352,352C312.3,352 280,319.7 280,280C280,240.3 312.3,208 352,208C360.46,208 368.46,209.73 376,212.42L376,176C376,167.16 383.16,160 392,160L408,160C416.84,160 424,167.16 424,176L424,336Z" style="fill:white;fill-rule:nonzero;"/>
+                <path d="M157.52,272L194.48,272L176,218.78L157.52,272ZM352,256C338.77,256 328,266.77 328,280C328,293.23 338.77,304 352,304C365.23,304 376,293.23 376,280C376,266.77 365.23,256 352,256ZM464,64L48,64C21.5,64 0,85.5 0,112L0,400C0,426.5 21.5,448 48,448L512,112C512,85.5 490.5,64 464,64ZM250.58,352L233.64,352C226.83,352 220.76,347.68 218.52,341.25L211.15,320L140.86,320L133.48,341.25C131.249,347.672 125.158,352.002 118.36,352L101.42,352C90.41,352 82.69,341.15 86.3,330.75L140,176.12C143.345,166.492 152.477,159.998 162.67,160L189.33,160C199.526,159.998 208.659,166.497 212,176.13L265.69,330.75C269.3,341.15 261.58,352 250.58,352ZM424,336C424,344.84 416.84,352 408,352L392,352C387.15,352 382.96,349.73 380.02,346.32C371.4,349.98 361.93,352 352,352C312.3,352 280,319.7 280,280C280,240.3 312.3,208 352,208C360.46,208 368.46,209.73 376,212.42L376,176C376,167.16 383.16,160 392,160L408,160C416.84,160 424,167.16 424,176L424,336Z" style="fill:white;fill-opacity:0.49;fill-rule:nonzero;"/>
+            </g>
+        </g>
+    </g>
+</svg>

+ 1 - 0
modules/boonex/albums/classes/BxAlbumsModule.php

@@ -423,6 +423,7 @@ class BxAlbumsModule extends BxBaseModTextModule
         $sTitle = isset($CNF['FIELD_TITLE']) && isset($aContentInfo[$CNF['FIELD_TITLE']]) ? $aContentInfo[$CNF['FIELD_TITLE']] : (isset($CNF['FIELD_TEXT']) && isset($aContentInfo[$CNF['FIELD_TEXT']]) ? strmaxtextlen($aContentInfo[$CNF['FIELD_TEXT']], 20, '...') : '');
         $sTitle = isset($CNF['FIELD_TITLE']) && isset($aContentInfo[$CNF['FIELD_TITLE']]) ? $aContentInfo[$CNF['FIELD_TITLE']] : (isset($CNF['FIELD_TEXT']) && isset($aContentInfo[$CNF['FIELD_TEXT']]) ? strmaxtextlen($aContentInfo[$CNF['FIELD_TEXT']], 20, '...') : '');
 
 
         return array(
         return array(
+            '_cache' => true,
             'owner_id' => $aEvent['owner_id'],
             'owner_id' => $aEvent['owner_id'],
             'object_owner_id' => $aContentInfo['author'],
             'object_owner_id' => $aContentInfo['author'],
             'icon' => !empty($CNF['ICON']) ? $CNF['ICON'] : '',
             'icon' => !empty($CNF['ICON']) ? $CNF['ICON'] : '',

+ 7 - 1
modules/boonex/decorous/data/template/system/_header_js_custom.html

@@ -4,6 +4,7 @@
 
 
         //responsive template
         //responsive template
         var mainContent = $('.cd-main-content'),
         var mainContent = $('.cd-main-content'),
+            content = $('.content-wrapper'),
             header = $('.cd-main-header'),
             header = $('.cd-main-header'),
             sidebar = $('.cd-side-nav'),
             sidebar = $('.cd-side-nav'),
             sidebarTrigger = $('.cd-nav-trigger');
             sidebarTrigger = $('.cd-nav-trigger');
@@ -32,9 +33,14 @@
                 var sidebarHeight = sidebar.outerHeight(),
                 var sidebarHeight = sidebar.outerHeight(),
                     windowHeight = $(window).height(),
                     windowHeight = $(window).height(),
                     mainContentHeight = mainContent.outerHeight(),
                     mainContentHeight = mainContent.outerHeight(),
+                    contentHeight = content.outerHeight(),
                     scrollTop = $(window).scrollTop();
                     scrollTop = $(window).scrollTop();
 
 
-                ( ( scrollTop + windowHeight > sidebarHeight ) && ( mainContentHeight - sidebarHeight != 0 ) ) ? sidebar.addClass('is-fixed').css('bottom', 0) : sidebar.removeClass('is-fixed').attr('style', '');
+                //--- Stick sidebar to bottom when scroll down if its height less than a height of main content area.
+                (scrollTop + windowHeight > sidebarHeight) && (mainContentHeight - sidebarHeight != 0) ? sidebar.addClass('is-fixed').css('bottom', 0) : sidebar.removeClass('is-fixed').attr('style', '');
+
+                //--- Stick main content area to bottom when scroll down if its height less than a height of sidebar.
+                (scrollTop + windowHeight > contentHeight) && (mainContentHeight - contentHeight != 0) ? content.addClass('is-fixed').css('bottom', 0) : content.removeClass('is-fixed').attr('style', '');
             }
             }
             scrolling = false;
             scrolling = false;
         }
         }

+ 21 - 16
modules/boonex/decorous/data/template/system/css/general.css

@@ -34,25 +34,25 @@
     right: 100%;
     right: 100%;
 }
 }
 .cd-main-content::before {
 .cd-main-content::before {
-  /* never visible - used to check MQ in jQuery */
-  display: none;
-  content: 'mobile';
+    /* never visible - used to check MQ in jQuery */
+    display: none;
+    content: 'mobile';
 }
 }
 @media only screen and (min-width: 720px) {
 @media only screen and (min-width: 720px) {
-  .cd-main-content .content-wrapper {
-    margin-left: 110px;
-  }
-  .cd-main-content::before {
-    content: 'tablet';
-  }
+    .cd-main-content .content-wrapper {
+        padding-left: 110px;
+    }
+    .cd-main-content::before {
+        content: 'tablet';
+    }
 }
 }
 @media only screen and (min-width: 1024px) {
 @media only screen and (min-width: 1024px) {
-  .cd-main-content .content-wrapper {
-    margin-left: 200px;
-  }
-  .cd-main-content::before {
-    content: 'desktop';
-  }
+    .cd-main-content .content-wrapper {
+        padding-left: 200px;
+    }
+    .cd-main-content::before {
+        content: 'desktop';
+    }
 }
 }
 
 
 /*--- Header ---*/
 /*--- Header ---*/
@@ -171,9 +171,14 @@
   .cd-side-nav.nav-is-visible {
   .cd-side-nav.nav-is-visible {
     box-shadow: none;
     box-shadow: none;
   }
   }
-  .cd-side-nav.is-fixed {
+  .cd-side-nav.is-fixed,
+  .content-wrapper.is-fixed {
     position: fixed;
     position: fixed;
   }
   }
+  .content-wrapper.is-fixed {
+      left: 0;
+      width: 100%;
+  }
   .cd-side-nav > ul {
   .cd-side-nav > ul {
     /* reset style */
     /* reset style */
     padding: 0;
     padding: 0;

+ 6 - 3
modules/boonex/decorous/data/template/system/css/menu.less

@@ -212,8 +212,8 @@
     padding: 0;
     padding: 0;
 }
 }
 .bx-popup ul.bx-menu-ver li a > div > span,
 .bx-popup ul.bx-menu-ver li a > div > span,
-.bx-popup ul.bx-menu-custom.bx-menu-ver li a > span,
-.bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a > 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) {
     margin-left: 1.0rem;
     margin-left: 1.0rem;
     line-height: 1.5rem;
     line-height: 1.5rem;
     .font-size(@bx-font-size-middle);
     .font-size(@bx-font-size-middle);
@@ -226,8 +226,11 @@
 .bx-popup ul.bx-menu-ver li a > div .sys-icon,
 .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 > 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 > .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 > 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 > .sys-icon,
+.bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a > span.sys-action-do-icon .sys-icon {
     width: 1.0rem;
     width: 1.0rem;
     height: 1.0rem;
     height: 1.0rem;
     line-height: 1.0rem;
     line-height: 1.0rem;

+ 4 - 2
modules/boonex/english/data/langs/system/en.xml

@@ -1323,7 +1323,7 @@
     <string name="_adm_stg_cpt_option_add_to_mobile_homepage"><![CDATA[Add to mobile homepage widget]]></string>
     <string name="_adm_stg_cpt_option_add_to_mobile_homepage"><![CDATA[Add to mobile homepage widget]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_activation_letter"><![CDATA[Enable account activation letter]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_activation_letter"><![CDATA[Enable account activation letter]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_confirmation_type"><![CDATA[Account is confirmed when]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_confirmation_type"><![CDATA[Account is confirmed when]]></string>
-	<string name="_adm_stg_cpt_option_sys_account_2fa_enable"><![CDATA[Enable 2FA]]></string>
+	<string name="_adm_stg_cpt_option_sys_account_2fa_enable"><![CDATA[Enable 2 Factor Authentication]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_autoapproval"><![CDATA[Automatic account activation after creation]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_autoapproval"><![CDATA[Automatic account activation after creation]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_auto_profile_creation"><![CDATA[Automatic profile creation from account name]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_auto_profile_creation"><![CDATA[Automatic profile creation from account name]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_online_time"><![CDATA[Online status timeframe (minutes)]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_online_time"><![CDATA[Online status timeframe (minutes)]]></string>
@@ -2989,7 +2989,9 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_vote_do_like"><![CDATA[Thank you!]]></string>
 	<string name="_vote_do_like"><![CDATA[Thank you!]]></string>
 	<string name="_vote_do_unlike"><![CDATA[No thank you]]></string>
 	<string name="_vote_do_unlike"><![CDATA[No thank you]]></string>
 	<string name="_vote_do_by"><![CDATA[Thanked by]]></string>
 	<string name="_vote_do_by"><![CDATA[Thanked by]]></string>
-        <string name="_vote_do_by_reactions"><![CDATA["{0}" by]]></string>
+        <string name="_vote_do_by_reactions"><![CDATA[Reacted by]]></string>
+        <string name="_vote_do_by_x_reaction"><![CDATA["{0}" by]]></string>
+        <string name="_vote_do_by_summary"><![CDATA[All]]></string>
 	<string name="_vote_err_not_enabled"><![CDATA[The feature is not available right now. Please, try again later.]]></string>
 	<string name="_vote_err_not_enabled"><![CDATA[The feature is not available right now. Please, try again later.]]></string>
 	<string name="_vote_err_duplicate_vote"><![CDATA[Duplicate vote]]></string>
 	<string name="_vote_err_duplicate_vote"><![CDATA[Duplicate vote]]></string>
         <string name="_vote_n_votes"><![CDATA[{0} votes]]></string>
         <string name="_vote_n_votes"><![CDATA[{0} votes]]></string>

+ 14 - 11
modules/boonex/forum/classes/BxForumModule.php

@@ -42,20 +42,20 @@ class BxForumModule extends BxBaseModTextModule
      */
      */
     public function actionUpdateStatus($sAction = '', $iContentId = 0)
     public function actionUpdateStatus($sAction = '', $iContentId = 0)
     {
     {
-    	if(empty($sAction) && bx_get('action') !== false)
-   			$sAction = bx_process_input(bx_get('action'));
+        if(empty($sAction) && bx_get('action') !== false)
+            $sAction = bx_process_input(bx_get('action'));
 
 
-		if(empty($iContentId) && bx_get('id') !== false)
-    		$iContentId = (int)bx_get('id');
+        if(empty($iContentId) && bx_get('id') !== false)
+            $iContentId = (int)bx_get('id');
 
 
-    	$aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
         if(empty($aContentInfo) || !is_array($aContentInfo))
         if(empty($aContentInfo) || !is_array($aContentInfo))
-			return echoJson(array('code' => 1, 'message' => _t('_bx_forum_err_not_found')));
+            return echoJson(array('code' => 1, 'message' => _t('_bx_forum_err_not_found')));
 
 
-		$sMethodCheck = 'checkAllowed' . bx_gen_method_name($sAction) . 'AnyEntry';
-		$sResult = $this->$sMethodCheck($aContentInfo);
+        $sMethodCheck = 'checkAllowed' . bx_gen_method_name($sAction) . 'AnyEntry';
+        $sResult = $this->$sMethodCheck($aContentInfo);
         if($sResult !== CHECK_ACTION_RESULT_ALLOWED)
         if($sResult !== CHECK_ACTION_RESULT_ALLOWED)
-        	return echoJson(array('code' => 2, 'message' => $sResult));
+            return echoJson(array('code' => 2, 'message' => $sResult));
 
 
         bx_audit(
         bx_audit(
             $iContentId, 
             $iContentId, 
@@ -65,9 +65,12 @@ class BxForumModule extends BxBaseModTextModule
         );
         );
         
         
         if(!$this->_oDb->updateStatus($sAction, $aContentInfo))
         if(!$this->_oDb->updateStatus($sAction, $aContentInfo))
-        	return echoJson(array('code' => 3, 'message' => _t('_error occured')));
+            return echoJson(array('code' => 3, 'message' => _t('_error occured')));
+
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+        $this->alertAfterEdit($aContentInfo);
 
 
-    	echoJson(array('code' => 0, 'id' => $iContentId, 'reload' => 1));
+        echoJson(array('code' => 0, 'id' => $iContentId, 'reload' => 1));
     }
     }
 
 
     public function actionAjaxGetAuthors()
     public function actionAjaxGetAuthors()

+ 2 - 2
modules/boonex/forum/template/css/main.css

@@ -193,7 +193,7 @@
     display: none;
     display: none;
 }
 }
 
 
-.bx-base-general-unit-meta ul.bx-menu-object-bx_forum_snippet_meta_counters li span {
+.bx-base-general-unit-meta ul.bx-menu-object-bx_forum_snippet_meta_counters li > span {
     position: relative;
     position: relative;
     display: inline-block;
     display: inline-block;
     vertical-align: top;
     vertical-align: top;
@@ -203,7 +203,7 @@
     border-width: 0px;
     border-width: 0px;
     line-height: 1.5rem;
     line-height: 1.5rem;
 }
 }
-.bx-base-general-unit-meta ul.bx-menu-object-bx_forum_snippet_meta_counters li .sys-icon {
+.bx-base-general-unit-meta ul.bx-menu-object-bx_forum_snippet_meta_counters li .sys-icon:not(.cmt-counter-icon) {
     width: 1.0rem;
     width: 1.0rem;
     height: 1.0rem;
     height: 1.0rem;
     text-align: center;
     text-align: center;

+ 1 - 1
modules/boonex/market/classes/BxMarketVoteStars.php

@@ -36,7 +36,7 @@ class BxMarketVoteStars extends BxTemplVoteStars
     	return parent::isAllowedVote($isPerformAction);
     	return parent::isAllowedVote($isPerformAction);
     }
     }
 
 
-    protected function _getLabelCounter($iCount, $aParams = array())
+    protected function _getCounterLabel($iCount, $aParams = array())
     {
     {
         return _t('_bx_market_vote_counter', $iCount);
         return _t('_bx_market_vote_counter', $iCount);
     }
     }

+ 0 - 2
modules/boonex/notifications/install/langs/en.xml

@@ -25,8 +25,6 @@
     <string name="_bx_ntfs_menu_item_title_notifications_push"><![CDATA[Push]]></string>
     <string name="_bx_ntfs_menu_item_title_notifications_push"><![CDATA[Push]]></string>
     <string name="_bx_ntfs_menu_item_title_system_notifications"><![CDATA[Notifications]]></string>
     <string name="_bx_ntfs_menu_item_title_system_notifications"><![CDATA[Notifications]]></string>
     <string name="_bx_ntfs_menu_item_title_notifications"><![CDATA[Notifications]]></string>
     <string name="_bx_ntfs_menu_item_title_notifications"><![CDATA[Notifications]]></string>
-    <string name="_bx_ntfs_menu_item_title_system_notifications"><![CDATA[Notifications]]></string>
-    <string name="_bx_ntfs_menu_item_title_notifications"><![CDATA[Notifications]]></string>
     
     
     <string name="_bx_ntfs_menu_title_preview"><![CDATA[Notifications Preview]]></string>
     <string name="_bx_ntfs_menu_title_preview"><![CDATA[Notifications Preview]]></string>
     <string name="_bx_ntfs_menu_set_title_preview"><![CDATA[Notifications Preview]]></string>
     <string name="_bx_ntfs_menu_set_title_preview"><![CDATA[Notifications Preview]]></string>

+ 1 - 1
modules/boonex/polls/classes/BxPollsVoteSubentries.php

@@ -133,7 +133,7 @@ class BxPollsVoteSubentries extends BxTemplVoteLikes
     	return _t('_bx_polls_txt_subentry_vote_do_by');
     	return _t('_bx_polls_txt_subentry_vote_do_by');
     }
     }
 
 
-    protected function _getLabelCounter($iCount, $aParams = array())
+    protected function _getCounterLabel($iCount, $aParams = array())
     {
     {
         return _t('_bx_polls_txt_subentry_vote_counter', $iCount);
         return _t('_bx_polls_txt_subentry_vote_counter', $iCount);
     }
     }

+ 1 - 0
modules/boonex/posts/classes/BxPostsConfig.php

@@ -188,6 +188,7 @@ class BxPostsConfig extends BxBaseModTextConfig
                 'txt_all_entries_by_author' => '_bx_posts_page_title_browse_by_author',
                 'txt_all_entries_by_author' => '_bx_posts_page_title_browse_by_author',
                 'txt_all_entries_by_context' => '_bx_posts_page_title_browse_by_context',
                 'txt_all_entries_by_context' => '_bx_posts_page_title_browse_by_context',
                 'txt_err_cannot_perform_action' => '_bx_posts_txt_err_cannot_perform_action',
                 'txt_err_cannot_perform_action' => '_bx_posts_txt_err_cannot_perform_action',
+                'txt_poll_form_answers_add' => '_bx_posts_form_poll_input_answers_add',
                 'txt_poll_menu_view_answers' => '_bx_posts_txt_poll_view_answers',
                 'txt_poll_menu_view_answers' => '_bx_posts_txt_poll_view_answers',
                 'txt_poll_menu_view_results' => '_bx_posts_txt_poll_view_results',
                 'txt_poll_menu_view_results' => '_bx_posts_txt_poll_view_results',
                 'txt_poll_menu_view_' => '_bx_posts_txt_poll_view_',
                 'txt_poll_menu_view_' => '_bx_posts_txt_poll_view_',

+ 0 - 8
modules/boonex/protean/data/template/bx_timeline/css/view.less

@@ -24,12 +24,4 @@ div.bx-tl-item-meta-activity {
 .bx-media-phone div.bx-tl-item-meta-activity {
 .bx-media-phone div.bx-tl-item-meta-activity {
     -webkit-flex-wrap: wrap;
     -webkit-flex-wrap: wrap;
     flex-wrap: wrap;
     flex-wrap: wrap;
-}
-
-/*--- Activity Menu Styles ---*/
-div.bx-tl-item-activity .bx-menu-custom.bx-menu-hor li .sys-icon {
-    width: 1.25rem;
-    height: 1.25rem;
-    line-height: 1.25rem;
-    font-size: 1.25rem;
 }
 }

+ 7 - 1
modules/boonex/protean/data/template/system/css/common.css

@@ -9,4 +9,10 @@ a {
 .bx-btn i,
 .bx-btn i,
 .bx-btn u {
 .bx-btn u {
     vertical-align: top !important;
     vertical-align: top !important;
-}
+}
+
+/* --- Loading indicator --- */
+.bx-loading-ajax-btn {
+    margin-left: 10px;
+}
+    

+ 67 - 60
modules/boonex/protean/data/template/system/css/default.less

@@ -717,7 +717,7 @@ a.bx-def-font-h3:hover {
     line-height: @bx-height-form-input;
     line-height: @bx-height-form-input;
 }
 }
 .bx-form-value .bx-form-input-text.bx-form-input-autotoken b .bx-def-thumb-size {
 .bx-form-value .bx-form-input-text.bx-form-input-autotoken b .bx-def-thumb-size {
-	width: @bx-height-form-input;
+    width: @bx-height-form-input;
     height: @bx-height-form-input;
     height: @bx-height-form-input;
     line-height: @bx-height-form-input;
     line-height: @bx-height-form-input;
 }
 }
@@ -730,65 +730,65 @@ a.bx-def-font-h3:hover {
 .bx-form-value .bx-form-input-textarea:focus,
 .bx-form-value .bx-form-input-textarea:focus,
 .bx-form-value .bx-form-input-password:focus,
 .bx-form-value .bx-form-input-password:focus,
 .bx-form-value .bx-form-input-text:focus {
 .bx-form-value .bx-form-input-text:focus {
-	border-color: @bx-color-border-form-input-active;
-	background-color: @bx-color-form-input-active;
+    border-color: @bx-color-border-form-input-active;
+    background-color: @bx-color-form-input-active;
 }
 }
 .bx-form-value .bx-switcher-cont,
 .bx-form-value .bx-switcher-cont,
 .bx-grid-table .bx-switcher-cont {
 .bx-grid-table .bx-switcher-cont {
-	border-color: @bx-color-border-form-input;
-	border-width: @bx-border-width-form-input;
+    border-color: @bx-color-border-form-input;
+    border-width: @bx-border-width-form-input;
 
 
-	background-color: @bx-color-form-input;
+    background-color: @bx-color-form-input;
 
 
-	-webkit-box-shadow: @bx-shadow-form-input;
-	-moz-box-shadow: @bx-shadow-form-input;
-	box-shadow: @bx-shadow-form-input;
+    -webkit-box-shadow: @bx-shadow-form-input;
+    -moz-box-shadow: @bx-shadow-form-input;
+    box-shadow: @bx-shadow-form-input;
 }
 }
 
 
 /* button large */
 /* button large */
 .bx-btn,
 .bx-btn,
 .bx-btn.bx-btn-primary {
 .bx-btn.bx-btn-primary {
-	.box-sizing(@base-input-box-sizing);
+    .box-sizing(@base-input-box-sizing);
 
 
-	height: @bx-height-button;
-	line-height: (@bx-height-button - 0.2);
+    height: @bx-height-button;
+    line-height: (@bx-height-button - 0.2);
 
 
-	.background-color (@bx-color-button);
+    .background-color (@bx-color-button);
 
 
-	border-width: @bx-border-width-button;
-	border-style: solid;
-	border-color: @bx-color-border-button;
+    border-width: @bx-border-width-button;
+    border-style: solid;
+    border-color: @bx-color-border-button;
 
 
-	border-radius: @bx-border-radius-button;
-	background-clip: padding-box;
-    
-	text-shadow: @bx-shadow-font-button;
+    border-radius: @bx-border-radius-button;
+    background-clip: padding-box;
 
 
-	font-family: @bx-font-family-button;
-	font-size: @bx-font-size-button;
-	font-weight: @bx-font-weight-button;
-	color: @bx-font-color-button;
+    text-shadow: @bx-shadow-font-button;
+
+    font-family: @bx-font-family-button;
+    font-size: @bx-font-size-button;
+    font-weight: @bx-font-weight-button;
+    color: @bx-font-color-button;
 }
 }
 .bx-btn-height {
 .bx-btn-height {
-	height: @bx-height-button;
-	line-height: @bx-height-button;
+    height: @bx-height-button;
+    line-height: (@bx-height-button - 0.2);
 }
 }
 .bx-btn-border {
 .bx-btn-border {
-	border-width: @bx-border-width-button;
-	border-style: solid;
-	border-color: transparent;
+    border-width: @bx-border-width-button;
+    border-style: solid;
+    border-color: transparent;
 }
 }
 .bx-btn:hover,
 .bx-btn:hover,
 .bx-btn:active,
 .bx-btn:active,
 .bx-btn.bx-btn-primary:hover,
 .bx-btn.bx-btn-primary:hover,
 .bx-btn.bx-btn-primary:active {
 .bx-btn.bx-btn-primary:active {
-	border-width: @bx-border-width-button;
-	border-style: solid;
-	border-color: @bx-color-border-button-hover;
+    border-width: @bx-border-width-button;
+    border-style: solid;
+    border-color: @bx-color-border-button-hover;
 
 
-	.background-color (@bx-color-button-hover);
+    .background-color (@bx-color-button-hover);
 
 
-	color: @bx-font-color-button-hover;
+    color: @bx-font-color-button-hover;
 }
 }
 .bx-btn .sys-icon:not(.sys-colored) {
 .bx-btn .sys-icon:not(.sys-colored) {
     color: @bx-font-color-button;
     color: @bx-font-color-button;
@@ -799,55 +799,62 @@ a.bx-def-font-h3:hover {
 .bx-btn.bx-btn-primary:active .sys-icon:not(.sys-colored) {
 .bx-btn.bx-btn-primary:active .sys-icon:not(.sys-colored) {
     color: @bx-font-color-button-hover;
     color: @bx-font-color-button-hover;
 }
 }
+.bx-btn .bx-loading-ajax-btn,
+.bx-btn.bx-btn-primary .bx-loading-ajax-btn {
+    margin-top: -@bx-border-width-button;
+}
 
 
 /* button small */
 /* button small */
 .bx-btn.bx-btn-small {
 .bx-btn.bx-btn-small {
-	.box-sizing(@base-input-box-sizing);
+    .box-sizing(@base-input-box-sizing);
 
 
-	height: @bx-height-button-small;
-	line-height: (@bx-height-button-small - 0.1);
+    height: @bx-height-button-small;
+    line-height: (@bx-height-button-small - 0.1);
 
 
-	.background-color (@bx-color-button-small);
+    .background-color (@bx-color-button-small);
 
 
-	border-width: @bx-border-width-button-small;
-	border-style: solid;
-	border-color: @bx-color-border-button-small;
+    border-width: @bx-border-width-button-small;
+    border-style: solid;
+    border-color: @bx-color-border-button-small;
 
 
-	border-radius: @bx-border-radius-button-small;
-	background-clip: padding-box;
+    border-radius: @bx-border-radius-button-small;
+    background-clip: padding-box;
 
 
-	text-shadow: @bx-shadow-font-button-small;
+    text-shadow: @bx-shadow-font-button-small;
 
 
-	font-family: @bx-font-family-button-small;
-	font-size: @bx-font-size-button-small;
-	font-weight: @bx-font-weight-button-small;
-	color: @bx-font-color-button-small;
+    font-family: @bx-font-family-button-small;
+    font-size: @bx-font-size-button-small;
+    font-weight: @bx-font-weight-button-small;
+    color: @bx-font-color-button-small;
 }
 }
 .bx-btn-small-height {
 .bx-btn-small-height {
-	height: @bx-height-button-small;
-	line-height: @bx-height-button-small;
+    height: @bx-height-button-small;
+    line-height: (@bx-height-button-small - 0.1);
 }
 }
 .bx-btn-small-border {
 .bx-btn-small-border {
-	border-width: @bx-border-width-button-small;
-	border-style: solid;
-	border-color: transparent;
+    border-width: @bx-border-width-button-small;
+    border-style: solid;
+    border-color: transparent;
 }
 }
 .bx-btn.bx-btn-small:hover,
 .bx-btn.bx-btn-small:hover,
 .bx-btn.bx-btn-small:active {
 .bx-btn.bx-btn-small:active {
-	border-width: @bx-border-width-button-small;
-	border-style: solid;
-	border-color: @bx-color-border-button-small-hover;
+    border-width: @bx-border-width-button-small;
+    border-style: solid;
+    border-color: @bx-color-border-button-small-hover;
 
 
-	.background-color (@bx-color-button-small-hover);
+    .background-color (@bx-color-button-small-hover);
 
 
-	color: @bx-font-color-button-small-hover;
+    color: @bx-font-color-button-small-hover;
 }
 }
 .bx-btn.bx-btn-small .sys-icon {
 .bx-btn.bx-btn-small .sys-icon {
-	color: @bx-font-color-button-small;
+    color: @bx-font-color-button-small;
 }
 }
 .bx-btn.bx-btn-small:hover .sys-icon,
 .bx-btn.bx-btn-small:hover .sys-icon,
 .bx-btn.bx-btn-small:active .sys-icon {
 .bx-btn.bx-btn-small:active .sys-icon {
-	color: @bx-font-color-button-small-hover;
+    color: @bx-font-color-button-small-hover;
+}
+.bx-btn.bx-btn-small .bx-loading-ajax-btn {
+    margin-top: -@bx-border-width-button-small;
 }
 }
 
 
 /* colors */
 /* colors */

+ 6 - 3
modules/boonex/protean/data/template/system/css/menu.less

@@ -87,8 +87,8 @@ ul.bx-menu-ver.bx-menu-profile-stats li.bx-menu-item-profile-stats-profile .bx-m
     padding: 0;
     padding: 0;
 }
 }
 .bx-popup ul.bx-menu-ver li a > div > span,
 .bx-popup ul.bx-menu-ver li a > div > span,
-.bx-popup ul.bx-menu-custom.bx-menu-ver li a > span,
-.bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a > 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) {
     margin-left: 1.0rem;
     margin-left: 1.0rem;
     line-height: 1.5rem;
     line-height: 1.5rem;
 }
 }
@@ -100,8 +100,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-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 > 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 > .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 > 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 > .sys-icon,
+.bx-popup ul.bx-menu-custom.bx-menu-custom-ver li a > span.sys-action-do-icon .sys-icon {
     width: 1.0rem;
     width: 1.0rem;
     height: 1.0rem;
     height: 1.0rem;
     line-height: 1.0rem;
     line-height: 1.0rem;

+ 4 - 0
modules/boonex/russian/data/langs/bx_notifications/ru.xml

@@ -25,10 +25,14 @@
     <string name="_bx_ntfs_menu_item_title_notifications_push"><![CDATA[Push]]></string>
     <string name="_bx_ntfs_menu_item_title_notifications_push"><![CDATA[Push]]></string>
     <string name="_bx_ntfs_menu_item_title_system_notifications"><![CDATA[Уведомления]]></string>
     <string name="_bx_ntfs_menu_item_title_system_notifications"><![CDATA[Уведомления]]></string>
     <string name="_bx_ntfs_menu_item_title_notifications"><![CDATA[Уведомления]]></string>
     <string name="_bx_ntfs_menu_item_title_notifications"><![CDATA[Уведомления]]></string>
+
     <string name="_bx_ntfs_menu_title_preview"><![CDATA[Уведомления - Пред просмотр]]></string>
     <string name="_bx_ntfs_menu_title_preview"><![CDATA[Уведомления - Пред просмотр]]></string>
     <string name="_bx_ntfs_menu_set_title_preview"><![CDATA[Уведомления - Пред просмотр]]></string>
     <string name="_bx_ntfs_menu_set_title_preview"><![CDATA[Уведомления - Пред просмотр]]></string>
     <string name="_bx_ntfs_menu_item_title_system_more"><![CDATA[Смотреть все уведомления]]></string>
     <string name="_bx_ntfs_menu_item_title_system_more"><![CDATA[Смотреть все уведомления]]></string>
     <string name="_bx_ntfs_menu_item_title_more"><![CDATA[Смотреть все уведомления]]></string>
     <string name="_bx_ntfs_menu_item_title_more"><![CDATA[Смотреть все уведомления]]></string>
+    <string name="_bx_ntfs_lmi_cpt_site"><![CDATA[На сайте]]></string>
+    <string name="_bx_ntfs_lmi_cpt_email"><![CDATA[Email]]></string>
+    <string name="_bx_ntfs_lmi_cpt_push"><![CDATA[Push]]></string>
 
 
     <string name="_bx_ntfs_options_category_system"><![CDATA[Системные]]></string>
     <string name="_bx_ntfs_options_category_system"><![CDATA[Системные]]></string>
     <string name="_bx_ntfs_option_events_per_page"><![CDATA[Количество элементов на странице]]></string>
     <string name="_bx_ntfs_option_events_per_page"><![CDATA[Количество элементов на странице]]></string>

+ 7 - 2
modules/boonex/russian/data/langs/bx_timeline/ru.xml

@@ -12,6 +12,9 @@
     <string name="_bx_timeline_option_events_per_page_account"><![CDATA[Количество элементов на странице "панель аккаунта"]]></string>
     <string name="_bx_timeline_option_events_per_page_account"><![CDATA[Количество элементов на странице "панель аккаунта"]]></string>
     <string name="_bx_timeline_option_events_per_page_home"><![CDATA[Количество элементов на главной странице сайта]]></string>
     <string name="_bx_timeline_option_events_per_page_home"><![CDATA[Количество элементов на главной странице сайта]]></string>
     <string name="_bx_timeline_option_events_per_page"><![CDATA[Количество элементов на странице]]></string>
     <string name="_bx_timeline_option_events_per_page"><![CDATA[Количество элементов на странице]]></string>
+    <string name="_bx_timeline_option_enable_infinite_scroll"><![CDATA[Включить 'Бесконечную прокрутку']]></string>
+    <string name="_bx_timeline_option_events_per_preload"><![CDATA[Бесконечная прокрутка: Количество элементов, получаемых при авто-подгрузке]]></string>
+    <string name="_bx_timeline_option_auto_preloads"><![CDATA[Бесконечная прокрутка: Количество авто-подгрузок]]></string>
     <string name="_bx_timeline_option_rss_length"><![CDATA[Количество элементов в RSS-ленте]]></string>
     <string name="_bx_timeline_option_rss_length"><![CDATA[Количество элементов в RSS-ленте]]></string>
     <string name="_bx_timeline_option_events_hide"><![CDATA[Показывать события]]></string>
     <string name="_bx_timeline_option_events_hide"><![CDATA[Показывать события]]></string>
     <string name="_bx_timeline_option_videos_autoplay"><![CDATA[Автоматически проигрывать видео ролики (доступно только для Ленты)]]></string>
     <string name="_bx_timeline_option_videos_autoplay"><![CDATA[Автоматически проигрывать видео ролики (доступно только для Ленты)]]></string>
@@ -181,14 +184,16 @@
 
 
     <string name="_bx_timeline_menu_title_item_actions"><![CDATA[Элемент - Действия]]></string>
     <string name="_bx_timeline_menu_title_item_actions"><![CDATA[Элемент - Действия]]></string>
     <string name="_bx_timeline_menu_set_title_item_actions"><![CDATA[Элемент - Действия]]></string>
     <string name="_bx_timeline_menu_set_title_item_actions"><![CDATA[Элемент - Действия]]></string>
+    <string name="_bx_timeline_menu_title_item_counters"><![CDATA[Элемент - Счетчики]]></string>
+    <string name="_bx_timeline_menu_set_title_item_counters"><![CDATA[Элемент - Счетчики]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_comment"><![CDATA[Комментарий]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_comment"><![CDATA[Комментарий]]></string>
-    <string name="_bx_timeline_menu_item_title_item_comment"><![CDATA[]]></string>
+    <string name="_bx_timeline_menu_item_title_item_comment"><![CDATA[Прокомментировать]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_view"><![CDATA[Посмотреть]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_view"><![CDATA[Посмотреть]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_vote"><![CDATA[Голосовать (Нравится)]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_vote"><![CDATA[Голосовать (Нравится)]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_score"><![CDATA[Голосовать (За/Против)]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_score"><![CDATA[Голосовать (За/Против)]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_reaction"><![CDATA[Отреагировать]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_reaction"><![CDATA[Отреагировать]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_share"><![CDATA[Поделиться]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_share"><![CDATA[Поделиться]]></string>
-    <string name="_bx_timeline_menu_item_title_item_share"><![CDATA[]]></string>
+    <string name="_bx_timeline_menu_item_title_item_share"><![CDATA[Поделиться]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_report"><![CDATA[Пожаловаться]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_report"><![CDATA[Пожаловаться]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_more"><![CDATA[Дополнительные действия]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_more"><![CDATA[Дополнительные действия]]></string>
     <string name="_bx_timeline_menu_item_title_item_more"><![CDATA[]]></string>
     <string name="_bx_timeline_menu_item_title_item_more"><![CDATA[]]></string>

+ 3 - 1
modules/boonex/russian/data/langs/system/ru.xml

@@ -2918,7 +2918,9 @@
 	<string name="_vote_do_like"><![CDATA[Спасибо!]]></string>
 	<string name="_vote_do_like"><![CDATA[Спасибо!]]></string>
 	<string name="_vote_do_unlike"><![CDATA[Нет, спасибо]]></string>
 	<string name="_vote_do_unlike"><![CDATA[Нет, спасибо]]></string>
 	<string name="_vote_do_by"><![CDATA[Поблагодарили]]></string>
 	<string name="_vote_do_by"><![CDATA[Поблагодарили]]></string>
-        <string name="_vote_do_by_reactions"><![CDATA["{0}" от]]></string>
+        <string name="_vote_do_by_reactions"><![CDATA[Отреагировали]]></string>
+        <string name="_vote_do_by_x_reaction"><![CDATA["{0}" от]]></string>
+        <string name="_vote_do_by_summary"><![CDATA[Все]]></string>
 	<string name="_vote_err_not_enabled"><![CDATA[Ваш голос не может быть принят в данный момент. Пожалуйста, попробуйте позднее.]]></string>
 	<string name="_vote_err_not_enabled"><![CDATA[Ваш голос не может быть принят в данный момент. Пожалуйста, попробуйте позднее.]]></string>
 	<string name="_vote_err_duplicate_vote"><![CDATA[Повторный голос]]></string>
 	<string name="_vote_err_duplicate_vote"><![CDATA[Повторный голос]]></string>
         <string name="_vote_n_votes"><![CDATA[{0} голосов]]></string>
         <string name="_vote_n_votes"><![CDATA[{0} голосов]]></string>

+ 1 - 1
modules/boonex/shopify/install/sql/install.sql

@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `bx_shopify_entries` (
   `added` int(11) NOT NULL,
   `added` int(11) NOT NULL,
   `changed` int(11) NOT NULL,
   `changed` int(11) NOT NULL,
   `title` varchar(255) NOT NULL,
   `title` varchar(255) NOT NULL,
-  `code` varchar(16) NOT NULL default '',
+  `code` varchar(255) NOT NULL default '',
   `cat` int(11) NOT NULL,
   `cat` int(11) NOT NULL,
   `location` text NOT NULL,
   `location` text NOT NULL,
   `views` int(11) NOT NULL default '0',
   `views` int(11) NOT NULL default '0',

+ 28 - 2
modules/boonex/timeline/classes/BxTimelineConfig.php

@@ -26,6 +26,9 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
     protected $_bCacheList;
     protected $_bCacheList;
     protected $_aCacheListExceptions;
     protected $_aCacheListExceptions;
 
 
+    protected $_bInfScroll;
+    protected $_iInfScrollAutoPreloads;
+
     protected $_iRssLength;
     protected $_iRssLength;
     protected $_iLiveUpdateLength;
     protected $_iLiveUpdateLength;
     protected $_iCharsDisplayMinTitle;
     protected $_iCharsDisplayMinTitle;
@@ -171,6 +174,7 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
             'menu_view' => $this->_sName . '_menu_view',
             'menu_view' => $this->_sName . '_menu_view',
             'menu_item_manage' => $this->_sName . '_menu_item_manage',
             'menu_item_manage' => $this->_sName . '_menu_item_manage',
             'menu_item_actions' => $this->_sName . '_menu_item_actions',
             'menu_item_actions' => $this->_sName . '_menu_item_actions',
+            'menu_item_counters' => $this->_sName . '_menu_item_counters',
             'menu_item_meta' => $this->_sName . '_menu_item_meta',
             'menu_item_meta' => $this->_sName . '_menu_item_meta',
             'menu_post_attachments' => $this->CNF['OBJECT_MENU_ENTRY_ATTACHMENTS'],
             'menu_post_attachments' => $this->CNF['OBJECT_MENU_ENTRY_ATTACHMENTS'],
 
 
@@ -289,9 +293,13 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
             'default' => (int)getParam($sOptionPrefix . 'events_per_page'),
             'default' => (int)getParam($sOptionPrefix . 'events_per_page'),
             'profile' => (int)getParam($sOptionPrefix . 'events_per_page_profile'),
             'profile' => (int)getParam($sOptionPrefix . 'events_per_page_profile'),
             'account' => (int)getParam($sOptionPrefix . 'events_per_page_account'),
             'account' => (int)getParam($sOptionPrefix . 'events_per_page_account'),
-            'home' => (int)getParam($sOptionPrefix . 'events_per_page_home')
+            'home' => (int)getParam($sOptionPrefix . 'events_per_page_home'),
+            'preload' => (int)getParam($sOptionPrefix . 'events_per_preload')
     	);
     	);
 
 
+        $this->_bInfScroll = getParam($sOptionPrefix . 'enable_infinite_scroll') == 'on';
+        $this->_iInfScrollAutoPreloads = (int)getParam($sOptionPrefix . 'auto_preloads');
+
         $this->_iRssLength = (int)getParam($sOptionPrefix . 'rss_length');
         $this->_iRssLength = (int)getParam($sOptionPrefix . 'rss_length');
         $this->_iLiveUpdateLength = 10;
         $this->_iLiveUpdateLength = 10;
         $this->_iCharsDisplayMinTitle = 32;
         $this->_iCharsDisplayMinTitle = 32;
@@ -374,6 +382,11 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
         return $this->_bAllowDelete;
         return $this->_bAllowDelete;
     }
     }
 
 
+    public function isInfiniteScroll()
+    {
+        return $this->_bInfScroll;
+    }
+
     public function isShowAll()
     public function isShowAll()
     {
     {
         return $this->_bShowAll;
         return $this->_bShowAll;
@@ -450,7 +463,7 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
             case 'photo':
             case 'photo':
                 $aResult = $this->_aPhotoUploaders;
                 $aResult = $this->_aPhotoUploaders;
                 break;
                 break;
-			case 'video':
+            case 'video':
                 $aResult = $this->_aVideoUploaders;
                 $aResult = $this->_aVideoUploaders;
                 break;
                 break;
         }
         }
@@ -458,6 +471,19 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
         return $aResult;
         return $aResult;
     }
     }
 
 
+    public function getPerPage($sType = 'default')
+    {
+        if($this->isInfiniteScroll())
+            $sType = 'preload';
+
+        return parent::getPerPage($sType);
+    }
+
+    public function getAutoPreloads()
+    {
+        return $this->_iInfScrollAutoPreloads;
+    }
+
     public function getRssLength()
     public function getRssLength()
     {
     {
         return $this->_iRssLength;
         return $this->_iRssLength;

+ 9 - 1
modules/boonex/timeline/classes/BxTimelineDb.php

@@ -637,6 +637,14 @@ class BxTimelineDb extends BxBaseModNotificationsDb
                     $sSelectClause  = "DISTINCT " . $sSelectClause;
                     $sSelectClause  = "DISTINCT " . $sSelectClause;
                 break;
                 break;
 
 
+            case 'list_from':
+                list($sMethod, $sSelectClause, $sJoinClause, $sWhereClause, $sOrderClause, $sLimitClause) = parent::_getSqlPartsEvents(array_merge($aParams, array('browse' => 'list')));
+                if(in_array($aParams['type'], array(BX_TIMELINE_TYPE_NEWS, BX_TIMELINE_TYPE_FEED, BX_BASE_MOD_NTFS_TYPE_CONNECTIONS, BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS)))
+                    $sSelectClause  = "DISTINCT " . $sSelectClause;
+
+                $sWhereClause .= $this->prepareAsString("AND `{$this->_sTable}`.`id`<=? ", $aParams['from']);
+                break;
+
             case 'ids':
             case 'ids':
                 $sWhereClause = "AND `{$this->_sTable}`.`id` IN (" . $this->implode_escape($aParams['ids']) . ") ";
                 $sWhereClause = "AND `{$this->_sTable}`.`id` IN (" . $this->implode_escape($aParams['ids']) . ") ";
                 break;
                 break;
@@ -646,7 +654,7 @@ class BxTimelineDb extends BxBaseModNotificationsDb
         }
         }
 
 
         $sSelectClause .= ", DAYOFYEAR(FROM_UNIXTIME(`{$this->_sTable}`.`date`)) AS `days`, DAYOFYEAR(NOW()) AS `today`, ROUND((UNIX_TIMESTAMP() - `{$this->_sTable}`.`date`)/86400) AS `ago_days`, YEAR(FROM_UNIXTIME(`{$this->_sTable}`.`date`)) AS `year`";
         $sSelectClause .= ", DAYOFYEAR(FROM_UNIXTIME(`{$this->_sTable}`.`date`)) AS `days`, DAYOFYEAR(NOW()) AS `today`, ROUND((UNIX_TIMESTAMP() - `{$this->_sTable}`.`date`)/86400) AS `ago_days`, YEAR(FROM_UNIXTIME(`{$this->_sTable}`.`date`)) AS `year`";
-        if(in_array($aParams['browse'], array('list', 'ids')) && (!isset($aParams['newest']) || $aParams['newest'] === false)) {
+        if(in_array($aParams['browse'], array('list', 'list_from', 'ids')) && (!isset($aParams['newest']) || $aParams['newest'] === false)) {
             $sOrderClause = "";
             $sOrderClause = "";
 
 
             switch($aParams['type']) {
             switch($aParams['type']) {

+ 94 - 16
modules/boonex/timeline/classes/BxTimelineMenuItemActions.php

@@ -14,6 +14,9 @@
  */
  */
 class BxTimelineMenuItemActions extends BxTemplMenuCustom
 class BxTimelineMenuItemActions extends BxTemplMenuCustom
 {
 {
+    protected static $_sModeActions = 'actions';
+    protected static $_sModeCounters = 'counters';
+
     protected $_oModule;
     protected $_oModule;
 
 
     protected $_iEvent;
     protected $_iEvent;
@@ -21,7 +24,12 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
 
 
     protected $_sType;
     protected $_sType;
     protected $_sView;
     protected $_sView;
+
+    protected $_sMode;
     protected $_bShowTitles;
     protected $_bShowTitles;
+    protected $_bShowCounters;
+
+    protected $_sTmplNameItem;
 
 
     public function __construct($aObject, $oTemplate = false)
     public function __construct($aObject, $oTemplate = false)
     {
     {
@@ -31,7 +39,10 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
 
 
         $this->_setBrowseParams();
         $this->_setBrowseParams();
 
 
-        $this->_bShowTitles = false;
+        $this->_sMode = self::$_sModeActions;
+        $this->_bShowTitles = true;
+        $this->_bShowCounters = false;
+        $this->_sTmplNameItem = 'menu_custom_item_hor.html';
     }
     }
 
 
     public function setEvent($aEvent, $aBrowseParams = array())
     public function setEvent($aEvent, $aBrowseParams = array())
@@ -109,10 +120,22 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
         $sViewsSystem = $this->_aEvent['views']['system'];
         $sViewsSystem = $this->_aEvent['views']['system'];
         $iViewsObject = $this->_aEvent['views']['object_id'];
         $iViewsObject = $this->_aEvent['views']['object_id'];
         $aViewsParams = array('dynamic_mode' => $this->_bDynamicMode);
         $aViewsParams = array('dynamic_mode' => $this->_bDynamicMode);
-        if($this->_bShowTitles)
-            $aViewsParams['show_do_view_label'] = true;
 
 
-        return $this->_oModule->getViewObject($sViewsSystem, $iViewsObject)->getElementInline($aViewsParams);
+        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;
+        }
+
+        return $this->_oModule->getViewObject($sViewsSystem, $iViewsObject)->$sViewsMethod($aViewsParams);
     }
     }
 
 
     protected function _getMenuItemItemVote($aItem)
     protected function _getMenuItemItemVote($aItem)
@@ -123,10 +146,22 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
         $sVotesSystem = $this->_aEvent['votes']['system'];
         $sVotesSystem = $this->_aEvent['votes']['system'];
         $iVotesObject = $this->_aEvent['votes']['object_id'];
         $iVotesObject = $this->_aEvent['votes']['object_id'];
         $aVotesParams = array('dynamic_mode' => $this->_bDynamicMode);
         $aVotesParams = array('dynamic_mode' => $this->_bDynamicMode);
-        if($this->_bShowTitles)
-            $aVotesParams['show_do_vote_label'] = true;
 
 
-        return $this->_oModule->getVoteObject($sVotesSystem, $iVotesObject)->getElementInline($aVotesParams);
+        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;
+        }
+
+        return $this->_oModule->getVoteObject($sVotesSystem, $iVotesObject)->$sVotesMethod($aVotesParams);
     }
     }
 
 
     protected function _getMenuItemItemReaction($aItem)
     protected function _getMenuItemItemReaction($aItem)
@@ -137,10 +172,22 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
         $sReactionsSystem = $this->_aEvent['reactions']['system'];
         $sReactionsSystem = $this->_aEvent['reactions']['system'];
         $iReactionsObject = $this->_aEvent['reactions']['object_id'];
         $iReactionsObject = $this->_aEvent['reactions']['object_id'];
         $aReactionsParams = array('dynamic_mode' => $this->_bDynamicMode);
         $aReactionsParams = array('dynamic_mode' => $this->_bDynamicMode);
-        if($this->_bShowTitles)
-            $aReactionsParams['show_do_vote_label'] = true;
+        
+        switch($this->_sMode) {
+            case self::$_sModeActions:
+                $sReactionsMethod = 'getElementInline';
+                $aReactionsParams['show_do_vote_label'] = $this->_bShowTitles;
+                $aReactionsParams['show_counter'] = $this->_bShowCounters;
+                break;
 
 
-    	return $this->_oModule->getReactionObject($sReactionsSystem, $iReactionsObject)->getElementInline($aReactionsParams);
+            case self::$_sModeCounters:
+                $sReactionsMethod = 'getCounter';
+                $aReactionsParams['show_counter'] = true;
+                $aReactionsParams['show_counter_style'] = 'compound';
+                break;
+        }
+
+    	return $this->_oModule->getReactionObject($sReactionsSystem, $iReactionsObject)->$sReactionsMethod($aReactionsParams);
     }
     }
 
 
     protected function _getMenuItemItemScore($aItem)
     protected function _getMenuItemItemScore($aItem)
@@ -151,10 +198,22 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
         $sScoresSystem = $this->_aEvent['scores']['system'];
         $sScoresSystem = $this->_aEvent['scores']['system'];
         $iScoresObject = $this->_aEvent['scores']['object_id'];
         $iScoresObject = $this->_aEvent['scores']['object_id'];
         $aScoresParams = array('dynamic_mode' => $this->_bDynamicMode);
         $aScoresParams = array('dynamic_mode' => $this->_bDynamicMode);
-        if($this->_bShowTitles)
-            $aScoresParams['show_do_vote_label'] = true;
+        
+        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;
+        }
 
 
-        return $this->_oModule->getScoreObject($sScoresSystem, $iScoresObject)->getElementInline($aScoresParams);
+        return $this->_oModule->getScoreObject($sScoresSystem, $iScoresObject)->$sScoresMethod($aScoresParams);
     }
     }
 
 
     protected function _getMenuItemItemReport($aItem)
     protected function _getMenuItemItemReport($aItem)
@@ -165,10 +224,21 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
         $sReportsSystem = $this->_aEvent['reports']['system'];
         $sReportsSystem = $this->_aEvent['reports']['system'];
         $iReportsObject = $this->_aEvent['reports']['object_id'];
         $iReportsObject = $this->_aEvent['reports']['object_id'];
         $aReportsParams = array('dynamic_mode' => $this->_bDynamicMode);
         $aReportsParams = array('dynamic_mode' => $this->_bDynamicMode);
-        if($this->_bShowTitles)
-            $aReportsParams['show_do_report_label'] = true;
+        
+        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;
+        }
 
 
-        return $this->_oModule->getReportObject($sReportsSystem, $iReportsObject)->getElementInline($aReportsParams);
+        return $this->_oModule->getReportObject($sReportsSystem, $iReportsObject)->$sReportsMethod($aReportsParams);
     }
     }
 
 
     protected function _getMenuItemDefault ($aItem)
     protected function _getMenuItemDefault ($aItem)
@@ -269,6 +339,14 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
 
 
         return call_user_func_array(array($this->_oModule, $sCheckFuncName), $aCheckFuncParams) === true;
         return call_user_func_array(array($this->_oModule, $sCheckFuncName), $aCheckFuncParams) === true;
     }
     }
+    
+    protected function _getTmplContentItem()
+    {
+        if(empty($this->_sTmplNameItem))
+           return parent::_getTmplContentItem();
+
+        return $this->_oModule->_oTemplate->getHtml($this->_sTmplNameItem);
+    }
 }
 }
 
 
 /** @} */
 /** @} */

+ 52 - 0
modules/boonex/timeline/classes/BxTimelineMenuItemCounters.php

@@ -0,0 +1,52 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+require_once('BxTimelineMenuItemActions.php');
+
+/**
+ * 'Item' menu.
+ */
+class BxTimelineMenuItemCounters extends BxTimelineMenuItemActions
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        parent::__construct($aObject, $oTemplate);
+
+        $this->_sMode = self::$_sModeCounters;
+    }
+
+    protected function _getMenuItemItemComment($aItem)
+    {
+        if(!isset($this->_aEvent['comments']) || !is_array($this->_aEvent['comments']) || !isset($this->_aEvent['comments']['system'])) 
+            return false;
+
+        $sCommentsSystem = $this->_aEvent['comments']['system'];
+        $iCommentsObject = $this->_aEvent['comments']['object_id'];
+        $aCommentsParams = array('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;
+        }
+
+        return $this->_oModule->getCmtsObject($sCommentsSystem, $iCommentsObject)->$sCommentsMethod($aCommentsParams);
+    }
+}
+
+/** @} */

+ 2 - 0
modules/boonex/timeline/classes/BxTimelineMenuItemManage.php

@@ -34,6 +34,8 @@ class BxTimelineMenuItemManage extends BxTimelineMenuItemActions
         $this->setEventById($iContentId, $aBrowseParams);
         $this->setEventById($iContentId, $aBrowseParams);
 
 
         $this->_bShowTitles = true;
         $this->_bShowTitles = true;
+        $this->_bShowCounters = true;
+        $this->_sTmplNameItem = '';
     }
     }
 }
 }
 
 

+ 6 - 5
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -82,7 +82,6 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         if($aData === false || !isset($aData['content']['videos'][$iVideoId]))
         if($aData === false || !isset($aData['content']['videos'][$iVideoId]))
             return;
             return;
 
 
-
         $oTemplate = BxDolTemplate::getInstance();
         $oTemplate = BxDolTemplate::getInstance();
         $oTemplate->addJs(array(
         $oTemplate->addJs(array(
             'embedly-player.min.js'
             'embedly-player.min.js'
@@ -1202,7 +1201,7 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             'owner_id' => $iProfileId,
             'owner_id' => $iProfileId,
             'start' => $iStart, 
             'start' => $iStart, 
             'per_page' => $iPerPage, 
             'per_page' => $iPerPage, 
-            'per_page_default' => $this->_oConfig->getPerPage('home'), 
+            'per_page_default' => $this->_oConfig->getPerPage(), 
             'timeline' => $iTimeline, 
             'timeline' => $iTimeline, 
             'filter' => $sFilter, 
             'filter' => $sFilter, 
             'modules' => $aModules
             'modules' => $aModules
@@ -1217,7 +1216,7 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             'owner_id' => $iProfileId,
             'owner_id' => $iProfileId,
             'start' => $iStart, 
             'start' => $iStart, 
             'per_page' => $iPerPage, 
             'per_page' => $iPerPage, 
-            'per_page_default' => $this->_oConfig->getPerPage('home'), 
+            'per_page_default' => $this->_oConfig->getPerPage(), 
             'timeline' => $iTimeline, 
             'timeline' => $iTimeline, 
             'filter' => $sFilter, 
             'filter' => $sFilter, 
             'modules' => $aModules
             'modules' => $aModules
@@ -2148,6 +2147,7 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
      * @code bx_srv('bx_timeline', 'get_menu_item_addon_comment', [...]); @endcode
      * @code bx_srv('bx_timeline', 'get_menu_item_addon_comment', [...]); @endcode
      * 
      * 
      * Get addon for Comment menu item.
      * Get addon for Comment menu item.
+     * NOTE. The service isn't used for now because comment functionality in card was updated.
      * 
      * 
      * @param $sSystem string value with comments engine system.
      * @param $sSystem string value with comments engine system.
      * @param $iObjectId integer value with object ID. 
      * @param $iObjectId integer value with object ID. 
@@ -3712,7 +3712,8 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
 
 
         $aParams = array_merge($aParams, array(
         $aParams = array_merge($aParams, array(
             'browse' => 'list',
             'browse' => 'list',
-            'status' => BX_TIMELINE_STATUS_ACTIVE
+            'status' => BX_TIMELINE_STATUS_ACTIVE,
+            'dynamic_mode' => false,
         ));
         ));
 
 
         return $aParams;
         return $aParams;
@@ -3898,7 +3899,7 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
                 'reports' => isset($aResult['reports']['count']) ? (int)$aResult['reports']['count'] : 0,
                 'reports' => isset($aResult['reports']['count']) ? (int)$aResult['reports']['count'] : 0,
                 'comments' => isset($aResult['comments']['count']) ? (int)$aResult['comments']['count'] : 0,
                 'comments' => isset($aResult['comments']['count']) ? (int)$aResult['comments']['count'] : 0,
                 'date' => isset($aResult['date']) ? $aResult['date'] : $aEvent['date'],
                 'date' => isset($aResult['date']) ? $aResult['date'] : $aEvent['date'],
-                'type' => stripos($aEvent['type'], 'timeline') !== FALSE ? 'bx_timeline' : $aEvent['type'],
+                'type' => stripos($aEvent['type'], 'timeline') !== false ? 'bx_timeline' : $aEvent['type'],
                 'event_type' => $aEvent['type'],
                 'event_type' => $aEvent['type'],
                 'id' => $aEvent['id'],
                 'id' => $aEvent['id'],
                 'content' => $aResult['content'],
                 'content' => $aResult['content'],

+ 9 - 2
modules/boonex/timeline/classes/BxTimelineResponse.php

@@ -61,7 +61,14 @@ class BxTimelineResponse extends BxBaseModNotificationsResponse
                 break;
                 break;
 
 
             case BX_BASE_MOD_NTFS_HANDLER_TYPE_UPDATE:
             case BX_BASE_MOD_NTFS_HANDLER_TYPE_UPDATE:
-                $aEvent = $this->_oModule->_oDb->getEvents(array('browse' => 'descriptor', 'type' => $oAlert->sUnit, 'object_id' => $oAlert->iObject));
+                $aHandlers = $this->_oModule->_oDb->getHandlers(array('type' => 'by_group_key_type', 'group' => $aHandler['group']));
+                
+                $aEvent = $this->_oModule->_oDb->getEvents(array(
+                    'browse' => 'descriptor', 
+                    'type' => $oAlert->sUnit, 
+                    'action' => $aHandlers[BX_BASE_MOD_NTFS_HANDLER_TYPE_INSERT]['alert_action'],
+                    'object_id' => $oAlert->iObject
+                ));
                 if(empty($aEvent) || !is_array($aEvent))
                 if(empty($aEvent) || !is_array($aEvent))
                     break;
                     break;
 
 
@@ -80,7 +87,7 @@ class BxTimelineResponse extends BxBaseModNotificationsResponse
                         'object_privacy_view' => $iObjectPrivacyView 
                         'object_privacy_view' => $iObjectPrivacyView 
                     ));
                     ));
 
 
-                $this->_oModule->_oDb->updateEvent($aParamsSet, array('type' => $oAlert->sUnit, 'object_id' => $oAlert->iObject));
+                $this->_oModule->_oDb->updateEvent($aParamsSet, array('id' => $aEvent[$CNF['FIELD_ID']]));
 
 
                 //--- Delete feed cached
                 //--- Delete feed cached
                 $this->_oModule->_oDb->deleteCache(array('context_id' => 0)); //--- Delete cache for Public feed
                 $this->_oModule->_oDb->deleteCache(array('context_id' => 0)); //--- Delete cache for Public feed

+ 121 - 32
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -75,6 +75,18 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
             return $mixedResult; 
             return $mixedResult; 
     }
     }
 
 
+    public function getJsCode($sType, $aParams = array(), $bWrap = true)
+    {
+        $oModule = $this->getModule();
+
+        $aParams = array_merge(array(
+            'bInfScroll' => $this->_oConfig->isInfiniteScroll(),
+            'iInfScrollAutoPreloads' => $this->_oConfig->getAutoPreloads()
+        ), $aParams);
+
+        return parent::getJsCode($sType, $aParams, $bWrap);
+    }
+
     public function getJsCodePost($iOwnerId, $aParams = array())
     public function getJsCodePost($iOwnerId, $aParams = array())
     {
     {
         return $this->getJsCode('post', array(
         return $this->getJsCode('post', array(
@@ -1233,7 +1245,39 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
 
         return $aIds;
         return $aIds;
     }
     }
-            
+
+    protected function _cacheEventsFrom($iId, $aParams)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $iPerPage = (int)$aParams['per_page'];
+
+        $aParamsCopy = $aParams;
+        $aParamsCopy['browse'] = 'list_from';
+        $aParamsCopy['from'] = $iId;
+        $aParamsCopy['start'] = 0;
+
+        $aIds = array();
+        while(count($aIds) < $iPerPage) {
+            $aEvents = $this->_oDb->getEvents($aParamsCopy);
+            if(empty($aEvents))
+                break;
+
+            foreach($aEvents as $aEvent) {
+                if($this->getPost($aEvent, $aParamsCopy) == '')
+                    continue;
+
+                $aIds[] = $aEvent[$CNF['FIELD_ID']];
+                if(count($aIds) == $iPerPage)
+                    break 2;
+            }
+
+            $aParamsCopy['start'] += $iPerPage;
+        }
+
+        return $aIds;
+    }
+
     protected function _getCachedEvents($iProfileId, &$aParams)
     protected function _getCachedEvents($iProfileId, &$aParams)
     {
     {
         return $this->_oDb->getCache(array(
         return $this->_oDb->getCache(array(
@@ -1257,12 +1301,16 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         $iProfileId = (int)bx_get_logged_profile_id(); 
         $iProfileId = (int)bx_get_logged_profile_id(); 
 
 
         /*
         /*
-         * Get cached data and check it for relevance.
+         * Get cached data.
          */
          */
         $aCache = $this->_getCachedEvents($iProfileId, $aParams);
         $aCache = $this->_getCachedEvents($iProfileId, $aParams);
         if(is_array($aCache) && !empty($aCache)) {
         if(is_array($aCache) && !empty($aCache)) {
+
+            /*
+             * Check received data for relevance.
+             */
             if(($iCache = count($aCache)) != $iPerPage) {
             if(($iCache = count($aCache)) != $iPerPage) {
-                $aRecachedIds = $this->_cacheEvents($aParams);
+                $aRecachedIds = $this->_cacheEventsFrom(reset($aCache)['event_id'], $aParams);
                 if(is_array($aRecachedIds) && count($aRecachedIds) > $iCache)
                 if(is_array($aRecachedIds) && count($aRecachedIds) > $iCache)
                     $aCache = $this->_getCachedEvents($iProfileId, $aParams);
                     $aCache = $this->_getCachedEvents($iProfileId, $aParams);
             }
             }
@@ -1270,7 +1318,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
             $bFound = false;
             $bFound = false;
             $bUpdated = false;
             $bUpdated = false;
 
 
-            $aCachedItem = current($aCache);
+            $aCachedItem = reset($aCache);
             $aCachedIds = array_keys($aCache);
             $aCachedIds = array_keys($aCache);
 
 
             $aParamsCopy = $aParams;
             $aParamsCopy = $aParams;
@@ -1335,6 +1383,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
             $oModule->getViewObject($aEvent['views']['system'], $aEvent['views']['object_id'])->doView();
             $oModule->getViewObject($aEvent['views']['system'], $aEvent['views']['object_id'])->doView();
 
 
         $aTmplVarsNote = $this->_getTmplVarsNote($aEvent);
         $aTmplVarsNote = $this->_getTmplVarsNote($aEvent);
+        $aTmplVarsMenuItemCounters = $this->_getTmplVarsMenuItemCounters($aEvent, $aBrowseParams);
         $aTmplVarsMenuItemActions = $this->_getTmplVarsMenuItemActions($aEvent, $aBrowseParams);
         $aTmplVarsMenuItemActions = $this->_getTmplVarsMenuItemActions($aEvent, $aBrowseParams);
         $aTmplVarsMenuItemMeta = $this->_getTmplVarsMenuItemMeta($aEvent, $aBrowseParams);
         $aTmplVarsMenuItemMeta = $this->_getTmplVarsMenuItemMeta($aEvent, $aBrowseParams);
 
 
@@ -1342,8 +1391,6 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         $bTmplVarsOwnerActions = !empty($aTmplVarsOwnerActions); 
         $bTmplVarsOwnerActions = !empty($aTmplVarsOwnerActions); 
 
 
         $aTmplVarsTimelineOwner = $this->_getTmplVarsTimelineOwner($aEvent);
         $aTmplVarsTimelineOwner = $this->_getTmplVarsTimelineOwner($aEvent);
-        
-        $aTmplVarsReactions = $this->_getTmplVarsReactions($aEvent, $aBrowseParams);
 
 
         $bPinned = (int)$aEvent['pinned'] > 0;
         $bPinned = (int)$aEvent['pinned'] > 0;
         $bSticked = (int)$aEvent['sticked'] > 0;
         $bSticked = (int)$aEvent['sticked'] > 0;
@@ -1441,9 +1488,9 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
                     'location' => $sLocation
                     'location' => $sLocation
             	)
             	)
             ),
             ),
-            'bx_if:show_reactions' => array(
-                'condition' => !empty($aTmplVarsReactions),
-                'content' => $aTmplVarsReactions
+            'bx_if:show_menu_item_counters' => array(
+                'condition' => !empty($aTmplVarsMenuItemCounters),
+                'content' => $aTmplVarsMenuItemCounters
             ),
             ),
             'bx_if:show_menu_item_actions' => array(
             'bx_if:show_menu_item_actions' => array(
                 'condition' => !empty($aTmplVarsMenuItemActions),
                 'condition' => !empty($aTmplVarsMenuItemActions),
@@ -1614,6 +1661,70 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         );
         );
     }
     }
 
 
+    protected function _getTmplVarsMenuItemCounters(&$aEvent, $aBrowseParams = array())
+    {
+        $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_counters'));
+        $oMenu->setEvent($aEvent, $aBrowseParams);
+        $oMenu->setDynamicMode(isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true);
+
+        $sMenu = $oMenu->getCode();
+        if(empty($sMenu))
+            return array();
+
+        return array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'js_object' => $this->_oConfig->getJsObjectView($aBrowseParams),
+            'menu_item_counters' => $sMenu
+        );
+    }
+    
+    /*
+    protected function _getTmplVarsReactions(&$aEvent, $aBrowseParams = array())
+    {
+        if(!isset($aEvent['reactions']) || !is_array($aEvent['reactions']) || !isset($aEvent['reactions']['system']))
+            return array();
+
+        $sReactionsSystem = $aEvent['reactions']['system'];
+        $iReactionsObject = $aEvent['reactions']['object_id'];
+        $aReactionsParams = array(
+            'show_counter' => true,
+            'show_counter_style' => 'compound', 
+            'dynamic_mode' => isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true
+        );
+
+        $oReactions = $this->getModule()->getReactionObject($sReactionsSystem, $iReactionsObject);
+        if(!$oReactions)
+            return array();
+
+        return array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'reactions' => $oReactions->getCounter($aReactionsParams)
+        );
+    }
+
+    protected function _getTmplVarsComments(&$aEvent, $aBrowseParams = array())
+    {
+        if(!isset($aEvent['comments']) || !is_array($aEvent['comments']) || !isset($aEvent['comments']['system']))
+            return array();
+
+        $sCmtsSystem = $aEvent['comments']['system'];
+        $iCmtsObject = $aEvent['comments']['object_id'];
+        $aCmtsParams = array(
+            'show_counter' => true, 
+            'dynamic_mode' => isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true
+        );
+
+        $oCmts = $this->getModule()->getCmtsObject($sCmtsSystem, $iCmtsObject);
+        if(!$oCmts)
+            return array();
+
+        return array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'comments' => $oCmts->getCounter($aCmtsParams)
+        );
+    }
+     */
+
     protected function _getTmplVarsMenuItemMeta(&$aEvent, $aBrowseParams = array())
     protected function _getTmplVarsMenuItemMeta(&$aEvent, $aBrowseParams = array())
     {
     {
         $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_meta'));
         $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_meta'));
@@ -1908,7 +2019,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         $sSampleLink = empty($aContent['url']) ? $sSample : $this->parseLink($aContent['url'], $sSample);
         $sSampleLink = empty($aContent['url']) ? $sSample : $this->parseLink($aContent['url'], $sSample);
 
 
         $sTitle = _t('_bx_timeline_txt_reposted', $sOwnerLink, $sSampleLink);
         $sTitle = _t('_bx_timeline_txt_reposted', $sOwnerLink, $sSampleLink);
-        $sText = $this->_getContent($aContent['parse_type'], $aEvent);
+        $sText = $this->_getContent($aContent['parse_type'], $aEvent, $aBrowseParams);
 
 
         return array(
         return array(
             'bx_if:show_title' => array(
             'bx_if:show_title' => array(
@@ -2179,28 +2290,6 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         );
         );
     }
     }
 
 
-    protected function _getTmplVarsReactions(&$aEvent, $aBrowseParams = array())
-    {
-        if(!isset($aEvent['reactions']) || !is_array($aEvent['reactions']) || !isset($aEvent['reactions']['system']))
-            return array();
-
-        $sReactionsSystem = $aEvent['reactions']['system'];
-        $iReactionsObject = $aEvent['reactions']['object_id'];
-        $aReactionsParams = array(
-            'show_counter' => true, 
-            'dynamic_mode' => isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true
-        );
-
-        $oReactions = $this->getModule()->getReactionObject($sReactionsSystem, $iReactionsObject);
-        if(!$oReactions)
-            return array();
-
-        return array(
-            'style_prefix' => $this->_oConfig->getPrefix('style'),
-            'reactions' => $oReactions->getCounter($aReactionsParams)
-        );
-    }
-
     protected function _getSystemData(&$aEvent, $aBrowseParams = array())
     protected function _getSystemData(&$aEvent, $aBrowseParams = array())
     {
     {
         $mixedResult = $this->_oConfig->getSystemData($aEvent, $aBrowseParams);
         $mixedResult = $this->_oConfig->getSystemData($aEvent, $aBrowseParams);

+ 7 - 2
modules/boonex/timeline/install/langs/en.xml

@@ -12,6 +12,9 @@
     <string name="_bx_timeline_option_events_per_page_account"><![CDATA[Number of items on dashboard page]]></string>
     <string name="_bx_timeline_option_events_per_page_account"><![CDATA[Number of items on dashboard page]]></string>
     <string name="_bx_timeline_option_events_per_page_home"><![CDATA[Number of items on site home page]]></string>
     <string name="_bx_timeline_option_events_per_page_home"><![CDATA[Number of items on site home page]]></string>
     <string name="_bx_timeline_option_events_per_page"><![CDATA[Number of items per page]]></string>
     <string name="_bx_timeline_option_events_per_page"><![CDATA[Number of items per page]]></string>
+    <string name="_bx_timeline_option_enable_infinite_scroll"><![CDATA[Enable 'Infinite Scroll']]></string>
+    <string name="_bx_timeline_option_events_per_preload"><![CDATA[Infinite Scroll: Number of items per preload]]></string>
+    <string name="_bx_timeline_option_auto_preloads"><![CDATA[Infinite Scroll: Number of auto preloads]]></string>
     <string name="_bx_timeline_option_rss_length"><![CDATA[The length of RSS feed]]></string>
     <string name="_bx_timeline_option_rss_length"><![CDATA[The length of RSS feed]]></string>
     <string name="_bx_timeline_option_events_hide"><![CDATA[Show events]]></string>
     <string name="_bx_timeline_option_events_hide"><![CDATA[Show events]]></string>
     <string name="_bx_timeline_option_videos_autoplay"><![CDATA[Videos autoplay (for Timeline view only)]]></string>
     <string name="_bx_timeline_option_videos_autoplay"><![CDATA[Videos autoplay (for Timeline view only)]]></string>
@@ -181,14 +184,16 @@
 
 
     <string name="_bx_timeline_menu_title_item_actions"><![CDATA[Item Actions]]></string>
     <string name="_bx_timeline_menu_title_item_actions"><![CDATA[Item Actions]]></string>
     <string name="_bx_timeline_menu_set_title_item_actions"><![CDATA[Item Actions]]></string>
     <string name="_bx_timeline_menu_set_title_item_actions"><![CDATA[Item Actions]]></string>
+    <string name="_bx_timeline_menu_title_item_counters"><![CDATA[Item Counters]]></string>
+    <string name="_bx_timeline_menu_set_title_item_counters"><![CDATA[Item Counters]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_comment"><![CDATA[Comment]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_comment"><![CDATA[Comment]]></string>
-    <string name="_bx_timeline_menu_item_title_item_comment"><![CDATA[]]></string>
+    <string name="_bx_timeline_menu_item_title_item_comment"><![CDATA[Comment]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_view"><![CDATA[View]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_view"><![CDATA[View]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_vote"><![CDATA[Vote (Like)]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_vote"><![CDATA[Vote (Like)]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_score"><![CDATA[Vote (Up/Down)]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_score"><![CDATA[Vote (Up/Down)]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_reaction"><![CDATA[Reaction]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_reaction"><![CDATA[Reaction]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_share"><![CDATA[Share]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_share"><![CDATA[Share]]></string>
-    <string name="_bx_timeline_menu_item_title_item_share"><![CDATA[]]></string>
+    <string name="_bx_timeline_menu_item_title_item_share"><![CDATA[Share]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_report"><![CDATA[Report]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_report"><![CDATA[Report]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_more"><![CDATA[More Actions]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_more"><![CDATA[More Actions]]></string>
     <string name="_bx_timeline_menu_item_title_item_more"><![CDATA[]]></string>
     <string name="_bx_timeline_menu_item_title_item_more"><![CDATA[]]></string>

+ 1 - 1
modules/boonex/timeline/install/sql/disable.sql

@@ -6,7 +6,7 @@ DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_timeline' OR `object` IN('bx
 -- MENU
 -- MENU
 DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_timeline';
 DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_timeline';
 DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_timeline';
 DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_timeline';
-DELETE FROM `sys_menu_items` WHERE `module` = 'bx_timeline' OR `set_name` IN('bx_timeline_menu_view', 'bx_timeline_menu_item_share', 'bx_timeline_menu_item_manage', 'bx_timeline_menu_item_actions', 'bx_timeline_menu_item_meta', 'bx_timeline_menu_post_attachments');
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_timeline' OR `set_name` IN('bx_timeline_menu_view', 'bx_timeline_menu_item_share', 'bx_timeline_menu_item_manage', 'bx_timeline_menu_item_actions', 'bx_timeline_menu_item_counters', 'bx_timeline_menu_item_meta', 'bx_timeline_menu_post_attachments');
 
 
 
 
 -- SETTINGS
 -- SETTINGS

+ 19 - 2
modules/boonex/timeline/install/sql/enable.sql

@@ -125,13 +125,27 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 
 
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-view', '_bx_timeline_menu_item_title_system_item_view', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 0),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-view', '_bx_timeline_menu_item_title_system_item_view', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 0),
-('bx_timeline_menu_item_actions', 'bx_timeline', 'item-comment', '_bx_timeline_menu_item_title_system_item_comment', '_bx_timeline_menu_item_title_item_comment', 'javascript:void(0)', 'javascript:{comment_onclick}', '_self', 'comment', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_menu_item_addon_comment";s:6:"params";a:3:{i:0;s:16:"{comment_system}";i:1;s:16:"{comment_object}";i:2;a:3:{s:4:"name";s:6:"{name}";s:4:"view";s:6:"{view}";s:4:"type";s:6:"{type}";}}}', '', 0, 2147483647, 1, 0, 1, 10),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-comment', '_bx_timeline_menu_item_title_system_item_comment', '_bx_timeline_menu_item_title_item_comment', 'javascript:void(0)', 'javascript:{comment_onclick}', '_self', 'comment', '', '', 0, 2147483647, 1, 0, 1, 10),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-vote', '_bx_timeline_menu_item_title_system_item_vote', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 20),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-vote', '_bx_timeline_menu_item_title_system_item_vote', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 20),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-reaction', '_bx_timeline_menu_item_title_system_item_reaction', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 30),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-reaction', '_bx_timeline_menu_item_title_system_item_reaction', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 30),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-score', '_bx_timeline_menu_item_title_system_item_score', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 40),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-score', '_bx_timeline_menu_item_title_system_item_score', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 40),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-share', '_bx_timeline_menu_item_title_system_item_share', '_bx_timeline_menu_item_title_item_share', 'javascript:void(0)', 'bx_menu_popup(''bx_timeline_menu_item_share'', this, {''id'':''bx_timeline_menu_item_share_{content_id}''}, {content_id:{content_id}, name:''{name}'', view:''{view}'', type:''{type}''});', '', 'share-alt', '', 'bx_timeline_menu_item_share', 1, 2147483647, 1, 0, 1, 50),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-share', '_bx_timeline_menu_item_title_system_item_share', '_bx_timeline_menu_item_title_item_share', 'javascript:void(0)', 'bx_menu_popup(''bx_timeline_menu_item_share'', this, {''id'':''bx_timeline_menu_item_share_{content_id}''}, {content_id:{content_id}, name:''{name}'', view:''{view}'', type:''{type}''});', '', 'share-alt', '', 'bx_timeline_menu_item_share', 1, 2147483647, 1, 0, 1, 50),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-more', '_bx_timeline_menu_item_title_system_item_more', '_bx_timeline_menu_item_title_item_more', 'javascript:void(0)', 'bx_menu_popup(''bx_timeline_menu_item_manage'', this, {''id'':''bx_timeline_menu_item_manage_{content_id}''}, {content_id:{content_id}, name:''{name}'', view:''{view}'', type:''{type}''});', '', 'ellipsis-h', '', 'bx_timeline_menu_item_manage', 1, 2147483647, 1, 0, 1, 60);
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-more', '_bx_timeline_menu_item_title_system_item_more', '_bx_timeline_menu_item_title_item_more', 'javascript:void(0)', 'bx_menu_popup(''bx_timeline_menu_item_manage'', this, {''id'':''bx_timeline_menu_item_manage_{content_id}''}, {content_id:{content_id}, name:''{name}'', view:''{view}'', type:''{type}''});', '', 'ellipsis-h', '', 'bx_timeline_menu_item_manage', 1, 2147483647, 1, 0, 1, 60);
 
 
+-- MENU: Item Counters (Comments, Votes, Reactions, etc)
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_item_counters', '_bx_timeline_menu_title_item_counters', 'bx_timeline_menu_item_counters', 'bx_timeline', 15, 0, 1, 'BxTimelineMenuItemCounters', 'modules/boonex/timeline/classes/BxTimelineMenuItemCounters.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_item_counters', 'bx_timeline', '_bx_timeline_menu_set_title_item_counters', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
+('bx_timeline_menu_item_counters', 'bx_timeline', 'item-vote', '_bx_timeline_menu_item_title_system_item_vote', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 0),
+('bx_timeline_menu_item_counters', 'bx_timeline', 'item-reaction', '_bx_timeline_menu_item_title_system_item_reaction', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 10),
+('bx_timeline_menu_item_counters', 'bx_timeline', 'item-score', '_bx_timeline_menu_item_title_system_item_score', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 20),
+('bx_timeline_menu_item_counters', 'bx_timeline', 'item-view', '_bx_timeline_menu_item_title_system_item_view', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 30),
+('bx_timeline_menu_item_counters', 'bx_timeline', 'item-comment', '_bx_timeline_menu_item_title_system_item_comment', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 40);
+
 -- MENU: Item Meta Info
 -- MENU: Item Meta Info
 INSERT INTO `sys_objects_menu` (`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
 INSERT INTO `sys_objects_menu` (`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
 ('bx_timeline_menu_item_meta', '_sys_menu_title_snippet_meta', 'bx_timeline_menu_item_meta', 'bx_timeline', 15, 0, 1, 'BxTimelineMenuSnippetMeta', 'modules/boonex/timeline/classes/BxTimelineMenuSnippetMeta.php');
 ('bx_timeline_menu_item_meta', '_sys_menu_title_snippet_meta', 'bx_timeline_menu_item_meta', 'bx_timeline', 15, 0, 1, 'BxTimelineMenuSnippetMeta', 'modules/boonex/timeline/classes/BxTimelineMenuSnippetMeta.php');
@@ -194,12 +208,15 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_timeline_events_per_page_account', '12', @iCategId, '_bx_timeline_option_events_per_page_account', 'digit', '', '', '', '', 11),
 ('bx_timeline_events_per_page_account', '12', @iCategId, '_bx_timeline_option_events_per_page_account', 'digit', '', '', '', '', 11),
 ('bx_timeline_events_per_page_home', '24', @iCategId, '_bx_timeline_option_events_per_page_home', 'digit', '', '', '', '', 12),
 ('bx_timeline_events_per_page_home', '24', @iCategId, '_bx_timeline_option_events_per_page_home', 'digit', '', '', '', '', 12),
 ('bx_timeline_events_per_page', '24', @iCategId, '_bx_timeline_option_events_per_page', 'digit', '', '', '', '', 13),
 ('bx_timeline_events_per_page', '24', @iCategId, '_bx_timeline_option_events_per_page', 'digit', '', '', '', '', 13),
+('bx_timeline_enable_infinite_scroll', 'on', @iCategId, '_bx_timeline_option_enable_infinite_scroll', 'checkbox', '', '', '', '', 15),
+('bx_timeline_events_per_preload', '10', @iCategId, '_bx_timeline_option_events_per_preload', 'digit', '', '', '', '', 16),
+('bx_timeline_auto_preloads', '10', @iCategId, '_bx_timeline_option_auto_preloads', 'digit', '', '', '', '', 17),
 ('bx_timeline_rss_length', '5', @iCategId, '_bx_timeline_option_rss_length', 'digit', '', '', '', '', 20),
 ('bx_timeline_rss_length', '5', @iCategId, '_bx_timeline_option_rss_length', 'digit', '', '', '', '', 20),
 ('bx_timeline_events_hide', '', @iCategId, '_bx_timeline_option_events_hide', 'rlist', '', '', '', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:21:"get_actions_checklist";}', 30),
 ('bx_timeline_events_hide', '', @iCategId, '_bx_timeline_option_events_hide', 'rlist', '', '', '', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:21:"get_actions_checklist";}', 30),
 ('bx_timeline_videos_autoplay', 'off', @iCategId, '_bx_timeline_option_videos_autoplay', 'select', '', '', '', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_options_videos_autoplay";}', 50),
 ('bx_timeline_videos_autoplay', 'off', @iCategId, '_bx_timeline_option_videos_autoplay', 'select', '', '', '', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_options_videos_autoplay";}', 50),
 ('bx_timeline_preload_comments', '0', @iCategId, '_bx_timeline_option_preload_comments', 'digit', '', '', '', '', 51),
 ('bx_timeline_preload_comments', '0', @iCategId, '_bx_timeline_option_preload_comments', 'digit', '', '', '', '', 51),
 ('bx_timeline_enable_jump_to_switcher', 'on', @iCategId, '_bx_timeline_option_enable_jump_to_switcher', 'checkbox', '', '', '', '', 52),
 ('bx_timeline_enable_jump_to_switcher', 'on', @iCategId, '_bx_timeline_option_enable_jump_to_switcher', 'checkbox', '', '', '', '', 52),
-('bx_timeline_enable_hot', '', @iCategId, '_bx_timeline_option_enable_hot', 'checkbox', '', '', '', '', 60),
+('bx_timeline_enable_hot', 'on', @iCategId, '_bx_timeline_option_enable_hot', 'checkbox', '', '', '', '', 60),
 ('bx_timeline_hot_interval', '48', @iCategId, '_bx_timeline_option_hot_interval', 'digit', '', '', '', '', 61),
 ('bx_timeline_hot_interval', '48', @iCategId, '_bx_timeline_option_hot_interval', 'digit', '', '', '', '', 61),
 ('bx_timeline_enable_cache_item', 'on', @iCategId, '_bx_timeline_option_enable_cache_item', 'checkbox', '', '', '', '', 70),
 ('bx_timeline_enable_cache_item', 'on', @iCategId, '_bx_timeline_option_enable_cache_item', 'checkbox', '', '', '', '', 70),
 ('bx_timeline_cache_item_engine', 'File', @iCategId, '_bx_timeline_option_cache_item_engine', 'select', '', '', '', 'File,Memcache,APC,XCache', 71),
 ('bx_timeline_cache_item_engine', 'File', @iCategId, '_bx_timeline_option_cache_item_engine', 'select', '', '', '', 'File,Memcache,APC,XCache', 71),

+ 2 - 0
modules/boonex/timeline/js/main.js

@@ -241,6 +241,8 @@ BxTimelineMain.prototype.loadingIn = function(e, bShow) {
         this.loadingInItem(e, bShow);
         this.loadingInItem(e, bShow);
     else if(bElement && oElement.parents('.bx-popup-content:first').length > 0)
     else if(bElement && oElement.parents('.bx-popup-content:first').length > 0)
         this.loadingInPopup(e, bShow);
         this.loadingInPopup(e, bShow);
+    else if(bElement && oElement.parents('.bx-db-container:first').length > 0)
+        this.loadingInBlock(e, bShow);
     else if(bElement && oElement.parents('.bx-tl-v-header:first').length > 0)
     else if(bElement && oElement.parents('.bx-tl-v-header:first').length > 0)
         this.loadingInBlockHeaderCustom(e, bShow);
         this.loadingInBlockHeaderCustom(e, bShow);
     else 
     else 

+ 116 - 48
modules/boonex/timeline/js/view.js

@@ -20,6 +20,12 @@ function BxTimelineView(oOptions) {
     this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
     this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
     this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
     this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
 
 
+    this._bInfScroll = oOptions.bInfScroll == undefined ? false : oOptions.bInfScroll;
+    this._iInfScrollAutoPreloads = oOptions.iInfScrollAutoPreloads == undefined ? 10 : oOptions.iInfScrollAutoPreloads;
+    this._fInfScrollAfter = 0.25; //--- Preload more info when specified portion of Timeline block's content was already scrolled.
+    this._bInfScrollBusy = false;
+    this._iInfScrollPreloads = 1; //--- First portion is loaded with page loading or 'Load More' button click.
+
     this._fOutsideOffset = 0.8;
     this._fOutsideOffset = 0.8;
     this._oSaved = {};
     this._oSaved = {};
 
 
@@ -95,6 +101,9 @@ BxTimelineView.prototype.init = function()
 
 
         //--- Load 'Jump To'
         //--- Load 'Jump To'
         this.initJumpTo(this.oView);
         this.initJumpTo(this.oView);
+
+        //--- Init 'Infinite Scroll'
+        this.initInfiniteScroll(this.oView);
     }
     }
 
 
     if(this.bViewOutline) {
     if(this.bViewOutline) {
@@ -159,6 +168,29 @@ BxTimelineView.prototype.onGetJumpTo = function(oData)
     $(oData.holder).html(oData.content);
     $(oData.holder).html(oData.content);
 };
 };
 
 
+BxTimelineView.prototype.initInfiniteScroll = function(oParent)
+{
+    var $this = this;
+
+    if(!this._bInfScroll)
+        return;
+
+    $(window).bind('scroll', function(oEvent) {
+        var iParentTop = parseInt(oParent.offset().top);
+        var iParentHeight = parseInt(oParent.height());
+        var iScrollTop = parseInt($(window).scrollTop());
+        var iWindowHeight = $(window).height();
+        if($this._bInfScrollBusy || $this._iInfScrollPreloads >= $this._iInfScrollAutoPreloads || (iScrollTop + iWindowHeight) <= (iParentTop + iParentHeight * $this._fInfScrollAfter))
+            return;
+
+        $this._bInfScrollBusy = true;
+        $this._getPage(undefined, $this._oRequestParams.start + $this._oRequestParams.per_page, $this._oRequestParams.per_page, function(oData) {
+            $this._iInfScrollPreloads += 1;
+            $this._bInfScrollBusy = false;
+        });
+    });
+};
+
 BxTimelineView.prototype.initVideosAutoplay = function(oParent)
 BxTimelineView.prototype.initVideosAutoplay = function(oParent)
 {
 {
     var $this = this;
     var $this = this;
@@ -260,53 +292,12 @@ BxTimelineView.prototype.changeView = function(oLink, sType)
     );
     );
 };
 };
 
 
-BxTimelineView.prototype.changePage = function(oLink, iStart, iPerPage)
+BxTimelineView.prototype.changePage = function(oLink, iStart, iPerPage, onLoad)
 {
 {
-    var $this = this;
-
-    this.loadingInButton(oLink, true);
-
-    this._oRequestParams.start = iStart;
-    this._oRequestParams.per_page = iPerPage;
-    this._getPosts(oLink, function(oData) {
-    	$this.loadingInButton(oLink, false);
-
-    	var sItems = $.trim(oData.items);
-
-        if($this.bViewTimeline)
-            $this.oView.find('.' + $this.sClassItems).append($(sItems).hide()).find('.' + $this.sClassItem + ':hidden').bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
-                $(this).bxProcessHtml().find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight($this.sSP + '-overflow', function(oElement) {
-                    $this.onFindOverflow(oElement);
-                });
-
-                $this.initFlickity();
-
-                //--- Init Video Autoplay
-                $this.initVideosAutoplay($this.oView);
-            });
+    if(this._bInfScroll)
+        this._iInfScrollPreloads = 1;
 
 
-        if($this.bViewOutline)
-            $this.appendMasonry($(sItems).bxProcessHtml(), function(oItems) {
-                oItems.find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight($this.sSP + '-overflow', function(oElement) {
-                    $this.onFindOverflow(oElement);
-                });
-
-                $this.initFlickity();
-
-                //--- Init Video Layout
-                if($this._sVideosAutoplay != 'off') 
-                    $this.initVideos($this.oView);
-            });
-
-    	if(oData && oData.load_more != undefined)
-            $this.oView.find('.' + $this.sSP + '-load-more-holder').html($.trim(oData.load_more));
-
-    	if(oData && oData.back != undefined)
-            $this.oView.find('.' + $this.sSP + '-back-holder').html($.trim(oData.back));
-
-    	if(oData && oData.empty != undefined)
-            $this.oView.find('.' + $this.sSP + '-empty-holder').html($.trim(oData.empty));
-    });
+    this._getPage(oLink, iStart, iPerPage, onLoad);
 };
 };
 
 
 BxTimelineView.prototype.changeFilter = function(oLink)
 BxTimelineView.prototype.changeFilter = function(oLink)
@@ -323,11 +314,33 @@ BxTimelineView.prototype.changeFilter = function(oLink)
 
 
 BxTimelineView.prototype.changeTimeline = function(oLink, sDate)
 BxTimelineView.prototype.changeTimeline = function(oLink, sDate)
 {
 {
-    this.loadingInBlock(oLink, true);
+    var $this = this;
+
+    oLink = $(oLink);
+    var bLink = oLink.length > 0;
+    var bLoadingInButton = bLink && oLink.hasClass('bx-btn');
+
+    if(bLink) {
+        if(bLoadingInButton)
+            this.loadingInButton(oLink, true);
+        else
+            this.loadingInBlock(oLink, true);
+    }
 
 
     this._oRequestParams.start = 0;
     this._oRequestParams.start = 0;
     this._oRequestParams.timeline = sDate;
     this._oRequestParams.timeline = sDate;
-    this._getPosts(oLink);
+    this._getPosts(oLink, function(oData) {
+        if(bLink) {
+            if(bLoadingInButton)
+                $this.loadingInButton(oLink, false);
+            else
+                $this.loadingInBlock(oLink, false);
+        }
+
+        window.scrollTo(0, $this.oView.offset().top - 150);
+
+        processJsonData(oData);
+    });
 };
 };
 
 
 BxTimelineView.prototype.showCalendar = function(oLink)
 BxTimelineView.prototype.showCalendar = function(oLink)
@@ -820,6 +833,60 @@ BxTimelineView.prototype.blink = function(oParent)
 /*------------------------------------*/
 /*------------------------------------*/
 /*--- Internal (protected) methods ---*/
 /*--- Internal (protected) methods ---*/
 /*------------------------------------*/
 /*------------------------------------*/
+BxTimelineView.prototype._getPage = function(oElement, iStart, iPerPage, onLoad)
+{
+    var $this = this;
+
+    if(oElement)
+        this.loadingIn(oElement, true);
+
+    this._oRequestParams.start = iStart;
+    this._oRequestParams.per_page = iPerPage;
+    this._getPosts(oElement, function(oData) {
+        if(oElement)
+            $this.loadingIn(oElement, false);
+
+    	var sItems = $.trim(oData.items);
+
+        if($this.bViewTimeline)
+            $this.oView.find('.' + $this.sClassItems).append($(sItems).hide()).find('.' + $this.sClassItem + ':hidden').bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
+                $(this).bxProcessHtml().find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight($this.sSP + '-overflow', function(oElement) {
+                    $this.onFindOverflow(oElement);
+                });
+
+                $this.initFlickity();
+
+                //--- Init Video Autoplay
+                $this.initVideosAutoplay($this.oView);
+            });
+
+        if($this.bViewOutline)
+            $this.appendMasonry($(sItems).bxProcessHtml(), function(oItems) {
+                oItems.find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight($this.sSP + '-overflow', function(oElement) {
+                    $this.onFindOverflow(oElement);
+                });
+
+                $this.initFlickity();
+
+                //--- Init Video Layout
+                if($this._sVideosAutoplay != 'off') 
+                    $this.initVideos($this.oView);
+            });
+
+    	if(oData && oData.load_more != undefined)
+            $this.oView.find('.' + $this.sSP + '-load-more-holder').html($.trim(oData.load_more));
+
+    	if(oData && oData.back != undefined)
+            $this.oView.find('.' + $this.sSP + '-back-holder').html($.trim(oData.back));
+
+    	if(oData && oData.empty != undefined)
+            $this.oView.find('.' + $this.sSP + '-empty-holder').html($.trim(oData.empty));
+
+        if(typeof onLoad == 'function')
+            onLoad(oData);
+    });
+};
+
 BxTimelineView.prototype._getPosts = function(oElement, onComplete)
 BxTimelineView.prototype._getPosts = function(oElement, onComplete)
 {
 {
     var $this = this;
     var $this = this;
@@ -832,7 +899,8 @@ BxTimelineView.prototype._getPosts = function(oElement, onComplete)
             if(typeof onComplete === 'function')
             if(typeof onComplete === 'function')
                 return onComplete(oData);
                 return onComplete(oData);
 
 
-            $this.loadingInBlock(oElement, false);
+            if(oElement)
+                $this.loadingInBlock(oElement, false);
 
 
             processJsonData(oData);
             processJsonData(oData);
         },
         },

+ 24 - 6
modules/boonex/timeline/template/css/view.css

@@ -385,11 +385,6 @@ div.bx-tl-item-text div.bx-tl-content img {
 	height: auto;
 	height: auto;
 }
 }
 
 
-/*--- Item Reactions Style ---*/
-div.bx-tl-item-reactions .bx-vote-counter {
-    margin-top: 0.5rem;
-}
-
 /*--- Item Images Style ---*/
 /*--- Item Images Style ---*/
 div.bx-tl-item div.bx-tl-item-images {
 div.bx-tl-item div.bx-tl-item-images {
     position: relative;
     position: relative;
@@ -400,8 +395,9 @@ div.bx-tl-item div.bx-tl-item-image {
     display: inline-block;
     display: inline-block;
 }
 }
 
 
+/*--- Item Activity ---*/
 div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom {
 div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom {
-    position: realtive;
+    position: relative;
     display: -webkit-flex;
     display: -webkit-flex;
     display: flex;
     display: flex;
     -webkit-justify-content: space-between;
     -webkit-justify-content: space-between;
@@ -420,6 +416,28 @@ div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li > span img {
     background-position: center center;
     background-position: center center;
 }
 }
 
 
+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: 1.25rem;
+    height: 1.25rem;
+
+    background-color: rgba(0, 0, 0, 0.2);
+    border: 1px solid #ffffff;
+    border-radius: 1rem;
+
+    text-align: center;
+    line-height: 1.125rem;
+    font-size: 0.625rem;
+}
+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;
+    color: #334455;
+}
+
 /*--- Item Style: Timeline ---*/
 /*--- Item Style: Timeline ---*/
 div.bx-tl-view-timeline div.bx-tl-items:before {
 div.bx-tl-view-timeline div.bx-tl-items:before {
     content: '';
     content: '';

+ 4 - 3
modules/boonex/timeline/template/item_outline.html

@@ -52,13 +52,14 @@
                 </bx_if:show_owner_actions>
                 </bx_if:show_owner_actions>
             </div>
             </div>
             <div class="__style_prefix__-item-content bx-clearfix">__content__</div>
             <div class="__style_prefix__-item-content bx-clearfix">__content__</div>
-            <bx_if:show_reactions>
-                <div class="__style_prefix__-item-reactions bx-def-margin-leftright">__reactions__</div>
-            </bx_if:show_reactions>
             <bx_if:show_location>
             <bx_if:show_location>
                 <div class="__style_prefix__-item-location bx-def-margin-leftright bx-def-margin-sec-top bx-def-font-grayed bx-clearfix">__location__</div>
                 <div class="__style_prefix__-item-location bx-def-margin-leftright bx-def-margin-sec-top bx-def-font-grayed bx-clearfix">__location__</div>
             </bx_if:show_location>
             </bx_if:show_location>
+            <bx_if:show_menu_item_counters>
+                <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>
             <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 bx-def-margin-leftright bx-def-margin-sec-top bx-clearfix">__menu_item_actions__</div>
             </bx_if:show_menu_item_actions>
             </bx_if:show_menu_item_actions>
             <div class="__style_prefix__-item-comments-holder bx-def-margin-leftright">__comments__</div>
             <div class="__style_prefix__-item-comments-holder bx-def-margin-leftright">__comments__</div>

+ 4 - 3
modules/boonex/timeline/template/item_timeline.html

@@ -56,13 +56,14 @@
             </bx_if:show_owner_actions>
             </bx_if:show_owner_actions>
         </div>
         </div>
         <div class="__style_prefix__-item-content bx-clearfix">__content__</div>
         <div class="__style_prefix__-item-content bx-clearfix">__content__</div>
-        <bx_if:show_reactions>
-            <div class="__style_prefix__-item-reactions bx-def-margin-leftright">__reactions__</div>
-        </bx_if:show_reactions>
         <bx_if:show_location>
         <bx_if:show_location>
             <div class="__style_prefix__-item-location bx-def-margin-leftright bx-def-margin-sec-top bx-def-font-grayed bx-clearfix">__location__</div>
             <div class="__style_prefix__-item-location bx-def-margin-leftright bx-def-margin-sec-top bx-def-font-grayed bx-clearfix">__location__</div>
         </bx_if:show_location>
         </bx_if:show_location>
+        <bx_if:show_menu_item_counters>
+            <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>
         <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 bx-def-margin-leftright bx-def-margin-sec-top bx-clearfix">__menu_item_actions__</div>
         </bx_if:show_menu_item_actions>
         </bx_if:show_menu_item_actions>
         <div class="__style_prefix__-item-comments-holder bx-def-margin-leftright">__comments__</div>
         <div class="__style_prefix__-item-comments-holder bx-def-margin-leftright">__comments__</div>

+ 1 - 2
modules/boonex/timeline/template/jump_to.html

@@ -5,7 +5,6 @@
 </bx_if:show_list>
 </bx_if:show_list>
 <bx_if:show_calendar>
 <bx_if:show_calendar>
     <div class="__style_prefix__-jump-to-cnt">
     <div class="__style_prefix__-jump-to-cnt">
-        <bx_text:_bx_timeline_txt_or_jump_to />&nbsp;<a class="bx-btn" href="javascript:void(0)" onclick="__onclick__"><i class="sys-icon calendar-alt"></i></a>
-        <input class="__style_prefix__-jump-to-calendar" type="text" />
+        <bx_text:_bx_timeline_txt_or_jump_to />&nbsp;<input class="__style_prefix__-jump-to-calendar" type="text" /><a class="bx-btn" href="javascript:void(0)" onclick="__onclick__"><i class="sys-icon calendar-alt"></i></a>
     </div>
     </div>
 </bx_if:show_calendar>
 </bx_if:show_calendar>

+ 4 - 0
modules/boonex/timeline/template/menu_custom_item_hor.html

@@ -0,0 +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>
+    <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><img src="__src__" /></bx_if:show_image><bx_if:show_icon><i class="sys-icon __name__"></i></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<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>

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

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

+ 1 - 1
template/comment_counter.html

@@ -1 +1 @@
-<span id="__id__" class="__class__ bx-def-font-grayed">__content__</a>
+<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>

+ 81 - 12
template/css/cmts.css

@@ -350,44 +350,113 @@
         text-overflow: ellipsis;
         text-overflow: ellipsis;
         overflow: hidden;
         overflow: hidden;
     }
     }
-        
+
 /*--- Comment Element Styles ---*/
 /*--- Comment Element Styles ---*/
 div.cmt div.cmt-element-holder,
 div.cmt div.cmt-element-holder,
 div.cmt div.cmt-counter-holder {
 div.cmt div.cmt-counter-holder {
-	position: relative;
-	float: left;
+    position: relative;
+    float: left;
+}
+span.cmt span.cmt-element-holder,
+span.cmt span.cmt-counter-holder {
+    position: relative;
+    display: inline-block;
+    vertical-align: middle;
 }
 }
 
 
 .cmt .cmt-element-holder,
 .cmt .cmt-element-holder,
 .cmt .cmt-counter-holder {
 .cmt .cmt-counter-holder {
-	line-height: 20px;
-	line-height: 1.25rem;
+    line-height: 20px;
+    line-height: 1.25rem;
 }
 }
 
 
 .cmt-button .cmt-element-holder,
 .cmt-button .cmt-element-holder,
 .cmt-button .cmt-counter-holder {
 .cmt-button .cmt-counter-holder {
-	line-height: 36px;
-	line-height: 2.2rem;
+    line-height: 36px;
+    line-height: 2.2rem;
 }
 }
 
 
 .cmt-button-small .cmt-element-holder,
 .cmt-button-small .cmt-element-holder,
 .cmt-button-small .cmt-counter-holder {
 .cmt-button-small .cmt-counter-holder {
-	line-height: 24px;
-	line-height: 1.6rem;
+    line-height: 24px;
+    line-height: 1.6rem;
 }
 }
 
 
 .cmt .cmt-element-holder .cmt-do-comment.cmt-disabled,
 .cmt .cmt-element-holder .cmt-do-comment.cmt-disabled,
 .cmt .cmt-element-holder .cmt-do-comment.cmt-disabled .sys-icon {
 .cmt .cmt-element-holder .cmt-do-comment.cmt-disabled .sys-icon {
-	color: #ddd;
+    color: #ddd;
 }
 }
 
 
 .cmt-button .cmt-counter-holder,
 .cmt-button .cmt-counter-holder,
 .cmt-button-small .cmt-counter-holder {
 .cmt-button-small .cmt-counter-holder {
-	font-size: 1.5rem;
+    font-size: 1.5rem;
 }
 }
 
 
 .cmt-link .cmt-counter-holder.bx-btn-border {
 .cmt-link .cmt-counter-holder.bx-btn-border {
-	border-width: 0px;
+    border-width: 0px;
+}
+
+/* +++ Comment Element: Counter +++ */
+.cmt-counter {
+    position: relative;
+    display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    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 -4px;
+}
+.cmt-counter div.cmt-counter-icon {
+    margin-right: 0.5rem;
+    box-sizing: border-box;
+
+    background-color: rgba(215, 215, 215, 1.0);
+    border: 1px solid #ffffff;
+    border-radius: 1rem;
+
+    text-align: center;
+}
+.cmt-counter div.cmt-counter-icon .sys-icon {
+    vertical-align: top;
+    color: #334455;
+}
+.cmt-counter .bx-def-icon-size {
+    width: 1.25rem;
+    height: 1.25rem;
+}
+.cmt-counter .bx-def-icon-size,
+.cmt-counter p.bx-base-pofile-unit-thumb.bx-def-icon-size {
+    line-height: 1.125rem;
+    font-size: 0.625rem;
+}
+.cmt-counter .bx-def-icon-size-min-height {
+    min-height: 1.0rem;
+}
+
+.cmt-counter .bx-def-icon-size-max-height {
+    max-height: 1.0rem;
+}
+
+.cmt-counter .bx-def-icon-size-left-indent {
+    margin-left: 1.25rem;
+}
+
+.cmt-counter .bx-def-unit-img .bx-base-pofile-unit-thumb {
+    display: block;
+    border-width: 1px;
+}
+
+.cmt-counter .bx-base-pofile-unit-online {
+    display: none;
 }
 }
 
 
 
 

+ 7 - 16
template/css/menu.css

@@ -17,7 +17,7 @@ ul.bx-menu-hor {
 }
 }
 
 
 .bx-menu-hor-inline li a {
 .bx-menu-hor-inline li a {
-	display:inline;
+    display:inline;
 }
 }
 
 
 .bx-menu-hor li.bx-menu-tab-active a {
 .bx-menu-hor li.bx-menu-tab-active a {
@@ -26,7 +26,7 @@ ul.bx-menu-hor {
 
 
 .bx-menu-hor li img,
 .bx-menu-hor li img,
 .bx-menu-hor li .sys-icon {
 .bx-menu-hor li .sys-icon {
-	display:inline-block;
+    display:inline-block;
     vertical-align:middle;
     vertical-align:middle;
 }
 }
 .bx-menu-hor li img {
 .bx-menu-hor li img {
@@ -36,6 +36,9 @@ ul.bx-menu-hor {
     background-position: center center;
     background-position: center center;
     background-repeat: no-repeat;
     background-repeat: no-repeat;
 }
 }
+.bx-menu-hor li a > span {
+    vertical-align:middle;
+}
 
 
 /* --------------- horizontal inline menu with 'special' buttons */
 /* --------------- horizontal inline menu with 'special' buttons */
 .bx-menu-hor-inline-sbtn li a {
 .bx-menu-hor-inline-sbtn li a {
@@ -767,22 +770,10 @@ ul.bx-menu-btns-icon-hor li:last-child .bx-btn {
 .bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-submenu-more-auto .bx-menu-item .bx-btn {
 .bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-submenu-more-auto .bx-menu-item .bx-btn {
     color: #3e8685;
     color: #3e8685;
 }
 }
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-view-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-vote-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-score-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-favorite-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-feature-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-report-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-tl-repost-element-holder a span {
+.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-item.bx-base-general-ea-sa .sys-action-element-holder a span:not(.sys-action-do-icon) {
     display: none;
     display: none;
 }
 }
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-submenu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-view-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-submenu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-vote-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-submenu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-score-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-submenu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-favorite-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-submenu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-feature-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-submenu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-report-element-holder a span,
-.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-submenu-more-auto .bx-menu-item.bx-base-general-ea-sa .bx-tl-repost-element-holder a span {
+.bx-menu-custom.bx-menu-hor.bx-menu-more-auto .bx-menu-submenu-more-auto .bx-menu-item.bx-base-general-ea-sa .sys-action-element-holder a span:not(.sys-action-do-icon) {
     display: inline;
     display: inline;
 }
 }
 
 

+ 27 - 0
template/css/score.css

@@ -71,3 +71,30 @@ div.bx-score-counter-holder {
 .bx-score-button-small .bx-score-counter-holder {
 .bx-score-button-small .bx-score-counter-holder {
 	font-size: 1.5rem;
 	font-size: 1.5rem;
 }
 }
+
+/*--- Counter Styles ---*/
+.bx-score-counter > span {
+    vertical-align: middle;
+}
+.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;
+
+    background-color: rgba(215, 215, 215, 1.0);
+    border: 1px solid #ffffff;
+    border-radius: 1rem;
+
+    line-height: 1.125rem;
+    text-align: center;
+    font-size: 0.625rem;
+}
+.bx-score-counter span.bx-score-counter-icon .sys-icon {
+    vertical-align: top;
+    color: #334455;
+}

+ 24 - 0
template/css/view.css

@@ -62,4 +62,28 @@ div.bx-view-counter-holder {
 .bx-view-button .bx-view-counter-holder,
 .bx-view-button .bx-view-counter-holder,
 .bx-view-button-small .bx-view-counter-holder {
 .bx-view-button-small .bx-view-counter-holder {
 	font-size: 1.5rem;
 	font-size: 1.5rem;
+}
+
+/*--- Counter Styles ---*/
+.bx-view-counter span.bx-view-counter-icon {
+    position: relative;
+    display: inline-block;
+    box-sizing: border-box;
+
+    width: 1.25rem;
+    height: 1.25rem;
+    margin-top: 4px;
+    margin-bottom: 4px;
+
+    background-color: rgba(215, 215, 215, 1.0);
+    border: 1px solid #ffffff;
+    border-radius: 1rem;
+
+    line-height: 1.125rem;
+    text-align: center;
+    font-size: 0.625rem;
+}
+.bx-view-counter span.bx-view-counter-icon .sys-icon {
+    vertical-align: top;
+    color: #334455;
 }
 }

+ 195 - 12
template/css/vote.css

@@ -1,16 +1,16 @@
-/*--- Comment Plused By ---*/
+/*--- Voted By ---*/
 div.bx-vote-by-list {}
 div.bx-vote-by-list {}
 div.bx-vote-by-list-cnt {
 div.bx-vote-by-list-cnt {
-	max-height: 200px;
-	max-height: 12.5rem;
-	min-width: 220px;
-	min-width: 13.75rem;
-	overflow: auto;
+    max-height: 200px;
+    max-height: 12.5rem;
+    min-width: 220px;
+    min-width: 13.75rem;
+    overflow: auto;
 }
 }
 div.bx-vote-by-list div.bx-base-pofile-unit {
 div.bx-vote-by-list div.bx-base-pofile-unit {
-	float: none;
-	margin-right: 0px;
-	margin-bottom: 0px;
+    float: none;
+    margin-right: 0px;
+    margin-bottom: 0px;
 }
 }
 
 
 /*--- Vote Element Styles ---*/
 /*--- Vote Element Styles ---*/
@@ -20,7 +20,10 @@ div.bx-vote div.bx-vote-counter-holder {
 	float: left;
 	float: left;
 }
 }
 
 
+
+/*----------------------------------*/
 /*--- Likes based Element Styles ---*/
 /*--- Likes based Element Styles ---*/
+/*----------------------------------*/
 .bx-vote-likes .bx-vote-element-holder,
 .bx-vote-likes .bx-vote-element-holder,
 .bx-vote-likes .bx-vote-counter-holder {
 .bx-vote-likes .bx-vote-counter-holder {
 	line-height: 20px;
 	line-height: 20px;
@@ -53,7 +56,10 @@ div.bx-vote div.bx-vote-counter-holder {
     border-width: 0px;
     border-width: 0px;
 }
 }
 
 
+
+/*--------------------------------------*/
 /*--- Reactions based Element Styles ---*/
 /*--- Reactions based Element Styles ---*/
+/*--------------------------------------*/
 .bx-vote-reactions .bx-vote-element-holder,
 .bx-vote-reactions .bx-vote-element-holder,
 .bx-vote-reactions .bx-vote-counter-holder {
 .bx-vote-reactions .bx-vote-counter-holder {
 	line-height: 20px;
 	line-height: 20px;
@@ -89,15 +95,192 @@ div.bx-vote div.bx-vote-counter-holder {
 .bx-vote-counter-wrapper-reactions .bx-vote-counter {
 .bx-vote-counter-wrapper-reactions .bx-vote-counter {
     display: inline-block;
     display: inline-block;
 }
 }
+.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;
+}
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound .bx-vote-counter {
+    display: block;
+}
+.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 {
+    margin-left: 0.5rem;
+}
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter {
+    width: 1.0rem;
+    height: 1.0rem;
+    box-sizing: border-box;
+
+    margin: 4px 0 4px -4px;
+}
+.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) {
+    display: none;
+}
 .bx-vote-counter-wrapper-reactions .bx-vote-counter.bx-vc-hidden {
 .bx-vote-counter-wrapper-reactions .bx-vote-counter.bx-vc-hidden {
     display: none;
     display: none;
 }
 }
-.bx-vote-counter-wrapper-reactions .bx-vote-counter i,
-.bx-vote-counter-wrapper-reactions .bx-vote-counter span {
-    vertical-align: middle;
+
+
+/*--- Counter Styles ---*/
+.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: 1.25rem;
+    height: 1.25rem;
+
+    background-color: rgba(215, 215, 215, 1.0);
+    border: 1px solid #ffffff;
+    border-radius: 1rem;
+
+    line-height: 1.125rem;
+    text-align: center;
+    font-size: 0.625rem;
+}
+.bx-vote-counter.bx-vote-counter-likes span.bx-vote-counter-icon {
+    margin-top: 4px;
+    margin-bottom: 4px;
+}
+.bx-vote-counter span.bx-vote-counter-icon .sys-icon {
+    vertical-align: top;
+}
+.bx-vote-counter.bx-vote-counter-likes span.bx-vote-counter-icon .sys-icon {
+    color: #334455;
+}
+
+
+/*--- Voted By ---*/
+div.bx-vote-by-list {}
+div.bx-vote-by-list-cnt {
+    max-height: 200px;
+    max-height: 12.5rem;
+    min-width: 220px;
+    min-width: 13.75rem;
+    overflow: auto;
+}
+div.bx-vote-by-list div.bx-base-pofile-unit {
+    float: none;
+    margin-right: 0px;
+    margin-bottom: 0px;
 }
 }
+.bx-vote-bls-header {
+    display: -webkit-flex;
+    display: flex;
+
+    margin: -1.25rem -1.25rem 0 -1.25rem;
+    
+    border-bottom-color: #e6f0fa;
+    border-bottom-width: 2px;
+}
+.bx-vote-bls-title,
+.bx-vote-bls-submenu {
+    -webkit-flex: 0 1 auto; 
+    -ms-flex:  0 1 auto; 
+    flex:  0 1 auto;
+    line-height: 3.125rem;
+}
+.bx-vote-bls-title,
+.bx-vote-bls-submenu-cnt {
+	height: 3.125rem;
+}
+
+.bx-vote-bls-title {
+    -webkit-flex-grow: 3;
+    flex-grow: 3;
+
+    border-bottom: 2px solid rgba(0,0,0,0.1);
+
+    white-space: nowrap;
+    font-size: 1rem;
+    font-weight: 400;
+}
+.bx-vote-bls-submenu {
+    overflow-x: auto;
+    overflow-y: hidden;
+
+    -webkit-overflow-scrolling: touch;
+}
+.bx-vote-bls-submenu::-webkit-scrollbar {
+    width: 0.5rem;
+}
+.bx-vote-bls-submenu::-webkit-scrollbar-track {
+    -webkit-border-radius: 0.5rem;
+    border-radius: 0.5rem;
+
+    background-color: rgba(0, 0, 0, 0.1); 
+}
+.bx-vote-bls-submenu::-webkit-scrollbar-thumb {
+    -webkit-border-radius: 0.5rem;
+    border-radius: 0.5rem;
+
+    background: rgba(255, 255, 255, 0.9); 
+    -webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5);
+}
+.bx-vote-bls-submenu::-webkit-scrollbar-thumb:window-inactive {
+    background: rgba(255, 255, 255, 0.4); 
+}
+.bx-vote-bls-submenu-cnt ul {
+    display: -webkit-flex;
+    display: flex;
+}
+.bx-vote-bls-submenu-cnt ul li {
+    -webkit-flex: 0 1 auto; 
+    -ms-flex:  0 1 auto; 
+    flex:  0 1 auto;
+    box-sizing: border-box;
+    height: 3.125rem;
+
+    border-bottom: 2px solid rgba(0,0,0,0.1);
+    border-radius: 0;
+
+    line-height: 3.125rem;
+    white-space: nowrap;
+}
+.bx-vote-bls-submenu-cnt ul li div {
+    padding: 0 0.625rem;
+}
+.bx-vote-bls-submenu-cnt ul li.bx-menu-inter-act {
+    border-bottom-color: #364f6b;
+}
+.bx-vote-bls-submenu-cnt ul li.bx-menu-inter-act > div {
+    font-weight: bold;
+}
+.bx-vote-bls-content .bx-vote-by-list:not(.bx-vote-bl-summary) {
+    display: none;
+}
+.bx-vote-bls-content .bx-vote-by-item {
+    position: relative;
+    display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    align-items: center;
+}
+.bx-vote-bls-content .bx-vote-by-item:first-child {
+    padding-top: 1rem;
+}
+.bx-vote-bls-content .bx-vote-by-item:last-child {
+    padding-bottom: 0;
+}
+
 
 
+/*----------------------------------*/
 /*--- Stars based Element Styles ---*/
 /*--- Stars based Element Styles ---*/
+/*----------------------------------*/
 .bx-vote-stars,
 .bx-vote-stars,
 .bx-vote-stars .bx-vote-do,
 .bx-vote-stars .bx-vote-do,
 .bx-vote-stars .bx-vote-element-holder,
 .bx-vote-stars .bx-vote-element-holder,

+ 1 - 1
template/favorite_do_favorite_label.html

@@ -1 +1 @@
-<bx_if:show_icon><i class="sys-icon __name__"></i></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<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>

+ 3 - 3
template/favorite_element_block.html

@@ -1,7 +1,7 @@
-<div id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-clearfix" bx_favorite_data_count="__count__">
-    <div class="__style_prefix__-element-holder">__do_favorite__</div>
+<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 class="sys-action-element-holder __style_prefix__-element-holder">__do_favorite__</div>
     <bx_if:show_counter>
     <bx_if:show_counter>
-        <div class="__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>
+        <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>
     </bx_if:show_counter>
     </bx_if:show_counter>
     __script__
     __script__
 </div>
 </div>

+ 2 - 2
template/favorite_element_inline.html

@@ -1,3 +1,3 @@
-<span id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_favorite_data_count="__count__">
-    <span class="__style_prefix__-element-holder">__do_favorite__</span><bx_if:show_counter><span class="__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 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 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>
 </span>

+ 1 - 1
template/feature_do_feature_label.html

@@ -1 +1 @@
-<bx_if:show_icon><i class="sys-icon __name__"></i></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<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>

+ 2 - 2
template/feature_element_block.html

@@ -1,4 +1,4 @@
-<div id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-clearfix" bx_feature_data_count="__count__">
-    <div class="__style_prefix__-element-holder">__do_feature__</div>
+<div id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-clearfix" bx_feature_data_count="__count__">
+    <div class="sys-action-element-holder __style_prefix__-element-holder">__do_feature__</div>
     __script__
     __script__
 </div>
 </div>

+ 2 - 2
template/feature_element_inline.html

@@ -1,3 +1,3 @@
-<span id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_feature_data_count="__count__">
-    <span class="__style_prefix__-element-holder">__do_feature__</span>__script__
+<span id="__html_id__" class="sys-action __style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_feature_data_count="__count__">
+    <span class="sys-action-element-holder __style_prefix__-element-holder">__do_feature__</span>__script__
 </span>
 </span>

+ 1 - 1
template/report_do_report_label.html

@@ -1 +1 @@
-<bx_if:show_icon><i class="sys-icon __name__"></i></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<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>

+ 6 - 6
template/report_element_block.html

@@ -1,7 +1,7 @@
-<div id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-clearfix" bx_report_data_count="__count__">
-	<div class="__style_prefix__-element-holder">__do_report__</div>
-	<bx_if:show_counter>
-		<div class="__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>
-	</bx_if:show_counter>
-	__script__
+<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 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>
+    </bx_if:show_counter>
+    __script__
 </div>
 </div>

+ 2 - 2
template/report_element_inline.html

@@ -1,3 +1,3 @@
-<span id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_report_data_count="__count__">
-    <span class="__style_prefix__-element-holder">__do_report__</span><bx_if:show_counter><span class="__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 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 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>
 </span>

+ 2 - 6
template/score_counter.html

@@ -1,6 +1,2 @@
-<bx_if:show_link>
-    <a id="__id__" class="__class__" href="javascript:void(0)" onclick="__onclick__" title="__title__">__content__</a>
-</bx_if:show_link>
-<bx_if:show_text>
-    <span id="__id__" class="__class__ bx-def-font-grayed">__content__</a>
-</bx_if:show_text>
+<bx_if:show_link><a id="__id__" class="__class__" href="javascript:void(0)" onclick="__onclick__" title="__title__">__content__</a></bx_if:show_link><bx_if:show_text><span id="__id__" class="__class__ bx-def-font-grayed">__content__</a></bx_if:show_text>
+__script__

+ 1 - 0
template/score_counter_label.html

@@ -0,0 +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>

+ 1 - 1
template/score_do_vote_label.html

@@ -1 +1 @@
-<bx_if:show_image><img src="__src__" /></bx_if:show_image><bx_if:show_icon><i class="sys-icon __name__"></i></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<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>

+ 10 - 10
template/score_element_block.html

@@ -1,13 +1,13 @@
-<div id="__html_id__" class="__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="__style_prefix__-do bx-clearfix">
-		<bx_if:show_do_vote_up>
-			<div class="__style_prefix__-element-holder __style_prefix__-eh-up">__do_vote__</div>
-		</bx_if:show_do_vote_up>
-		<bx_if:show_counter>
-			<div class="__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="__style_prefix__-element-holder __style_prefix__-eh-down bx-def-margin-sec-left-auto">__do_vote__</div>
+<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">
+        <bx_if:show_do_vote_up>
+                <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>
+        </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>
         </bx_if:show_do_vote_down>
 	</div>
 	</div>
 	<bx_if:show_legend>__legend__</bx_if:show_legend>
 	<bx_if:show_legend>__legend__</bx_if:show_legend>

+ 2 - 2
template/score_element_inline.html

@@ -1,3 +1,3 @@
-<span id="__html_id__" class="__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="__style_prefix__-do"><bx_if:show_do_vote_up><span class="__style_prefix__-element-holder __style_prefix__-eh-up">__do_vote__</span></bx_if:show_do_vote_up><bx_if:show_counter><span class="__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="__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 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>
 </span>

+ 27 - 2
template/scripts/BxBaseCmts.php

@@ -592,10 +592,35 @@ class BxBaseCmts extends BxDolCmts
         if($bShowDoCommentAsButton)
         if($bShowDoCommentAsButton)
             $sClass .= ' bx-btn-height';
             $sClass .= ' bx-btn-height';
 
 
+        $aCmts = $this->_oQuery->getCommentsBy(array('type' => 'object_id', 'object_id' => $this->getId(), 'order_way' => 'desc', 'start' => 0, 'per_page' => 5));
+        $aCmts = array_reverse($aCmts);
+
+        $aTmplVarsProfiles = array();
+        foreach($aCmts as $aCmt) {
+            $oAuthor = BxDolProfile::getInstanceMagic((int)$aCmt['cmt_author_id']);
+            if(!$oAuthor)
+                continue;
+            
+            $aTmplVarsProfiles[] = array(
+                'icon' => $oAuthor->getUnit(0, array('template' => array('name' => 'unit_wo_info_links', 'size' => 'icon'))) 
+            );
+        }
+
+        $sContent = $iCount != 0 || $bShowEmpty ? $this->_getCounterLabel($iCount) : '';
+        if(!empty($sContent))
+            $sContent = $this->_oTemplate->parseLink($this->getListUrl(), $sContent);
+
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplCounter(), array(
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplCounter(), array(
             'id' => $this->_aHtmlIds['counter'],
             'id' => $this->_aHtmlIds['counter'],
             'class' => $sClass,
             'class' => $sClass,
-            'content' => $iCount != 0 || $bShowEmpty ? $this->_getLabelCounter($iCount) : ''
+            'content' => $sContent,
+            'bx_repeat:profiles' => $aTmplVarsProfiles,
+            'bx_if:show_icon' => array(
+                'condition' => $bShowEmpty || !empty($aTmplVarsProfiles),
+                'content' => array(
+                    'sp' => $this->_sStylePrefix
+                )
+            )
         ));
         ));
     }
     }
 
 
@@ -623,7 +648,7 @@ class BxBaseCmts extends BxDolCmts
         ));
         ));
     }
     }
 
 
-    protected function _getLabelCounter($iCount)
+    protected function _getCounterLabel($iCount)
     {
     {
         return (int)$iCount != 0 ? _t('_cmt_txt_counter', $iCount) : _t('_cmt_txt_counter_empty');
         return (int)$iCount != 0 ? _t('_cmt_txt_counter', $iCount) : _t('_cmt_txt_counter_empty');
     }
     }

+ 14 - 23
template/scripts/BxBaseFavorite.php

@@ -12,13 +12,9 @@
  */
  */
 class BxBaseFavorite extends BxDolFavorite
 class BxBaseFavorite extends BxDolFavorite
 {
 {
-    protected static $_sTmplContentElementBlock;
-    protected static $_sTmplContentElementInline;
-    protected static $_sTmplContentDoFavoriteLabel;
-
     protected $_bCssJsAdded;
     protected $_bCssJsAdded;
 
 
-	protected $_sJsObjClass;
+    protected $_sJsObjClass;
     protected $_sJsObjName;
     protected $_sJsObjName;
     protected $_sStylePrefix;
     protected $_sStylePrefix;
 
 
@@ -40,26 +36,21 @@ class BxBaseFavorite extends BxDolFavorite
         $this->_aHtmlIds = array(
         $this->_aHtmlIds = array(
             'main' => 'bx-favorite-' . $sHtmlId,
             'main' => 'bx-favorite-' . $sHtmlId,
             'counter' => 'bx-favorite-counter-' . $sHtmlId,
             'counter' => 'bx-favorite-counter-' . $sHtmlId,
-        	'do_link' => 'bx-favorite-do-link-' . $sHtmlId,
+            'do_link' => 'bx-favorite-do-link-' . $sHtmlId,
             'by_popup' => 'bx-favorite-by-popup-' . $sHtmlId
             'by_popup' => 'bx-favorite-by-popup-' . $sHtmlId
         );
         );
 
 
         $this->_aElementDefaults = array(
         $this->_aElementDefaults = array(
-			'show_do_favorite_as_button' => false,
-			'show_do_favorite_as_button_small' => false,
-			'show_do_favorite_icon' => true,
-			'show_do_favorite_label' => false,
-			'show_counter' => true
+            'show_do_favorite_as_button' => false,
+            'show_do_favorite_as_button_small' => false,
+            'show_do_favorite_icon' => true,
+            'show_do_favorite_label' => false,
+            'show_counter' => true
         );
         );
 
 
-        if(empty(self::$_sTmplContentElementBlock))
-            self::$_sTmplContentElementBlock = $this->_oTemplate->getHtml('favorite_element_block.html');
-
-        if(empty(self::$_sTmplContentElementInline))
-            self::$_sTmplContentElementInline = $this->_oTemplate->getHtml('favorite_element_inline.html');
-
-        if(empty(self::$_sTmplContentDoFavoriteLabel))
-            self::$_sTmplContentDoFavoriteLabel = $this->_oTemplate->getHtml('favorite_do_favorite_label.html');
+        $this->_sTmplContentElementBlock = $this->_oTemplate->getHtml('favorite_element_block.html');
+        $this->_sTmplContentElementInline = $this->_oTemplate->getHtml('favorite_element_inline.html');
+        $this->_sTmplContentDoActionLabel = $this->_oTemplate->getHtml('favorite_do_favorite_label.html');
     }
     }
 
 
     public function getJsObjectName()
     public function getJsObjectName()
@@ -100,7 +91,7 @@ class BxBaseFavorite extends BxDolFavorite
         if($bShowDoFavoriteAsButton)
         if($bShowDoFavoriteAsButton)
             $sClass .= ' bx-btn-height';
             $sClass .= ' bx-btn-height';
 
 
-        return $this->_oTemplate->parseLink('javascript:void(0)', (int)$aFavorite['count'] > 0 ? $this->_getLabelCounter($aFavorite['count']) : '', array(
+        return $this->_oTemplate->parseLink('javascript:void(0)', (int)$aFavorite['count'] > 0 ? $this->_getCounterLabel($aFavorite['count']) : '', array(
             'title' => _t('_favorite_do_favorite_by'),
             'title' => _t('_favorite_do_favorite_by'),
         	'id' => $this->_aHtmlIds['counter'],
         	'id' => $this->_aHtmlIds['counter'],
         	'class' => $sClass,
         	'class' => $sClass,
@@ -142,7 +133,7 @@ class BxBaseFavorite extends BxDolFavorite
 
 
         $aParams['is_favorited'] = $this->isPerformed($iObjectId, $iAuthorId) ? true : false;
         $aParams['is_favorited'] = $this->isPerformed($iObjectId, $iAuthorId) ? true : false;
 
 
-        $sTmplName = self::${'_sTmplContentElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_DOL_FAVORITE_USAGE_DEFAULT)};
+        $sTmplName = $this->{'_getTmplContentElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_DOL_FAVORITE_USAGE_DEFAULT)}();
         return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
         return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
             'style_prefix' => $this->_sStylePrefix,
             'style_prefix' => $this->_sStylePrefix,
             'html_id' => $this->_aHtmlIds['main'],
             'html_id' => $this->_aHtmlIds['main'],
@@ -188,7 +179,7 @@ class BxBaseFavorite extends BxDolFavorite
         ));
         ));
     }
     }
 
 
-    protected function _getLabelCounter($iCount)
+    protected function _getCounterLabel($iCount)
     {
     {
         return _t('_favorite_counter', $iCount);
         return _t('_favorite_counter', $iCount);
     }
     }
@@ -196,7 +187,7 @@ class BxBaseFavorite extends BxDolFavorite
     protected function _getLabelDoFavorite($aParams = array())
     protected function _getLabelDoFavorite($aParams = array())
     {
     {
     	$bFavorited = isset($aParams['is_favorited']) && $aParams['is_favorited'] === true;
     	$bFavorited = isset($aParams['is_favorited']) && $aParams['is_favorited'] === true;
-        return $this->_oTemplate->parseHtmlByContent(self::$_sTmplContentDoFavoriteLabel, array(
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
         	'bx_if:show_icon' => array(
         	'bx_if:show_icon' => array(
         		'condition' => isset($aParams['show_do_favorite_icon']) && $aParams['show_do_favorite_icon'] == true,
         		'condition' => isset($aParams['show_do_favorite_icon']) && $aParams['show_do_favorite_icon'] == true,
         		'content' => array(
         		'content' => array(

+ 11 - 20
template/scripts/BxBaseFeature.php

@@ -12,13 +12,9 @@
  */
  */
 class BxBaseFeature extends BxDolFeature
 class BxBaseFeature extends BxDolFeature
 {
 {
-    protected static $_sTmplContentElementBlock;
-    protected static $_sTmplContentElementInline;
-    protected static $_sTmplContentDoFeatureLabel;
-
     protected $_bCssJsAdded;
     protected $_bCssJsAdded;
 
 
-	protected $_sJsObjClass;
+    protected $_sJsObjClass;
     protected $_sJsObjName;
     protected $_sJsObjName;
     protected $_sStylePrefix;
     protected $_sStylePrefix;
 
 
@@ -39,24 +35,19 @@ class BxBaseFeature extends BxDolFeature
         $sHtmlId = str_replace(array('_' , ' '), array('-', '-'), $sSystem) . '-' . $iId;
         $sHtmlId = str_replace(array('_' , ' '), array('-', '-'), $sSystem) . '-' . $iId;
         $this->_aHtmlIds = array(
         $this->_aHtmlIds = array(
             'main' => 'bx-feature-' . $sHtmlId,
             'main' => 'bx-feature-' . $sHtmlId,
-        	'do_link' => 'bx-feature-do-link-' . $sHtmlId
+            'do_link' => 'bx-feature-do-link-' . $sHtmlId
         );
         );
 
 
         $this->_aElementDefaults = array(
         $this->_aElementDefaults = array(
-			'show_do_feature_as_button' => false,
-			'show_do_feature_as_button_small' => false,
-			'show_do_feature_icon' => true,
-			'show_do_feature_label' => false
+            'show_do_feature_as_button' => false,
+            'show_do_feature_as_button_small' => false,
+            'show_do_feature_icon' => true,
+            'show_do_feature_label' => false
         );
         );
 
 
-        if(empty(self::$_sTmplContentElementBlock))
-            self::$_sTmplContentElementBlock = $this->_oTemplate->getHtml('feature_element_block.html');
-
-        if(empty(self::$_sTmplContentElementInline))
-            self::$_sTmplContentElementInline = $this->_oTemplate->getHtml('feature_element_inline.html');
-
-        if(empty(self::$_sTmplContentDoFeatureLabel))
-            self::$_sTmplContentDoFeatureLabel = $this->_oTemplate->getHtml('feature_do_feature_label.html');
+        $this->_sTmplContentElementBlock = $this->_oTemplate->getHtml('feature_element_block.html');
+        $this->_sTmplContentElementInline = $this->_oTemplate->getHtml('feature_element_inline.html');
+        $this->_sTmplContentDoActionLabel = $this->_oTemplate->getHtml('feature_do_feature_label.html');
     }
     }
 
 
     public function getJsObjectName()
     public function getJsObjectName()
@@ -118,7 +109,7 @@ class BxBaseFeature extends BxDolFeature
 
 
         $aParams['is_featured'] = $this->isPerformed($iObjectId, $iAuthorId) ? true : false;
         $aParams['is_featured'] = $this->isPerformed($iObjectId, $iAuthorId) ? true : false;
 
 
-        $sTmplName = self::${'_sTmplContentElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_DOL_FEATURED_USAGE_DEFAULT)};
+        $sTmplName = $this->{'_getTmplContentElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_DOL_FEATURED_USAGE_DEFAULT)}();
         return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
         return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
             'style_prefix' => $this->_sStylePrefix,
             'style_prefix' => $this->_sStylePrefix,
             'html_id' => $this->_aHtmlIds['main'],
             'html_id' => $this->_aHtmlIds['main'],
@@ -156,7 +147,7 @@ class BxBaseFeature extends BxDolFeature
     protected function _getLabelDoFeature($aParams = array())
     protected function _getLabelDoFeature($aParams = array())
     {
     {
     	$bFeatured = isset($aParams['is_featured']) && $aParams['is_featured'] === true;
     	$bFeatured = isset($aParams['is_featured']) && $aParams['is_featured'] === true;
-        return $this->_oTemplate->parseHtmlByContent(self::$_sTmplContentDoFeatureLabel, array(
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
         	'bx_if:show_icon' => array(
         	'bx_if:show_icon' => array(
         		'condition' => isset($aParams['show_do_feature_icon']) && $aParams['show_do_feature_icon'] == true,
         		'condition' => isset($aParams['show_do_feature_icon']) && $aParams['show_do_feature_icon'] == true,
         		'content' => array(
         		'content' => array(

+ 53 - 63
template/scripts/BxBaseReport.php

@@ -12,14 +12,9 @@
  */
  */
 class BxBaseReport extends BxDolReport
 class BxBaseReport extends BxDolReport
 {
 {
-    protected static $_sTmplContentElementBlock;
-    protected static $_sTmplContentElementInline;
-    protected static $_sTmplContentDoReport;
-    protected static $_sTmplContentDoReportLabel;
+    protected $_bCssJsAdded;
 
 
-	protected $_bCssJsAdded;
-
-	protected $_sJsObjClass;
+    protected $_sJsObjClass;
     protected $_sJsObjName;
     protected $_sJsObjName;
     protected $_sStylePrefix;
     protected $_sStylePrefix;
 
 
@@ -41,31 +36,24 @@ class BxBaseReport extends BxDolReport
         $this->_aHtmlIds = array(
         $this->_aHtmlIds = array(
             'main' => 'bx-report-' . $sHtmlId,
             'main' => 'bx-report-' . $sHtmlId,
             'counter' => 'bx-report-counter-' . $sHtmlId,
             'counter' => 'bx-report-counter-' . $sHtmlId,
-        	'do_link' => 'bx-report-do-link-' . $sHtmlId,
-        	'do_popup' => 'bx-report-do-popup-' . $sHtmlId,
-        	'do_form' => 'bx-report-do-form-' . $sHtmlId,
+            'do_link' => 'bx-report-do-link-' . $sHtmlId,
+            'do_popup' => 'bx-report-do-popup-' . $sHtmlId,
+            'do_form' => 'bx-report-do-form-' . $sHtmlId,
             'by_popup' => 'bx-report-by-popup-' . $sHtmlId
             'by_popup' => 'bx-report-by-popup-' . $sHtmlId
         );
         );
 
 
         $this->_aElementDefaults = array(
         $this->_aElementDefaults = array(
-			'show_do_report_as_button' => false,
-			'show_do_report_as_button_small' => false,
-			'show_do_report_icon' => true,
-			'show_do_report_label' => false,
-			'show_counter' => true
+            'show_do_report_as_button' => false,
+            'show_do_report_as_button_small' => false,
+            'show_do_report_icon' => true,
+            'show_do_report_label' => false,
+            'show_counter' => true
         );
         );
 
 
-        if(empty(self::$_sTmplContentElementBlock))
-            self::$_sTmplContentElementBlock = $this->_oTemplate->getHtml('report_element_block.html');
-
-        if(empty(self::$_sTmplContentElementInline))
-            self::$_sTmplContentElementInline = $this->_oTemplate->getHtml('report_element_inline.html');
-
-        if(empty(self::$_sTmplContentDoReport))
-            self::$_sTmplContentDoReport = $this->_oTemplate->getHtml('report_do_report.html');
-
-        if(empty(self::$_sTmplContentDoReportLabel))
-            self::$_sTmplContentDoReportLabel = $this->_oTemplate->getHtml('report_do_report_label.html');
+        $this->_sTmplContentElementBlock = $this->_oTemplate->getHtml('report_element_block.html');
+        $this->_sTmplContentElementInline = $this->_oTemplate->getHtml('report_element_inline.html');
+        $this->_sTmplContentDoAction = $this->_oTemplate->getHtml('report_do_report.html');
+        $this->_sTmplContentDoActionLabel = $this->_oTemplate->getHtml('report_do_report_label.html');
     }
     }
 
 
     public function getJsObjectName()
     public function getJsObjectName()
@@ -108,7 +96,7 @@ class BxBaseReport extends BxDolReport
         if($bShowDoReportAsButton)
         if($bShowDoReportAsButton)
             $sClass .= ' bx-btn-height';
             $sClass .= ' bx-btn-height';
 
 
-        return $this->_oTemplate->parseLink('javascript:void(0)',  (int)$aReport['count'] > 0 ? $this->_getLabelCounter($aReport['count']) : '', array(
+        return $this->_oTemplate->parseLink('javascript:void(0)',  (int)$aReport['count'] > 0 ? $this->_getCounterLabel($aReport['count']) : '', array(
             'id' => $this->_aHtmlIds['counter'],
             'id' => $this->_aHtmlIds['counter'],
             'class' => $sClass, 
             'class' => $sClass, 
         	'title' => _t('_report_do_report_by'),
         	'title' => _t('_report_do_report_by'),
@@ -137,10 +125,10 @@ class BxBaseReport extends BxDolReport
 
 
         $bShowDoReportAsButtonSmall = isset($aParams['show_do_report_as_button_small']) && $aParams['show_do_report_as_button_small'] == true;
         $bShowDoReportAsButtonSmall = isset($aParams['show_do_report_as_button_small']) && $aParams['show_do_report_as_button_small'] == true;
         $bShowDoReportAsButton = !$bShowDoReportAsButtonSmall && isset($aParams['show_do_report_as_button']) && $aParams['show_do_report_as_button'] == true;
         $bShowDoReportAsButton = !$bShowDoReportAsButtonSmall && isset($aParams['show_do_report_as_button']) && $aParams['show_do_report_as_button'] == true;
-		$bShowCounter = isset($aParams['show_counter']) && $aParams['show_counter'] === true && $this->isAllowedReportView();
+        $bShowCounter = isset($aParams['show_counter']) && $aParams['show_counter'] === true && $this->isAllowedReportView();
 
 
-		$iObjectId = $this->getId();
-		$iAuthorId = $this->_getAuthorId();
+        $iObjectId = $this->getId();
+        $iAuthorId = $this->_getAuthorId();
         $aReport = $this->_oQuery->getReport($iObjectId);
         $aReport = $this->_oQuery->getReport($iObjectId);
 
 
         if(!$this->isAllowedReport() && (!$this->isAllowedReportView() || (int)$aReport['count'] == 0))
         if(!$this->isAllowedReport() && (!$this->isAllowedReportView() || (int)$aReport['count'] == 0))
@@ -148,7 +136,7 @@ class BxBaseReport extends BxDolReport
 
 
         $aParams['is_reported'] = $this->isPerformed($iObjectId, $iAuthorId) ? true : false;
         $aParams['is_reported'] = $this->isPerformed($iObjectId, $iAuthorId) ? true : false;
 
 
-        $sTmplName = self::${'_sTmplContentElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_DOL_REPORT_USAGE_DEFAULT)};
+        $sTmplName = $this->{'_getTmplContentElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_DOL_REPORT_USAGE_DEFAULT)}();
         return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
         return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
             'style_prefix' => $this->_sStylePrefix,
             'style_prefix' => $this->_sStylePrefix,
             'html_id' => $this->_aHtmlIds['main'],
             'html_id' => $this->_aHtmlIds['main'],
@@ -159,10 +147,10 @@ class BxBaseReport extends BxDolReport
                 'condition' => $bShowCounter,
                 'condition' => $bShowCounter,
                 'content' => array(
                 'content' => array(
                     'style_prefix' => $this->_sStylePrefix,
                     'style_prefix' => $this->_sStylePrefix,
-        			'bx_if:show_hidden' => array(
-        				'condition' => (int)$aReport['count'] == 0,
-        				'content' => array()
-        			),
+                    'bx_if:show_hidden' => array(
+                        'condition' => (int)$aReport['count'] == 0,
+                        'content' => array()
+                    ),
                     'counter' => $this->getCounter($aParams)
                     'counter' => $this->getCounter($aParams)
                 )
                 )
             ),
             ),
@@ -175,33 +163,33 @@ class BxBaseReport extends BxDolReport
     	$bReported = isset($aParams['is_reported']) && $aParams['is_reported'] === true;
     	$bReported = isset($aParams['is_reported']) && $aParams['is_reported'] === true;
         $bShowDoReportAsButtonSmall = isset($aParams['show_do_report_as_button_small']) && $aParams['show_do_report_as_button_small'] == true;
         $bShowDoReportAsButtonSmall = isset($aParams['show_do_report_as_button_small']) && $aParams['show_do_report_as_button_small'] == true;
         $bShowDoReportAsButton = !$bShowDoReportAsButtonSmall && isset($aParams['show_do_report_as_button']) && $aParams['show_do_report_as_button'] == true;
         $bShowDoReportAsButton = !$bShowDoReportAsButtonSmall && isset($aParams['show_do_report_as_button']) && $aParams['show_do_report_as_button'] == true;
-		$bDisabled = !$this->isAllowedReport() || $bReported;
+        $bDisabled = !$this->isAllowedReport() || $bReported;
 
 
         $sClass = '';
         $sClass = '';
-		if($bShowDoReportAsButton)
-			$sClass = 'bx-btn';
-		else if ($bShowDoReportAsButtonSmall)
-			$sClass = 'bx-btn bx-btn-small';
+        if($bShowDoReportAsButton)
+            $sClass = 'bx-btn';
+        else if ($bShowDoReportAsButtonSmall)
+            $sClass = 'bx-btn bx-btn-small';
 
 
-		if($bDisabled)
-			$sClass .= $bShowDoReportAsButton || $bShowDoReportAsButtonSmall ? ' bx-btn-disabled' : 'bx-report-disabled';
+        if($bDisabled)
+            $sClass .= $bShowDoReportAsButton || $bShowDoReportAsButtonSmall ? ' bx-btn-disabled' : 'bx-report-disabled';
 
 
-        return $this->_oTemplate->parseHtmlByContent(self::$_sTmplContentDoReport, array(
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoAction(), array(
             'style_prefix' => $this->_sStylePrefix,
             'style_prefix' => $this->_sStylePrefix,
-        	'html_id' => $this->_aHtmlIds['do_link'],
+            'html_id' => $this->_aHtmlIds['do_link'],
             'class' => $sClass,
             'class' => $sClass,
             'title' => _t('_report_do_report'),
             'title' => _t('_report_do_report'),
         	'bx_if:show_onclick' => array(
         	'bx_if:show_onclick' => array(
-        		'condition' => !$bDisabled,
-        		'content' => array(
-        			'js_object' => $this->getJsObjectName()
-        		)
+                    'condition' => !$bDisabled,
+                    'content' => array(
+                        'js_object' => $this->getJsObjectName()
+                    )
         	),
         	),
             'do_report' => $this->_getLabelDoReport($aParams),
             'do_report' => $this->_getLabelDoReport($aParams),
         ));
         ));
     }
     }
 
 
-    protected function _getLabelCounter($iCount)
+    protected function _getCounterLabel($iCount)
     {
     {
         return _t('_report_counter', $iCount);
         return _t('_report_counter', $iCount);
     }
     }
@@ -209,19 +197,21 @@ class BxBaseReport extends BxDolReport
     protected function _getLabelDoReport($aParams = array())
     protected function _getLabelDoReport($aParams = array())
     {
     {
     	$bReported = isset($aParams['is_reported']) && $aParams['is_reported'] === true;
     	$bReported = isset($aParams['is_reported']) && $aParams['is_reported'] === true;
-        return $this->_oTemplate->parseHtmlByContent(self::$_sTmplContentDoReportLabel, array(
-        	'bx_if:show_icon' => array(
-        		'condition' => isset($aParams['show_do_report_icon']) && $aParams['show_do_report_icon'] == true,
-        		'content' => array(
-        			'name' => $this->_getIconDoReport($bReported)
-        		)
-        	),
-        	'bx_if:show_text' => array(
-        		'condition' => isset($aParams['show_do_report_label']) && $aParams['show_do_report_label'] == true,
-        		'content' => array(
-        			'text' => _t($this->_getTitleDoReport($bReported))
-        		)
-        	)
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
+            'bx_if:show_icon' => array(
+                'condition' => isset($aParams['show_do_report_icon']) && $aParams['show_do_report_icon'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'name' => $this->_getIconDoReport($bReported)
+                )
+            ),
+            'bx_if:show_text' => array(
+                'condition' => isset($aParams['show_do_report_label']) && $aParams['show_do_report_label'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'text' => _t($this->_getTitleDoReport($bReported))
+                )
+            )
         ));
         ));
     }
     }
 
 
@@ -294,7 +284,7 @@ class BxBaseReport extends BxDolReport
 		        	'code' => 0,
 		        	'code' => 0,
 		        	'id' => $iId, 
 		        	'id' => $iId, 
 		        	'count' => $aReport['count'], 
 		        	'count' => $aReport['count'], 
-		        	'countf' => (int)$aReport['count'] > 0 ? $this->_getLabelCounter($aReport['count']) : '',
+		        	'countf' => (int)$aReport['count'] > 0 ? $this->_getCounterLabel($aReport['count']) : '',
 		        	'label_icon' => $this->_getIconDoReport(!$bPerformed),
 		        	'label_icon' => $this->_getIconDoReport(!$bPerformed),
 		        	'label_title' => _t($this->_getTitleDoReport(!$bPerformed)),
 		        	'label_title' => _t($this->_getTitleDoReport(!$bPerformed)),
 		        	'disabled' => !$bPerformed
 		        	'disabled' => !$bPerformed

+ 41 - 28
template/scripts/BxBaseScore.php

@@ -12,11 +12,7 @@
  */
  */
 class BxBaseScore extends BxDolScore
 class BxBaseScore extends BxDolScore
 {
 {
-    protected static $_sTmplContentElementBlock;
-    protected static $_sTmplContentElementInline;
-    protected static $_sTmplContentDoVoteLabel;
-
-	protected $_bCssJsAdded;
+    protected $_bCssJsAdded;
 
 
     protected $_sJsObjName;
     protected $_sJsObjName;
     protected $_sStylePrefix;
     protected $_sStylePrefix;
@@ -57,14 +53,10 @@ class BxBaseScore extends BxDolScore
         $this->_sTmplNameLegend = 'score_legend.html';
         $this->_sTmplNameLegend = 'score_legend.html';
         $this->_sTmplNameByList = 'score_by_list.html';
         $this->_sTmplNameByList = 'score_by_list.html';
 
 
-        if(empty(self::$_sTmplContentElementBlock))
-            self::$_sTmplContentElementBlock = $this->_oTemplate->getHtml('score_element_block.html');
-
-        if(empty(self::$_sTmplContentElementInline))
-            self::$_sTmplContentElementInline = $this->_oTemplate->getHtml('score_element_inline.html');
-
-        if(empty(self::$_sTmplContentDoVoteLabel))
-            self::$_sTmplContentDoVoteLabel = $this->_oTemplate->getHtml('score_do_vote_label.html');
+        $this->_sTmplContentElementBlock = $this->_oTemplate->getHtml('score_element_block.html');
+        $this->_sTmplContentElementInline = $this->_oTemplate->getHtml('score_element_inline.html');
+        $this->_sTmplContentDoActionLabel = $this->_oTemplate->getHtml('score_do_vote_label.html');
+        $this->_sTmplContentCounterLabel = $this->_oTemplate->getHtml('score_counter_label.html');
     }
     }
 
 
     public function getJsObjectName()
     public function getJsObjectName()
@@ -74,10 +66,12 @@ class BxBaseScore extends BxDolScore
 
 
     public function getJsScript($aParams = array())
     public function getJsScript($aParams = array())
     {
     {
+        $sJsObjName = $this->getJsObjectName();
+
         $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
         $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
 
 
         $aParamsJs = array(
         $aParamsJs = array(
-            'sObjName' => $this->_sJsObjName,
+            'sObjName' => $sJsObjName,
             'sSystem' => $this->getSystemName(),
             'sSystem' => $this->getSystemName(),
             'iAuthorId' => $this->_getAuthorId(),
             'iAuthorId' => $this->_getAuthorId(),
             'iObjId' => $this->getId(),
             'iObjId' => $this->getId(),
@@ -86,7 +80,7 @@ class BxBaseScore extends BxDolScore
             'sStylePrefix' => $this->_sStylePrefix,
             'sStylePrefix' => $this->_sStylePrefix,
             'aHtmlIds' => $this->_aHtmlIds
             'aHtmlIds' => $this->_aHtmlIds
         );
         );
-        $sCode = "var " . $this->_sJsObjName . " = new BxDolScore(" . json_encode($aParamsJs) . ");";
+        $sCode = "if(window['" . $sJsObjName . "'] == undefined) var " . $sJsObjName . " = new BxDolScore(" . json_encode($aParamsJs) . ");";
 
 
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
     }
     }
@@ -105,9 +99,12 @@ class BxBaseScore extends BxDolScore
     {
     {
         $sJsObject = $this->getJsObjectName();
         $sJsObject = $this->getJsObjectName();
 
 
+        $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
         $bShowEmpty = isset($aParams['show_counter_empty']) && $aParams['show_counter_empty'] == 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;
         $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;
         $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;
+
         $bAllowedViewViewVoters = $this->isAllowedVoteViewVoters();
         $bAllowedViewViewVoters = $this->isAllowedVoteViewVoters();
 
 
         $aScore = $this->_oQuery->getScore($this->getId());
         $aScore = $this->_oQuery->getScore($this->getId());
@@ -123,7 +120,7 @@ class BxBaseScore extends BxDolScore
             $sClass .= ' bx-btn-height';
             $sClass .= ' bx-btn-height';
 
 
         $bLink = $bAllowedViewViewVoters && !$bEmpty;
         $bLink = $bAllowedViewViewVoters && !$bEmpty;
-        $sCounter = !$bEmpty || $bShowEmpty ? $this->_getLabelCounter($iCup - $iCdown) : '';
+        $sCounter = !$bEmpty || $bShowEmpty ? $this->_getCounterLabel($iCup - $iCdown) : '';
 
 
         $aTmplVars = array(
         $aTmplVars = array(
             'id' => $this->_aHtmlIds['counter'],
             'id' => $this->_aHtmlIds['counter'],
@@ -145,6 +142,7 @@ class BxBaseScore extends BxDolScore
                 'condition' => !$bLink,
                 'condition' => !$bLink,
                 'content' => $aTmplVars
                 'content' => $aTmplVars
             ),
             ),
+            'script' => $bShowScript ? $this->getJsScript($bDynamicMode) : ''
         ));
         ));
     }
     }
 
 
@@ -228,7 +226,7 @@ class BxBaseScore extends BxDolScore
                     'condition' => !$bShowCounterEmpty && !$bCount,
                     'condition' => !$bShowCounterEmpty && !$bCount,
                     'content' => array()
                     'content' => array()
                 ),
                 ),
-                'counter' => $this->getCounter($aParams)
+                'counter' => $this->getCounter(array_merge($aParams, array('show_script' => false)))
             );
             );
 
 
         //--- Legend
         //--- Legend
@@ -240,9 +238,9 @@ class BxBaseScore extends BxDolScore
             );
             );
 
 
         if(!$bTmplVarsDoVote && !$bTmplVarsCounter && !$bTmplVarsLegend)
         if(!$bTmplVarsDoVote && !$bTmplVarsCounter && !$bTmplVarsLegend)
-                return '';
+            return '';
 
 
-        $sTmplName = self::${'_sTmplContentElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_DOL_SCORE_USAGE_DEFAULT)};
+        $sTmplName = $this->{'_getTmplContentElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_DOL_SCORE_USAGE_DEFAULT)}();
         return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
         return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
             'style_prefix' => $this->_sStylePrefix,
             'style_prefix' => $this->_sStylePrefix,
             'html_id' => $this->_aHtmlIds['main'],
             'html_id' => $this->_aHtmlIds['main'],
@@ -278,13 +276,13 @@ class BxBaseScore extends BxDolScore
 		$bDisabled = !$isAllowedVote || $bVoted;
 		$bDisabled = !$isAllowedVote || $bVoted;
 
 
         $sClass = '';
         $sClass = '';
-		if($bShowDoVoteAsButton)
-			$sClass = 'bx-btn';
-		else if ($bShowDoVoteAsButtonSmall)
-			$sClass = 'bx-btn bx-btn-small';
+        if($bShowDoVoteAsButton)
+            $sClass = 'bx-btn';
+        else if ($bShowDoVoteAsButtonSmall)
+            $sClass = 'bx-btn bx-btn-small';
 
 
-		if($bDisabled)
-			$sClass .= $bShowDoVoteAsButton || $bShowDoVoteAsButtonSmall ? ' bx-btn-disabled' : 'bx-score-disabled';
+        if($bDisabled)
+            $sClass .= $bShowDoVoteAsButton || $bShowDoVoteAsButtonSmall ? ' bx-btn-disabled' : 'bx-score-disabled';
 
 
         return $this->_oTemplate->parseLink('javascript:void(0)', $this->_getLabelDo($sType, $aParams), array(
         return $this->_oTemplate->parseLink('javascript:void(0)', $this->_getLabelDo($sType, $aParams), array(
             'class' => $this->_sStylePrefix . '-do-vote ' . $this->_sStylePrefix . '-dv-' . $sType . ' ' . $sClass,
             'class' => $this->_sStylePrefix . '-do-vote ' . $this->_sStylePrefix . '-dv-' . $sType . ' ' . $sClass,
@@ -293,14 +291,29 @@ class BxBaseScore extends BxDolScore
         ));
         ));
     }
     }
 
 
-    protected function _getLabelCounter($iCount)
+    protected function _getCounterLabel($iCount)
     {
     {
-        return (int)$iCount != 0 ? _t('_sys_score_counter', $iCount) : _t('_sys_score_counter_empty');
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterLabel(), array(
+            'bx_if:show_icon' => array(
+                'condition' => !isset($aParams['show_counter_label_icon']) || $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,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'text' => _t('_sys_score_counter', $iCount)
+                )
+            )
+        ));
     }
     }
 
 
     protected function _getLabelDo($sType, $aParams = array())
     protected function _getLabelDo($sType, $aParams = array())
     {
     {
-        return $this->_oTemplate->parseHtmlByContent(self::$_sTmplContentDoVoteLabel, array(
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
             'bx_if:show_image' => array(
             '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']) && $aParams['show_do_vote_image'] == true,
                 'content' => array(
                 'content' => array(

+ 88 - 71
template/scripts/BxBaseView.php

@@ -12,12 +12,8 @@
  */
  */
 class BxBaseView extends BxDolView
 class BxBaseView extends BxDolView
 {
 {
-    protected static $_sTmplContentElementBlock;
-    protected static $_sTmplContentElementInline;
-    protected static $_sTmplContentCounter;
-    protected static $_sTmplContentDoViewLabel;
-
     protected $_sTmplNameByList;
     protected $_sTmplNameByList;
+    protected $_sTmplContentDoViewLabel;
 
 
     protected $_bCssJsAdded;
     protected $_bCssJsAdded;
     protected $_sStylePrefix;
     protected $_sStylePrefix;
@@ -47,22 +43,18 @@ class BxBaseView extends BxDolView
             'show_do_view_as_button_small' => false,
             'show_do_view_as_button_small' => false,
             'show_do_view_icon' => true,
             'show_do_view_icon' => true,
             'show_do_view_label' => false,
             'show_do_view_label' => false,
-            'show_counter' => true
+            'show_counter' => true,
+            'show_counter_label_icon' => false,
+            'show_counter_label_text' => true,
+            'show_script' => true
         );
         );
 
 
-        if(empty(self::$_sTmplContentElementBlock))
-            self::$_sTmplContentElementBlock = $this->_oTemplate->getHtml('view_element_block.html');
-
-        if(empty(self::$_sTmplContentElementInline))
-            self::$_sTmplContentElementInline = $this->_oTemplate->getHtml('view_element_inline.html');
-
-        if(empty(self::$_sTmplContentCounter))
-            self::$_sTmplContentCounter = $this->_oTemplate->getHtml('view_counter.html');
-
-        if(empty(self::$_sTmplContentDoViewLabel))
-            self::$_sTmplContentDoViewLabel = $this->_oTemplate->getHtml('view_do_view_label.html');
-
         $this->_sTmplNameByList = 'view_by_list.html';
         $this->_sTmplNameByList = 'view_by_list.html';
+        $this->_sTmplContentElementBlock = $this->_oTemplate->getHtml('view_element_block.html');
+        $this->_sTmplContentElementInline = $this->_oTemplate->getHtml('view_element_inline.html');
+        $this->_sTmplContentCounter = $this->_oTemplate->getHtml('view_counter.html');
+        $this->_sTmplContentCounterLabel = $this->_oTemplate->getHtml('view_counter_label.html');
+        $this->_sTmplContentDoViewLabel = $this->_oTemplate->getHtml('view_do_view_label.html');
     }
     }
 
 
     public function getJsObjectName()
     public function getJsObjectName()
@@ -72,8 +64,10 @@ class BxBaseView extends BxDolView
 
 
     public function getJsScript($bDynamicMode = false)
     public function getJsScript($bDynamicMode = false)
     {
     {
+        $sJsObjName = $this->getJsObjectName();
+
         $aParams = array(
         $aParams = array(
-            'sObjName' => $this->_sJsObjName,
+            'sObjName' => $sJsObjName,
             'sSystem' => $this->getSystemName(),
             'sSystem' => $this->getSystemName(),
             'iAuthorId' => $this->_getAuthorId(),
             'iAuthorId' => $this->_getAuthorId(),
             'iObjId' => $this->getId(),
             'iObjId' => $this->getId(),
@@ -81,7 +75,7 @@ class BxBaseView extends BxDolView
             'sStylePrefix' => $this->_sStylePrefix,
             'sStylePrefix' => $this->_sStylePrefix,
             'aHtmlIds' => $this->_aHtmlIds
             'aHtmlIds' => $this->_aHtmlIds
         );
         );
-        $sCode = "var " . $this->_sJsObjName . " = new BxDolView(" . json_encode($aParams) . ");";
+        $sCode = "if(window['" . $sJsObjName . "'] == undefined) var " . $sJsObjName . " = new BxDolView(" . json_encode($aParams) . ");";
 
 
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
     }
     }
@@ -90,8 +84,11 @@ class BxBaseView extends BxDolView
     {
     {
         $sJsObject = $this->getJsObjectName();
         $sJsObject = $this->getJsObjectName();
 
 
+        $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
         $bShowDoViewAsButtonSmall = isset($aParams['show_do_view_as_button_small']) && $aParams['show_do_view_as_button_small'] == true;
         $bShowDoViewAsButtonSmall = isset($aParams['show_do_view_as_button_small']) && $aParams['show_do_view_as_button_small'] == true;
         $bShowDoViewAsButton = !$bShowDoViewAsButtonSmall && isset($aParams['show_do_view_as_button']) && $aParams['show_do_view_as_button'] == true;
         $bShowDoViewAsButton = !$bShowDoViewAsButtonSmall && isset($aParams['show_do_view_as_button']) && $aParams['show_do_view_as_button'] == true;
+        $bShowScript = !isset($aParams['show_script']) || $aParams['show_script'] == true;
+
         $bAllowedViewViewViewers = $this->isAllowedViewViewViewers();
         $bAllowedViewViewViewers = $this->isAllowedViewViewViewers();
 
 
         $aView = $this->_oQuery->getView($this->getId());
         $aView = $this->_oQuery->getView($this->getId());
@@ -101,9 +98,11 @@ class BxBaseView extends BxDolView
         if($bShowDoViewAsButton)
         if($bShowDoViewAsButton)
             $sClass .= ' bx-btn-height';
             $sClass .= ' bx-btn-height';
 
 
-        $sContent = (int)$aView['count'] > 0 ? $this->_getLabelCounter($aView['count']) : '';
-        return $this->_oTemplate->parseHtmlByContent(self::$_sTmplContentCounter, array(
-        	'bx_if:show_text' => array(
+        $sContent = (int)$aView['count'] > 0 ? $this->_getCounterLabel($aView['count'], $aParams) : '';
+        return $this->_oTemplate->parseHtmlByContent($this->_sTmplContentCounter, array(
+            'html_id' => $this->_aHtmlIds['counter'],
+            'style_prefix' => $this->_sStylePrefix,
+            'bx_if:show_text' => array(
                 'condition' => !$bAllowedViewViewViewers,
                 'condition' => !$bAllowedViewViewViewers,
                 'content' => array(
                 'content' => array(
                     'bx_repeat:attrs' => array(
                     'bx_repeat:attrs' => array(
@@ -125,7 +124,8 @@ class BxBaseView extends BxDolView
                     ),
                     ),
                     'content' => $sContent
                     'content' => $sContent
                 )
                 )
-            )
+            ),
+            'script' => $bShowScript ? $this->getJsScript($bDynamicMode) : ''
         ));
         ));
     }
     }
 
 
@@ -156,9 +156,9 @@ class BxBaseView extends BxDolView
         $bShowDoViewAsButton = !$bShowDoViewAsButtonSmall && isset($aParams['show_do_view_as_button']) && $aParams['show_do_view_as_button'] == true;
         $bShowDoViewAsButton = !$bShowDoViewAsButtonSmall && isset($aParams['show_do_view_as_button']) && $aParams['show_do_view_as_button'] == true;
         $bShowCounter = isset($aParams['show_counter']) && $aParams['show_counter'] === true && $bAllowedViewView;
         $bShowCounter = isset($aParams['show_counter']) && $aParams['show_counter'] === true && $bAllowedViewView;
 
 
-		$iObjectId = $this->getId();
-		$iAuthorId = $this->_getAuthorId();
-		$aView = $this->_oQuery->getView($iObjectId);
+        $iObjectId = $this->getId();
+        $iAuthorId = $this->_getAuthorId();
+        $aView = $this->_oQuery->getView($iObjectId);
         $bCount = (int)$aView['count'] != 0;
         $bCount = (int)$aView['count'] != 0;
 
 
         if(!$bAllowedView && (!$bAllowedViewView || !$bCount))
         if(!$bAllowedView && (!$bAllowedViewView || !$bCount))
@@ -168,41 +168,41 @@ class BxBaseView extends BxDolView
         $bTmplVarsDoView = $bShowDoView && ($bCount || $bAllowedView);
         $bTmplVarsDoView = $bShowDoView && ($bCount || $bAllowedView);
         $aTmplVarsDoView = array();
         $aTmplVarsDoView = array();
         if($bTmplVarsDoView)
         if($bTmplVarsDoView)
-        	$aTmplVarsDoView = array(
-				'style_prefix' => $this->_sStylePrefix,
-				'do_view' => $this->_getDoView($aParams, $bAllowedView),
-			);
+            $aTmplVarsDoView = array(
+                'style_prefix' => $this->_sStylePrefix,
+                'do_view' => $this->_getDoView($aParams, $bAllowedView),
+            );
 
 
         //--- Counter
         //--- Counter
         $bTmplVarsCounter = $bShowCounter && ($bCount || $bAllowedView);
         $bTmplVarsCounter = $bShowCounter && ($bCount || $bAllowedView);
         $aTmplVarsCounter = array();
         $aTmplVarsCounter = array();
         if($bTmplVarsCounter)
         if($bTmplVarsCounter)
-        	$aTmplVarsCounter = array(
-				'style_prefix' => $this->_sStylePrefix,
-				'bx_if:show_hidden' => array(
-					'condition' => !$bCount,
-					'content' => array()
-				),
-				'counter' => $this->getCounter($aParams)
-        	);
-
-		if(!$bTmplVarsDoView && !$bTmplVarsCounter)
-			return '';
-
-        $sTmplName = self::${'_sTmplContentElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_DOL_VIEW_USAGE_DEFAULT)};
+            $aTmplVarsCounter = array(
+                'style_prefix' => $this->_sStylePrefix,
+                'bx_if:show_hidden' => array(
+                    'condition' => !$bCount,
+                    'content' => array()
+                ),
+                'counter' => $this->getCounter(array_merge($aParams, array('show_script' => false)))
+            );
+
+        if(!$bTmplVarsDoView && !$bTmplVarsCounter)
+            return '';
+
+        $sTmplName = $this->{'_getTmplContentElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_DOL_VIEW_USAGE_DEFAULT)}();
         return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
         return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
             'style_prefix' => $this->_sStylePrefix,
             'style_prefix' => $this->_sStylePrefix,
             'html_id' => $this->_aHtmlIds['main'],
             'html_id' => $this->_aHtmlIds['main'],
             'class' => $this->_sStylePrefix . ($bShowDoViewAsButton ? '-button' : '') . ($bShowDoViewAsButtonSmall ? '-button-small' : ''),
             'class' => $this->_sStylePrefix . ($bShowDoViewAsButton ? '-button' : '') . ($bShowDoViewAsButtonSmall ? '-button-small' : ''),
             'count' => $aView['count'],
             'count' => $aView['count'],
         	'bx_if:show_do_view' => array(
         	'bx_if:show_do_view' => array(
-        		'condition' => $bTmplVarsDoView,
-        		'content' => $aTmplVarsDoView
+                    'condition' => $bTmplVarsDoView,
+                    'content' => $aTmplVarsDoView
         	),
         	),
         	'bx_if:show_counter' => array(
         	'bx_if:show_counter' => array(
-				'condition' => $bTmplVarsCounter,
-				'content' => $aTmplVarsCounter
-			),
+                    'condition' => $bTmplVarsCounter,
+                    'content' => $aTmplVarsCounter
+                ),
             'script' => $this->getJsScript($bDynamicMode)
             'script' => $this->getJsScript($bDynamicMode)
         ));
         ));
     }
     }
@@ -211,16 +211,16 @@ class BxBaseView extends BxDolView
     {
     {
         $bShowDoViewAsButtonSmall = isset($aParams['show_do_view_as_button_small']) && $aParams['show_do_view_as_button_small'] == true;
         $bShowDoViewAsButtonSmall = isset($aParams['show_do_view_as_button_small']) && $aParams['show_do_view_as_button_small'] == true;
         $bShowDoViewAsButton = !$bShowDoViewAsButtonSmall && isset($aParams['show_do_view_as_button']) && $aParams['show_do_view_as_button'] == true;
         $bShowDoViewAsButton = !$bShowDoViewAsButtonSmall && isset($aParams['show_do_view_as_button']) && $aParams['show_do_view_as_button'] == true;
-		$bDisabled = !$bAllowedView;
+        $bDisabled = !$bAllowedView;
 
 
         $sClass = '';
         $sClass = '';
-		if($bShowDoViewAsButton)
-			$sClass = 'bx-btn';
-		else if ($bShowDoViewAsButtonSmall)
-			$sClass = 'bx-btn bx-btn-small';
+        if($bShowDoViewAsButton)
+            $sClass = 'bx-btn';
+        else if ($bShowDoViewAsButtonSmall)
+            $sClass = 'bx-btn bx-btn-small';
 
 
-		if($bDisabled)
-			$sClass .= $bShowDoViewAsButton || $bShowDoViewAsButtonSmall ? ' bx-btn-disabled' : 'bx-view-disabled';
+        if($bDisabled)
+            $sClass .= $bShowDoViewAsButton || $bShowDoViewAsButtonSmall ? ' bx-btn-disabled' : 'bx-view-disabled';
 
 
         return $this->_oTemplate->parseLink('javascript:void(0)', $this->_getLabelDo($aParams), array(
         return $this->_oTemplate->parseLink('javascript:void(0)', $this->_getLabelDo($aParams), array(
             'class' => $this->_sStylePrefix . '-do-view ' . $sClass,
             'class' => $this->_sStylePrefix . '-do-view ' . $sClass,
@@ -228,26 +228,43 @@ class BxBaseView extends BxDolView
         ));
         ));
     }
     }
 
 
-    protected function _getLabelCounter($iCount)
+    protected function _getCounterLabel($iCount, $aParams = array())
     {
     {
-        return _t('_view_counter', $iCount);
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterLabel(), array(
+            'bx_if:show_icon' => array(
+                'condition' => !isset($aParams['show_counter_label_icon']) || $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,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'text' => _t('_view_counter', $iCount)
+                )
+            )
+        ));
     }
     }
 
 
     protected function _getLabelDo($aParams = array())
     protected function _getLabelDo($aParams = array())
     {
     {
-        return $this->_oTemplate->parseHtmlByContent(self::$_sTmplContentDoViewLabel, array(
-        	'bx_if:show_icon' => array(
-        		'condition' => isset($aParams['show_do_view_icon']) && $aParams['show_do_view_icon'] == true,
-        		'content' => array(
-        			'name' => $this->_getIconDo()
-        		)
-        	),
-        	'bx_if:show_text' => array(
-        		'condition' => isset($aParams['show_do_view_label']) && $aParams['show_do_view_label'] == true,
-        		'content' => array(
-        			'text' => _t($this->_getTitleDo())
-        		)
-        	)
+        return $this->_oTemplate->parseHtmlByContent($this->_sTmplContentDoViewLabel, array(
+            'bx_if:show_icon' => array(
+                'condition' => isset($aParams['show_do_view_icon']) && $aParams['show_do_view_icon'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'name' => $this->_getIconDo()
+                )
+            ),
+            'bx_if:show_text' => array(
+                'condition' => isset($aParams['show_do_view_label']) && $aParams['show_do_view_label'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'text' => _t($this->_getTitleDo())
+                )
+            )
         ));
         ));
     }
     }
 
 

+ 21 - 38
template/scripts/BxBaseVote.php

@@ -12,10 +12,6 @@
  */
  */
 class BxBaseVote extends BxDolVote
 class BxBaseVote extends BxDolVote
 {
 {
-    protected static $_sTmplContentElementBlock;
-    protected static $_sTmplContentElementInline;
-    protected static $_sTmplContentCounter;
-
     protected $_aElementDefaults;
     protected $_aElementDefaults;
 
 
     protected $_bCssJsAdded;
     protected $_bCssJsAdded;
@@ -50,14 +46,9 @@ class BxBaseVote extends BxDolVote
         $this->_sTmplNameLegend = 'vote_legend.html';
         $this->_sTmplNameLegend = 'vote_legend.html';
         $this->_sTmplNameByList = 'vote_by_list.html';
         $this->_sTmplNameByList = 'vote_by_list.html';
 
 
-        if(empty(self::$_sTmplContentElementBlock))
-            self::$_sTmplContentElementBlock = $this->_oTemplate->getHtml('vote_element_block.html');
-
-        if(empty(self::$_sTmplContentElementInline))
-            self::$_sTmplContentElementInline = $this->_oTemplate->getHtml('vote_element_inline.html');
-
-        if(empty(self::$_sTmplContentCounter))
-            self::$_sTmplContentCounter = $this->_oTemplate->getHtml('vote_counter.html');
+        $this->_sTmplContentElementBlock = $this->_oTemplate->getHtml('vote_element_block.html');
+        $this->_sTmplContentElementInline = $this->_oTemplate->getHtml('vote_element_inline.html');
+        $this->_sTmplContentCounter = $this->_oTemplate->getHtml('vote_counter.html');
     }
     }
 
 
     public function getJsClassName()
     public function getJsClassName()
@@ -72,8 +63,11 @@ class BxBaseVote extends BxDolVote
 
 
     public function getJsScript($bDynamicMode = false)
     public function getJsScript($bDynamicMode = false)
     {
     {
+        $sJsObjName = $this->getJsObjectName();
+        $sJsObjClass = $this->getJsClassName();
+
         $aParams = array(
         $aParams = array(
-            'sObjName' => $this->_sJsObjName,
+            'sObjName' => $sJsObjName,
             'sSystem' => $this->getSystemName(),
             'sSystem' => $this->getSystemName(),
             'iAuthorId' => $this->_getAuthorId(),
             'iAuthorId' => $this->_getAuthorId(),
             'iObjId' => $this->getId(),
             'iObjId' => $this->getId(),
@@ -81,7 +75,7 @@ class BxBaseVote extends BxDolVote
             'sStylePrefix' => $this->_sStylePrefix,
             'sStylePrefix' => $this->_sStylePrefix,
             'aHtmlIds' => $this->_aHtmlIds
             'aHtmlIds' => $this->_aHtmlIds
         );
         );
-        $sCode = "var " . $this->getJsObjectName() . " = new " . $this->getJsClassName() . "(" . json_encode($aParams) . ");";
+        $sCode = "if(window['" . $sJsObjName . "'] == undefined) var " . $sJsObjName . " = new " . $sJsObjClass . "(" . json_encode($aParams) . ");";
 
 
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
     }
     }
@@ -98,10 +92,12 @@ class BxBaseVote extends BxDolVote
 
 
     public function getCounter($aParams = array())
     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;
         $bShowEmpty = isset($aParams['show_counter_empty']) && $aParams['show_counter_empty'] == true;
-        $bAllowedViewViewVoters = $this->isAllowedVoteViewVoters();
+        $bShowActive = $this->isAllowedVoteViewVoters() && (!isset($aParams['show_counter_active']) || $aParams['show_counter_active'] === true);
+        $bShowScript = !isset($aParams['show_script']) || $aParams['show_script'] == true;
 
 
-        $sClass = $this->_sStylePrefix . '-counter';
+        $sClass = $this->_sStylePrefix . '-counter ' . $this->_sStylePrefix . '-counter-' . $this->_sType;
         if(!empty($aParams['class_counter']))
         if(!empty($aParams['class_counter']))
             $sClass .= $aParams['class_counter'];
             $sClass .= $aParams['class_counter'];
 
 
@@ -109,7 +105,7 @@ class BxBaseVote extends BxDolVote
             array('key' => 'class', 'value' => $sClass),
             array('key' => 'class', 'value' => $sClass),
         );
         );
 
 
-        if($bAllowedViewViewVoters)
+        if($bShowActive)
             $aTmplVarsAttrs = array_merge($aTmplVarsAttrs, array(
             $aTmplVarsAttrs = array_merge($aTmplVarsAttrs, array(
                 array('key' => 'href', 'value' => 'javascript:void(0)'),
                 array('key' => 'href', 'value' => 'javascript:void(0)'),
                 array('key' => 'title', 'value' => bx_html_attribute($this->_getTitleDoBy($aParams))),
                 array('key' => 'title', 'value' => bx_html_attribute($this->_getTitleDoBy($aParams))),
@@ -121,25 +117,26 @@ class BxBaseVote extends BxDolVote
             $aTmplVarsAttrs[] = array('key' => 'id', 'value' => $sHtmlId);
             $aTmplVarsAttrs[] = array('key' => 'id', 'value' => $sHtmlId);
 
 
         $aVote = !empty($aParams['vote']) && is_array($aParams['vote']) ? $aParams['vote'] : $this->_getVote();
         $aVote = !empty($aParams['vote']) && is_array($aParams['vote']) ? $aParams['vote'] : $this->_getVote();
-        $sContent = $bShowEmpty || (int)$aVote['count'] > 0 ? $this->_getLabelCounter($aVote['count'], $aParams) : '';
+        $sContent = $bShowEmpty || (int)$aVote['count'] > 0 ? $this->_getCounterLabel($aVote['count'], $aParams) : '';
 
 
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounter(), array(
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounter(), array(
             'bx_if:show_text' => array(
             'bx_if:show_text' => array(
-                'condition' => !$bAllowedViewViewVoters,
+                'condition' => !$bShowActive,
                 'content' => array(
                 'content' => array(
                     'bx_repeat:attrs' => $aTmplVarsAttrs,
                     'bx_repeat:attrs' => $aTmplVarsAttrs,
                     'content' => $sContent
                     'content' => $sContent
                 )
                 )
             ),
             ),
             'bx_if:show_link' => array(
             'bx_if:show_link' => array(
-                'condition' => $bAllowedViewViewVoters,
+                'condition' => $bShowActive,
                 'content' => array(
                 'content' => array(
                     'bx_repeat:attrs' => $aTmplVarsAttrs,
                     'bx_repeat:attrs' => $aTmplVarsAttrs,
                     'content' => $sContent
                     'content' => $sContent
                 )
                 )
             ),
             ),
             'bx_repeat:attrs' => $aTmplVarsAttrs,
             'bx_repeat:attrs' => $aTmplVarsAttrs,
-            'content' => $sContent
+            'content' => $sContent,
+            'script' => $bShowScript ? $this->getJsScript($bDynamicMode) : ''
         ));
         ));
     }
     }
 
 
@@ -215,7 +212,7 @@ class BxBaseVote extends BxDolVote
                     'condition' => !$bCount && !$bShowCounterEmpty,
                     'condition' => !$bCount && !$bShowCounterEmpty,
                     'content' => array()
                     'content' => array()
                 ),
                 ),
-                'counter' => $this->getCounter($aParams)
+                'counter' => $this->getCounter(array_merge($aParams, array('show_script' => false)))
             );
             );
 
 
         //--- Legend
         //--- Legend
@@ -262,7 +259,7 @@ class BxBaseVote extends BxDolVote
         return '';
         return '';
     }
     }
 
 
-    protected function _getLabelCounter($iCount, $aParams = array())
+    protected function _getCounterLabel($iCount, $aParams = array())
     {
     {
         return _t('_vote_counter', $iCount);
         return _t('_vote_counter', $iCount);
     }
     }
@@ -285,6 +282,7 @@ class BxBaseVote extends BxDolVote
 
 
         return $this->_oTemplate->parseHtmlByName($this->_sTmplNameByList, array(
         return $this->_oTemplate->parseHtmlByName($this->_sTmplNameByList, array(
             'style_prefix' => $this->_sStylePrefix,
             'style_prefix' => $this->_sStylePrefix,
+            'class' => '',
             'bx_repeat:list' => $aTmplUsers
             'bx_repeat:list' => $aTmplUsers
         ));
         ));
     }
     }
@@ -303,21 +301,6 @@ class BxBaseVote extends BxDolVote
     {
     {
         return false;
         return false;
     }
     }
-
-    protected function _getTmplContentElementBlock()
-    {
-        return self::$_sTmplContentElementBlock;
-    }
-
-    protected function _getTmplContentElementInline()
-    {
-        return self::$_sTmplContentElementInline;
-    }
-
-    protected function _getTmplContentCounter()
-    {
-        return self::$_sTmplContentCounter;
-    }
 }
 }
 
 
 /** @} */
 /** @} */

+ 30 - 11
template/scripts/BxBaseVoteLikes.php

@@ -12,8 +12,6 @@
  */
  */
 class BxBaseVoteLikes extends BxDolVoteLikes
 class BxBaseVoteLikes extends BxDolVoteLikes
 {
 {
-    protected static $_sTmplContentDoVoteLabelLikes;
-
     public function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
     public function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
     {
     {
         parent::__construct($sSystem, $iId, $iInit, $oTemplate);
         parent::__construct($sSystem, $iId, $iInit, $oTemplate);
@@ -32,11 +30,14 @@ class BxBaseVoteLikes extends BxDolVoteLikes
             'show_do_vote_label' => false,
             'show_do_vote_label' => false,
             'show_counter' => true,
             'show_counter' => true,
             'show_counter_empty' => false,
             'show_counter_empty' => false,
-            'show_legend' => false
+            'show_counter_label_icon' => false,
+            'show_counter_label_text' => true,
+            'show_legend' => false,
+            'show_script' => true
         );
         );
 
 
-        if(empty(self::$_sTmplContentDoVoteLabelLikes))
-            self::$_sTmplContentDoVoteLabelLikes = $this->_oTemplate->getHtml('vote_do_vote_likes_label.html');
+        $this->_sTmplContentDoActionLabel = $this->_oTemplate->getHtml('vote_do_vote_label_likes.html');
+        $this->_sTmplContentCounterLabel = $this->_oTemplate->getHtml('vote_counter_label_likes.html');
     }
     }
 
 
     public function getJsClick($iValue = 0)
     public function getJsClick($iValue = 0)
@@ -104,22 +105,45 @@ class BxBaseVoteLikes extends BxDolVoteLikes
     protected function _getDoVoteLabel($aParams = array())
     protected function _getDoVoteLabel($aParams = array())
     {
     {
     	$bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
     	$bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
-        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoVoteLabel(), array(
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
             'bx_if:show_icon' => array(
             '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']) && $aParams['show_do_vote_icon'] == true,
                 'content' => array(
                 'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
                     'name' => $this->_getIconDo($bVoted)
                     'name' => $this->_getIconDo($bVoted)
                 )
                 )
             ),
             ),
             'bx_if:show_text' => array(
             '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']) && $aParams['show_do_vote_label'] == true,
                 'content' => array(
                 'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
                     'text' => _t($this->_getTitleDo($bVoted))
                     'text' => _t($this->_getTitleDo($bVoted))
                 )
                 )
             )
             )
         ));
         ));
     }
     }
 
 
+    protected function _getCounterLabel($iCount, $aParams = array())
+    {
+        $bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterLabel(), array(
+            'bx_if:show_icon' => array(
+                'condition' => !isset($aParams['show_counter_label_icon']) || $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,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'text' => parent::_getCounterLabel($iCount)
+                )
+            )
+        ));
+    }
+
     protected function _isShowDoVote($aParams, $isAllowedVote, $bCount)
     protected function _isShowDoVote($aParams, $isAllowedVote, $bCount)
     {
     {
         $bResult = parent::_isShowDoVote($aParams, $isAllowedVote, $bCount);
         $bResult = parent::_isShowDoVote($aParams, $isAllowedVote, $bCount);
@@ -128,11 +152,6 @@ class BxBaseVoteLikes extends BxDolVoteLikes
 
 
         return $isAllowedVote || $bCount;
         return $isAllowedVote || $bCount;
     }
     }
-
-    protected function _getTmplContentDoVoteLabel()
-    {
-        return self::$_sTmplContentDoVoteLabelLikes;
-    }
 }
 }
 
 
 /** @} */
 /** @} */

+ 173 - 31
template/scripts/BxBaseVoteReactions.php

@@ -12,9 +12,8 @@
  */
  */
 class BxBaseVoteReactions extends BxDolVoteReactions
 class BxBaseVoteReactions extends BxDolVoteReactions
 {
 {
-    protected static $_sTmplContentDoVoteLabelReactions;
-    protected static $_sTmplContentCounterWrapper;
-    protected static $_sTmplContentCounterLabel;
+    protected $_sTmplNameBySummary;
+    protected $_sTmplContentCounterWrapper = '';
 
 
     public function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
     public function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
     {
     {
@@ -36,17 +35,17 @@ class BxBaseVoteReactions extends BxDolVoteReactions
             'show_do_vote_label' => false,
             'show_do_vote_label' => false,
             'show_counter' => false,
             'show_counter' => false,
             'show_counter_empty' => true,
             'show_counter_empty' => true,
-            'show_legend' => false
+            'show_counter_style' => self::$_sCounterStyleDivided, //--- Alloved styles are 'divided' and 'compound'
+            'show_legend' => false,
+            'show_script' => true
         );
         );
 
 
-        if(empty(self::$_sTmplContentDoVoteLabelReactions))
-            self::$_sTmplContentDoVoteLabelReactions = $this->_oTemplate->getHtml('vote_do_vote_reactions_label.html');
+        $this->_sTmplNameBySummary = 'vote_by_summary_reactions.html';
+        $this->_sTmplNameByList = 'vote_by_list_reactions.html';
 
 
-        if(empty(self::$_sTmplContentCounterWrapper))
-            self::$_sTmplContentCounterWrapper = $this->_oTemplate->getHtml('vote_counter_wrapper_reactions.html');
-
-        if(empty(self::$_sTmplContentCounterLabel))
-            self::$_sTmplContentCounterLabel = $this->_oTemplate->getHtml('vote_counter_label_reactions.html');
+        $this->_sTmplContentDoActionLabel = $this->_oTemplate->getHtml('vote_do_vote_label_reactions.html');
+        $this->_sTmplContentCounterLabel = $this->_oTemplate->getHtml('vote_counter_label_reactions.html');
+        $this->_sTmplContentCounterWrapper = $this->_oTemplate->getHtml('vote_counter_wrapper_reactions.html');
     }
     }
 
 
     public function getJsClick($iValue = 0)
     public function getJsClick($iValue = 0)
@@ -67,13 +66,34 @@ class BxBaseVoteReactions extends BxDolVoteReactions
 
 
     public function getJsClickCounter($aParams = array())
     public function getJsClickCounter($aParams = array())
     {
     {
-        $sReaction = !empty($aParams['reaction']) ? $aParams['reaction'] : $this->_sDefault;
+        $sJsObject = $this->getJsObjectName();
+        $sJsMethod = 'toggleByPopup';
+
+        if(isset($aParams['show_counter_style']) && $aParams['show_counter_style'] == self::$_sCounterStyleCompound)
+            return $sJsObject . '.' . $sJsMethod . '(this)';
 
 
-        return $this->getJsObjectName() . '.toggleByPopup(this, \'' . $sReaction . '\')';
+        $sReaction = !empty($aParams['reaction']) ? $aParams['reaction'] : $this->_sDefault;
+        return $sJsObject . '.' . $sJsMethod . '(this, \'' . $sReaction . '\')';
     }
     }
 
 
     public function getCounter($aParams = array())
     public function getCounter($aParams = array())
     {
     {
+        $sDefault = $this->_aElementDefaults['show_counter_style'];
+        $sCounterStyle = !empty($aParams['show_counter_style']) ? $aParams['show_counter_style'] : $sDefault;
+
+        $sMethodPrefix = '_getCounter';
+        $sMethod = $sMethodPrefix . bx_gen_method_name($sCounterStyle);
+        if(!method_exists($this, $sMethod))
+            $sMethod = $sMethodPrefix . bx_gen_method_name($sDefault);
+
+        return $this->$sMethod($aParams);
+    }
+
+    public function _getCounterDivided($aParams = array())
+    {
+        $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
+        $bShowScript = !isset($aParams['show_script']) || $aParams['show_script'] == true;
+
         $aVote = $this->_getVote();
         $aVote = $this->_getVote();
         $aReactions = $this->getReactions();
         $aReactions = $this->getReactions();
 
 
@@ -96,14 +116,79 @@ class BxBaseVoteReactions extends BxDolVoteReactions
                 'rate' => $aVote['rate_' . $sName],
                 'rate' => $aVote['rate_' . $sName],
             );
             );
 
 
-            $sResult .= parent::getCounter($aParams);
+            $sResult .= parent::getCounter(array_merge($aParams, array('show_script' => false)));
+        }
+
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterWrapper(), array(
+            'html_id' => $this->_aHtmlIds['counter'],
+            'style_prefix' => $this->_sStylePrefix,
+            'type' => $this->_sType,
+            'style' => self::$_sCounterStyleDivided,
+            'counter' => $sResult,
+            'script' => $bShowScript ? $this->getJsScript($bDynamicMode) : ''
+        ));
+    }
+
+    public function _getCounterCompound($aParams = array())
+    {
+        $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
+        $bShowScript = !isset($aParams['show_script']) || $aParams['show_script'] == true;
+
+        $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)
+            $sClass .= ' bx-btn-small-height';
+        else if(isset($aParams['show_do_vote_as_button']) && $aParams['show_do_vote_as_button'] == true)
+            $sClass .= ' bx-btn-height';
+
+        $aParams['id_counter'] = '';
+
+        $sResult = '';
+        $iResultC = $iResultS = 0;
+        foreach($aReactions as $sName) {
+            $iCount = (int)$aVote['count_' . $sName];
+
+            $aParams = array_merge($aParams, array(
+                'show_counter_active' => false,
+                'show_counter_label_icon' => true,
+                'show_counter_label_text' => false,
+                'class_counter' => ($iCount == 0 ? ' bx-vc-hidden' : '') . ' ' . $sName . ' ' . $sClass,
+                'reaction' => $sName,
+                'vote' => array(
+                    'count' => $iCount,
+                    'sum' => $aVote['sum_' . $sName],
+                    'rate' => $aVote['rate_' . $sName],
+                )
+            ));
+
+            $iResultC += $iCount;
+            $iResultS += (int)$aVote['sum_' . $sName];
+            $sResult .= trim(parent::getCounter(array_merge($aParams, array('show_script' => false))));
         }
         }
 
 
+        $aParams = array_merge($aParams, array(
+            'show_counter_active' => true,
+            'show_counter_label_icon' => false,
+            'show_counter_label_text' => true,
+            'class_counter' => ' total-count ' . $sClass,
+            'reaction' => '',
+            'vote' => array(
+                'count' => $iResultC,
+                'sum' => $iResultS,
+                'rate' => $iResultC > 0 ? round($iResultS / $iResultC, 2) : 0,
+            )
+        ));
+        $sResult .= parent::getCounter(array_merge($aParams, array('show_script' => false)));
+
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterWrapper(), array(
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterWrapper(), array(
             'html_id' => $this->_aHtmlIds['counter'],
             'html_id' => $this->_aHtmlIds['counter'],
             'style_prefix' => $this->_sStylePrefix,
             'style_prefix' => $this->_sStylePrefix,
             'type' => $this->_sType,
             'type' => $this->_sType,
-            'counter' => $sResult
+            'style' => self::$_sCounterStyleCompound,
+            'counter' => $sResult,
+            'script' => $bShowScript ? $this->getJsScript($bDynamicMode) : ''
         ));
         ));
     }
     }
 
 
@@ -170,16 +255,18 @@ class BxBaseVoteReactions extends BxDolVoteReactions
     {
     {
     	$bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
     	$bVoted = isset($aParams['is_voted']) && $aParams['is_voted'] === true;
 
 
-        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoVoteLabel(), array(
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentDoActionLabel(), array(
             'bx_if:show_icon' => array(
             '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']) && $aParams['show_do_vote_icon'] == true,
                 'content' => array(
                 'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
                     'name' => $this->_getIconDoWithTrack($bVoted, $aParams['track'])
                     'name' => $this->_getIconDoWithTrack($bVoted, $aParams['track'])
                 )
                 )
             ),
             ),
             'bx_if:show_text' => array(
             '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']) && $aParams['show_do_vote_label'] == true,
                 'content' => array(
                 'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
                     'text' => _t($this->_getTitleDoWithTrack($bVoted, $aParams['track']))
                     'text' => _t($this->_getTitleDoWithTrack($bVoted, $aParams['track']))
                 )
                 )
             )
             )
@@ -202,26 +289,56 @@ class BxBaseVoteReactions extends BxDolVoteReactions
         return $oMenu->getCode();
         return $oMenu->getCode();
     }
     }
 
 
-    protected function _getLabelCounter($iCount, $aParams = array())
+    protected function _getCounterLabel($iCount, $aParams = array())
     {
     {
         $sReaction = !empty($aParams['reaction']) ? $aParams['reaction'] : $this->_sDefault;
         $sReaction = !empty($aParams['reaction']) ? $aParams['reaction'] : $this->_sDefault;
 
 
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterLabel(), array(
         return $this->_oTemplate->parseHtmlByContent($this->_getTmplContentCounterLabel(), array(
-            'name' => $this->_aDataList[$sReaction]['icon'],
-            'text' => parent::_getLabelCounter($iCount)
+            'bx_if:show_icon' => array(
+                'condition' => !isset($aParams['show_counter_label_icon']) || $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,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'text' => parent::_getCounterLabel($iCount)
+                )
+            )
         ));
         ));
     }
     }
 
 
     protected function _getVotedBy($aParams = array())
     protected function _getVotedBy($aParams = array())
     {
     {
+        if(!isset($aParams['reaction']))
+            return $this->_getVotedBySummary($aParams);
+
+        $bSummary = $aParams['reaction'] == 'summary';
+
+        $aBrowseParams = array('type' => 'by', 'object_id' => $this->getId());
+        if(!$bSummary)
+            $aBrowseParams['reaction'] = $aParams['reaction'];
+
+        $aValues = $this->_oQuery->getPerformed($aBrowseParams);
+
         $aTmplUsers = array();
         $aTmplUsers = array();
+        foreach($aValues as $mValue) {
+            $mValue = is_array($mValue) ? $mValue : array('author_id' => (int)$mValue, 'reaction' => '');
 
 
-        $aUserIds = $this->_oQuery->getPerformed(array('type' => 'by', 'object_id' => $this->getId(), 'reaction' => $aParams['reaction']));
-        foreach($aUserIds as $iUserId) {
-            list($sUserName, $sUserUrl, $sUserIcon, $sUserUnit) = $this->_getAuthorInfo($iUserId);
+            list($sUserName, $sUserUrl, $sUserIcon, $sUserUnit) = $this->_getAuthorInfo($mValue['author_id']);
             $aTmplUsers[] = array(
             $aTmplUsers[] = array(
                 'style_prefix' => $this->_sStylePrefix,
                 'style_prefix' => $this->_sStylePrefix,
-                'user_unit' => $sUserUnit
+                'user_unit' => $sUserUnit,
+                'bx_if:show_reaction' => array(
+                    'condition' => $bSummary,
+                    'content' => array(
+                        'style_prefix' => $this->_sStylePrefix,
+                        'icon' => $bSummary ? $this->_aDataList[$mValue['reaction']]['icon'] : ''
+                    )
+                )
             );
             );
         }
         }
 
 
@@ -230,23 +347,48 @@ class BxBaseVoteReactions extends BxDolVoteReactions
 
 
         return $this->_oTemplate->parseHtmlByName($this->_sTmplNameByList, array(
         return $this->_oTemplate->parseHtmlByName($this->_sTmplNameByList, array(
             'style_prefix' => $this->_sStylePrefix,
             'style_prefix' => $this->_sStylePrefix,
+            'class' => ' ' . $this->_sStylePrefix . '-bl-' . $aParams['reaction'],
             'bx_repeat:list' => $aTmplUsers
             'bx_repeat:list' => $aTmplUsers
         ));
         ));
     }
     }
 
 
-    protected function _getTmplContentDoVoteLabel()
+    protected function _getVotedBySummary($aParams = array())
     {
     {
-        return self::$_sTmplContentDoVoteLabelReactions;
-    }
+        $sJsObject = $this->getJsObjectName();
 
 
-    protected function _getTmplContentCounterWrapper()
-    {
-        return self::$_sTmplContentCounterWrapper;
+        $sTxtSummary = _t('_vote_do_by_summary');
+        $aReactions = array_merge(array('summary'), $this->getReactions());
+
+        $aMenuItems = array();
+        $aTmplVarsLists = array();
+        foreach ($aReactions as $sReaction) {
+            $bSummary = $sReaction == 'summary';
+
+            $sName = $this->_sStylePrefix . '-' . $sReaction;
+            $sTitle = !$bSummary ? $this->_oTemplate->parseIcon($this->_aDataList[$sReaction]['icon']) : $sTxtSummary;
+            $sTitleAttr = !$bSummary ? _t('_vote_do_by_x_reaction', _t($this->_aDataList[$sReaction]['title'])) : $sTxtSummary;
+
+            $aMenuItems[] = array('id' => $sName, 'name' => $sName, 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeVotedBy(this, \'' . $sReaction . '\')', 'target' => '_self', 'title' => $sTitle, 'title_attr' => $sTitleAttr, 'active' => 1);
+
+            $aTmplVarsLists[] = array(
+                'content' => $this->_getVotedBy(array('reaction' => $sReaction))
+            );
+        }
+
+        $oMenu = new BxTemplMenuInteractive(array('template' => 'menu_interactive_vertical.html', 'menu_id'=> $this->_sStylePrefix . '-voted-by', 'menu_items' => $aMenuItems));
+        $oMenu->setSelected('', $this->_sStylePrefix . '-summary');
+
+        return $this->_oTemplate->parseHtmlByName($this->_sTmplNameBySummary, array(
+            'style_prefix' => $this->_sStylePrefix,
+            'title' => '',
+            'menu' => $oMenu->getCode(),
+            'bx_repeat:lists' => $aTmplVarsLists
+        ));
     }
     }
 
 
-    protected function _getTmplContentCounterLabel()
+    protected function _getTmplContentCounterWrapper()
     {
     {
-        return self::$_sTmplContentCounterLabel;
+        return $this->_sTmplContentCounterWrapper;
     }
     }
 }
 }
 
 

+ 2 - 1
template/scripts/BxBaseVoteStars.php

@@ -30,7 +30,8 @@ class BxBaseVoteStars extends BxDolVoteStars
             'show_do_vote_legend' => false,
             'show_do_vote_legend' => false,
             'show_counter' => true,
             'show_counter' => true,
             'show_counter_empty' => false,
             'show_counter_empty' => false,
-            'show_legend' => false
+            'show_legend' => false,
+            'show_script' => true
         );
         );
 
 
         $this->_sTmplNameDoVoteStars = 'vote_do_vote_stars.html';
         $this->_sTmplNameDoVoteStars = 'vote_do_vote_stars.html';

+ 2 - 6
template/view_counter.html

@@ -1,6 +1,2 @@
-<bx_if:show_text>
-    <span <bx_repeat:attrs>__key__="__value__"</bx_repeat:attrs>>__content__</span>
-</bx_if:show_text>
-<bx_if:show_link>
-    <a <bx_repeat:attrs>__key__="__value__"</bx_repeat:attrs>>__content__</a>
-</bx_if:show_link>
+<bx_if:show_text><span <bx_repeat:attrs>__key__="__value__"</bx_repeat:attrs>>__content__</span></bx_if:show_text><bx_if:show_link><a <bx_repeat:attrs>__key__="__value__"</bx_repeat:attrs>>__content__</a></bx_if:show_link>
+__script__

+ 1 - 0
template/view_counter_label.html

@@ -0,0 +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>

+ 1 - 1
template/view_do_view_label.html

@@ -1 +1 @@
-<bx_if:show_icon><i class="sys-icon __name__"></i></bx_if:show_icon><bx_if:show_text><span class="bx-def-margin-sec-left-auto">__text__</span></bx_if:show_text>
+<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>

+ 4 - 4
template/view_element_block.html

@@ -1,10 +1,10 @@
-<div id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_view_data_count="__count__">
-    <div class="__style_prefix__-do bx-clearfix">
+<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">
         <bx_if:show_do_view>
         <bx_if:show_do_view>
-                <div class="__style_prefix__-element-holder">__do_view__</div>
+            <div class="sys-action-element-holder __style_prefix__-element-holder">__do_view__</div>
         </bx_if:show_do_view>
         </bx_if:show_do_view>
         <bx_if:show_counter>
         <bx_if:show_counter>
-                <div class="__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_counter>
     </div>
     </div>
     __script__
     __script__

+ 2 - 2
template/view_element_inline.html

@@ -1,3 +1,3 @@
-<span id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_view_data_count="__count__">
-    <span class="__style_prefix__-do"><bx_if:show_do_view><span class="__style_prefix__-element-holder">__do_view__</span></bx_if:show_do_view><bx_if:show_counter><span class="__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 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>
 </span>

+ 8 - 8
template/vote_by_list.html

@@ -1,9 +1,9 @@
-<div class="__style_prefix__-by-list">
-	<div class="__style_prefix__-by-list-cnt">
-		<div class="__style_prefix__-by-items">
-			<bx_repeat:list>
-				<div class="__style_prefix__-by-item bx-def-padding-sec bx-clearfix">__user_unit__</div>
-			</bx_repeat:list>
-		</div>
-	</div>
+<div class="__style_prefix__-by-list__class__">
+    <div class="__style_prefix__-by-list-cnt">
+        <div class="__style_prefix__-by-items">
+            <bx_repeat:list>
+                <div class="__style_prefix__-by-item bx-def-padding-sec bx-clearfix">__user_unit__</div>
+            </bx_repeat:list>
+        </div>
+    </div>
 </div>
 </div>

+ 14 - 0
template/vote_by_list_reactions.html

@@ -0,0 +1,14 @@
+<div class="__style_prefix__-by-list__class__">
+    <div class="__style_prefix__-by-list-cnt">
+        <div class="__style_prefix__-by-items">
+            <bx_repeat:list>
+                <div class="__style_prefix__-by-item bx-def-padding-sec-topbottom bx-clearfix">
+                    <div class="__style_prefix__-bi-user">__user_unit__</div>
+                    <bx_if:show_reaction>
+                        <div class="__style_prefix__-bi-icon"><i class="sys-icon __icon__"></i></div>
+                    </bx_if:show_reaction>
+                </div>
+            </bx_repeat:list>
+        </div>
+    </div>
+</div>

+ 11 - 0
template/vote_by_summary_reactions.html

@@ -0,0 +1,11 @@
+<div class="__style_prefix__-by-lists">
+    <div class="__style_prefix__-bls-header">
+        <div class="__style_prefix__-bls-title bx-def-padding-leftright bx-def-border-bottom bx-def-box-sizing">__title__</div>
+        <div class="__style_prefix__-bls-submenu">
+            <div class="__style_prefix__-bls-submenu-cnt">__menu__</div>
+        </div>
+    </div>
+    <div class="__style_prefix__-bls-content">
+        <bx_repeat:lists>__content__</bx_repeat:lists>
+    </div>
+</div>

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio