AntonLV 7 lat temu
rodzic
commit
f6e77d9c0a
43 zmienionych plików z 159 dodań i 29 usunięć
  1. 7 7
      inc/classes/BxDolModuleQuery.php
  2. 31 7
      inc/classes/BxDolObjectQuery.php
  3. 5 0
      inc/classes/BxDolVoteReactions.php
  4. 59 11
      modules/base/general/classes/BxBaseModGeneralModule.php
  5. 1 0
      modules/boonex/albums/classes/BxAlbumsConfig.php
  6. 1 0
      modules/boonex/albums/install/langs/en.xml
  7. 1 0
      modules/boonex/directory/classes/BxDirConfig.php
  8. 1 0
      modules/boonex/directory/install/langs/en.xml
  9. 1 0
      modules/boonex/files/classes/BxFilesConfig.php
  10. 1 0
      modules/boonex/files/install/langs/en.xml
  11. 1 0
      modules/boonex/forum/classes/BxForumConfig.php
  12. 1 0
      modules/boonex/forum/install/langs/en.xml
  13. 1 0
      modules/boonex/glossary/classes/BxGlsrConfig.php
  14. 1 0
      modules/boonex/glossary/install/langs/en.xml
  15. 1 0
      modules/boonex/market/classes/BxMarketConfig.php
  16. 1 0
      modules/boonex/market/install/langs/en.xml
  17. 18 3
      modules/boonex/notifications/classes/BxNtfsTemplate.php
  18. 1 0
      modules/boonex/photos/classes/BxPhotosConfig.php
  19. 1 0
      modules/boonex/photos/install/langs/en.xml
  20. 1 0
      modules/boonex/polls/classes/BxPollsConfig.php
  21. 1 0
      modules/boonex/polls/install/langs/en.xml
  22. 1 0
      modules/boonex/posts/classes/BxPostsConfig.php
  23. 1 0
      modules/boonex/posts/install/langs/en.xml
  24. 1 0
      modules/boonex/russian/data/langs/bx_albums/ru.xml
  25. 1 0
      modules/boonex/russian/data/langs/bx_files/ru.xml
  26. 1 0
      modules/boonex/russian/data/langs/bx_forum/ru.xml
  27. 2 1
      modules/boonex/russian/data/langs/bx_glossary/ru.xml
  28. 1 0
      modules/boonex/russian/data/langs/bx_market/ru.xml
  29. 1 0
      modules/boonex/russian/data/langs/bx_photos/ru.xml
  30. 1 0
      modules/boonex/russian/data/langs/bx_polls/ru.xml
  31. 1 0
      modules/boonex/russian/data/langs/bx_posts/ru.xml
  32. 1 0
      modules/boonex/russian/data/langs/bx_shopify/ru.xml
  33. 1 0
      modules/boonex/russian/data/langs/bx_snipcart/ru.xml
  34. 1 0
      modules/boonex/russian/data/langs/bx_timeline/ru.xml
  35. 1 0
      modules/boonex/russian/data/langs/bx_videos/ru.xml
  36. 1 0
      modules/boonex/shopify/classes/BxShopifyConfig.php
  37. 1 0
      modules/boonex/shopify/install/langs/en.xml
  38. 1 0
      modules/boonex/snipcart/classes/BxSnipcartConfig.php
  39. 1 0
      modules/boonex/snipcart/install/langs/en.xml
  40. 1 0
      modules/boonex/timeline/classes/BxTimelineConfig.php
  41. 1 0
      modules/boonex/timeline/install/langs/en.xml
  42. 1 0
      modules/boonex/videos/classes/BxVideosConfig.php
  43. 1 0
      modules/boonex/videos/install/langs/en.xml

+ 7 - 7
inc/classes/BxDolModuleQuery.php

@@ -104,9 +104,9 @@ class BxDolModuleQuery extends BxDolDb implements iBxDolSingleton
         $aBindings = array();
 
         switch($aParams['type']) {
-        	case 'type':
-        		if(!is_array($aParams['value']))
-        			$aParams['value'] = array($aParams['value']);
+            case 'type':
+                if(!is_array($aParams['value']))
+                    $aParams['value'] = array($aParams['value']);
 
                 $sPostfix .= '_type_' . implode('_', $aParams['value']);
                 $sWhereClause .= " AND `type` IN (" . $this->implode_escape($aParams['value']) . ")";
@@ -130,20 +130,20 @@ class BxDolModuleQuery extends BxDolDb implements iBxDolSingleton
                 $sPostfix .= '_templates';
                 $aBindings['type'] = BX_DOL_MODULE_TYPE_TEMPLATE;
 
-                $sWhereClause .= " AND `type`=?";
+                $sWhereClause .= " AND `type`=:type";
                 break;
 
             case 'path_and_uri':
             	$aMethod['name'] = 'getRow';
             	$aBindings = array_merge($aBindings, array(
-                	'path' => $aParams['path'],
-            		'uri' => $aParams['uri']
+                    'path' => $aParams['path'],
+                    'uri' => $aParams['uri']
                 ));
 
             	$sWhereClause .= " AND `path`=:path AND `uri`=:uri";
             	break;
 
-			case 'all_pairs_name_uri':
+            case 'all_pairs_name_uri':
             	$aMethod['name'] = 'getPairs';
             	$aMethod['params'][1] = 'name';
             	$aMethod['params'][2] = 'uri';

+ 31 - 7
inc/classes/BxDolObjectQuery.php

@@ -81,15 +81,9 @@ class BxDolObjectQuery extends BxDolDb
 
     public function getPerformedBy($iObjectId)
     {
-        $sQuery = $this->prepare("SELECT `author_id` FROM `{$this->_sTableTrack}` WHERE `object_id` = ?", $iObjectId);
+        $sQuery = $this->prepare("SELECT `author_id` FROM `{$this->_sTableTrack}` WHERE `object_id`=?", $iObjectId);
         return $this->getColumn($sQuery);
     }
-    
-    public function getData($iObjectId)
-    {
-        $sQuery = $this->prepare("SELECT * FROM `{$this->_sTableTrack}` WHERE `object_id` = ?", $iObjectId);
-        return $this->getAll($sQuery);
-    }
 
     public function getTrack($iObjectId, $iAuthorId)
     {
@@ -98,6 +92,36 @@ class BxDolObjectQuery extends BxDolDb
             'author_id' => $iAuthorId
         ));
     }
+    
+    public function getTrackBy($aParams = array())
+    {
+        $aMethod = array('name' => 'getAll', 'params' => array(0 => 'query'));
+        $sWhereClause = $sOrderByClause = $sLimitClause = "";
+        $aBindings = array();
+
+        switch($aParams['type']) {
+            case 'id':
+                $aMethod['name'] = 'getRow';
+                $aBindings['id'] = $aParams['id'];
+
+                $sWhereClause .= " AND `id`=:id";
+                break;
+
+            case 'all':
+            	break;
+        }
+
+        if(!empty($aParams['order_by']))
+            $sOrderByClause = " ORDER BY " . $aParams['order_by'] . (!empty($aParams['order_way']) ? " " . $aParams['order_way'] : "");
+
+        if(isset($aParams['start']) && !empty($aParams['per_page']))
+            $sLimitClause = " LIMIT " . $aParams['start'] . ", " . $aParams['per_page'];
+
+        $aMethod['params'][0] = "SELECT * FROM `{$this->_sTableTrack}` WHERE 1 " . $sWhereClause . $sOrderByClause . $sLimitClause;
+        $aMethod['params'][] = $aBindings;
+
+        return call_user_func_array(array($this, $aMethod['name']), $aMethod['params']);
+    }
 
     public function deleteObjectEntries($iObjectId)
     {

+ 5 - 0
inc/classes/BxDolVoteReactions.php

@@ -75,6 +75,11 @@ class BxDolVoteReactions extends BxTemplVote
         return $bFullInfo ? $this->_aDataList : array_keys($this->_aDataList);
     }
 
+    public function getTrackBy($aParams)
+    {
+        return $this->_oQuery->getTrackBy($aParams);
+    }
+
     /**
      * Actions functions
      */

+ 59 - 11
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -770,7 +770,10 @@ class BxBaseModGeneralModule extends BxDolModule
 
                 array('group' => $sModule . '_vote', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'doVote', 'module_name' => $sModule, 'module_method' => 'get_notifications_vote', 'module_class' => 'Module', 'module_event_privacy' => $sEventPrivacy),
                 array('group' => $sModule . '_vote', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'undoVote'),
-                
+
+                array('group' => $sModule . '_reaction', 'type' => 'insert', 'alert_unit' => $sModule . '_reactions', 'alert_action' => 'doVote', 'module_name' => $sModule, 'module_method' => 'get_notifications_reaction', 'module_class' => 'Module', 'module_event_privacy' => $sEventPrivacy),
+                array('group' => $sModule . '_reaction', 'type' => 'delete', 'alert_unit' => $sModule . '_reactions', 'alert_action' => 'undoVote'),
+
                 array('group' => $sModule . '_score_up', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'doVoteUp', 'module_name' => $sModule, 'module_method' => 'get_notifications_score_up', 'module_class' => 'Module', 'module_event_privacy' => $sEventPrivacy),
 
                 array('group' => $sModule . '_score_down', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'doVoteDown', 'module_name' => $sModule, 'module_method' => 'get_notifications_score_down', 'module_class' => 'Module', 'module_event_privacy' => $sEventPrivacy),
@@ -780,6 +783,7 @@ class BxBaseModGeneralModule extends BxDolModule
                 array('group' => 'comment', 'unit' => $sModule, 'action' => 'commentPost', 'types' => array('personal', 'follow_member', 'follow_context')),
                 array('group' => 'reply', 'unit' => $sModule, 'action' => 'replyPost', 'types' => array('personal')),
                 array('group' => 'vote', 'unit' => $sModule, 'action' => 'doVote', 'types' => array('personal', 'follow_member', 'follow_context')),
+                array('group' => 'vote', 'unit' => $sModule . '_reactions', 'action' => 'doVote', 'types' => array('personal', 'follow_member', 'follow_context')),
                 array('group' => 'score_up', 'unit' => $sModule, 'action' => 'doVoteUp', 'types' => array('personal', 'follow_member', 'follow_context')),
                 array('group' => 'score_down', 'unit' => $sModule, 'action' => 'doVoteDown', 'types' => array('personal', 'follow_member', 'follow_context'))
             ),
@@ -797,6 +801,9 @@ class BxBaseModGeneralModule extends BxDolModule
                 array('unit' => $sModule, 'action' => 'doVote'),
                 array('unit' => $sModule, 'action' => 'undoVote'),
 
+                array('unit' => $sModule . '_reactions', 'action' => 'doVote'),
+                array('unit' => $sModule . '_reactions', 'action' => 'undoVote'),
+
                 array('unit' => $sModule, 'action' => 'doVoteUp'),
                 array('unit' => $sModule, 'action' => 'doVoteDown'),
             )
@@ -907,6 +914,35 @@ class BxBaseModGeneralModule extends BxDolModule
      * Entry post vote for Notifications module
      */
     public function serviceGetNotificationsVote($aEvent)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $iContentId = (int)$aEvent['object_id'];
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+        if(empty($aContentInfo) || !is_array($aContentInfo))
+            return array();
+
+        $oVote = BxDolVote::getObjectInstance($CNF['OBJECT_VOTES'], $iContentId);
+        if(!$oVote || !$oVote->isEnabled())
+            return array();
+
+        $sEntryUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]);
+        $sEntryCaption = isset($aContentInfo[$CNF['FIELD_TITLE']]) ? $aContentInfo[$CNF['FIELD_TITLE']] : strmaxtextlen($aContentInfo[$CNF['FIELD_TEXT']], 20, '...');
+
+        return array(
+            'entry_sample' => $CNF['T']['txt_sample_single'],
+            'entry_url' => $sEntryUrl,
+            'entry_caption' => $sEntryCaption,
+            'entry_author' => $aContentInfo[$CNF['FIELD_AUTHOR']],
+            'subentry_sample' => $CNF['T']['txt_sample_vote_single'],
+            'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
+        );
+    }
+
+    /**
+     * Entry post vote for Notifications module
+     */
+    public function serviceGetNotificationsReaction($aEvent)
     {
     	$CNF = &$this->_oConfig->CNF;
 
@@ -915,21 +951,33 @@ class BxBaseModGeneralModule extends BxDolModule
         if(empty($aContentInfo) || !is_array($aContentInfo))
             return array();
 
-		$oVote = BxDolVote::getObjectInstance($CNF['OBJECT_VOTES'], $iContentId);
-        if(!$oVote || !$oVote->isEnabled())
+        $oReaction = BxDolVote::getObjectInstance($CNF['OBJECT_REACTIONS'], $iContentId);
+        if(!$oReaction || !$oReaction->isEnabled())
+            return array();
+
+        $aSubentry = $oReaction->getTrackBy(array('type' => 'id', 'id' => (int)$aEvent['subobject_id']));
+        if(empty($aSubentry) || !is_array($aSubentry))
             return array();
 
+        $aSubentrySampleParams = array();
+        $aReaction = $oReaction->getReaction($aSubentry['reaction']);
+        if(!empty($aReaction['title']))
+            $aSubentrySampleParams[] = $aReaction['title'];
+        else
+            $aSubentrySampleParams[] = '_undefined';
+
         $sEntryUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]);
         $sEntryCaption = isset($aContentInfo[$CNF['FIELD_TITLE']]) ? $aContentInfo[$CNF['FIELD_TITLE']] : strmaxtextlen($aContentInfo[$CNF['FIELD_TEXT']], 20, '...');
 
-		return array(
-			'entry_sample' => $CNF['T']['txt_sample_single'],
-			'entry_url' => $sEntryUrl,
-			'entry_caption' => $sEntryCaption,
-			'entry_author' => $aContentInfo[$CNF['FIELD_AUTHOR']],
-			'subentry_sample' => $CNF['T']['txt_sample_vote_single'],
-			'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
-		);
+        return array(
+            'entry_sample' => $CNF['T']['txt_sample_single'],
+            'entry_url' => $sEntryUrl,
+            'entry_caption' => $sEntryCaption,
+            'entry_author' => $aContentInfo[$CNF['FIELD_AUTHOR']],
+            'subentry_sample' => $CNF['T']['txt_sample_reaction_single'],
+            'subentry_sample_params' => $aSubentrySampleParams,
+            'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
+        );
     }
 
     /**

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

@@ -158,6 +158,7 @@ class BxAlbumsConfig extends BxBaseModTextConfig
             	'txt_sample_single_with_article' => '_bx_albums_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_albums_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_albums_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_albums_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_albums_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_albums_txt_sample_score_down_single',
                 'txt_sample_action_changed' => '_bx_albums_txt_sample_action_changed',

+ 1 - 0
modules/boonex/albums/install/langs/en.xml

@@ -242,6 +242,7 @@
     <string name="_bx_albums_txt_sample_single_with_article"><![CDATA[an album]]></string>
     <string name="_bx_albums_txt_sample_comment_single"><![CDATA[comment to album]]></string>
     <string name="_bx_albums_txt_sample_vote_single"><![CDATA[vote to album]]></string>
+    <string name="_bx_albums_txt_sample_reaction_single"><![CDATA['{0}' reaction to album]]></string>
     <string name="_bx_albums_txt_sample_score_up_single"><![CDATA[score up vote to album]]></string>
     <string name="_bx_albums_txt_sample_score_down_single"><![CDATA[score down vote to album]]></string>
     <string name="_bx_albums_txt_sample_action_changed"><![CDATA[changed {0}]]></string>

+ 1 - 0
modules/boonex/directory/classes/BxDirConfig.php

@@ -167,6 +167,7 @@ class BxDirConfig extends BxBaseModTextConfig
             	'txt_sample_single_with_article' => '_bx_directory_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_directory_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_directory_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_directory_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_directory_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_directory_txt_sample_score_down_single',
                 'form_field_author' => '_bx_directory_form_entry_input_author',

+ 1 - 0
modules/boonex/directory/install/langs/en.xml

@@ -353,6 +353,7 @@
     <string name="_bx_directory_txt_sample_single_with_article"><![CDATA[an ad]]></string>
     <string name="_bx_directory_txt_sample_comment_single"><![CDATA[comment to ad]]></string>
     <string name="_bx_directory_txt_sample_vote_single"><![CDATA[vote to ad]]></string>
+    <string name="_bx_directory_txt_sample_reaction_single"><![CDATA['{0}' reaction to ad]]></string>
     <string name="_bx_directory_txt_sample_score_up_single"><![CDATA[score up vote to ad]]></string>
     <string name="_bx_directory_txt_sample_score_down_single"><![CDATA[score down vote to ad]]></string>
     <string name="_bx_directory_txt_display_title_add"><![CDATA[{0}: Add]]></string>

+ 1 - 0
modules/boonex/files/classes/BxFilesConfig.php

@@ -119,6 +119,7 @@ class BxFilesConfig extends BxBaseModTextConfig
             	'txt_sample_single_with_article' => '_bx_files_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_files_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_files_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_files_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_files_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_files_txt_sample_score_down_single',
              	'form_field_author' => '_bx_files_form_entry_input_author',

+ 1 - 0
modules/boonex/files/install/langs/en.xml

@@ -221,6 +221,7 @@
     <string name="_bx_files_txt_sample_single_with_article"><![CDATA[a file]]></string>
     <string name="_bx_files_txt_sample_comment_single"><![CDATA[comment to file]]></string>
     <string name="_bx_files_txt_sample_vote_single"><![CDATA[vote to file]]></string>
+    <string name="_bx_files_txt_sample_reaction_single"><![CDATA['{0}' reaction to file]]></string>
     <string name="_bx_files_txt_sample_score_up_single"><![CDATA[score up vote to file]]></string>
     <string name="_bx_files_txt_sample_score_down_single"><![CDATA[score down vote to file]]></string>
 

+ 1 - 0
modules/boonex/forum/classes/BxForumConfig.php

@@ -149,6 +149,7 @@ class BxForumConfig extends BxBaseModTextConfig
             	'txt_sample_single_with_article' => '_bx_forum_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_forum_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_forum_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_forum_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_forum_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_forum_txt_sample_score_down_single',
             	'form_field_author' => '_bx_forum_form_entry_input_author',

+ 1 - 0
modules/boonex/forum/install/langs/en.xml

@@ -277,6 +277,7 @@
     <string name="_bx_forum_txt_entry_sticked"><![CDATA[Pinned discussion]]></string>
     <string name="_bx_forum_txt_sample_comment_single"><![CDATA[comment to discussion]]></string>
     <string name="_bx_forum_txt_sample_vote_single"><![CDATA[vote to discussion]]></string>
+    <string name="_bx_forum_txt_sample_reaction_single"><![CDATA['{0}' reaction to discussion]]></string>
     <string name="_bx_forum_txt_sample_score_up_single"><![CDATA[score up vote to discussion]]></string>
     <string name="_bx_forum_txt_sample_score_down_single"><![CDATA[score down vote to discussion]]></string>
     <string name="_bx_forum_txt_sample_single"><![CDATA[discussion]]></string>

+ 1 - 0
modules/boonex/glossary/classes/BxGlsrConfig.php

@@ -117,6 +117,7 @@ class BxGlsrConfig extends BxBaseModTextConfig
                 'txt_sample_single_with_article' => '_bx_glossary_txt_sample_single_with_article',
                 'txt_sample_comment_single' => '_bx_glossary_txt_sample_comment_single',
                 'txt_sample_vote_single' => '_bx_glossary_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_glossary_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_glossary_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_glossary_txt_sample_score_down_single',
                 'form_field_author' => '_bx_glossary_form_entry_input_author',

+ 1 - 0
modules/boonex/glossary/install/langs/en.xml

@@ -220,6 +220,7 @@
     <string name="_bx_glossary_txt_sample_single_with_article"><![CDATA[a term]]></string>
     <string name="_bx_glossary_txt_sample_comment_single"><![CDATA[comment to term]]></string>
     <string name="_bx_glossary_txt_sample_vote_single"><![CDATA[vote to term]]></string>
+    <string name="_bx_glossary_txt_sample_reaction_single"><![CDATA['{0}' reaction to term]]></string>
     <string name="_bx_glossary_txt_sample_score_up_single"><![CDATA[score up vote to term]]></string>
     <string name="_bx_glossary_txt_sample_score_down_single"><![CDATA[score down vote to term]]></string>
     <string name="_bx_glossary_txt_term_in_pending_status"><![CDATA[This term is pending approval.]]></string>

+ 1 - 0
modules/boonex/market/classes/BxMarketConfig.php

@@ -179,6 +179,7 @@ class BxMarketConfig extends BxBaseModTextConfig
             	'txt_sample_single_with_article' => '_bx_market_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_market_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_market_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_market_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_market_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_market_txt_sample_score_down_single',
             	'form_field_author' => '_bx_market_form_entry_input_author',

+ 1 - 0
modules/boonex/market/install/langs/en.xml

@@ -420,6 +420,7 @@
     <string name="_bx_market_txt_sample_single_with_article"><![CDATA[a product]]></string>
     <string name="_bx_market_txt_sample_comment_single"><![CDATA[comment to product]]></string>
     <string name="_bx_market_txt_sample_vote_single"><![CDATA[vote to product]]></string>
+    <string name="_bx_market_txt_sample_reaction_single"><![CDATA['{0}' reaction to product]]></string>
     <string name="_bx_market_txt_sample_score_up_single"><![CDATA[score up vote to product]]></string>
     <string name="_bx_market_txt_sample_score_down_single"><![CDATA[score down vote to product]]></string>
     <string name="_bx_market_txt_author_added_product"><![CDATA[{0} {1}]]></string>

+ 18 - 3
modules/boonex/notifications/classes/BxNtfsTemplate.php

@@ -169,9 +169,24 @@ class BxNtfsTemplate extends BxBaseModNotificationsTemplate
             $aEvent['content']['object_owner_icon'] = $oObjectOwner->getThumb();
         }
 
-        foreach($aEvent['content'] as $sKey => $sValue)
-            if(substr($sValue, 0, 1) == '_')
-                    $aEvent['content'][$sKey] = _t($sValue);        
+        foreach($aEvent['content'] as $sKey => $sValue) {
+            if(!is_string($sValue) || substr($sValue, 0, 1) != '_') 
+                continue;
+
+            $aCallParams = array($sValue);
+
+            $sKeyParams = $sKey . '_params';
+            if(isset($aEvent['content'][$sKeyParams]) && is_array($aEvent['content'][$sKeyParams])) {
+                foreach($aEvent['content'][$sKeyParams] as $iParamIndex => $sParamValue)
+                    if(is_string($sParamValue) && substr($sParamValue, 0, 1) == '_')
+                        $aEvent['content'][$sKeyParams][$iParamIndex] = _t($sParamValue);
+
+                $aCallParams = array_merge($aCallParams, $aEvent['content'][$sKeyParams]);
+                unset($aEvent['content'][$sKeyParams]);
+            }
+
+            $aEvent['content'][$sKey] = call_user_func_array('_t', $aCallParams);
+        }
 
     	$bEventParsed = false;
         bx_alert($this->_oConfig->getName(), 'get_notification', 0, 0, array('event' => &$aEvent, 'event_parsed' => &$bEventParsed, 'owner' => &$oOwner));

+ 1 - 0
modules/boonex/photos/classes/BxPhotosConfig.php

@@ -123,6 +123,7 @@ class BxPhotosConfig extends BxBaseModTextConfig
             	'txt_sample_single_with_article' => '_bx_photos_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_photos_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_photos_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_photos_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_photos_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_photos_txt_sample_score_down_single',
                 'form_field_author' => '_bx_photos_form_entry_input_author',

+ 1 - 0
modules/boonex/photos/install/langs/en.xml

@@ -223,6 +223,7 @@
     <string name="_bx_photos_txt_sample_single_with_article"><![CDATA[a photo]]></string>
     <string name="_bx_photos_txt_sample_comment_single"><![CDATA[comment to photo]]></string>
     <string name="_bx_photos_txt_sample_vote_single"><![CDATA[vote to photo]]></string>
+    <string name="_bx_photos_txt_sample_reaction_single"><![CDATA['{0}' reaction to photo]]></string>
     <string name="_bx_photos_txt_sample_score_up_single"><![CDATA[score up vote to photo]]></string>
     <string name="_bx_photos_txt_sample_score_down_single"><![CDATA[score down vote to photo]]></string>
     <string name="_bx_photos_txt_n_views"><![CDATA[{0} views]]></string>

+ 1 - 0
modules/boonex/polls/classes/BxPollsConfig.php

@@ -124,6 +124,7 @@ class BxPollsConfig extends BxBaseModTextConfig
                 'txt_sample_single_with_article' => '_bx_polls_txt_sample_single_with_article',
                 'txt_sample_comment_single' => '_bx_polls_txt_sample_comment_single',
                 'txt_sample_vote_single' => '_bx_polls_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_polls_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_polls_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_polls_txt_sample_score_down_single',
                 'form_field_author' => '_bx_polls_form_entry_input_author',

+ 1 - 0
modules/boonex/polls/install/langs/en.xml

@@ -229,6 +229,7 @@
     <string name="_bx_polls_txt_sample_single_with_article"><![CDATA[a poll]]></string>
     <string name="_bx_polls_txt_sample_comment_single"><![CDATA[comment to poll]]></string>
     <string name="_bx_polls_txt_sample_vote_single"><![CDATA[vote to poll]]></string>
+    <string name="_bx_polls_txt_sample_reaction_single"><![CDATA['{0}' reaction to poll]]></string>
     <string name="_bx_polls_txt_sample_score_up_single"><![CDATA[score up vote to poll]]></string>
     <string name="_bx_polls_txt_sample_score_down_single"><![CDATA[score down vote to poll]]></string>
     <string name="_bx_polls_txt_subentry_vote_do_by"><![CDATA[Voted for]]></string>

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

@@ -162,6 +162,7 @@ class BxPostsConfig extends BxBaseModTextConfig
             	'txt_sample_single_with_article' => '_bx_posts_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_posts_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_posts_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_posts_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_posts_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_posts_txt_sample_score_down_single',
                 'form_field_author' => '_bx_posts_form_entry_input_author',

+ 1 - 0
modules/boonex/posts/install/langs/en.xml

@@ -278,6 +278,7 @@
     <string name="_bx_posts_txt_sample_single_with_article"><![CDATA[a post]]></string>
     <string name="_bx_posts_txt_sample_comment_single"><![CDATA[comment to post]]></string>
     <string name="_bx_posts_txt_sample_vote_single"><![CDATA[vote to post]]></string>
+    <string name="_bx_posts_txt_sample_reaction_single"><![CDATA['{0}' reaction to post]]></string>
     <string name="_bx_posts_txt_sample_score_up_single"><![CDATA[score up vote to post]]></string>
     <string name="_bx_posts_txt_sample_score_down_single"><![CDATA[score down vote to post]]></string>
     <string name="_bx_posts_txt_processing_awaiting"><![CDATA[Scheduled for publishing as soon as video conversion is complete.]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_albums/ru.xml

@@ -240,6 +240,7 @@
     <string name="_bx_albums_txt_sample_single_with_article"><![CDATA[альбом]]></string>
     <string name="_bx_albums_txt_sample_comment_single"><![CDATA[комментарий к альбому]]></string>
     <string name="_bx_albums_txt_sample_vote_single"><![CDATA[голос за альбом]]></string>
+    <string name="_bx_albums_txt_sample_reaction_single"><![CDATA[реакция '{0}' к альбому]]></string>
     <string name="_bx_albums_txt_sample_score_up_single"><![CDATA[голос за альбом]]></string>
     <string name="_bx_albums_txt_sample_score_down_single"><![CDATA[голос против альбома]]></string>
     <string name="_bx_albums_txt_sample_action_changed"><![CDATA[изменил {0}]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_files/ru.xml

@@ -220,6 +220,7 @@
     <string name="_bx_files_txt_sample_single_with_article"><![CDATA[файл]]></string>
     <string name="_bx_files_txt_sample_comment_single"><![CDATA[комментарии к файлу]]></string>
     <string name="_bx_files_txt_sample_vote_single"><![CDATA[голос за файл]]></string>
+    <string name="_bx_files_txt_sample_reaction_single"><![CDATA[реакция '{0}' к файлу]]></string>
     <string name="_bx_files_txt_sample_score_up_single"><![CDATA[голос за файл]]></string>
     <string name="_bx_files_txt_sample_score_down_single"><![CDATA[голос против файла]]></string>
 

+ 1 - 0
modules/boonex/russian/data/langs/bx_forum/ru.xml

@@ -278,6 +278,7 @@
     <string name="_bx_forum_txt_entry_sticked"><![CDATA[Закрепленное обсуждение]]></string>
     <string name="_bx_forum_txt_sample_comment_single"><![CDATA[комментарий к обсуждению]]></string>
     <string name="_bx_forum_txt_sample_vote_single"><![CDATA[голос за обсуждение]]></string>
+    <string name="_bx_forum_txt_sample_reaction_single"><![CDATA[реакция '{0}' к обсуждению]]></string>
     <string name="_bx_forum_txt_sample_score_up_single"><![CDATA[голос за обсуждение]]></string>
     <string name="_bx_forum_txt_sample_score_down_single"><![CDATA[голос против обсуждения]]></string>
     <string name="_bx_forum_txt_all_entries_in"><![CDATA[<a href="{0}">Все обсуждения в {1} ({2})</a>]]></string>

+ 2 - 1
modules/boonex/russian/data/langs/bx_glossary/ru.xml

@@ -221,8 +221,9 @@
     <string name="_bx_glossary_txt_all_entries_in"><![CDATA[<a href="{0}">Все термины в {1} ({2})</a>]]></string>
     <string name="_bx_glossary_txt_sample_single"><![CDATA[термин]]></string>
     <string name="_bx_glossary_txt_sample_single_with_article"><![CDATA[термин]]></string>
-    <string name="_bx_glossary_txt_sample_comment_single"><![CDATA[комментарий к Глоссарий]]></string>
+    <string name="_bx_glossary_txt_sample_comment_single"><![CDATA[комментарий к термину]]></string>
     <string name="_bx_glossary_txt_sample_vote_single"><![CDATA[голос за термин]]></string>
+    <string name="_bx_glossary_txt_sample_reaction_single"><![CDATA[реакция '{0}' к термину]]></string>
     <string name="_bx_glossary_txt_sample_score_up_single"><![CDATA[голос за термин]]></string>
     <string name="_bx_glossary_txt_sample_score_down_single"><![CDATA[голос против термина]]></string>
 	<string name="_bx_glossary_txt_term_in_pending_status"><![CDATA[Этот термин ожидает одобрения.]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_market/ru.xml

@@ -418,6 +418,7 @@
     <string name="_bx_market_txt_sample_single_with_article"><![CDATA[продукт]]></string>
     <string name="_bx_market_txt_sample_comment_single"><![CDATA[обзор к продукту]]></string>
     <string name="_bx_market_txt_sample_vote_single"><![CDATA[голос за продукт]]></string>
+    <string name="_bx_market_txt_sample_reaction_single"><![CDATA[реакция '{0}' к продукту]]></string>
     <string name="_bx_market_txt_sample_score_up_single"><![CDATA[голос за продукт]]></string>
     <string name="_bx_market_txt_sample_score_down_single"><![CDATA[голос против продукта]]></string>
     <string name="_bx_market_txt_author_added_product"><![CDATA[{0} {1}]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_photos/ru.xml

@@ -225,6 +225,7 @@
     <string name="_bx_photos_txt_sample_single_with_article"><![CDATA[фото]]></string>
     <string name="_bx_photos_txt_sample_comment_single"><![CDATA[комментарий к фото]]></string>
     <string name="_bx_photos_txt_sample_vote_single"><![CDATA[голос за фото]]></string>
+    <string name="_bx_photos_txt_sample_reaction_single"><![CDATA[реакция '{0}' к фото]]></string>
     <string name="_bx_photos_txt_sample_score_up_single"><![CDATA[голос за фото]]></string>
     <string name="_bx_photos_txt_sample_score_down_single"><![CDATA[голос против фото]]></string>
     <string name="_bx_photos_txt_n_views"><![CDATA[{0} просмотров]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_polls/ru.xml

@@ -228,6 +228,7 @@
     <string name="_bx_polls_txt_sample_single_with_article"><![CDATA[голосование]]></string>
     <string name="_bx_polls_txt_sample_comment_single"><![CDATA[комментарий к голосованию]]></string>
     <string name="_bx_polls_txt_sample_vote_single"><![CDATA[голос за голосование]]></string>
+    <string name="_bx_polls_txt_sample_reaction_single"><![CDATA[реакция '{0}' к голосованию]]></string>
     <string name="_bx_polls_txt_sample_score_up_single"><![CDATA[голос за голосование]]></string>
     <string name="_bx_polls_txt_sample_score_down_single"><![CDATA[голос против голосования]]></string>
     <string name="_bx_polls_txt_subentry_vote_do_by"><![CDATA[Проголосовали за]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_posts/ru.xml

@@ -278,6 +278,7 @@
     <string name="_bx_posts_txt_sample_single_with_article"><![CDATA[публикация]]></string>
     <string name="_bx_posts_txt_sample_comment_single"><![CDATA[комментарий к публикации]]></string>
     <string name="_bx_posts_txt_sample_vote_single"><![CDATA[голос за публикацию]]></string>
+    <string name="_bx_posts_txt_sample_reaction_single"><![CDATA[реакция '{0}' к публикации]]></string>
     <string name="_bx_posts_txt_sample_score_up_single"><![CDATA[голос за публикацию]]></string>
     <string name="_bx_posts_txt_sample_score_down_single"><![CDATA[голос против публикации]]></string>
     <string name="_bx_posts_txt_processing_awaiting"><![CDATA[Публикация будет опубликована как только сконвертируется видео.]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_shopify/ru.xml

@@ -238,6 +238,7 @@
     <string name="_bx_shopify_txt_sample_single_with_article"><![CDATA[товар]]></string>
     <string name="_bx_shopify_txt_sample_comment_single"><![CDATA[комментарии к товару]]></string>
     <string name="_bx_shopify_txt_sample_vote_single"><![CDATA[голос за товар]]></string>
+    <string name="_bx_shopify_txt_sample_reaction_single"><![CDATA[реакция '{0}' к товару]]></string>
     <string name="_bx_shopify_txt_sample_score_up_single"><![CDATA[голос за товар]]></string>
     <string name="_bx_shopify_txt_sample_score_down_single"><![CDATA[голос против товара]]></string>
 </resources>

+ 1 - 0
modules/boonex/russian/data/langs/bx_snipcart/ru.xml

@@ -256,6 +256,7 @@
     <string name="_bx_snipcart_txt_sample_single_with_article"><![CDATA[товар]]></string>
     <string name="_bx_snipcart_txt_sample_comment_single"><![CDATA[комментарии к товару]]></string>
     <string name="_bx_snipcart_txt_sample_vote_single"><![CDATA[голос за товар]]></string>
+    <string name="_bx_snipcart_txt_sample_reaction_single"><![CDATA[реакция '{0}' к товару]]></string>
     <string name="_bx_snipcart_txt_sample_score_up_single"><![CDATA[голос за товар]]></string>
     <string name="_bx_snipcart_txt_sample_score_down_single"><![CDATA[голос против товара]]></string>
 </resources>

+ 1 - 0
modules/boonex/russian/data/langs/bx_timeline/ru.xml

@@ -240,6 +240,7 @@
 	<string name="_bx_timeline_txt_sample_ext"><![CDATA[сообщение в ленте]]></string>
 	<string name="_bx_timeline_txt_sample_comment_single"><![CDATA[комментарий к сообщению в ленте]]></string>
 	<string name="_bx_timeline_txt_sample_vote_single"><![CDATA[голос за сообщение в ленте]]></string>
+        <string name="_bx_timeline_txt_sample_reaction_single"><![CDATA[реакция '{0}' к сообщению в ленте]]></string>
         <string name="_bx_timeline_txt_sample_score_up_single"><![CDATA[голос за сообщение в ленте]]></string>
     <string name="_bx_timeline_txt_sample_score_down_single"><![CDATA[голос против сообщения в ленте]]></string>
     <string name="_bx_timeline_txt_sample_with_link"><![CDATA[со ссылкой]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_videos/ru.xml

@@ -220,6 +220,7 @@
     <string name="_bx_videos_txt_sample_single_with_article"><![CDATA[видео]]></string>
     <string name="_bx_videos_txt_sample_comment_single"><![CDATA[комментарий к видео]]></string>
     <string name="_bx_videos_txt_sample_vote_single"><![CDATA[голос за видео]]></string>
+    <string name="_bx_videos_txt_sample_reaction_single"><![CDATA[реакция '{0}' к видео]]></string>
     <string name="_bx_videos_txt_sample_score_up_single"><![CDATA[голос за видео]]></string>
     <string name="_bx_videos_txt_sample_score_down_single"><![CDATA[голос против видео]]></string>
     <string name="_bx_videos_txt_n_views"><![CDATA[{0} просмотров]]></string>

+ 1 - 0
modules/boonex/shopify/classes/BxShopifyConfig.php

@@ -122,6 +122,7 @@ class BxShopifyConfig extends BxBaseModTextConfig
             	'txt_sample_single_with_article' => '_bx_shopify_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_shopify_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_shopify_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_shopify_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_shopify_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_shopify_txt_sample_score_down_single',
             	'form_field_author' => '_bx_shopify_form_entry_input_author',

+ 1 - 0
modules/boonex/shopify/install/langs/en.xml

@@ -237,6 +237,7 @@
     <string name="_bx_shopify_txt_sample_single_with_article"><![CDATA[a shop item]]></string>
     <string name="_bx_shopify_txt_sample_comment_single"><![CDATA[comment to shop item]]></string>
     <string name="_bx_shopify_txt_sample_vote_single"><![CDATA[vote to shop item]]></string>
+    <string name="_bx_shopify_txt_sample_reaction_single"><![CDATA['{0}' reaction to shop item]]></string>
     <string name="_bx_shopify_txt_sample_score_up_single"><![CDATA[score up vote to shop item]]></string>
     <string name="_bx_shopify_txt_sample_score_down_single"><![CDATA[score down vote to shop item]]></string>
 </resources>

+ 1 - 0
modules/boonex/snipcart/classes/BxSnipcartConfig.php

@@ -123,6 +123,7 @@ class BxSnipcartConfig extends BxBaseModTextConfig
             	'txt_sample_single_with_article' => '_bx_snipcart_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_snipcart_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_snipcart_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_snipcart_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_snipcart_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_snipcart_txt_sample_score_down_single',
             	'form_field_author' => '_bx_snipcart_form_entry_input_author',

+ 1 - 0
modules/boonex/snipcart/install/langs/en.xml

@@ -256,6 +256,7 @@
     <string name="_bx_snipcart_txt_sample_single_with_article"><![CDATA[a shop item]]></string>
     <string name="_bx_snipcart_txt_sample_comment_single"><![CDATA[comment to shop item]]></string>
     <string name="_bx_snipcart_txt_sample_vote_single"><![CDATA[vote to shop item]]></string>
+    <string name="_bx_snipcart_txt_sample_reaction_single"><![CDATA['{0}' reaction to shop item]]></string>
     <string name="_bx_snipcart_txt_sample_score_up_single"><![CDATA[score up vote to shop item]]></string>
     <string name="_bx_snipcart_txt_sample_score_down_single"><![CDATA[score down vote to shop item]]></string>
 </resources>

+ 1 - 0
modules/boonex/timeline/classes/BxTimelineConfig.php

@@ -115,6 +115,7 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
                 'txt_sample_single_ext' => '_bx_timeline_txt_sample_ext',
             	'txt_sample_comment_single' => '_bx_timeline_txt_sample_comment_single',
                 'txt_sample_vote_single' => '_bx_timeline_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_timeline_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_timeline_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_timeline_txt_sample_score_down_single',
                 'txt_sample_with_link' => '_bx_timeline_txt_sample_with_link',

+ 1 - 0
modules/boonex/timeline/install/langs/en.xml

@@ -240,6 +240,7 @@
 	<string name="_bx_timeline_txt_sample_ext"><![CDATA[timeline post]]></string>
 	<string name="_bx_timeline_txt_sample_comment_single"><![CDATA[comment to timeline post]]></string>
     <string name="_bx_timeline_txt_sample_vote_single"><![CDATA[vote to timeline post]]></string>
+    <string name="_bx_timeline_txt_sample_reaction_single"><![CDATA['{0}' reaction to timeline post]]></string>
     <string name="_bx_timeline_txt_sample_score_up_single"><![CDATA[score up vote to timeline post]]></string>
     <string name="_bx_timeline_txt_sample_score_down_single"><![CDATA[score down vote to timeline post]]></string>
     <string name="_bx_timeline_txt_sample_with_link"><![CDATA[with link]]></string>

+ 1 - 0
modules/boonex/videos/classes/BxVideosConfig.php

@@ -146,6 +146,7 @@ class BxVideosConfig extends BxBaseModTextConfig
                 'txt_sample_single_with_article' => '_bx_videos_txt_sample_single_with_article',
                 'txt_sample_comment_single' => '_bx_videos_txt_sample_comment_single',
                 'txt_sample_vote_single' => '_bx_videos_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_videos_txt_sample_reaction_single',
                 'txt_sample_score_up_single' => '_bx_videos_txt_sample_score_up_single',
                 'txt_sample_score_down_single' => '_bx_videos_txt_sample_score_down_single',
                 'form_field_author' => '_bx_videos_form_entry_input_author',

+ 1 - 0
modules/boonex/videos/install/langs/en.xml

@@ -220,6 +220,7 @@
     <string name="_bx_videos_txt_sample_single_with_article"><![CDATA[a video]]></string>
     <string name="_bx_videos_txt_sample_comment_single"><![CDATA[comment to video]]></string>
     <string name="_bx_videos_txt_sample_vote_single"><![CDATA[vote to video]]></string>
+    <string name="_bx_videos_txt_sample_reaction_single"><![CDATA['{0}' reaction to video]]></string>
     <string name="_bx_videos_txt_sample_score_up_single"><![CDATA[score up vote to video]]></string>
     <string name="_bx_videos_txt_sample_score_down_single"><![CDATA[score down vote to video]]></string>
     <string name="_bx_videos_txt_n_views"><![CDATA[{0} views]]></string>