AntonLV 9 лет назад
Родитель
Сommit
7daf8ccda1
100 измененных файлов с 17769 добавлено и 0 удалено
  1. 266 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/classes/BxMarketFormEntry.php
  2. 546 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/classes/BxMarketModule.php
  3. 143 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/classes/BxMarketSearchResult.php
  4. 434 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/classes/BxMarketTemplate.php
  5. 138 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/install/config.php
  6. 372 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/install/langs/en.xml
  7. 57 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/install/sql/disable.sql
  8. 499 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/install/sql/enable.sql
  9. 509 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/install/sql/install.sql
  10. 53 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/install/sql/uninstall.sql
  11. 93 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/js/entry.js
  12. 7 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/template/css/forms.css
  13. 134 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/template/css/main.css
  14. 78 0
      modules/boonex/market/updates/9.0.5_9.0.6/source/template/unit_gallery.html
  15. 190 0
      modules/boonex/notifications/updates/9.0.4_9.0.5/source/classes/BxNtfsModule.php
  16. 198 0
      modules/boonex/notifications/updates/9.0.4_9.0.5/source/classes/BxNtfsResponse.php
  17. 191 0
      modules/boonex/notifications/updates/9.0.4_9.0.5/source/classes/BxNtfsTemplate.php
  18. 82 0
      modules/boonex/notifications/updates/9.0.4_9.0.5/source/install/config.php
  19. 35 0
      modules/boonex/notifications/updates/9.0.4_9.0.5/source/install/langs/en.xml
  20. 112 0
      modules/boonex/oauth2/updates/9.0.4_9.0.5/source/classes/BxOAuthDb.php
  21. 100 0
      modules/boonex/oauth2/updates/9.0.4_9.0.5/source/classes/BxOAuthFormAdd.php
  22. 258 0
      modules/boonex/oauth2/updates/9.0.4_9.0.5/source/classes/BxOAuthModule.php
  23. 68 0
      modules/boonex/oauth2/updates/9.0.4_9.0.5/source/install/config.php
  24. 24 0
      modules/boonex/oauth2/updates/9.0.4_9.0.5/source/install/langs/en.xml
  25. 51 0
      modules/boonex/ocean/updates/9.0.4_9.0.5/install/config.php
  26. 26 0
      modules/boonex/ocean/updates/9.0.4_9.0.5/install/installer.php
  27. 46 0
      modules/boonex/ocean/updates/9.0.4_9.0.5/source/data/template/system/_sub_footer.html
  28. 60 0
      modules/boonex/ocean/updates/9.0.4_9.0.5/source/data/template/system/css/general.css
  29. 68 0
      modules/boonex/ocean/updates/9.0.4_9.0.5/source/install/config.php
  30. 198 0
      modules/boonex/organizations/updates/9.0.4_9.0.5/source/classes/BxOrgsConfig.php
  31. 191 0
      modules/boonex/organizations/updates/9.0.4_9.0.5/source/classes/BxOrgsSearchResult.php
  32. 148 0
      modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/config.php
  33. 298 0
      modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/langs/en.xml
  34. 75 0
      modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/sql/disable.sql
  35. 469 0
      modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/sql/enable.sql
  36. 293 0
      modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/sql/install.sql
  37. 38 0
      modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/sql/uninstall.sql
  38. 1 0
      modules/boonex/organizations/updates/9.0.4_9.0.5/source/template/unit_wo_info.html
  39. 1 0
      modules/boonex/organizations/updates/9.0.4_9.0.5/source/template/unit_wo_links.html
  40. 154 0
      modules/boonex/payment/updates/9.0.4_9.0.5/source/classes/BxPaymentGridCart.php
  41. 710 0
      modules/boonex/payment/updates/9.0.4_9.0.5/source/classes/BxPaymentModule.php
  42. 438 0
      modules/boonex/payment/updates/9.0.4_9.0.5/source/classes/BxPaymentTemplate.php
  43. 70 0
      modules/boonex/payment/updates/9.0.4_9.0.5/source/install/config.php
  44. 496 0
      modules/boonex/payment/updates/9.0.4_9.0.5/source/install/langs/en.xml
  45. 5 0
      modules/boonex/payment/updates/9.0.4_9.0.5/source/template/providers_select.html
  46. 197 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/classes/BxPersonsConfig.php
  47. 28 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/classes/BxPersonsFormEntry.php
  48. 191 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/classes/BxPersonsSearchResult.php
  49. 148 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/install/config.php
  50. 261 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/install/langs/en.xml
  51. 72 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/install/sql/disable.sql
  52. 455 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/install/sql/enable.sql
  53. 254 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/install/sql/install.sql
  54. 37 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/install/sql/uninstall.sql
  55. 1 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/template/unit_wo_info.html
  56. 1 0
      modules/boonex/persons/updates/9.0.4_9.0.5/source/template/unit_wo_links.html
  57. 119 0
      modules/boonex/polls/updates/9.0.1_9.0.2/source/classes/BxPollsModule.php
  58. 149 0
      modules/boonex/polls/updates/9.0.1_9.0.2/source/classes/BxPollsSearchResult.php
  59. 202 0
      modules/boonex/polls/updates/9.0.1_9.0.2/source/classes/BxPollsTemplate.php
  60. 135 0
      modules/boonex/polls/updates/9.0.1_9.0.2/source/install/config.php
  61. 220 0
      modules/boonex/polls/updates/9.0.1_9.0.2/source/install/langs/en.xml
  62. 48 0
      modules/boonex/polls/updates/9.0.1_9.0.2/source/install/sql/disable.sql
  63. 383 0
      modules/boonex/polls/updates/9.0.1_9.0.2/source/install/sql/enable.sql
  64. 343 0
      modules/boonex/polls/updates/9.0.1_9.0.2/source/install/sql/install.sql
  65. 64 0
      modules/boonex/polls/updates/9.0.1_9.0.2/source/install/sql/uninstall.sql
  66. 12 0
      modules/boonex/polls/updates/9.0.1_9.0.2/source/template/subentries_results.html
  67. 137 0
      modules/boonex/posts/updates/9.0.4_9.0.5/source/classes/BxPostsSearchResult.php
  68. 28 0
      modules/boonex/posts/updates/9.0.4_9.0.5/source/classes/BxPostsUploaderHTML5.php
  69. 28 0
      modules/boonex/posts/updates/9.0.4_9.0.5/source/classes/BxPostsUploaderSimple.php
  70. 135 0
      modules/boonex/posts/updates/9.0.4_9.0.5/source/install/config.php
  71. 220 0
      modules/boonex/posts/updates/9.0.4_9.0.5/source/install/langs/en.xml
  72. 51 0
      modules/boonex/posts/updates/9.0.4_9.0.5/source/install/sql/disable.sql
  73. 400 0
      modules/boonex/posts/updates/9.0.4_9.0.5/source/install/sql/enable.sql
  74. 325 0
      modules/boonex/posts/updates/9.0.4_9.0.5/source/install/sql/install.sql
  75. 54 0
      modules/boonex/posts/updates/9.0.4_9.0.5/source/install/sql/uninstall.sql
  76. 51 0
      modules/boonex/profiler/updates/9.0.4_9.0.5/install/config.php
  77. 13 0
      modules/boonex/profiler/updates/9.0.4_9.0.5/install/installer.php
  78. 689 0
      modules/boonex/profiler/updates/9.0.4_9.0.5/source/classes/BxProfiler.php
  79. 68 0
      modules/boonex/profiler/updates/9.0.4_9.0.5/source/install/config.php
  80. 51 0
      modules/boonex/protean/updates/9.0.4_9.0.5/install/config.php
  81. 26 0
      modules/boonex/protean/updates/9.0.4_9.0.5/install/installer.php
  82. 770 0
      modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/css/default.less
  83. 3 0
      modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/designbox_10.html
  84. 7 0
      modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/designbox_11.html
  85. 7 0
      modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/designbox_13.html
  86. 7 0
      modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/designbox_14.html
  87. 451 0
      modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/scripts/BxTemplConfig.php
  88. 68 0
      modules/boonex/protean/updates/9.0.4_9.0.5/source/install/config.php
  89. 222 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_albums/ru.xml
  90. 38 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_chat_plus/ru.xml
  91. 47 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_contact/ru.xml
  92. 135 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_convos/ru.xml
  93. 296 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_decorous/ru.xml
  94. 463 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_developer/ru.xml
  95. 28 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_dolcon/ru.xml
  96. 405 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_events/ru.xml
  97. 207 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_files/ru.xml
  98. 268 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_forum/ru.xml
  99. 27 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_googlecon/ru.xml
  100. 301 0
      modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_groups/ru.xml

+ 266 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/classes/BxMarketFormEntry.php

@@ -0,0 +1,266 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Market Market
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Create/Edit entry form
+ */
+class BxMarketFormEntry extends BxBaseModTextFormEntry
+{
+    public function __construct($aInfo, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_market';
+        parent::__construct($aInfo, $oTemplate);
+
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        $iProfileId = bx_get_logged_profile_id();
+
+        if(isset($this->aInputs[$CNF['FIELD_TITLE']], $this->aInputs[$CNF['FIELD_NAME']])) {
+        	$sJsObject = $this->_oModule->_oConfig->getJsObject('entry');
+
+        	$this->aInputs[$CNF['FIELD_TITLE']]['attrs']['onblur'] = "javascript:" . $sJsObject . ".checkName('" . $CNF['FIELD_TITLE'] . "', '" . $CNF['FIELD_NAME'] . "');";
+        }
+
+	    if(isset($this->aInputs[$CNF['FIELD_FILE']])) {
+            $this->aInputs[$CNF['FIELD_FILE']]['storage_object'] = $CNF['OBJECT_STORAGE_FILES'];
+            $this->aInputs[$CNF['FIELD_FILE']]['uploaders'] =  !empty($this->aInputs[$CNF['FIELD_FILE']]['value']) ? unserialize($this->aInputs[$CNF['FIELD_FILE']]['value']) : $CNF['OBJECT_UPLOADERS'];
+            $this->aInputs[$CNF['FIELD_FILE']]['images_transcoder'] = '';
+            $this->aInputs[$CNF['FIELD_FILE']]['storage_private'] = 1;
+            $this->aInputs[$CNF['FIELD_FILE']]['multiple'] = true;
+            $this->aInputs[$CNF['FIELD_FILE']]['content_id'] = 0;
+            $this->aInputs[$CNF['FIELD_FILE']]['ghost_template'] = '';
+        }
+
+        $bRecurring = $this->_oModule->_oDb->getParam($CNF['OPTION_ENABLE_RECURRING']) == 'on';
+        if(!$bRecurring) {
+        	$this->aInputs[$CNF['FIELD_DURATION_RECURRING']]['type'] = 'hidden';
+			$this->aInputs[$CNF['FIELD_PRICE_RECURRING']]['type'] = 'hidden';
+			$this->aInputs[$CNF['FIELD_PRICE_RECURRING']]['value'] = 0;
+
+			unset($this->aInputs[$CNF['FIELD_HEADER_BEG_RECURRING']]);
+			unset($this->aInputs[$CNF['FIELD_HEADER_END_RECURRING']]);
+        }
+
+        $oPayment = BxDolPayments::getInstance();
+        if(isset($this->aInputs[$CNF['FIELD_WARNING_SINGLE']])) {
+	        if(!$oPayment->isAcceptingPayments($iProfileId, BX_PAYMENT_TYPE_SINGLE)) 
+	        	$this->aInputs[$CNF['FIELD_WARNING_SINGLE']]['value'] = MsgBox(_t($this->aInputs[$CNF['FIELD_WARNING_SINGLE']]['value'], $oPayment->getDetailsUrl()));
+	        else 
+	        	unset($this->aInputs[$CNF['FIELD_WARNING_SINGLE']]);
+        }
+
+        if(isset($this->aInputs[$CNF['FIELD_WARNING_RECURRING']])) {
+	        if($bRecurring && !$oPayment->isAcceptingPayments($iProfileId, BX_PAYMENT_TYPE_RECURRING))
+	        	$this->aInputs[$CNF['FIELD_WARNING_RECURRING']]['value'] = MsgBox(_t($this->aInputs[$CNF['FIELD_WARNING_RECURRING']]['value'], $oPayment->getDetailsUrl()));
+	        else 
+	        	unset($this->aInputs[$CNF['FIELD_WARNING_RECURRING']]);
+        }
+
+		if(isset($this->aInputs[$CNF['FIELD_ALLOW_PURCHASE_TO']]))
+			$this->aInputs[$CNF['FIELD_ALLOW_PURCHASE_TO']] = BxDolPrivacy::getGroupChooser($CNF['OBJECT_PRIVACY_PURCHASE']);
+
+		$aDynamicGroups = array(
+			array ('key' => '', 'value' => '----'),
+			array ('key' => 'c', 'value' => _t('_bx_market_privacy_group_customers'))
+		);
+
+		if(isset($this->aInputs[$CNF['FIELD_ALLOW_COMMENT_TO']])) {
+			$this->aInputs[$CNF['FIELD_ALLOW_COMMENT_TO']] = BxDolPrivacy::getGroupChooser($CNF['OBJECT_PRIVACY_COMMENT'], $iProfileId, array('dynamic_groups' => $aDynamicGroups));
+			$this->aInputs[$CNF['FIELD_ALLOW_COMMENT_TO']]['db']['pass'] = 'Xss';
+		}
+
+		if(isset($this->aInputs[$CNF['FIELD_ALLOW_VOTE_TO']])) {
+			$this->aInputs[$CNF['FIELD_ALLOW_VOTE_TO']] = BxDolPrivacy::getGroupChooser($CNF['OBJECT_PRIVACY_VOTE'], $iProfileId, array('dynamic_groups' => $aDynamicGroups));
+			$this->aInputs[$CNF['FIELD_ALLOW_VOTE_TO']]['db']['pass'] = 'Xss';
+		}
+
+		if(isset($this->aInputs[$CNF['FIELD_SUBENTRIES']]) && $this->_oModule->checkAllowedSetSubentries() !== CHECK_ACTION_RESULT_ALLOWED)
+		    unset($this->aInputs[$CNF['FIELD_SUBENTRIES']]);
+    }
+
+	function initChecker ($aValues = array (), $aSpecificValues = array())
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        if (isset($this->aInputs[$CNF['FIELD_FILE']])) {
+
+            $aContentInfo = false;
+            if ($aValues && !empty($aValues['id'])) {
+                $aContentInfo = $this->_oModule->_oDb->getContentInfoById ($aValues['id']);
+                $this->aInputs[$CNF['FIELD_FILE']]['content_id'] = $aValues['id'];
+            }
+
+            $this->aInputs[$CNF['FIELD_FILE']]['ghost_template'] = $this->_oModule->_oTemplate->getGhostTemplateFile($this, $aContentInfo);
+        }
+
+        if(isset($this->aInputs[$CNF['FIELD_SUBENTRIES']]) && !empty($aValues[$CNF['FIELD_ID']])) {
+            $oConnection = BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTION_SUBENTRIES']);
+            if($oConnection)
+		        $this->aInputs[$CNF['FIELD_SUBENTRIES']]['value'] = $oConnection->getConnectedContent((int)$aValues[$CNF['FIELD_ID']]);
+		}
+
+        return parent::initChecker($aValues, $aSpecificValues);
+    }
+
+	public function insert ($aValsToAdd = array(), $isIgnore = false)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+	    if($this->_oModule->checkAllowedSetCover() === CHECK_ACTION_RESULT_ALLOWED) {
+            $aCover = isset($_POST[$CNF['FIELD_COVER']]) ? bx_process_input ($_POST[$CNF['FIELD_COVER']], BX_DATA_INT) : false;
+
+            $aValsToAdd[$CNF['FIELD_COVER']] = 0;
+            if(!empty($aCover) && is_array($aCover) && ($iFileCover = array_pop($aCover)))
+                $aValsToAdd[$CNF['FIELD_COVER']] = $iFileCover;
+        }
+
+        $aPackage = bx_process_input(bx_get($CNF['FIELD_PACKAGE']), BX_DATA_INT);
+		$aValsToAdd[$CNF['FIELD_PACKAGE']] = 0;
+		if(!empty($aPackage) && is_array($aPackage) && ($iFilePackage = array_pop($aPackage)))
+			$aValsToAdd[$CNF['FIELD_PACKAGE']] = $iFilePackage;
+
+        $iContentId = parent::insert ($aValsToAdd, $isIgnore);
+        if(!empty($iContentId))
+            $this->processFiles($CNF['FIELD_FILE'], $iContentId, true, $CNF['OBJECT_STORAGE_FILES']);
+
+        return $iContentId;
+    }
+
+	function update ($iContentId, $aValsToAdd = array(), &$aTrackTextFieldsChanges = null)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+	    if($this->_oModule->checkAllowedSetCover() === CHECK_ACTION_RESULT_ALLOWED) {
+            $aCover = bx_process_input (bx_get($CNF['FIELD_COVER']), BX_DATA_INT);
+
+            $aValsToAdd[$CNF['FIELD_COVER']] = 0;
+            if (!empty($aCover) && is_array($aCover) && ($iFileCover = array_pop($aCover)))
+                $aValsToAdd[$CNF['FIELD_COVER']] = $iFileCover;
+        }
+
+		$aPackage = bx_process_input(bx_get($CNF['FIELD_PACKAGE']), BX_DATA_INT);
+		$aValsToAdd[$CNF['FIELD_PACKAGE']] = 0;
+		if(!empty($aPackage) && is_array($aPackage) && ($iFilePackage = array_pop($aPackage)))
+			$aValsToAdd[$CNF['FIELD_PACKAGE']] = $iFilePackage;
+
+        $iResult = parent::update ($iContentId, $aValsToAdd, $aTrackTextFieldsChanges);
+
+        $this->processFiles($CNF['FIELD_FILE'], $iContentId, false, $CNF['OBJECT_STORAGE_FILES']);
+
+        return $iResult;
+    }
+
+	function delete ($iContentId, $aContentInfo = array())
+    {
+    	$bResult = parent::delete($iContentId, $aContentInfo);
+        if(!$bResult)
+			return $bResult;
+
+		$bResult &= $this->_oModule->_oDb->deassociatePhotoWithContent($iContentId, 0);
+		$bResult &= $this->_oModule->_oDb->deassociateFileWithContent($iContentId, 0);
+
+		return $bResult;
+    }
+
+    protected function _associalFileWithContent($oStorage, $iFileId, $iProfileId, $iContentId, $sPictureField = '')
+    {
+        parent::_associalFileWithContent($oStorage, $iFileId, $iProfileId, $iContentId, $sPictureField);
+
+        $sStorage = $oStorage->getObject();
+        switch($sStorage) {
+        	case $this->_oModule->_oConfig->CNF['OBJECT_STORAGE']:
+        		$this->_oModule->_oDb->associatePhotoWithContent($iContentId, $iFileId, $this->getCleanValue('title-' . $iFileId));
+        		break;
+
+        	case $this->_oModule->_oConfig->CNF['OBJECT_STORAGE_FILES']:
+        		$aParams = array(
+        			'type' => $this->getCleanValue('type-' . $iFileId)        			
+        		);
+
+        		switch ($aParams['type']) {
+        			case BX_MARKET_FILE_TYPE_VERSION:
+        				$aParams = array_merge($aParams, array(
+        					'version' => $this->getCleanValue('version-' . $iFileId),
+        				));
+        				break;
+        				
+        			case BX_MARKET_FILE_TYPE_UPDATE:
+        				$aParams = array_merge($aParams, array(
+        					'version' => $this->getCleanValue('version-from-' . $iFileId),
+        					'version_to' => $this->getCleanValue('version-to-' . $iFileId),
+        				));
+        				break;
+        		}
+
+        		$this->_oModule->_oDb->associateFileWithContent($iContentId, $iFileId, $aParams);
+        		break;
+        }
+    }
+
+    protected function _getPhotoGhostTmplVars($aContentInfo = array())
+    {
+    	$CNF = &$this->_oModule->_oConfig->CNF;
+
+    	$aResult = parent::_getPhotoGhostTmplVars($aContentInfo);
+    	$aResult = array_merge($aResult, array(
+    		'cover_id' => isset($aContentInfo[$CNF['FIELD_COVER']]) ? $aContentInfo[$CNF['FIELD_COVER']] : 0,
+    		'bx_if:set_cover' => array (
+				'condition' => CHECK_ACTION_RESULT_ALLOWED === $this->_oModule->checkAllowedSetCover(),
+				'content' => array (
+					'name_cover' => $CNF['FIELD_COVER'],
+				),
+			),
+    	));
+
+    	return $aResult;
+	}
+
+    protected function genCustomInputSubentries($aInput)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        $sGetSubentriesUrl = BX_DOL_URL_ROOT . $this->_oModule->_oConfig->getBaseUri() . 'get_subentries';
+        $sPlaceholder = bx_html_attribute(_t('_bx_market_form_entry_input_subentries_placeholder'), BX_ESCAPE_STR_QUOTE);
+
+        $this->addJsJQueryUI();
+
+        $this->oTemplate->addJs(array(
+            'jquery.form.min.js',
+        ));
+
+        $sVals = '';
+        if (!empty($aInput['value']) && is_array($aInput['value'])) {
+            foreach ($aInput['value'] as $iValue) {
+                $iValue = (int)$iValue;
+                if(!$iValue)
+                    continue;
+
+                $aContentInfo = $this->_oModule->_oDb->getContentInfoById($iValue);
+                if(empty($aContentInfo) || !is_array($aContentInfo))
+                    continue;
+                
+               $sVals .= '<b class="val bx-def-color-bg-hl bx-def-round-corners">' . $aContentInfo[$CNF['FIELD_TITLE']] . '<input type="hidden" name="' . $aInput['name'] . '[]" value="' . $iValue . '" /></b>';
+            }
+            $sVals = trim($sVals, ',');
+        }
+
+        return $this->oTemplate->parseHtmlByName('form_field_custom_suggestions.html', array(
+            'id' => $aInput['name'] . time(),
+            'url_get_recipients' => $sGetSubentriesUrl,
+            'name' => $aInput['name'],
+			'b_img' => false,
+            'placeholder' => $sPlaceholder,
+            'vals' => $sVals,
+        ));
+    }
+}
+
+/** @} */

+ 546 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/classes/BxMarketModule.php

@@ -0,0 +1,546 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Market Market
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+define('BX_MARKET_LICENSE_TYPE_SINGLE', 'single'); //--- one-time payment license
+define('BX_MARKET_LICENSE_TYPE_RECURRING', 'recurring'); //--- recurring payment license
+
+define('BX_MARKET_FILE_TYPE_VERSION', 'version');
+define('BX_MARKET_FILE_TYPE_UPDATE', 'update');
+
+/**
+ * Market module
+ */
+class BxMarketModule extends BxBaseModTextModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+
+        $CNF = &$this->_oConfig->CNF;
+        $this->_aSearchableNamesExcept = array_merge($this->_aSearchableNamesExcept, array(
+             $CNF['FIELD_NAME'],
+             $CNF['FIELD_PRICE_SINGLE'],
+             $CNF['FIELD_PRICE_RECURRING'],
+             $CNF['FIELD_DURATION_RECURRING'],
+             $CNF['FIELD_TRIAL_RECURRING'],
+             $CNF['FIELD_ALLOW_PURCHASE_TO'],
+             $CNF['FIELD_ALLOW_COMMENT_TO'],
+             $CNF['FIELD_ALLOW_VOTE_TO']
+        ));
+    }
+
+    public function actionCheckName()
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$sTitle = strtolower(bx_process_input(bx_get('title')));
+    	if(empty($sTitle))
+    		return echoJson(array());
+
+    	echoJson(array(
+    		'title' => $sTitle,
+    		'name' => uriGenerate($sTitle, $CNF['TABLE_ENTRIES'], $CNF['FIELD_NAME'])
+    	));
+    }
+
+    public function actionGetSubentries()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $sTerm = bx_get('term');
+        $iLimit = (int)bx_get('limit');
+        if(empty($iLimit))
+            $iLimit = 10;
+
+        $aResult = array();
+        $aEntries = $this->_oDb->searchByAuthorTerm($this->_iProfileId, $sTerm, $iLimit);
+        foreach ($aEntries as $aEntry)
+            $aResult[] = array('value' => $aEntry[$CNF['FIELD_ID']], 'label' => $aEntry[$CNF['FIELD_TITLE']]);
+
+        // sort result
+        usort($aResult, function($r1, $r2) {
+            return strcmp($r1['label'], $r2['label']);
+        });
+
+        echoJson(array_slice($aResult, 0, $iLimit));
+    }
+
+    public function serviceGetSearchableFields ()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aResult = parent::serviceGetSearchableFields();
+        unset($aResult[$CNF['FIELD_PRICE_SINGLE']], $aResult[$CNF['FIELD_TRIAL_RECURRING']]);
+
+        return $aResult;
+    }
+    public function serviceEntityCreate ()
+    {
+    	$oPayments = BxDolPayments::getInstance();
+    	if(!$oPayments->isActive())
+    		return MsgBox(_t('_bx_market_err_no_payments'));
+
+    	if(!$oPayments->isAcceptingPayments($this->_iProfileId))
+    		return MsgBox(_t('_bx_market_err_not_accept_payments', $oPayments->getDetailsUrl()));
+
+    	$this->_oTemplate->addJs(array('entry.js'));
+    	return $this->_oTemplate->getJsCode('entry') . parent::serviceEntityCreate();
+    }
+
+    public function serviceEntityDownload ($iContentId = 0)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	if(!$iContentId)
+            $iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+        if(!$iContentId)
+            return false;
+
+		$aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+		if(empty($aContentInfo) || !is_array($aContentInfo))
+            return MsgBox(_t('_sys_txt_error_occured'));
+
+    	if($this->checkAllowedDownload($aContentInfo) !== CHECK_ACTION_RESULT_ALLOWED)
+    		return MsgBox(_t('_bx_market_err_access_denied'));
+
+        return $this->_oTemplate->entryAttachmentsByStorage($CNF['OBJECT_STORAGE_FILES'], $aContentInfo, array(
+            'filter_field' => ''
+        ));
+    }
+
+    public function serviceEntityRating($iContentId = 0)
+    {
+    	return $this->_serviceTemplateFunc ('entryRating', $iContentId);
+    }
+
+	public function serviceEntityAuthorEntities($iContentId = 0)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$aContentInfo = $this->_getContentInfo($iContentId);
+    	if($aContentInfo === false)
+    		return false;
+
+		$oProfile = BxDolProfile::getInstance($aContentInfo[$CNF['FIELD_AUTHOR']]);
+        if (!$oProfile)
+            $oProfile = BxDolProfileUndefined::getInstance();
+
+		$aBlock = $this->_serviceBrowse ('author', array('author' => $aContentInfo[$CNF['FIELD_AUTHOR']], 'except' => array($iContentId), 'per_page' => 2), BX_DB_PADDING_DEF, true);
+		$aBlock['title'] = _t('_bx_market_page_block_title_entry_author_entries', $oProfile->getDisplayName());
+
+    	return $aBlock;
+    }
+
+    /**
+     * Licenses 
+     */
+	public function serviceBlockLicenses() 
+	{
+		$sGrid = $this->_oConfig->getGridObject('licenses');
+		$oGrid = BxDolGrid::getObjectInstance($sGrid);
+        if(!$oGrid)
+			return '';
+
+        $this->_oDb->updateLicense(array('new' => 0), array('profile_id' => bx_get_logged_profile_id(), 'new' => 1));
+
+		$this->_oTemplate->addJs(array('licenses.js'));
+		return array(
+        	'content' => $this->_oTemplate->getJsCode('licenses', array('sObjNameGrid' => $sGrid)) . $oGrid->getCode(),
+        );
+	}
+	public function serviceBlockLicensesNote()
+	{
+	    return MsgBox(_t('_bx_market_page_block_content_licenses_note'));
+	}
+
+    /**
+     * Get number of unused licenses for some profile. It can be used in menus with "alert" counters.
+     * 
+     * @param $iProfileId - profile to get unused licenses for, if omitted then currently logged in profile is used
+     * @return integer
+     */
+    public function serviceGetUnusedLicensesNum ($iProfileId = 0)
+    {
+        if(!$iProfileId)
+			$iProfileId = bx_get_logged_profile_id();
+
+        $aLicenses = $this->_oDb->getLicense(array('type' => 'new', 'profile_id' => (int)$iProfileId));
+        return !empty($aLicenses) && is_array($aLicenses) ? count($aLicenses) : 0;
+    }
+
+	public function serviceHasLicense ($iProfileId, $iProductId, $sDomain = '')
+    {
+    	return $this->_oDb->hasLicense($iProfileId, $iProductId, $sDomain);
+    }
+
+    public function serviceGetLicense ($aParams)
+    {
+    	return $this->_oDb->getLicense($aParams);
+    }
+
+    public function serviceUpdateLicense ($aSet, $aWhere)
+    {
+    	return $this->_oDb->updateLicense($aSet, $aWhere);
+    }
+
+    public function serviceGetEntryBy($sType, $mixedValue)
+    {
+    	return $this->_oDb->getContentInfoBy(array('type' => $sType, 'value' => $mixedValue));
+    }
+
+    public function serviceGetEntriesBy($aParams)
+    {
+    	return $this->_oDb->getContentInfoBy($aParams);
+    }
+
+    public function serviceGetThumbnail($iPhotoId)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE']);
+    	$oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_GALLERY']);
+
+    	return array(
+    		'small' => $oImagesTranscoder ? $oImagesTranscoder->getFileUrl($iPhotoId) : '',
+    		'big' => $oStorage ? $oStorage->getFileUrlById($iPhotoId) : ''
+    	);
+    }
+
+	public function serviceGetCover($iPhotoId)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE']);
+    	$oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_COVER']);
+
+    	return array(
+    		'small' => $oImagesTranscoder ? $oImagesTranscoder->getFileUrl($iPhotoId) : '',
+    		'big' => $oStorage ? $oStorage->getFileUrlById($iPhotoId) : ''
+    	);
+    }
+
+    public function serviceGetFile($iFileId)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$aFile = $this->_oDb->getFile(array(
+    		'type' => 'file_id_ext', 
+    		'file_id' => $iFileId
+    	));
+
+    	if(!empty($aFile) && is_array($aFile)) {
+	    	$oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE_FILES']);
+	    	$aFile['file_url'] = $oStorage ? $oStorage->getFileUrlById($iFileId) : '';
+    	}
+
+    	return $aFile;
+    }
+
+	public function serviceGetUpdates($iContentId, $sVersion = '')
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$aFile = $this->_oDb->getFile(array(
+    		'type' => 'content_id_and_type', 
+    		'content_id' => $iContentId, 
+    		'file_type' => 'update',
+    		'version' => $sVersion
+    	));
+
+    	if(!empty($aFile) && is_array($aFile)) {
+	    	$oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE_FILES']);
+	    	$aFile['file_url'] = $oStorage ? $oStorage->getFileUrlById($aFile['file_id']) : '';
+    	}
+
+    	return $aFile;
+    }
+
+    public function serviceGetScreenshots($iItemId)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+        if(!$iItemId)
+			return array();
+
+    	$aData = $this->_oDb->getContentInfoById($iItemId);
+    	
+    	$aPhotos = $this->_oDb->getPhoto(array('type' => 'content_id', 'content_id' => $aData[$CNF['FIELD_ID']], 'except' => array($aData[$CNF['FIELD_THUMB']], $aData[$CNF['FIELD_COVER']])));
+    	if(empty($aPhotos) || !is_array($aPhotos))
+    		return array();
+
+		$oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE']);
+    	$oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_SCREENSHOT']);
+
+    	$aResult = array();
+    	foreach($aPhotos as $aPhoto) 
+    		$aResult[] = array(
+    			'id' => $aPhoto['file_id'],
+    			'url_sm' => $oImagesTranscoder ? $oImagesTranscoder->getFileUrl($aPhoto['file_id']) : '',
+    			'url_bg' => $oStorage ? $oStorage->getFileUrlById($aPhoto['file_id']) : ''
+    		);
+
+		return $aResult;
+    }
+    
+    /**
+     * Integration with Payment based modules.  
+     */
+	public function serviceGetPaymentData()
+    {
+        return $this->_aModule;
+    }
+
+    public function serviceGetCartItem($iItemId)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+        if(!$iItemId)
+			return array();
+
+		$aItem = $this->_oDb->getContentInfoById($iItemId);
+        if(empty($aItem) || !is_array($aItem))
+			return array();
+
+		return array (
+			'id' => $aItem[$CNF['FIELD_ID']],
+			'author_id' => $aItem[$CNF['FIELD_AUTHOR']],
+			'name' => $aItem[$CNF['FIELD_NAME']],
+			'title' => $aItem[$CNF['FIELD_TITLE']],
+			'description' => $aItem[$CNF['FIELD_TEXT']],
+			'url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=view-product&id=' . $aItem[$CNF['FIELD_ID']]),
+			'price_single' => $aItem[$CNF['FIELD_PRICE_SINGLE']],
+			'price_recurring' => $aItem[$CNF['FIELD_PRICE_RECURRING']],
+		    'trial_recurring' => $aItem[$CNF['FIELD_TRIAL_RECURRING']]
+        );
+    }
+
+    public function serviceGetCartItems($iSellerId)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+        $iSellerId = (int)$iSellerId;
+        if(empty($iSellerId))
+            return array();
+
+        $aItems = $this->_oDb->getEntriesByAuthor($iSellerId);
+
+        $aResult = array();
+        foreach($aItems as $aItem)
+            $aResult[] = array(
+				'id' => $aItem[$CNF['FIELD_ID']],
+				'author_id' => $aItem[$CNF['FIELD_AUTHOR']],
+            	'name' => $aItem[$CNF['FIELD_NAME']],
+				'title' => $aItem[$CNF['FIELD_TITLE']],
+				'description' => $aItem[$CNF['FIELD_TEXT']],
+				'url' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=view-product&id=' . $aItem[$CNF['FIELD_ID']]),
+				'price_single' => $aItem[$CNF['FIELD_PRICE_SINGLE']],
+            	'price_recurring' => $aItem[$CNF['FIELD_PRICE_RECURRING']],
+            	'trial_recurring' => $aItem[$CNF['FIELD_TRIAL_RECURRING']]
+           );
+
+        return $aResult;
+    }
+
+    public function serviceRegisterCartItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
+    {
+        return $this->_serviceRegisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, BX_MARKET_LICENSE_TYPE_SINGLE);
+    }
+
+    public function serviceRegisterSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
+    {
+		return $this->_serviceRegisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, BX_MARKET_LICENSE_TYPE_RECURRING);
+    }
+
+    public function serviceUnregisterCartItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
+    {
+        return $this->_serviceUnregisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, BX_MARKET_LICENSE_TYPE_SINGLE);
+    }
+
+    public function serviceUnregisterSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
+    {
+    	return $this->_serviceUnregisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, BX_MARKET_LICENSE_TYPE_RECURRING); 
+    }
+
+	public function serviceCancelSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder)
+    {
+    	//TODO: Do something if it's necessary.
+    	return true;
+    }
+
+    protected function _serviceRegisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, $sType)
+    {
+    	$aItem = $this->serviceGetCartItem($iItemId);
+        if(empty($aItem) || !is_array($aItem))
+			return array();
+
+        $iTrial = 0;
+		$sDuration = '';
+		if($sType == BX_MARKET_LICENSE_TYPE_RECURRING) {
+			$aProduct = $this->_oDb->getContentInfoById($iItemId);
+
+			$iTrial = $aProduct[$this->_oConfig->CNF['FIELD_TRIAL_RECURRING']];
+			$sDuration = $aProduct[$this->_oConfig->CNF['FIELD_DURATION_RECURRING']];
+		}
+
+    	$sAction = $this->_oDb->hasLicenseByOrder($iClientId, $iItemId, $sOrder) ? 'prolong' : 'register';
+        if(!$this->_oDb->{$sAction . 'License'}($iClientId, $iItemId, $iItemCount, $sOrder, $sLicense, $sType, $sDuration, $iTrial))
+            return array();
+
+		bx_alert($this->getName(), 'license_' . $sAction, 0, false, array(
+			'product_id' => $iItemId,
+			'profile_id' => $iClientId,
+			'order' => $sOrder,
+			'license' => $sLicense,
+			'type' => $sType,
+			'count' => $iItemCount,
+			'duration' => $sDuration,
+		    'trial' => $iTrial
+		));
+
+        return $aItem;
+    }
+
+    protected function _serviceUnregisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, $sType)
+    {
+    	if(!$this->_oDb->unregisterLicense($iClientId, $iItemId, $sOrder, $sLicense, $sType))
+    		return false;
+
+    	bx_alert($this->getName(), 'license_unregister', 0, false, array(
+			'product_id' => $iItemId,
+			'profile_id' => $iClientId,
+			'order' => $sOrder,
+			'license' => $sLicense,
+			'type' => $sType,
+			'count' => $iItemCount
+		));
+
+    	return true;
+    }
+
+    public function getGhostTemplateVars($aFile, $iProfileId, $iContentId, $oStorage, $oImagesTranscoder)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$sMethod = '';
+    	$sStorage = $oStorage->getObject();
+        switch($sStorage) {
+        	case $CNF['OBJECT_STORAGE']:
+        		$sMethod = 'getPhoto';
+        		break;
+
+			case $CNF['OBJECT_STORAGE_FILES']:
+				$sMethod = 'getFile';
+				break;
+        }
+
+		$aFileInfo = $this->_oDb->$sMethod(array('type' => 'file_id', 'file_id' => $aFile['id']));
+        $bFileInfo = !empty($aFileInfo) && is_array($aFileInfo);
+
+        $bFileInfoTitle = $bFileInfo && isset($aFileInfo['title']);
+
+		$aTmplVars = array(
+			'file_title' => $bFileInfoTitle ? $aFileInfo['title'] : '',
+			'file_title_attr' => $bFileInfoTitle ? bx_html_attribute($aFileInfo['title']) : '',
+		);
+
+		if($sStorage == $CNF['OBJECT_STORAGE'])
+			return $aTmplVars;
+
+		$bFileInfoVersion = $bFileInfo && isset($aFileInfo['version']);
+
+        $bFileInfoTypeVersion = !$bFileInfo || ($bFileInfo && isset($aFileInfo['type']) && $aFileInfo['type'] == BX_MARKET_FILE_TYPE_VERSION);
+        $bFileInfoTypeUpdate = $bFileInfo && isset($aFileInfo['type']) && $aFileInfo['type'] == BX_MARKET_FILE_TYPE_UPDATE;
+
+        $aVersions = $this->_oDb->$sMethod(array('type' => 'content_id', 'content_id' => $iContentId));
+
+		$aTmplVars = array_merge($aTmplVars, array(
+			'file_version' => $bFileInfoVersion ? $aFileInfo['version'] : '',
+			'file_version_attr' => $bFileInfoVersion ? bx_html_attribute($aFileInfo['version']) : '',
+
+			'file_type_version_selected' => $bFileInfoTypeVersion ? ' selected="selected"' : '',
+			'file_type_update_selected' => $bFileInfoTypeUpdate ? ' selected="selected"' : '',
+
+			'file_type_version_elements' => !$bFileInfoTypeVersion ? ' style="display:none;"' : '',
+			'file_type_update_elements' => !$bFileInfoTypeUpdate ? ' style="display:none;"' : '',
+
+			'file_version_from_options' => $this->_oTemplate->getGhostTemplateFileOptions('version', $aFileInfo, $aVersions),
+			'file_version_to_options' => $this->_oTemplate->getGhostTemplateFileOptions('version_to', $aFileInfo, $aVersions)
+		));
+
+		return $aTmplVars;
+    }
+
+    public function checkAllowedSetCover ()
+    {
+        $aCheck = checkActionModule($this->_iProfileId, 'set cover', $this->getName(), false);
+        if($aCheck[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED)
+            return $aCheck[CHECK_ACTION_MESSAGE];
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+    public function checkAllowedSetSubentries ()
+    {
+        $aCheck = checkActionModule($this->_iProfileId, 'set subentries', $this->getName(), false);
+        if($aCheck[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED)
+            return $aCheck[CHECK_ACTION_MESSAGE];
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+	public function checkAllowedDownload($aDataEntry, $isPerformAction = false)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        // moderator and owner always have access
+        if ($aDataEntry[$CNF['FIELD_AUTHOR']] == $this->_iProfileId || $this->_isModerator($isPerformAction))
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        // check ACL
+        $aCheck = checkActionModule($this->_iProfileId, 'download entry', $this->getName(), $isPerformAction);
+        if($aCheck[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED)
+			return $aCheck[CHECK_ACTION_MESSAGE];
+
+        if((float)$aDataEntry[$CNF['FIELD_PRICE_SINGLE']] == 0 && (float)$aDataEntry[$CNF['FIELD_PRICE_RECURRING']] == 0)
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+		if(!$this->_oDb->hasLicense($this->_iProfileId, $aDataEntry[$CNF['FIELD_ID']]))
+            return CHECK_ACTION_RESULT_NOT_ALLOWED;
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+    protected function _getContentInfo($iContentId = 0)
+    {
+    	if(!$iContentId)
+            $iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+        if(!$iContentId)
+            return false;
+
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+        if(!$aContentInfo)
+            return false;
+
+		return $aContentInfo;
+    }
+
+    protected function _entitySocialSharing ($iId, $aParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+        return parent::_entitySocialSharing($iId, array_merge($aParams, array(
+        	'object_vote' => ''
+        )));
+    }
+}
+
+/** @} */

+ 143 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/classes/BxMarketSearchResult.php

@@ -0,0 +1,143 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Market Market
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxMarketSearchResult extends BxBaseModTextSearchResult
+{
+    function __construct($sMode = '', $aParams = array())
+    {
+        parent::__construct($sMode, $aParams);
+
+        $this->aCurrent = array(
+            'name' => 'bx_market',
+            'module_name' => 'bx_market',
+            'object_metatags' => 'bx_market',
+            'title' => _t('_bx_market_page_title_browse'),
+            'table' => 'bx_market_products',
+            'ownFields' => array('id', 'title', 'text', 'price_single', 'price_recurring', 'duration_recurring', 'thumb', 'cover', 'author', 'added'),
+            'searchFields' => array(),
+            'restriction' => array(
+                'author' => array('value' => '', 'field' => 'author', 'operator' => '='),
+        		'featured' => array('value' => '', 'field' => 'featured', 'operator' => '<>'),
+        		'except' => array('value' => '', 'field' => 'id', 'operator' => 'not in'),
+        		'status' => array('value' => 'active', 'field' => 'status', 'operator' => '='),
+            ),
+            'paginate' => array('perPage' => getParam('bx_market_per_page_browse'), 'start' => 0),
+            'sorting' => 'last',
+            'rss' => array(
+                'title' => '',
+                'link' => '',
+                'image' => '',
+                'profile' => 0,
+                'fields' => array (
+                    'Guid' => 'link',
+                    'Link' => 'link',
+                    'Title' => 'title',
+                    'DateTimeUTS' => 'added',
+                    'Desc' => 'text',
+                ),
+            ),
+            'ident' => 'id',
+        );
+
+        $this->sFilterName = 'bx_market_filter';
+        $this->oModule = $this->getMain();
+        $this->aCurrent['searchFields'] = explode(',', getParam($this->oModule->_oConfig->CNF['PARAM_SEARCHABLE_FIELDS']));
+
+        $oProfileAuthor = null;
+
+        $CNF = &$this->oModule->_oConfig->CNF;
+
+        switch ($sMode) {
+
+            case 'author':
+                if(!$this->_updateCurrentForAuthor($sMode, $aParams, $oProfileAuthor)) {
+                    $this->isError = true;
+                    break;
+                }
+                break;
+
+            case 'favorite':
+                if(!$this->_updateCurrentForFavorite($sMode, $aParams, $oProfileAuthor)) {
+                    $this->isError = true;
+                    break;
+                }
+                break;
+
+            case 'public':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_market_page_title_browse_recent');
+                $this->aCurrent['rss']['link'] = 'modules/?r=market/rss/' . $sMode;
+                break;
+
+            case 'featured':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_market_page_title_browse_featured');
+                $this->aCurrent['restriction']['featured']['value'] = '0';
+                $this->aCurrent['rss']['link'] = 'modules/?r=market/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'featured';
+                break;
+
+            case 'popular':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_POPULAR']);
+                $this->aCurrent['title'] = _t('_bx_market_page_title_browse_popular');
+                $this->aCurrent['rss']['link'] = 'modules/?r=market/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'popular';
+                break;
+
+            case 'updated':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_UPDATED']);
+                $this->aCurrent['title'] = _t('_bx_market_page_title_browse_updated');
+                $this->aCurrent['rss']['link'] = 'modules/?r=market/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'updated';
+                break;
+
+            case '': // search results
+                $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
+                unset($this->aCurrent['paginate']['perPage'], $this->aCurrent['rss']);
+                break;
+
+            default:
+                $sMode = '';
+                $this->isError = true;
+        }
+
+        $this->processReplaceableMarkers($oProfileAuthor);
+
+        $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+    }
+    
+    function displayResultBlock ()
+    {
+    	return BxDolPayments::getInstance()->getCartJs() . parent::displayResultBlock();
+    }
+
+    function getAlterOrder()
+    {
+        $aSql = array();
+        switch ($this->aCurrent['sorting']) {
+            case 'last':
+                $aSql['order'] = ' ORDER BY `bx_market_products`.`added` DESC';
+                break;
+            case 'featured':
+                $aSql['order'] = ' ORDER BY `bx_market_products`.`featured` DESC';
+                break;
+            case 'updated':
+                $aSql['order'] = ' ORDER BY `bx_market_products`.`changed` DESC';
+                break;
+            case 'popular':
+                $aSql['order'] = ' ORDER BY `bx_market_products`.`views` DESC';
+                break;
+        }
+        return $aSql;
+    }
+}
+
+/** @} */

+ 434 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/classes/BxMarketTemplate.php

@@ -0,0 +1,434 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Market Market
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/*
+ * Module representation.
+ */
+class BxMarketTemplate extends BxBaseModTextTemplate
+{
+	protected $_aCurrency;
+
+    /**
+     * Constructor
+     */
+    function __construct(&$oConfig, &$oDb)
+    {
+        $this->MODULE = 'bx_market';
+
+        parent::__construct($oConfig, $oDb);
+
+        $this->_aCurrency = $this->_oConfig->getCurrency();
+    }
+
+    public function entryRating($aData)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+    	$sVotes = '';
+        $oVotes = BxDolVote::getObjectInstance($CNF['OBJECT_VOTES'], $aData['id']);
+        if($oVotes) {
+			$sVotes = $oVotes->getElementBlock(array('show_counter' => true, 'show_legend' => true));
+			if(!empty($sVotes))
+				$sVotes = $this->parseHtmlByName('entry-rating.html', array(
+		    		'content' => $sVotes,
+		    	));
+        }
+
+    	return $sVotes; 
+    }
+
+    public function entryText ($aData, $sTemplateName = 'entry-text.html')
+    {
+    	$sScreenshots = $this->getScreenshots($aData);
+
+    	$this->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'flickity/|flickity.css');
+    	$this->addJs('flickity/flickity.pkgd.min.js');
+    	return $this->parseHtmlByContent(parent::entryText($aData), array(
+    		'bx_if:show_screenshots' => array(
+    			'condition' => !empty($sScreenshots),
+    			'content' => array(
+    				'screenshots' => $sScreenshots
+    			)
+    		)
+    	));
+    }
+
+    public function setCover($aData)
+    {
+		$CNF = &$this->getModule()->_oConfig->CNF;
+
+		if(empty($aData[$CNF['FIELD_COVER']]))
+			return;
+
+		$mixedOptions = BxDolPage::getObjectInstanceByURI()->getPageCoverParams();
+        if(empty($mixedOptions) || !is_array($mixedOptions))
+        	return;
+
+        //--- Get Cover image URL
+        $oTranscoderCover = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_COVER']);
+		if(empty($oTranscoderCover))
+			return;
+
+		$sCoverUrl = $oTranscoderCover->getFileUrl($aData[$CNF['FIELD_COVER']]);
+		if(empty($sCoverUrl))
+			return;
+
+		//--- Get Thumbnail image URL
+		$sThumbnailUrl = '';
+		$bThumbnailUrl = false;
+		if(!empty($aData[$CNF['FIELD_THUMB']])) {
+		    $oTranscoderThumbnail = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_THUMB']);
+    		if($oTranscoderThumbnail)
+    			$sThumbnailUrl = $oTranscoderThumbnail->getFileUrl($aData[$CNF['FIELD_THUMB']]);
+
+            $bThumbnailUrl = !empty($sThumbnailUrl);
+		}
+
+		$oCover = BxDolCover::getInstance($this);
+		$oCover->setCoverImageUrl($sCoverUrl);
+		$oCover->set(array_merge($mixedOptions, array(
+			'bx_if:image' => array (
+                'condition' => $bThumbnailUrl,
+                'content' => array(
+                	'icon_url' => $sThumbnailUrl
+		        ),
+            ),
+            'bx_if:icon' => array (
+                'condition' => !$bThumbnailUrl,
+                'content' => array(
+                    'icon' => $CNF['ICON']
+                ),
+            ),
+            'bx_if:bg' => array (
+                'condition' => true,
+                'content' => array('image_url' => $sCoverUrl),
+            ),
+		)));
+    }
+
+    public function getScreenshots($aData)
+    {
+    	$oModule = $this->getModule();
+
+    	$CNF = &$oModule->_oConfig->CNF;
+    	$aPhotos = $oModule->serviceGetScreenshots($aData[$CNF['FIELD_ID']]);
+		if(empty($aPhotos) || !is_array($aPhotos))
+    		return '';
+
+		return $this->parseHtmlByName('entry-screenshots.html', array(
+    		'bx_repeat:items' => $aPhotos
+    	));
+    }
+    
+    public function getAuthorAddon ($aData, $oProfile)
+    {
+        $aAccount = $oProfile->getAccountObject()->getInfo();
+
+        $sContent = $this->parseHtmlByName('entry-author.html', array(
+    		'joined' => bx_time_js($aAccount['added']),
+	    	'last_active' => bx_time_js($aAccount['logged']),
+	    	'installs' => '?',
+    	));
+
+    	return $sContent . parent::getAuthorAddon ($aData, $oProfile);
+    }
+
+    public function getGhostTemplateFileOptions($sField, $aFile, $aVersions)
+    {
+    	$bField = !empty($aFile) && is_array($aFile) && isset($aFile[$sField]);
+    	
+    	$aTmplVarsVersions = array();
+    	foreach ($aVersions as $aVersion) {
+    		if($aVersion['type'] != 'version' || empty($aVersion['version']))
+    			continue;
+
+			$aTmplVarsVersions[] = array(
+				'value' => $aVersion['version'],
+				'title' =>  $aVersion['version'],
+				'bx_if:selected' => array(
+					'condition' => $bField && $aFile[$sField] == $aVersion['version'],
+					'content' => array()
+				)
+			);
+    	}
+
+    	return $this->parseHtmlByName('form_ghost_template_file_options.html', array(
+    		'bx_repeat:versions' => $aTmplVarsVersions
+    	));    	
+    }
+
+    public function getGhostTemplateFile($oForm, $aContentInfo)
+    {
+    	$CNF = &$this->getModule()->_oConfig->CNF;
+
+    	return $this->parseHtmlByName('form_ghost_template_file.html', array (
+                'name' => $oForm->aInputs[$CNF['FIELD_FILE']]['name'],
+                'content_id' => $oForm->aInputs[$CNF['FIELD_FILE']]['content_id'],
+                'editor_id' => $CNF['FIELD_TEXT_ID'],
+                'thumb_id' => isset($aContentInfo[$CNF['FIELD_PACKAGE']]) ? $aContentInfo[$CNF['FIELD_PACKAGE']] : 0,
+                'bx_if:set_thumb' => array (
+                    'condition' => true,
+                    'content' => array(
+            			'name_thumb' => $CNF['FIELD_PACKAGE'],
+            		),
+                ),
+            ));
+    }
+
+    protected function getUnit ($aData, $aParams = array())
+    {
+        $bTmplVarsSectionAuthor = false;
+        $bTmplVarsSectionPricing = false;
+        $bTmplVarsSectionVoting = true;
+
+        $oModule = $this->getModule();
+    	$CNF = &$oModule->_oConfig->CNF;
+
+    	$aUnit = parent::getUnit($aData, $aParams);
+        $oPayment = BxDolPayments::getInstance();
+        $oPermalinks = BxDolPermalinks::getInstance();
+
+        list($sAuthorName, $sAuthorUrl, $sAuthorIcon, $sAuthorUnit, $sAuthorUnitShort) = $oModule->getUserInfo($aData[$CNF['FIELD_AUTHOR']]);
+
+        $aTmplVarsSectionAuthor = array();
+        if($bTmplVarsSectionAuthor) {
+            //--- Author Info
+            $bAuthorIcon = !empty($sAuthorIcon);
+            $sAuthorName = $this->parseHtmlByName('author_link.html', array(
+                'href' => $sAuthorUrl,
+                'title' => bx_html_attribute($sAuthorName),
+                'content' => $sAuthorName,
+                'bx_if:show_account' => array(
+                    'condition' => false,
+                    'content' => array()
+                )
+            ));
+
+            //--- Actions
+            $sActions = '';
+        	$oActions = BxDolMenu::getObjectInstance($CNF['OBJECT_MENU_ACTIONS_SNIPPET']);
+        	if($oActions) {
+        	    $oActions->setContentId($aData[$CNF['FIELD_ID']]);
+        	    $sActions = $oActions->getCode();
+        	}
+
+            $sDate = $this->parseHtmlByName('snippet-date.html', array(
+                'date' => bx_time_js($aData[$CNF['FIELD_ADDED']])
+            ));
+
+        	$aTmplVarsSectionAuthor = array(
+                'actions' => $sActions,
+                'author_unit' => $sAuthorUnitShort,
+                'author_width_date' => _t('_bx_market_txt_author_added_product', $sAuthorName, $sDate),
+	        );
+        }
+
+        //--- Main Info
+        $sUrl = BX_DOL_URL_ROOT . $oPermalinks->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
+        $sLinkMore = ' <a title="' . bx_html_attribute(_t('_sys_read_more', $aData[$CNF['FIELD_TITLE']])) . '" href="' . $sUrl . '"><i class="sys-icon ellipsis-h"></i></a>';
+        $sSummary = strmaxtextlen($aData[$CNF['FIELD_TEXT']], (int)getParam($CNF['PARAM_CHARS_SUMMARY']), $sLinkMore);
+        $sSummaryPlain = BxTemplFunctions::getInstance()->getStringWithLimitedLength(strip_tags($sSummary), (int)getParam($CNF['PARAM_CHARS_SUMMARY_PLAIN']));
+        
+
+        //--- Icon Info
+        $sIconUrl = '';
+        if(!empty($CNF['FIELD_THUMB']) && $aData[$CNF['FIELD_THUMB']]) {
+            $oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_ICON']);
+            if($oImagesTranscoder)
+                $sIconUrl = $oImagesTranscoder->getFileUrl($aData[$CNF['FIELD_THUMB']]);
+
+            if(empty($sIconUrl)) {
+                $oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_THUMB']);
+                if($oImagesTranscoder)
+                    $sIconUrl = $oImagesTranscoder->getFileUrl($aData[$CNF['FIELD_THUMB']]);
+            }
+        }
+
+        //--- Cover Info
+        $sCoverUrl = '';
+        if(!empty($CNF['FIELD_COVER']) && $aData[$CNF['FIELD_COVER']]) {
+            $oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_GALLERY']);
+                if($oImagesTranscoder)
+                    $sCoverUrl = $oImagesTranscoder->getFileUrl($aData[$CNF['FIELD_COVER']]);
+
+            if(empty($sCoverUrl)) {
+                $oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_COVER']);
+                if($oImagesTranscoder)
+                    $sCoverUrl = $oImagesTranscoder->getFileUrl($aData[$CNF['FIELD_COVER']]);
+            }
+        }
+
+        $aTmplVarsSectionPricing = array();
+        if($bTmplVarsSectionPricing) {
+            //--- Price Single
+        	$bTmplVarsSingle = (float)$aData[$CNF['FIELD_PRICE_SINGLE']] != 0;
+        	$aTmplVarsSingle = array();
+        	if($bTmplVarsSingle) {
+        		$aJsSingle = $oPayment->getAddToCartJs($aData[$CNF['FIELD_AUTHOR']], $this->_oConfig->getName(), $aData[$CNF['FIELD_ID']], 1, true);
+        		if(!empty($aJsSingle) && is_array($aJsSingle)) {
+        			list($sJsCode, $sSingleOnclick) = $aJsSingle;
+        			
+    	    		$aTmplVarsSingle = array(
+    	    			'price_single_onclick' => $sSingleOnclick,
+    					'price_single' => _t('_bx_market_txt_price_single', $this->_aCurrency['sign'], $aData[$CNF['FIELD_PRICE_SINGLE']])
+    				);
+        		}
+        		else 
+        			$bTmplVarsSingle = false;
+        	}
+    
+        	//--- Price Recurring
+        	$bTmplVarsRecurring = (float)$aData[$CNF['FIELD_PRICE_RECURRING']] != 0;
+        	$aTmplVarsRecurring = array();
+        	if($bTmplVarsRecurring) {
+            	$aJsRecurring = $oPayment->getSubscribeJs($aData[$CNF['FIELD_AUTHOR']], '', $this->_oConfig->getName(), $aData[$CNF['FIELD_ID']], 1);
+            	if(!empty($aJsRecurring) && is_array($aJsRecurring)) {
+    				list($sJsCode, $sRecurringOnclick) = $aJsRecurring;
+    
+    	        	$aTmplVarsRecurring = array(
+    	        		'price_recurring_onclick' => $sRecurringOnclick,
+    					'price_recurring' => _t('_bx_market_txt_price_recurring', $this->_aCurrency['sign'], $aData[$CNF['FIELD_PRICE_RECURRING']], _t($CNF['T']['txt_per_' . $aData[$CNF['FIELD_DURATION_RECURRING']] . '_short']))
+    				);
+            	}
+            	else 
+            		$bTmplVarsRecurring = false;
+        	}
+
+        	$aTmplVarsSectionPricing = array(
+        	    'bx_if:show_single' => array(
+        			'condition' => $bTmplVarsSingle,
+        			'content' => $aTmplVarsSingle
+        		),
+        		'bx_if:show_recurring' => array(
+        			'condition' => $bTmplVarsRecurring,
+        			'content' => $aTmplVarsRecurring
+        		),
+        		'bx_if:show_free' => array(
+        			'condition' => !$bTmplVarsSingle && !$bTmplVarsRecurring,
+        			'content' => array(
+        		        'price_free_href' => $oPermalinks->permalink('page.php?i=' . $CNF['URI_DOWNLOAD_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']])
+        		    )
+        		)
+        	);
+        }
+
+        $aTmplVarsSectionVoting = array();
+        if($bTmplVarsSectionVoting) {
+            $sVoting = '';
+        	$oVoting = BxDolVote::getObjectInstance($CNF['OBJECT_VOTES'], $aData[$CNF['FIELD_ID']]);
+            if($oVoting)
+    			$sVoting = $oVoting->getElementBlock(array('show_counter' => false));
+
+            $sPricing = "";
+            if((float)$aData[$CNF['FIELD_PRICE_RECURRING']] != 0)
+                $sPricing = _t('_bx_market_txt_price_recurring_short', $this->_aCurrency['sign'], $aData[$CNF['FIELD_PRICE_RECURRING']], _t($CNF['T']['txt_per_' . $aData[$CNF['FIELD_DURATION_RECURRING']] . '_short']));
+
+            if(empty($sPricing) && (float)$aData[$CNF['FIELD_PRICE_SINGLE']] != 0)
+                $sPricing = _t('_bx_market_txt_price_single_short', $this->_aCurrency['sign'], $aData[$CNF['FIELD_PRICE_SINGLE']]);
+
+            if(empty($sPricing))
+                 $sPricing = _t('_bx_market_txt_price_free');
+
+            $aTmplVarsSectionVoting = array(
+                'voting' => $sVoting,
+                'pricing' => $sPricing
+            );
+            
+        }
+
+
+    	$aUnit = array_merge($aUnit, array(
+    	    'bx_if:show_section_author' => array(
+    	        'condition' => $bTmplVarsSectionAuthor,
+    	        'content' => $aTmplVarsSectionAuthor
+    	    ),
+            'bx_if:show_icon' => array (
+                'condition' => $sIconUrl,
+                'content' => array(
+                	'icon_url' => $sIconUrl,
+                ),
+            ),
+            'bx_if:show_icon_empty' => array (
+                'condition' => !$sIconUrl,
+                'content' => array(
+                    'icon' => $CNF['ICON']
+                ),
+            ),
+            'bx_if:show_cover' => array (
+                'condition' => $sCoverUrl,
+                'content' => array (
+                    'summary_attr' => bx_html_attribute($sSummaryPlain),
+                    'content_url' => $sUrl,
+                    'cover_url' => $sCoverUrl,
+                    'strecher' => str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ', 40),
+                ),
+            ),
+            'bx_if:show_cover_empty' => array (
+                'condition' => !$sCoverUrl,
+                'content' => array (
+                    'summary_plain' => $sSummaryPlain,
+                    'strecher' => mb_strlen($sSummaryPlain) > 240 ? '' : str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ', round((240 - mb_strlen($sSummaryPlain)) / 6)),
+                ),
+            ),
+            'author_name' => $sAuthorName,
+            'content_url' => $sUrl,
+    		'bx_if:show_section_pricing' => array(
+                'condition' => $bTmplVarsSectionPricing,
+                'content' => $aTmplVarsSectionPricing
+            ),
+            'bx_if:show_section_voting' => array(
+            	'condition' => $bTmplVarsSectionVoting,
+                'content' => $aTmplVarsSectionVoting
+            )
+    	));
+
+    	return $aUnit;
+    }
+
+    protected function getAttachments($sStorage, $aData, $aParams = array())
+    {
+    	$aFiles = $this->_oDb->getFile(array('type' => 'content_id_key_file_id', 'content_id' => $aData['id']));
+
+    	$aAttachments = parent::getAttachments($sStorage, $aData, $aParams);
+    	if(empty($aAttachments) || !is_array($aAttachments))
+    		return $aAttachments;
+
+    	foreach($aAttachments as $iIndex => $aAttachment) {
+    		$iAttachmentId = (int)$aAttachment['id'];
+
+    		$aAttachments[$iIndex]['bx_if:main'] = array(
+    			'condition' => (int)$aData['package'] == $iAttachmentId,
+    			'content' => array()
+    		);
+
+    		$bAttachment = !empty($aFiles[$iAttachmentId]);
+    		$aAttachments[$iIndex]['bx_if:not_image']['content'] = array_merge($aAttachments[$iIndex]['bx_if:not_image']['content'], array(
+    			'file_type' => $bAttachment ? _t('_bx_market_form_entry_input_files_type_' . $aFiles[$iAttachmentId]['type']) : '',
+    			'bx_if:show_version' => array(
+    				'condition' => $bAttachment && $aFiles[$iAttachmentId]['type'] == BX_MARKET_FILE_TYPE_VERSION,
+    				'content' => array(
+    					'file_version' => $bAttachment ? $aFiles[$iAttachmentId]['version'] : ''
+    				)
+    			),
+    			'bx_if:show_update' => array(
+    				'condition' => $bAttachment && $aFiles[$iAttachmentId]['type'] == BX_MARKET_FILE_TYPE_UPDATE,
+    				'content' => array(
+    					'file_version_from_to' => $bAttachment ? _t('_bx_market_form_entry_input_files_version_from_x_to_y', $aFiles[$iAttachmentId]['version'], $aFiles[$iAttachmentId]['version_to']) : ''
+    				)
+    			)
+    		));
+    	}
+
+    	return $aAttachments;
+    }
+}
+
+/** @} */

+ 138 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/install/config.php

@@ -0,0 +1,138 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Market Market
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_market',
+    'title' => 'Market',
+    'note' => 'Market module.',
+    'version' => '9.0.6',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/market/',
+    'home_uri' => 'market',
+
+    'db_prefix' => 'bx_market_',
+    'class_prefix' => 'BxMarket',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Market',
+
+	/**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry',
+    ),
+
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu'
+    ),
+
+    /**
+     * Storages.
+     */
+    'storages' => array(
+    	'bx_market_files'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+        'bx_market_icon',
+        'bx_market_thumb',
+        'bx_market_cover',
+        'bx_market_screenshot',
+		'bx_market_preview',
+        'bx_market_gallery',
+    ),
+
+    /**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_market',
+    	'bx_market_cmts',
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+    	'process_storages' => 1,
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+    	'process_page_triggers' => 1,
+    	'process_menu_triggers' => 1,
+    	'process_esearches' => 1,
+    	'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+    	'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Connections Section
+     */
+    'relations' => array(
+    	'bx_timeline',
+    	'bx_notifications'
+    ),
+
+);
+
+/** @} */

+ 372 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/install/langs/en.xml

@@ -0,0 +1,372 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_market"><![CDATA[Market]]></string>
+	<string name="_bx_market_cmts"><![CDATA[Market's Reviews]]></string>
+
+	<string name="_bx_market_option_enable_recurring"><![CDATA[Allow to sell subscriptions]]></string>
+	<string name="_bx_market_option_recurring_reserve"><![CDATA[Reserve (in days) to accept and process recurring payment notification]]></string>
+	<string name="_bx_market_option_summary_chars"><![CDATA[Number of characters in auto-cropped product summary]]></string>
+	<string name="_bx_market_option_plain_summary_chars"><![CDATA[Number of characters in plain product description when product hasn't thumb]]></string>
+	<string name="_bx_market_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_market_option_per_page_profile"><![CDATA[Number of items per page on Profile View page]]></string>
+	<string name="_bx_market_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
+	<string name="_bx_market_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+
+	<string name="_bx_market_form_entry"><![CDATA[Product]]></string>
+	<string name="_bx_market_form_entry_display_add"><![CDATA[Add Product]]></string>
+	<string name="_bx_market_form_entry_display_edit"><![CDATA[Edit Product]]></string>
+	<string name="_bx_market_form_entry_display_delete"><![CDATA[Delete Product]]></string>
+	<string name="_bx_market_form_entry_display_view"><![CDATA[View Product]]></string>
+	<string name="_bx_market_form_entry_display_view_full"><![CDATA[Full View Product]]></string>
+	<string name="_bx_market_form_entry_input_author"><![CDATA[Author]]></string>
+	<string name="_bx_market_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_market_form_entry_input_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_market_form_entry_input_sys_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_market_form_entry_input_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_market_form_entry_input_sys_title"><![CDATA[Title]]></string>
+	<string name="_bx_market_form_entry_input_title"><![CDATA[Title]]></string>
+	<string name="_bx_market_form_entry_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+	<string name="_bx_market_form_entry_input_sys_name"><![CDATA[Name]]></string>
+	<string name="_bx_market_form_entry_input_name"><![CDATA[Name]]></string>
+	<string name="_bx_market_form_entry_input_name_err"><![CDATA[Name should be unique and is needed for internal usage. Please, fill in this field]]></string>
+	<string name="_bx_market_form_entry_input_sys_cat"><![CDATA[Category]]></string>
+	<string name="_bx_market_form_entry_input_cat"><![CDATA[Category]]></string>
+    <string name="_bx_market_form_entry_input_cat_err"><![CDATA[Please select category]]></string>
+    <string name="_bx_market_form_entry_input_sys_price_single"><![CDATA[Price]]></string>
+	<string name="_bx_market_form_entry_input_price_single"><![CDATA[Price]]></string>
+    <string name="_bx_market_form_entry_input_price_single_inf"><![CDATA[Leave empty to make the product free.]]></string>
+    <string name="_bx_market_form_entry_input_sys_price_recurring"><![CDATA[Recurring price]]></string>
+	<string name="_bx_market_form_entry_input_price_recurring"><![CDATA[Price]]></string>
+    <string name="_bx_market_form_entry_input_price_recurring_inf"><![CDATA[Select 'None' to make the product free.]]></string>
+    <string name="_bx_market_form_entry_input_sys_duration_recurring"><![CDATA[Billing period]]></string>
+    <string name="_bx_market_form_entry_input_duration_recurring"><![CDATA[Billing period]]></string>
+    <string name="_bx_market_form_entry_input_sys_trial_recurring"><![CDATA[Recurring trial]]></string>
+    <string name="_bx_market_form_entry_input_trial_recurring"><![CDATA[Trial period]]></string>
+    <string name="_bx_market_form_entry_input_trial_recurring_inf"><![CDATA[The number of days new customers should receive a free trial. Leave empty to disable trial period.]]></string>
+    <string name="_bx_market_form_entry_input_sys_header_beg_single"><![CDATA[One-time payment: begin]]></string>
+    <string name="_bx_market_form_entry_input_header_beg_single"><![CDATA[One-time payment]]></string>
+    <string name="_bx_market_form_entry_input_sys_header_beg_recurring"><![CDATA[Recurring payment: begin]]></string>
+    <string name="_bx_market_form_entry_input_header_beg_recurring"><![CDATA[Recurring payment]]></string>
+    <string name="_bx_market_form_entry_input_sys_header_beg_privacy"><![CDATA[Privacy: begin]]></string>
+    <string name="_bx_market_form_entry_input_header_beg_privacy"><![CDATA[Privacy]]></string>
+    <string name="_bx_market_form_entry_input_sys_header_end_single"><![CDATA[One-time payment: end]]></string>
+    <string name="_bx_market_form_entry_input_sys_header_end_recurring"><![CDATA[Recurring payment: end]]></string>
+    <string name="_bx_market_form_entry_input_sys_header_end_privacy"><![CDATA[Privacy: end]]></string>
+	<string name="_bx_market_form_entry_input_sys_text"><![CDATA[Text]]></string>
+	<string name="_bx_market_form_entry_input_text"><![CDATA[Text]]></string>
+	<string name="_bx_market_form_entry_input_text_err"><![CDATA[Text field can't be empty]]></string>
+	<string name="_bx_market_form_entry_input_sys_notes"><![CDATA[Notes]]></string>
+	<string name="_bx_market_form_entry_input_notes"><![CDATA[Notes]]></string>
+	<string name="_bx_market_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_market_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this product]]></string>
+	<string name="_bx_market_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+	<string name="_bx_market_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the product]]></string>
+	<string name="_bx_market_form_entry_input_sys_pictures"><![CDATA[Pictures]]></string>
+	<string name="_bx_market_form_entry_input_pictures"><![CDATA[Pictures]]></string>
+	<string name="_bx_market_form_entry_input_pictures_title"><![CDATA[Title]]></string>
+	<string name="_bx_market_form_entry_input_pictures_use_as_thumb"><![CDATA[Product icon]]></string>
+	<string name="_bx_market_form_entry_input_pictures_use_as_cover"><![CDATA[Product cover]]></string>
+	<string name="_bx_market_form_entry_input_sys_files"><![CDATA[Files]]></string>
+	<string name="_bx_market_form_entry_input_files"><![CDATA[Files]]></string>
+	<string name="_bx_market_form_entry_input_files_use_as_main"><![CDATA[Use as Main]]></string>
+	<string name="_bx_market_form_entry_input_files_name"><![CDATA[Name:]]></string>
+	<string name="_bx_market_form_entry_input_files_version"><![CDATA[Version:]]></string>
+	<string name="_bx_market_form_entry_input_files_type"><![CDATA[Type:]]></string>
+	<string name="_bx_market_form_entry_input_files_type_version"><![CDATA[version]]></string>
+	<string name="_bx_market_form_entry_input_files_type_update"><![CDATA[update]]></string>
+	<string name="_bx_market_form_entry_input_files_version_from"><![CDATA[Version from:]]></string>
+	<string name="_bx_market_form_entry_input_files_version_to"><![CDATA[Version to:]]></string>
+	<string name="_bx_market_form_entry_input_files_version_from_x_to_y"><![CDATA[Version from {0} to {1}]]></string>
+    <string name="_bx_market_form_entry_input_sys_allow_view_to"><![CDATA[Who can view]]></string>
+    <string name="_bx_market_form_entry_input_allow_view_to"><![CDATA[Who can view]]></string>
+    <string name="_bx_market_form_entry_input_sys_allow_purchase_to"><![CDATA[Who can purchase]]></string>
+    <string name="_bx_market_form_entry_input_allow_purchase_to"><![CDATA[Who can purchase]]></string>
+    <string name="_bx_market_form_entry_input_sys_allow_comment_to"><![CDATA[Who can review]]></string>
+    <string name="_bx_market_form_entry_input_allow_comment_to"><![CDATA[Who can review]]></string>
+    <string name="_bx_market_form_entry_input_sys_allow_vote_to"><![CDATA[Who can vote]]></string>
+    <string name="_bx_market_form_entry_input_allow_vote_to"><![CDATA[Who can vote]]></string>
+    <string name="_bx_market_form_entry_input_sys_added"><![CDATA[Created]]></string>
+    <string name="_bx_market_form_entry_input_added"><![CDATA[Created]]></string>
+    <string name="_bx_market_form_entry_input_sys_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_market_form_entry_input_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_market_form_entry_input_sys_warning_single"><![CDATA[Warning for single payments]]></string>
+    <string name="_bx_market_form_entry_input_sys_warning_recurring"><![CDATA[Warning for recurring payments]]></string>
+    <string name="_bx_market_form_entry_input_sys_subentries"><![CDATA[Subproducts]]></string>
+    <string name="_bx_market_form_entry_input_subentries"><![CDATA[Subproducts]]></string>
+    <string name="_bx_market_form_entry_input_subentries_inf"><![CDATA[Leave empty if you don't want to create association.]]></string>
+    <string name="_bx_market_form_entry_input_subentries_placeholder"><![CDATA[Type product name here...]]></string>
+
+	<string name="_bx_market_acl_action_create_entry"><![CDATA[Create Product]]></string>
+	<string name="_bx_market_acl_action_delete_entry"><![CDATA[Delete Product]]></string>
+	<string name="_bx_market_acl_action_download_entry"><![CDATA[Download Product]]></string>
+	<string name="_bx_market_acl_action_view_entry"><![CDATA[View Product]]></string>
+	<string name="_bx_market_acl_action_set_cover"><![CDATA[Set Product Cover]]></string>
+	<string name="_bx_market_acl_action_set_subentries"><![CDATA[Set Product Subproducts]]></string>
+	<string name="_bx_market_acl_action_set_thumb"><![CDATA[Set Product Thumbnail]]></string>
+	<string name="_bx_market_acl_action_edit_any_entry"><![CDATA[Edit Any Product]]></string>
+
+	<string name="_bx_market_privacy_group_customers"><![CDATA[Customers]]></string>
+
+	<string name="_bx_market_page_title_sys_create_entry"><![CDATA[New Product]]></string>
+	<string name="_bx_market_page_title_create_entry"><![CDATA[New Product]]></string>
+	<string name="_bx_market_page_block_title_create_entry"><![CDATA[New Product]]></string>
+	<string name="_bx_market_page_title_sys_edit_entry"><![CDATA[Edit Product]]></string>
+	<string name="_bx_market_page_title_edit_entry"><![CDATA[Edit Product]]></string>
+	<string name="_bx_market_page_block_title_edit_entry"><![CDATA[Edit Product]]></string>
+    <string name="_bx_market_page_title_sys_delete_entry"><![CDATA[Delete Product]]></string>
+    <string name="_bx_market_page_title_delete_entry"><![CDATA[Delete Product]]></string>
+    <string name="_bx_market_page_block_title_delete_entry"><![CDATA[Delete Product]]></string>
+	<string name="_bx_market_page_title_sys_download_entry"><![CDATA[Download Product]]></string>
+    <string name="_bx_market_page_title_download_entry"><![CDATA[Download Product]]></string>
+    <string name="_bx_market_page_block_title_download_entry"><![CDATA[Download Product]]></string>
+	<string name="_bx_market_page_title_sys_view_entry"><![CDATA[View Product]]></string>
+	<string name="_bx_market_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_market_page_block_title_entry_text"><![CDATA[Product Overview]]></string>
+	<string name="_bx_market_page_title_browse"><![CDATA[Products]]></string>
+	<string name="_bx_market_page_title_search_results"><![CDATA[Products matching "{0}"]]></string>
+	<string name="_bx_market_page_title_browse_by_author"><![CDATA[Products of {display_name}]]></string>
+	<string name="_bx_market_page_title_browse_featured"><![CDATA[Featured Products]]></string>
+    <string name="_bx_market_page_title_browse_recent"><![CDATA[Recent Products]]></string>
+    <string name="_bx_market_page_title_browse_popular"><![CDATA[Popular Products]]></string>
+    <string name="_bx_market_page_title_browse_updated"><![CDATA[Updated Products]]></string>
+    <string name="_bx_market_page_title_sys_home"><![CDATA[Market Home]]></string>
+    <string name="_bx_market_page_title_home"><![CDATA[Market]]></string>
+    <string name="_bx_market_page_block_title_featured_entries_view_extended"><![CDATA[Featured Products]]></string>
+    <string name="_bx_market_page_block_title_recent_entries"><![CDATA[Recent Products (Gallery View)]]></string>
+    <string name="_bx_market_page_block_title_recent_entries_view_extended"><![CDATA[Recent Products]]></string>
+    <string name="_bx_market_page_block_title_recent_entries_view_full"><![CDATA[Recent Products (Full View)]]></string>
+    <string name="_bx_market_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+    <string name="_bx_market_page_block_title_entry_author"><![CDATA[Vendor]]></string>
+    <string name="_bx_market_page_block_title_entry_author_entries"><![CDATA[More Products From {0}]]></string>
+    <string name="_bx_market_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_market_page_block_title_entry_comments"><![CDATA[Reviews]]></string>
+    <string name="_bx_market_page_block_title_entry_comments_link"><![CDATA[Reviews to <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_market_page_block_title_entry_comments_n"><![CDATA[Reviews ({0})]]></string>
+    <string name="_bx_market_page_block_title_entry_info"><![CDATA[Info]]></string>
+    <string name="_bx_market_page_block_title_entry_info_link"><![CDATA[<a href="{entry_link}">{title}</a> Info]]></string>
+    <string name="_bx_market_page_block_title_entry_location"><![CDATA[Location]]></string>
+    <string name="_bx_market_page_block_title_entry_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_market_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
+    <string name="_bx_market_page_block_title_entry_rating"><![CDATA[Rating]]></string>
+    <string name="_bx_market_page_title_sys_entries_popular"><![CDATA[Popular Products]]></string>
+    <string name="_bx_market_page_title_entries_popular"><![CDATA[Popular Products]]></string>
+    <string name="_bx_market_page_title_sys_entries_updated"><![CDATA[Updated Products]]></string>
+    <string name="_bx_market_page_title_entries_updated"><![CDATA[Updated Products]]></string>
+    <string name="_bx_market_page_block_title_popular_entries"><![CDATA[Popular Products]]></string>
+    <string name="_bx_market_page_block_title_popular_entries_view_extended"><![CDATA[Popular Products (Extended View)]]></string>
+    <string name="_bx_market_page_block_title_popular_entries_view_full"><![CDATA[Popular Products (Full View)]]></string>
+    <string name="_bx_market_page_block_title_updated_entries"><![CDATA[Updated Products]]></string>
+    <string name="_bx_market_page_title_sys_view_entry_comments"><![CDATA[Product Reviews]]></string>
+    <string name="_bx_market_page_title_view_entry_comments"><![CDATA[Reviews to {title}]]></string>
+    <string name="_bx_market_page_title_sys_view_entry_info"><![CDATA[Product Info]]></string>
+    <string name="_bx_market_page_title_view_entry_info"><![CDATA[{title} Info]]></string>
+    <string name="_bx_market_page_title_sys_entries_of_author"><![CDATA[Products of author]]></string>
+    <string name="_bx_market_page_title_entries_of_author"><![CDATA[Products by {display_name}]]></string>
+    <string name="_bx_market_page_block_title_favorites_of_author"><![CDATA[Favorites by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_market_page_block_title_sys_favorites_of_author"><![CDATA[Favorites of author]]></string>
+    <string name="_bx_market_page_block_title_entries_of_author"><![CDATA[Products by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_market_page_block_title_sys_entries_of_author"><![CDATA[Products of author]]></string>   
+    <string name="_bx_market_page_block_title_entries_actions"><![CDATA[Products actions]]></string>
+    <string name="_bx_market_page_block_title_browse_cmts"><![CDATA[Products' Reviews]]></string>
+	<string name="_bx_market_page_title_sys_manage"><![CDATA[Manage Own Products]]></string>
+	<string name="_bx_market_page_title_sys_manage_administration"><![CDATA[Manage All Products]]></string>
+	<string name="_bx_market_page_title_manage"><![CDATA[Manage Products]]></string>
+	<string name="_bx_market_page_block_title_system_manage"><![CDATA[Manage Own Products]]></string>
+	<string name="_bx_market_page_block_title_system_manage_administration"><![CDATA[Manage All Products]]></string>
+	<string name="_bx_market_page_block_title_manage"><![CDATA[Manage Products]]></string>    
+	<string name="_bx_market_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
+	<string name="_bx_market_page_block_title_cats"><![CDATA[Products Categories]]></string>
+	<string name="_bx_market_page_title_sys_entries_categories"><![CDATA[Categories]]></string>
+    <string name="_bx_market_page_title_entries_categories"><![CDATA[Categories]]></string>
+    <string name="_bx_market_page_block_title_categories_entries"><![CDATA[Products]]></string>
+    <string name="_bx_market_page_title_sys_licenses"><![CDATA[Licenses]]></string>
+    <string name="_bx_market_page_title_licenses"><![CDATA[Licenses]]></string>
+    <string name="_bx_market_page_block_title_licenses"><![CDATA[Licenses]]></string>
+    <string name="_bx_market_page_block_title_licenses_note"><![CDATA[Note]]></string>
+    <string name="_bx_market_page_block_content_licenses_note"><![CDATA[The licenses are for reference only. There is no need to "register" them, as you can simply download and install licensed UNA apps directly from your site Studio Apps store.]]></string>
+    <string name="_bx_market_page_block_title_view_profile"><![CDATA[My Products]]></string>
+    <string name="_bx_market_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_market_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_market_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_market_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_market_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_market_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+
+    <string name="_bx_market_menu_set_title_view_entry"><![CDATA[Product Actions]]></string>
+    <string name="_bx_market_menu_title_view_entry"><![CDATA[Product Actions]]></string>    
+    <string name="_bx_market_menu_title_view_entry_popup"><![CDATA[Product Actions (in popup)]]></string>
+    <string name="_bx_market_menu_title_submenu"><![CDATA[Market Submenu]]></string>
+    <string name="_bx_market_menu_set_title_submenu"><![CDATA[Market Submenu]]></string>
+    <string name="_bx_market_menu_item_title_system_create_entry"><![CDATA[New Product]]></string>
+    <string name="_bx_market_menu_item_title_create_entry"><![CDATA[New Product]]></string>
+    <string name="_bx_market_menu_item_title_system_edit_entry"><![CDATA[Edit Product]]></string>
+    <string name="_bx_market_menu_item_title_edit_entry"><![CDATA[Edit Product]]></string>
+    <string name="_bx_market_menu_item_title_system_delete_entry"><![CDATA[Delete Product]]></string>
+    <string name="_bx_market_menu_item_title_delete_entry"><![CDATA[Delete Product]]></string>
+    <string name="_bx_market_menu_item_title_system_add_to_cart"><![CDATA[Add to Cart]]></string>
+    <string name="_bx_market_menu_item_title_add_to_cart"><![CDATA[Buy for {0}{1}]]></string>
+    <string name="_bx_market_menu_item_title_system_subscribe"><![CDATA[Rent]]></string>
+    <string name="_bx_market_menu_item_title_subscribe"><![CDATA[Rent for {0}{1}/{2}]]></string>
+    <string name="_bx_market_menu_item_title_system_download"><![CDATA[Download]]></string>
+    <string name="_bx_market_menu_item_title_download"><![CDATA[Download]]></string>
+    <string name="_bx_market_menu_item_title_system_entries_home"><![CDATA[Market]]></string>
+    <string name="_bx_market_menu_item_title_entries_home"><![CDATA[Market]]></string>
+    <string name="_bx_market_menu_item_title_system_entries_categories"><![CDATA[Categories]]></string>
+    <string name="_bx_market_menu_item_title_entries_categories"><![CDATA[Categories]]></string>
+    <string name="_bx_market_menu_item_title_system_entries_public"><![CDATA[Storefront]]></string>
+    <string name="_bx_market_menu_item_title_entries_public"><![CDATA[Storefront]]></string>
+    <string name="_bx_market_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_market_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_market_menu_item_title_system_entries_manage"><![CDATA[Manage Products]]></string>
+    <string name="_bx_market_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_market_menu_item_title_system_entries_popular"><![CDATA[Popular Products]]></string>
+    <string name="_bx_market_menu_item_title_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_market_menu_title_view_entry_submenu"><![CDATA[View Product Submenu]]></string>
+    <string name="_bx_market_menu_set_title_view_entry_submenu"><![CDATA[View Product Submenu]]></string>
+    <string name="_bx_market_menu_item_title_system_view_entry_submenu_entry"><![CDATA[Overview]]></string>
+    <string name="_bx_market_menu_item_title_view_entry_submenu_entry"><![CDATA[Overview]]></string>
+    <string name="_bx_market_menu_item_title_system_view_entry_submenu_comments"><![CDATA[Reviews]]></string>
+    <string name="_bx_market_menu_item_title_view_entry_submenu_comments"><![CDATA[Reviews]]></string>
+    <string name="_bx_market_menu_item_title_system_view_entry_submenu_info"><![CDATA[Info]]></string>
+    <string name="_bx_market_menu_item_title_view_entry_submenu_info"><![CDATA[Info]]></string>
+    <string name="_bx_market_menu_item_title_system_view_entries_author"><![CDATA[Products]]></string>
+    <string name="_bx_market_menu_item_title_view_entries_author"><![CDATA[Products]]></string>
+    <string name="_bx_market_menu_title_entries_my"><![CDATA[My Products Action Menu]]></string>
+    <string name="_bx_market_menu_set_title_entries_my"><![CDATA[My Products Menu]]></string>
+	<string name="_bx_market_menu_item_title_system_manage_my_products"><![CDATA[My products]]></string>
+    <string name="_bx_market_menu_item_title_manage_my_products"><![CDATA[{addon} products]]></string>
+    <string name="_bx_market_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_market_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_market_menu_item_title_system_manage_account"><![CDATA[Manage account]]></string>
+    <string name="_bx_market_menu_item_title_manage_account"><![CDATA[Manage account]]></string>
+	<string name="_bx_market_menu_item_title_system_admt_products"><![CDATA[Products]]></string>
+	<string name="_bx_market_menu_item_title_admt_products"><![CDATA[Products - {addon} hidden]]></string>
+	<string name="_bx_market_menu_item_title_manage_my"><![CDATA[My Products]]></string>
+	<string name="_bx_market_menu_item_title_manage_all"><![CDATA[All Products]]></string>
+	<string name="_bx_market_menu_item_title_system_licenses"><![CDATA[Licenses]]></string>
+	<string name="_bx_market_menu_item_title_licenses"><![CDATA[Licenses]]></string>
+	<string name="_bx_market_menu_title_snippet"><![CDATA[Snippet Actions]]></string>
+    <string name="_bx_market_menu_set_title_snippet"><![CDATA[Snippet Actions]]></string>
+    <string name="_bx_market_menu_item_title_system_snippet_more"><![CDATA[More Actions]]></string>
+    <string name="_bx_market_menu_item_title_snippet_more"><![CDATA[More Actions]]></string>
+
+	<string name="_bx_market_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_market_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_market_grid_filter_item_title_adm_hidden"><![CDATA[Hidden]]></string>
+	<string name="_bx_market_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_market_grid_column_title_adm_title"><![CDATA[Title]]></string>
+    <string name="_bx_market_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_market_grid_column_title_adm_author"><![CDATA[Author]]></string>
+    <string name="_bx_market_grid_action_title_adm_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_market_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_market_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_market_grid_action_err_delete"><![CDATA[Cannot delete the selected product(s).]]></string>
+    <string name="_bx_market_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+	<string name="_bx_market_grid_column_title_lcs_product"><![CDATA[Product]]></string>
+	<string name="_bx_market_grid_column_title_lcs_license"><![CDATA[License]]></string>
+	<string name="_bx_market_grid_column_title_lcs_type"><![CDATA[Type]]></string>
+	<string name="_bx_market_grid_column_title_lcs_domain"><![CDATA[Domain]]></string>
+	<string name="_bx_market_grid_column_title_lcs_added"><![CDATA[Begin]]></string>
+	<string name="_bx_market_grid_column_title_lcs_expired"><![CDATA[Expire]]></string>
+	<string name="_bx_market_grid_action_title_lcs_reset"><![CDATA[Reset]]></string>
+	<string name="_bx_market_grid_action_err_cannot_perform"><![CDATA[Cannot perform the action. Please report.]]></string>
+	<string name="_bx_market_grid_txt_lcs_type_single"><![CDATA[one-time]]></string>
+	<string name="_bx_market_grid_txt_lcs_type_recurring"><![CDATA[recurring]]></string>
+	<string name="_bx_market_grid_txt_lcs_never"><![CDATA[never]]></string>
+
+    <string name="_bx_market_chart_growth"><![CDATA[Market: Growth]]></string>
+    <string name="_bx_market_chart_growth_speed"><![CDATA[Market: Growth Speed]]></string>
+
+    <string name="_bx_market_search_extended"><![CDATA[Market Search]]></string>
+    <string name="_bx_market_search_extended_cmts"><![CDATA[Market Comments Search]]></string>
+
+    <string name="_bx_market_pre_lists_cats"><![CDATA[Product categories]]></string>
+    <string name="_bx_market_cat_administration"><![CDATA[Administration]]></string>
+    <string name="_bx_market_cat_adult"><![CDATA[Adult]]></string>
+    <string name="_bx_market_cat_advertisement"><![CDATA[Advertisement]]></string>
+    <string name="_bx_market_cat_affiliates"><![CDATA[Affiliates]]></string>
+    <string name="_bx_market_cat_authentication"><![CDATA[Authentication]]></string>
+    <string name="_bx_market_cat_calendars"><![CDATA[Calendars]]></string>
+    <string name="_bx_market_cat_communication"><![CDATA[Communication]]></string>
+    <string name="_bx_market_cat_content"><![CDATA[Content]]></string>
+    <string name="_bx_market_cat_conversion"><![CDATA[Conversion]]></string>
+    <string name="_bx_market_cat_core_changes"><![CDATA[Core Changes]]></string>
+    <string name="_bx_market_cat_dating"><![CDATA[Dating]]></string>
+    <string name="_bx_market_cat_documentation"><![CDATA[Documentation]]></string>
+    <string name="_bx_market_cat_ecommerce"><![CDATA[eCommerce]]></string>
+    <string name="_bx_market_cat_events"><![CDATA[Events]]></string>
+    <string name="_bx_market_cat_feedback"><![CDATA[Feedback]]></string>
+    <string name="_bx_market_cat_flash"><![CDATA[Flash]]></string>
+    <string name="_bx_market_cat_games"><![CDATA[Games]]></string>
+    <string name="_bx_market_cat_graphics"><![CDATA[Graphics]]></string>
+    <string name="_bx_market_cat_hosting"><![CDATA[Hosting]]></string>
+    <string name="_bx_market_cat_integrations"><![CDATA[Integrations]]></string>
+    <string name="_bx_market_cat_location"><![CDATA[Location]]></string>
+    <string name="_bx_market_cat_management"><![CDATA[Management]]></string>
+    <string name="_bx_market_cat_mobile"><![CDATA[Mobile]]></string>
+    <string name="_bx_market_cat_multimedia"><![CDATA[Multimedia]]></string>
+    <string name="_bx_market_cat_music"><![CDATA[Music]]></string>
+    <string name="_bx_market_cat_navigation"><![CDATA[Navigation]]></string>
+    <string name="_bx_market_cat_other"><![CDATA[Other]]></string>
+    <string name="_bx_market_cat_performance"><![CDATA[Performance]]></string>
+    <string name="_bx_market_cat_photos"><![CDATA[Photos]]></string>
+    <string name="_bx_market_cat_search"><![CDATA[Search]]></string>
+    <string name="_bx_market_cat_security"><![CDATA[Security]]></string>
+    <string name="_bx_market_cat_services"><![CDATA[Services]]></string>
+    <string name="_bx_market_cat_social"><![CDATA[Social]]></string>
+    <string name="_bx_market_cat_spam_prevention"><![CDATA[Spam Prevention]]></string>
+    <string name="_bx_market_cat_statistics"><![CDATA[Statistics]]></string>
+    <string name="_bx_market_cat_templates"><![CDATA[Templates]]></string>
+    <string name="_bx_market_cat_tools"><![CDATA[Tools]]></string>
+    <string name="_bx_market_cat_translations"><![CDATA[Translations]]></string>
+    <string name="_bx_market_cat_video"><![CDATA[Video]]></string>
+
+    <string name="_bx_market_pre_lists_prices"><![CDATA[Product prices]]></string>
+    <string name="_bx_market_cat_price_0"><![CDATA[None]]></string>
+    <string name="_bx_market_cat_price_1"><![CDATA[1]]></string>
+    <string name="_bx_market_cat_price_2"><![CDATA[2]]></string>
+    <string name="_bx_market_cat_price_3"><![CDATA[3]]></string>
+    <string name="_bx_market_cat_price_4"><![CDATA[4]]></string>
+    <string name="_bx_market_cat_price_5"><![CDATA[5]]></string>
+
+	<string name="_bx_market_pre_lists_durations"><![CDATA[Product durations]]></string>
+	<string name="_bx_market_cat_duration_day"><![CDATA[daily]]></string>
+	<string name="_bx_market_cat_duration_week"><![CDATA[weekly]]></string>
+	<string name="_bx_market_cat_duration_month"><![CDATA[monthly]]></string>
+	<string name="_bx_market_cat_duration_year"><![CDATA[yearly]]></string>
+
+    <string name="_bx_market_vote_counter"><![CDATA[{0} ratings]]></string>
+
+	<string name="_bx_market_err_access_denied"><![CDATA[Access denied.]]></string>
+	<string name="_bx_market_err_no_payments"><![CDATA[There is no installed payment processing module.]]></string>
+	<string name="_bx_market_err_not_accept_payments"><![CDATA[You need to activate at least one payment provider. You may do it via My Account menu -> Settings page -> <a href="{0}">Payments</a> tab.]]></string>
+	<string name="_bx_market_err_not_accept_payments_single"><![CDATA[You need to activate at least one payment provider, which is working with Shopping Cart. You may do it via My Account menu -> Settings page -> <a href="{0}">Payments</a> tab.]]></string>
+	<string name="_bx_market_err_not_accept_payments_recurring"><![CDATA[You need to activate at least one payment provider, which is working with Subscriptions. You may do it via My Account menu -> Settings page -> <a href="{0}">Payments</a> tab.]]></string>
+
+    <string name="_bx_market_txt_all_entries_by"><![CDATA[<a href="{0}">All Products by {1} ({2})</a>]]></string>
+    <string name="_bx_market_txt_category"><![CDATA[Category:]]></string>
+    <string name="_bx_market_txt_most_current_version"><![CDATA[The most current version]]></string>
+    <string name="_bx_market_txt_sample_single"><![CDATA[product]]></string>
+    <string name="_bx_market_txt_sample_single_with_article"><![CDATA[a product]]></string>
+    <string name="_bx_market_txt_sample_comment_single"><![CDATA[product's comment]]></string>
+    <string name="_bx_market_txt_sample_vote_single"><![CDATA[product's vote]]></string>
+    <string name="_bx_market_txt_author_added_product"><![CDATA[{0} {1}]]></string>
+    <string name="_bx_market_txt_joined"><![CDATA[Joined:]]></string>
+    <string name="_bx_market_txt_last_active"><![CDATA[Last Active:]]></string>
+    <string name="_bx_market_txt_price_single"><![CDATA[Buy for {0}{1}]]></string>
+    <string name="_bx_market_txt_price_single_short"><![CDATA[{0}{1}]]></string>
+    <string name="_bx_market_txt_price_recurring"><![CDATA[Rent for {0}{1}/{2}]]></string>
+    <string name="_bx_market_txt_price_recurring_short"><![CDATA[{0}{1}/{2}]]></string>
+    <string name="_bx_market_txt_price_free"><![CDATA[Free]]></string>
+    <string name="_bx_market_txt_per_day"><![CDATA[day]]></string>
+    <string name="_bx_market_txt_per_day_short"><![CDATA[day]]></string>
+    <string name="_bx_market_txt_per_week"><![CDATA[week]]></string>
+    <string name="_bx_market_txt_per_week_short"><![CDATA[week]]></string>
+    <string name="_bx_market_txt_per_month"><![CDATA[month]]></string>
+    <string name="_bx_market_txt_per_month_short"><![CDATA[month]]></string>
+    <string name="_bx_market_txt_per_year"><![CDATA[year]]></string>
+    <string name="_bx_market_txt_per_year_short"><![CDATA[year]]></string>
+    <string name="_bx_market_txt_get_for_free"><![CDATA[Download for Free]]></string>
+</resources>

+ 57 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/install/sql/disable.sql

@@ -0,0 +1,57 @@
+
+-- SETTINGS
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_market' LIMIT 1);
+SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
+DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
+DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
+DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
+
+-- PAGES
+DELETE FROM `sys_objects_page` WHERE `module` = 'bx_market';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_market' OR `object` IN('bx_market_create_entry', 'bx_market_edit_entry', 'bx_market_delete_entry', 'bx_market_download_entry', 'bx_market_view_entry', 'bx_market_view_entry_comments', 'bx_market_home', 'bx_market_categories', 'bx_market_popular', 'bx_market_updated', 'bx_market_author', 'bx_market_search', 'bx_market_manage');
+
+-- MENU
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_market';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_market';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_market' OR `set_name` IN('bx_market_view', 'bx_market_submenu', 'bx_market_view_submenu', 'bx_market_my', 'bx_market_snippet');
+
+-- PRIVACY 
+DELETE FROM `sys_objects_privacy` WHERE `object` IN ('bx_market_allow_view_to', 'bx_market_allow_purchase_to', 'bx_market_allow_comment_to', 'bx_market_allow_vote_to');
+
+-- ACL
+DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_market';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_market';
+
+-- SEARCH
+DELETE FROM `sys_objects_search` WHERE `ObjectName` IN ('bx_market', 'bx_market_cmts');
+
+-- CONNECTIONS
+DELETE FROM `sys_objects_connection` WHERE `object` = 'bx_market_subentries';
+
+-- METATAGS
+DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_market';
+
+-- CATEGORY
+DELETE FROM `sys_objects_category` WHERE `object` = 'bx_market_cats';
+
+-- STATS
+DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_market%';
+
+-- CHARTS
+DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_market%';
+
+-- GRIDS
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_market_administration', 'bx_market_common', 'bx_market_licenses');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_market_administration', 'bx_market_common', 'bx_market_licenses');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_market_administration', 'bx_market_common', 'bx_market_licenses');
+
+-- UPLOADERS
+DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_market_simple', 'bx_market_html5');
+
+-- ALERTS
+SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_market' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
+
+-- CRON
+DELETE FROM `sys_cron_jobs` WHERE `name` LIKE 'bx_market%';

+ 499 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/install/sql/enable.sql

@@ -0,0 +1,499 @@
+
+-- SETTINGS
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_market', '_bx_market', 'bx_market@modules/boonex/market/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_market', '_bx_market', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_market_enable_recurring', 'on', @iCategId, '_bx_market_option_enable_recurring', 'checkbox', '', '', '', 1),
+('bx_market_recurring_reserve', '4', @iCategId, '_bx_market_option_recurring_reserve', 'digit', '', '', '', 2),
+('bx_market_summary_chars', '700', @iCategId, '_bx_market_option_summary_chars', 'digit', '', '', '', 10),
+('bx_market_plain_summary_chars', '240', @iCategId, '_bx_market_option_plain_summary_chars', 'digit', '', '', '', 11),
+('bx_market_per_page_browse', '12', @iCategId, '_bx_market_option_per_page_browse', 'digit', '', '', '', 20),
+('bx_market_per_page_profile', '3', @iCategId, '_bx_market_option_per_page_profile', 'digit', '', '', '', 21),
+('bx_market_rss_num', '10', @iCategId, '_bx_market_option_rss_num', 'digit', '', '', '', 25),
+('bx_market_searchable_fields', 'title,text', @iCategId, '_bx_market_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:9:"bx_market";s:6:"method";s:21:"get_searchable_fields";}', 30);
+
+-- PAGE: create entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_create_entry', '_bx_market_page_title_sys_create_entry', '_bx_market_page_title_create_entry', 'bx_market', 5, 2147483647, 1, 'create-product', 'page.php?i=create-product', '', '', '', 0, 1, 0, 'BxMarketPageBrowse', 'modules/boonex/market/classes/BxMarketPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_market_create_entry', 1, 'bx_market', '_bx_market_page_block_title_create_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_market";s:6:"method";s:13:"entity_create";}', 0, 1, 1);
+
+
+-- PAGE: edit entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_edit_entry', '_bx_market_page_title_sys_edit_entry', '_bx_market_page_title_edit_entry', 'bx_market', 5, 2147483647, 1, 'edit-product', '', '', '', '', 0, 1, 0, 'BxMarketPageEntry', 'modules/boonex/market/classes/BxMarketPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_market_edit_entry', 1, 'bx_market', '_bx_market_page_block_title_edit_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_market";s:6:"method";s:11:"entity_edit";}', 0, 0, 0);
+
+
+-- PAGE: delete entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_delete_entry', '_bx_market_page_title_sys_delete_entry', '_bx_market_page_title_delete_entry', 'bx_market', 5, 2147483647, 1, 'delete-product', '', '', '', '', 0, 1, 0, 'BxMarketPageEntry', 'modules/boonex/market/classes/BxMarketPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_market_delete_entry', 1, 'bx_market', '_bx_market_page_block_title_delete_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_market";s:6:"method";s:13:"entity_delete";}', 0, 0, 0);
+
+
+-- PAGE: download entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_download_entry', '_bx_market_page_title_sys_download_entry', '_bx_market_page_title_download_entry', 'bx_market', 5, 2147483647, 1, 'download-product', '', '', '', '', 0, 1, 0, 'BxMarketPageEntry', 'modules/boonex/market/classes/BxMarketPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_market_download_entry', 1, 'bx_market', '_bx_market_page_block_title_download_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_market";s:6:"method";s:15:"entity_download";}', 0, 0, 0);
+
+
+-- PAGE: view entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_view_entry', '_bx_market_page_title_sys_view_entry', '_bx_market_page_title_view_entry', 'bx_market', 7, 2147483647, 1, 'view-product', '', '', '', '', 0, 1, 0, 'BxMarketPageEntry', 'modules/boonex/market/classes/BxMarketPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_market_view_entry', 2, 'bx_market', '', '_bx_market_page_block_title_entry_text', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 0),
+('bx_market_view_entry', 2, 'bx_market', '', '_bx_market_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:18:\"entity_all_actions\";}', 0, 0, 0, 1),
+('bx_market_view_entry', 2, 'bx_market', '', '_bx_market_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:14:\"entity_actions\";}', 0, 0, 0, 2),
+('bx_market_view_entry', 2, 'bx_market', '', '_bx_market_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1, 3),
+('bx_market_view_entry', 2, 'bx_market', '', '_bx_market_page_block_title_entry_author_entries', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:22:\"entity_author_entities\";}', 0, 0, 1, 4),
+('bx_market_view_entry', 3, 'bx_market', '', '_bx_market_page_block_title_entry_social_sharing', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 1, 0),
+('bx_market_view_entry', 3, 'bx_market', '', '_bx_market_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 2),
+('bx_market_view_entry', 3, 'bx_market', '', '_bx_market_page_block_title_entry_rating', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:13:\"entity_rating\";}', 0, 0, 1, 3),
+('bx_market_view_entry', 3, 'bx_market', '', '_bx_market_page_block_title_entry_author', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:13:\"entity_author\";}', 0, 0, 1, 4),
+('bx_market_view_entry', 3, 'bx_market', '', '_bx_market_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:15:\"entity_location\";}', 0, 0, 0, 5),
+('bx_market_view_entry', 3, 'bx_market', '', '_bx_market_page_block_title_entry_location', 3, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:13:\"locations_map\";s:6:\"params\";a:2:{i:0;s:9:\"bx_market\";i:1;s:4:\"{id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 6),
+('bx_market_view_entry', 3, 'bx_market', '', '_bx_market_page_block_title_entry_attachments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:18:\"entity_attachments\";}', 0, 0, 0, 7);
+
+
+
+-- PAGE: view entry comments
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_view_entry_comments', '_bx_market_page_title_sys_view_entry_comments', '_bx_market_page_title_view_entry_comments', 'bx_market', 5, 2147483647, 1, 'view-product-comments', '', '', '', '', 0, 1, 0, 'BxMarketPageEntry', 'modules/boonex/market/classes/BxMarketPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_market_view_entry_comments', 1, 'bx_market', '_bx_market_page_block_title_entry_comments', '_bx_market_page_block_title_entry_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1);
+
+
+-- PAGE: view entry info
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_view_entry_info', '_bx_market_page_title_sys_view_entry_info', '_bx_market_page_title_view_entry_info', 'bx_market', 5, 2147483647, 1, 'view-product-info', '', '', '', '', 0, 1, 0, 'BxMarketPageEntry', 'modules/boonex/market/classes/BxMarketPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_market_view_entry_info', 1, 'bx_market', '_bx_market_page_block_title_entry_info', '_bx_market_page_block_title_entry_info_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:16:\"entity_info_full\";}', 0, 0, 1),
+('bx_market_view_entry_info', 1, 'bx_market', '', '_bx_market_page_block_title_entry_text', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 2);
+
+
+-- PAGE: categories
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_categories', '_bx_market_page_title_sys_entries_categories', '_bx_market_page_title_entries_categories', 'bx_market', 5, 2147483647, 1, 'products-categories', 'page.php?i=products-categories', '', '', '', 0, 1, 0, 'BxMarketPageBrowse', 'modules/boonex/market/classes/BxMarketPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_market_categories', 1, 'bx_market', '_bx_market_page_block_title_cats', 11, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:15:\"categories_list\";s:6:\"params\";a:2:{i:0;s:14:\"bx_market_cats\";i:1;b:0;}s:5:\"class\";s:20:\"TemplServiceCategory\";}', 0, 1, 1);
+--('bx_market_categories', 2, 'bx_market', '_bx_market_page_block_title_categories_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_market";s:6:"method";s:15:"browse_category";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1);
+
+
+-- PAGE: popular entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_popular', '_bx_market_page_title_sys_entries_popular', '_bx_market_page_title_entries_popular', 'bx_market', 5, 2147483647, 1, 'products-popular', 'page.php?i=products-popular', '', '', '', 0, 1, 0, 'BxMarketPageBrowse', 'modules/boonex/market/classes/BxMarketPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_market_popular', 1, 'bx_market', '_bx_market_page_block_title_popular_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_market";s:6:"method";s:14:"browse_popular";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+
+-- PAGE: recently updated entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_updated', '_bx_market_page_title_sys_entries_updated', '_bx_market_page_title_entries_updated', 'bx_market', 5, 2147483647, 1, 'products-updated', 'page.php?i=products-updated', '', '', '', 0, 1, 0, 'BxMarketPageBrowse', 'modules/boonex/market/classes/BxMarketPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_market_updated', 1, 'bx_market', '_bx_market_page_block_title_updated_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_market";s:6:"method";s:14:"browse_updated";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+
+-- PAGE: entries of author
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_author', 'products-author', '_bx_market_page_title_sys_entries_of_author', '_bx_market_page_title_entries_of_author', 'bx_market', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxMarketPageAuthor', 'modules/boonex/market/classes/BxMarketPageAuthor.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_market_author', 1, 'bx_market', '', '_bx_market_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:18:\"my_entries_actions\";}', 0, 0, 1, 1),
+('bx_market_author', 1, 'bx_market', '_bx_market_page_block_title_sys_favorites_of_author', '_bx_market_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:15:\"browse_favorite\";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 2),
+('bx_market_author', 1, 'bx_market', '_bx_market_page_block_title_sys_entries_of_author', '_bx_market_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:13:\"browse_author\";}', 0, 0, 1, 3);
+
+-- PAGE: profile's licenses
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_licenses', '_bx_market_page_title_sys_licenses', '_bx_market_page_title_licenses', 'bx_market', 5, 2147483647, 1, 'products-licenses', '', '', '', '', 0, 1, 0, 'BxMarketPageLicenses', 'modules/boonex/market/classes/BxMarketPageLicenses.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_market_licenses', 1, 'bx_market', '', '_bx_market_page_block_title_licenses_note', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:19:\"block_licenses_note\";}', 0, 0, 1, 0),
+('bx_market_licenses', 1, 'bx_market', '', '_bx_market_page_block_title_licenses', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:14:\"block_licenses\";}', 0, 0, 1, 1);
+
+-- PAGE: module home
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_home', 'products-home', '_bx_market_page_title_sys_home', '_bx_market_page_title_home', 'bx_market', 1, 2147483647, 1, 'page.php?i=products-home', '', '', '', 0, 1, 0, 'BxMarketPageBrowse', 'modules/boonex/market/classes/BxMarketPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_market_home', 1, 'bx_market', '', '_bx_market_page_block_title_popular_keywords', 11, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:14:\"keywords_cloud\";s:6:\"params\";a:2:{i:0;s:9:\"bx_market\";i:1;s:9:\"bx_market\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 1, 1, 0),
+('bx_market_home', 1, 'bx_market', '', '_bx_market_page_block_title_cats', 11, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:15:\"categories_list\";s:6:\"params\";a:2:{i:0;s:14:\"bx_market_cats\";i:1;a:1:{s:10:\"show_empty\";b:1;}}s:5:\"class\";s:20:\"TemplServiceCategory\";}', 0, 1, 1, 1),
+('bx_market_home', 2, 'bx_market', '', '_bx_market_page_block_title_featured_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_market";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:7:"gallery";}}', 0, 1, 1, 0),
+('bx_market_home', 2, 'bx_market', '', '_bx_market_page_block_title_recent_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_market";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:7:"gallery";}}', 0, 1, 1, 1),
+('bx_market_home', 2, 'bx_market', '', '_bx_market_page_block_title_popular_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_market";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:7:"gallery";}}', 0, 1, 1, 2);
+
+-- PAGE: search for entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_search', '_bx_market_page_title_sys_entries_search', '_bx_market_page_title_entries_search', 'bx_market', 5, 2147483647, 1, 'products-search', 'page.php?i=products-search', '', '', '', 0, 1, 0, 'BxMarketPageBrowse', 'modules/boonex/market/classes/BxMarketPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_market_search', 1, 'bx_market', '_bx_market_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:9:"bx_market";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_market_search', 1, 'bx_market', '_bx_market_page_block_title_search_results', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:9:"bx_market";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 2),
+('bx_market_search', 1, 'bx_market', '_bx_market_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:14:"bx_market_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_market_search', 1, 'bx_market', '_bx_market_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:14:"bx_market_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
+
+-- PAGE: module manage own
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_manage', '_bx_market_page_title_sys_manage', '_bx_market_page_title_manage', 'bx_market', 5, 2147483647, 1, 'products-manage', 'page.php?i=products-manage', '', '', '', 0, 1, 0, 'BxMarketPageBrowse', 'modules/boonex/market/classes/BxMarketPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_market_manage', 1, 'bx_market', '_bx_market_page_block_title_system_manage', '_bx_market_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:12:\"manage_tools\";}}', 0, 1, 0);
+
+-- PAGE: module manage all
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_administration', '_bx_market_page_title_sys_manage_administration', '_bx_market_page_title_manage', 'bx_market', 5, 192, 1, 'products-administration', 'page.php?i=products-administration', '', '', '', 0, 1, 0, 'BxMarketPageBrowse', 'modules/boonex/market/classes/BxMarketPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_market_administration', 1, 'bx_market', '_bx_market_page_block_title_system_manage_administration', '_bx_market_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
+
+-- PAGE: add block to homepage
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('sys_home', 1, 'bx_market', '_bx_market_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:13:\"browse_public\";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
+
+-- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
+SET @iPBCellProfile = 3;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_market', '_bx_market_page_block_title_view_profile', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:13:\"browse_author\";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:1:{s:8:"per_page";s:26:"bx_market_per_page_profile";}}}', 0, 0, 0);
+
+-- PAGE: service blocks
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('', 0, 'bx_market', '_bx_market_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_market\";s:6:\"method\";s:13:\"browse_public\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:7:\"gallery\";s:13:\"empty_message\";b:1;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 1),
+
+('', 0, 'bx_market', '_bx_market_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_market";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2),
+('', 0, 'bx_market', '_bx_market_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_market";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 3),
+('', 0, 'bx_market', '_bx_market_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_market";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 4);
+
+
+-- MENU: add to site menu
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_site', 'bx_market', 'products-home', '_bx_market_menu_item_title_system_entries_home', '_bx_market_menu_item_title_entries_home', 'page.php?i=products-home', '', '', 'shopping-cart col-green3', 'bx_market_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+-- MENU: add to homepage menu
+SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_homepage', 'bx_market', 'products-home', '_bx_market_menu_item_title_system_entries_home', '_bx_market_menu_item_title_entries_home', 'page.php?i=products-home', '', '', 'shopping-cart col-green3', 'bx_market_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+
+-- MENU: add to "add content" menu
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_add_content_links', 'bx_market', 'create-product', '_bx_market_menu_item_title_system_create_entry', '_bx_market_menu_item_title_create_entry', 'page.php?i=create-product', '', '', 'shopping-cart col-green3', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+
+-- MENU: actions menu for view entry 
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_view', '_bx_market_menu_title_view_entry', 'bx_market_view', 'bx_market', 9, 0, 1, 'BxMarketMenuView', 'modules/boonex/market/classes/BxMarketMenuView.php'),
+('bx_market_view_popup', '_bx_market_menu_title_view_entry_popup', 'bx_market_view', 'bx_market', 4, 0, 1, 'BxMarketMenuView', 'modules/boonex/market/classes/BxMarketMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_market_view', 'bx_market', '_bx_market_menu_set_title_view_entry', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_market_view', 'bx_market', 'edit-product', '_bx_market_menu_item_title_system_edit_entry', '_bx_market_menu_item_title_edit_entry', 'page.php?i=edit-product&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 1),
+('bx_market_view', 'bx_market', 'delete-product', '_bx_market_menu_item_title_system_delete_entry', '_bx_market_menu_item_title_delete_entry', 'page.php?i=delete-product&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 2),
+('bx_market_view', 'bx_market', 'download', '_bx_market_menu_item_title_system_download', '_bx_market_menu_item_title_download', 'page.php?i=download-product&id={content_id}', '', '', 'download', '', 2147483647, 1, 0, 3),
+('bx_market_view', 'bx_market', 'add-to-cart', '_bx_market_menu_item_title_system_add_to_cart', '{add_to_cart_title}', 'javascript:void(0);', 'javascript:{add_to_cart_onclick}', '', 'cart-plus', '', 2147483647, 1, 0, 4),
+('bx_market_view', 'bx_market', 'subscribe', '_bx_market_menu_item_title_system_subscribe', '{subscribe_title}', 'javascript:void(0);', 'javascript:{subscribe_onclick}', '', 'credit-card', '', 2147483647, 1, 0, 5);
+
+
+-- MENU: actions menu for my entries
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_my', '_bx_market_menu_title_entries_my', 'bx_market_my', 'bx_market', 9, 0, 1, 'BxMarketMenu', 'modules/boonex/market/classes/BxMarketMenu.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_market_my', 'bx_market', '_bx_market_menu_set_title_entries_my', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_market_my', 'bx_market', 'create-product', '_bx_market_menu_item_title_system_create_entry', '_bx_market_menu_item_title_create_entry', 'page.php?i=create-product', '', '', 'plus', '', 2147483647, 1, 0, 0);
+
+-- MENU: actions menu for snippet
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_snippet', '_bx_market_menu_title_snippet', 'bx_market_snippet', 'bx_market', 17, 0, 1, 'BxMarketMenuSnippetActions', 'modules/boonex/market/classes/BxMarketMenuSnippetActions.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_market_snippet', 'bx_market', '_bx_market_menu_set_title_snippet', 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_market_snippet', 'bx_market', 'snippet-more', '_bx_market_menu_item_title_system_snippet_more', '_bx_market_menu_item_title_snippet_more', 'javascript:void(0)', 'bx_menu_popup(''bx_market_view_popup'', this, {''id'':''bx_market_snippet_{content_id}''}, {id:{content_id}});', '', 'ellipsis-v', '', 'bx_market_view_popup', 1, 2147483647, 1, 0, 0, 1);
+
+
+-- MENU: module sub-menu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_submenu', '_bx_market_menu_title_submenu', 'bx_market_submenu', 'bx_market', 8, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_market_submenu', 'bx_market', '_bx_market_menu_set_title_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_market_submenu', 'bx_market', 'products-home', '_bx_market_menu_item_title_system_entries_public', '_bx_market_menu_item_title_entries_public', 'page.php?i=products-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_market_submenu', 'bx_market', 'products-categories', '_bx_market_menu_item_title_system_entries_categories', '_bx_market_menu_item_title_entries_categories', 'page.php?i=products-categories', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_market_submenu', 'bx_market', 'products-popular', '_bx_market_menu_item_title_system_entries_popular', '_bx_market_menu_item_title_entries_popular', 'page.php?i=products-popular', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_market_submenu', 'bx_market', 'products-search', '_bx_market_menu_item_title_system_entries_search', '_bx_market_menu_item_title_entries_search', 'page.php?i=products-search', '', '', '', '', 2147483647, 1, 1, 4),
+('bx_market_submenu', 'bx_market', 'products-manage', '_bx_market_menu_item_title_system_entries_manage', '_bx_market_menu_item_title_entries_manage', 'page.php?i=products-manage', '', '', '', '', 2147483646, 1, 1, 5);
+
+-- MENU: sub-menu for view entry
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_view_submenu', '_bx_market_menu_title_view_entry_submenu', 'bx_market_view_submenu', 'bx_market', 8, 0, 1, 'BxMarketMenuView', 'modules/boonex/market/classes/BxMarketMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_market_view_submenu', 'bx_market', '_bx_market_menu_set_title_view_entry_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_market_view_submenu', 'bx_market', 'view-product', '_bx_market_menu_item_title_system_view_entry_submenu_entry', '_bx_market_menu_item_title_view_entry_submenu_entry', 'page.php?i=view-product&id={content_id}', '', '', '', '', 2147483647, 1, 0, 1),
+('bx_market_view_submenu', 'bx_market', 'view-product-info', '_bx_market_menu_item_title_system_view_entry_submenu_info', '_bx_market_menu_item_title_view_entry_submenu_info', 'page.php?i=view-product-info&id={content_id}', '', '', '', '', 2147483647, 1, 0, 2),
+('bx_market_view_submenu', 'bx_market', 'view-product-comments', '_bx_market_menu_item_title_system_view_entry_submenu_comments', '_bx_market_menu_item_title_view_entry_submenu_comments', 'page.php?i=view-product-comments&id={content_id}', '', '', '', '', 2147483647, 1, 0, 3);
+
+-- MENU: profile stats
+SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_profile_stats', 'bx_market', 'profile-stats-manage-products', '_bx_market_menu_item_title_system_manage_my_products', '_bx_market_menu_item_title_manage_my_products', 'page.php?i=products-manage', '', '_self', 'shopping-cart col-green3', 'a:2:{s:6:"module";s:9:"bx_market";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1);
+
+-- MENU: manage tools submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market_menu_manage_tools', '_bx_market_menu_title_manage_tools', 'bx_market_menu_manage_tools', 'bx_market', 6, 0, 1, 'BxMarketMenuManageTools', 'modules/boonex/market/classes/BxMarketMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_market_menu_manage_tools', 'bx_market', '_bx_market_menu_set_title_manage_tools', 0);
+
+--INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+--('bx_market_menu_manage_tools', 'bx_market', 'delete-with-content', '_bx_market_menu_item_title_system_delete_with_content', '_bx_market_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'trash-o', '', 128, 1, 0, 0);
+
+-- MENU: dashboard manage tools
+SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_account_dashboard_manage_tools', 'bx_market', 'products-administration', '_bx_market_menu_item_title_system_admt_products', '_bx_market_menu_item_title_admt_products', 'page.php?i=products-administration', '', '_self', '', 'a:2:{s:6:"module";s:9:"bx_market";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+
+-- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('trigger_profile_view_submenu', 'bx_market', 'products-author', '_bx_market_menu_item_title_system_view_entries_author', '_bx_market_menu_item_title_view_entries_author', 'page.php?i=products-author&profile_id={profile_id}', '', '', 'shopping-cart col-green3', '', 2147483647, 1, 0, 0);
+
+-- MENU: account dashboard
+SET @iMoAccountDashboard = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard' LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
+('sys_account_dashboard', 'bx_market', 'dashboard-licenses', '_bx_market_menu_item_title_system_licenses', '_bx_market_menu_item_title_licenses', 'page.php?i=products-licenses', '', '', 'certificate col-green2', '', '', 2147483646, 1, 0, 1, @iMoAccountDashboard + 1);
+
+
+-- PRIVACY 
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_market_allow_view_to', 'bx_market', 'view', '_bx_market_form_entry_input_allow_view_to', '3', 'bx_market_products', 'id', 'author', '', ''),
+('bx_market_allow_purchase_to', 'bx_market', 'purchase', '_bx_market_form_entry_input_allow_purchase_to', '3', 'bx_market_products', 'id', 'author', '', ''),
+('bx_market_allow_comment_to', 'bx_market', 'comment', '_bx_market_form_entry_input_allow_comment_to', 'c', 'bx_market_products', 'id', 'author', 'BxMarketPrivacy', 'modules/boonex/market/classes/BxMarketPrivacy.php'),
+('bx_market_allow_vote_to', 'bx_market', 'vote', '_bx_market_form_entry_input_allow_vote_to', 'c', 'bx_market_products', 'id', 'author', 'BxMarketPrivacy', 'modules/boonex/market/classes/BxMarketPrivacy.php');
+
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_market', 'create entry', NULL, '_bx_market_acl_action_create_entry', '', 1, 3);
+SET @iIdActionEntryCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_market', 'delete entry', NULL, '_bx_market_acl_action_delete_entry', '', 1, 3);
+SET @iIdActionEntryDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_market', 'download entry', NULL, '_bx_market_acl_action_download_entry', '', 1, 0);
+SET @iIdActionEntryDownload = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_market', 'view entry', NULL, '_bx_market_acl_action_view_entry', '', 1, 0);
+SET @iIdActionEntryView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_market', 'set thumb', NULL, '_bx_market_acl_action_set_thumb', '', 1, 3);
+SET @iIdActionSetThumb = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_market', 'set cover', NULL, '_bx_market_acl_action_set_cover', '', 1, 3);
+SET @iIdActionSetCover = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_market', 'set subentries', NULL, '_bx_market_acl_action_set_subentries', '', 1, 3);
+SET @iIdActionSetSubentries = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_market', 'edit any entry', NULL, '_bx_market_acl_action_edit_any_entry', '', 1, 3);
+SET @iIdActionEntryEditAny = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- entry create
+(@iStandard, @iIdActionEntryCreate),
+(@iModerator, @iIdActionEntryCreate),
+(@iAdministrator, @iIdActionEntryCreate),
+(@iPremium, @iIdActionEntryCreate),
+
+-- entry delete
+(@iStandard, @iIdActionEntryDelete),
+(@iModerator, @iIdActionEntryDelete),
+(@iAdministrator, @iIdActionEntryDelete),
+(@iPremium, @iIdActionEntryDelete),
+
+-- entry download
+(@iUnauthenticated, @iIdActionEntryDownload),
+(@iAccount, @iIdActionEntryDownload),
+(@iStandard, @iIdActionEntryDownload),
+(@iUnconfirmed, @iIdActionEntryDownload),
+(@iPending, @iIdActionEntryDownload),
+(@iModerator, @iIdActionEntryDownload),
+(@iAdministrator, @iIdActionEntryDownload),
+(@iPremium, @iIdActionEntryDownload),
+
+-- entry view
+(@iUnauthenticated, @iIdActionEntryView),
+(@iAccount, @iIdActionEntryView),
+(@iStandard, @iIdActionEntryView),
+(@iUnconfirmed, @iIdActionEntryView),
+(@iPending, @iIdActionEntryView),
+(@iModerator, @iIdActionEntryView),
+(@iAdministrator, @iIdActionEntryView),
+(@iPremium, @iIdActionEntryView),
+
+-- set entry thumb
+(@iStandard, @iIdActionSetThumb),
+(@iModerator, @iIdActionSetThumb),
+(@iAdministrator, @iIdActionSetThumb),
+(@iPremium, @iIdActionSetThumb),
+
+-- set entry cover
+(@iStandard, @iIdActionSetCover),
+(@iModerator, @iIdActionSetCover),
+(@iAdministrator, @iIdActionSetCover),
+(@iPremium, @iIdActionSetCover),
+
+-- set entry subentries
+(@iStandard, @iIdActionSetSubentries),
+(@iModerator, @iIdActionSetSubentries),
+(@iAdministrator, @iIdActionSetSubentries),
+(@iPremium, @iIdActionSetSubentries),
+
+-- edit any entry
+(@iModerator, @iIdActionEntryEditAny),
+(@iAdministrator, @iIdActionEntryEditAny);
+
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_market', '_bx_market', @iSearchOrder + 1, 'BxMarketSearchResult', 'modules/boonex/market/classes/BxMarketSearchResult.php'),
+('bx_market_cmts', '_bx_market_cmts', @iSearchOrder + 2, 'BxMarketCmtsSearchResult', 'modules/boonex/market/classes/BxMarketCmtsSearchResult.php');
+
+-- CONNECTIONS
+INSERT INTO `sys_objects_connection` (`object`, `table`, `type`, `override_class_name`, `override_class_file`) VALUES
+('bx_market_subentries', 'bx_market_subproducts', 'one-way', '', '');
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_market', 'bx_market_meta_keywords', 'bx_market_meta_locations', '', '', '');
+
+-- CATEGORY
+INSERT INTO `sys_objects_category` (`object`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
+('bx_market_cats', 'bx_market', 'bx_market', 'bx_market_cats', 'bx_market_products', 'cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`id` = `bx_market_products`.`author`)', 'AND `sys_profiles`.`status` = ''active''', '', '');
+
+-- STATS
+SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
+INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
+('bx_market', 'bx_market', '_bx_market', 'page.php?i=products-home', 'shopping-cart col-green3', 'SELECT COUNT(*) FROM `bx_market_products` WHERE 1 AND `status` = ''active'' AND `status_admin` = ''active''', @iMaxOrderStats + 1);
+
+-- CHARTS
+SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
+INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
+('bx_market_growth', '_bx_market_chart_growth', 'bx_market_products', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_market_growth_speed', '_bx_market_chart_growth_speed', 'bx_market_products', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
+
+-- GRIDS: moderation tools
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
+('bx_market_administration', 'Sql', 'SELECT * FROM `bx_market_products` WHERE 1 ', 'bx_market_products', 'id', 'added', 'status_admin', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 192, 'BxMarketGridAdministration', 'modules/boonex/market/classes/BxMarketGridAdministration.php'),
+('bx_market_common', 'Sql', 'SELECT * FROM `bx_market_products` WHERE 1 ', 'bx_market_products', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 2147483647, 'BxMarketGridCommon', 'modules/boonex/market/classes/BxMarketGridCommon.php'),
+
+-- GRIDS: Licenses
+('bx_market_licenses', 'Sql', 'SELECT `tl`.`id` AS `id`, `tl`.`profile_id` AS `profile_id`, `tl`.`product_id` AS `product_id`, `tp`.`title` AS `product`, `tl`.`license` AS `license`, `tl`.`type` AS `type`, `tl`.`domain` AS `domain`, `tl`.`added` AS `added`, `tl`.`expired` AS `expired` FROM `bx_market_licenses` AS `tl` LEFT JOIN `bx_market_products` AS `tp` ON `tl`.`product_id`=`tp`.`id` WHERE 1 ', 'bx_market_licenses', 'id', 'added', '', '', 20, NULL, 'start', '', 'tp`.`title,tl`.`license,tl`.`type,tl`.`domain', '', 'like', '', '', 2147483647, 'BxMarketGridLicenses', 'modules/boonex/market/classes/BxMarketGridLicenses.php');
+
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_market_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_market_administration', 'switcher', '_bx_market_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_market_administration', 'title', '_bx_market_grid_column_title_adm_title', '25%', 0, '', '', 3),
+('bx_market_administration', 'added', '_bx_market_grid_column_title_adm_added', '20%', 1, '25', '', 4),
+('bx_market_administration', 'author', '_bx_market_grid_column_title_adm_author', '25%', 0, '25', '', 5),
+('bx_market_administration', 'actions', '', '20%', 0, '', '', 6),
+('bx_market_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_market_common', 'switcher', '_bx_market_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_market_common', 'title', '_bx_market_grid_column_title_adm_title', '40%', 0, '', '', 3),
+('bx_market_common', 'added', '_bx_market_grid_column_title_adm_added', '30%', 1, '25', '', 4),
+('bx_market_common', 'actions', '', '20%', 0, '', '', 5),
+
+('bx_market_licenses', 'product', '_bx_market_grid_column_title_lcs_product', '30%', 0, '28', '', 1),
+('bx_market_licenses', 'license', '_bx_market_grid_column_title_lcs_license', '10%', 0, '8', '', 3),
+('bx_market_licenses', 'type', '_bx_market_grid_column_title_lcs_type', '10%', 1, '12', '', 4),
+('bx_market_licenses', 'domain', '_bx_market_grid_column_title_lcs_domain', '20%', 0, '18', '', 5),
+('bx_market_licenses', 'added', '_bx_market_grid_column_title_lcs_added', '10%', 1, '25', '', 6),
+('bx_market_licenses', 'expired', '_bx_market_grid_column_title_lcs_expired', '10%', 1, '25', '', 7),
+('bx_market_licenses', 'actions', '', '10%', 0, '', '', 8);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_market_administration', 'bulk', 'delete', '_bx_market_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_market_administration', 'single', 'edit', '_bx_market_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_market_administration', 'single', 'delete', '_bx_market_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_market_administration', 'single', 'settings', '_bx_market_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
+('bx_market_common', 'bulk', 'delete', '_bx_market_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_market_common', 'single', 'edit', '_bx_market_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_market_common', 'single', 'delete', '_bx_market_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_market_common', 'single', 'settings', '_bx_market_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
+
+('bx_market_licenses', 'single', 'reset', '_bx_market_grid_action_title_lcs_reset', 'eraser', 1, 1, 1);
+
+
+-- UPLOADERS
+INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
+('bx_market_simple', 1, 'BxMarketUploaderSimple', 'modules/boonex/market/classes/BxMarketUploaderSimple.php'),
+('bx_market_html5', 1, 'BxMarketUploaderHTML5', 'modules/boonex/market/classes/BxMarketUploaderHTML5.php');
+
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_market', 'BxMarketAlertsResponse', 'modules/boonex/market/classes/BxMarketAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('bx_market_files', 'file_deleted', @iHandler),
+('bx_market_files', 'file_downloaded', @iHandler),
+('bx_market_photos', 'file_deleted', @iHandler),
+('profile', 'delete', @iHandler);
+
+
+-- CRON
+INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `service_call`) VALUES
+('bx_market_pruning', '0 0 * * *', 'BxMarketCronPruning', 'modules/boonex/market/classes/BxMarketCronPruning.php', '');

+ 509 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/install/sql/install.sql

@@ -0,0 +1,509 @@
+
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+-- TABLE: entries
+CREATE TABLE IF NOT EXISTS `bx_market_products` (
+  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(11) unsigned NOT NULL default '0',
+  `added` int(11) NOT NULL default '0',
+  `changed` int(11) NOT NULL default '0',
+  `thumb` int(11) NOT NULL default '0',
+  `cover` int(11) NOT NULL default '0',
+  `package` int(11) NOT NULL default '0',
+  `name` varchar(255) NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `text` text NOT NULL,
+  `notes` text NOT NULL,
+  `cat` int(11) NOT NULL,
+  `price_single` float NOT NULL default '0',
+  `price_recurring` float NOT NULL default '0',
+  `duration_recurring` varchar(16) NOT NULL default 'month',
+  `trial_recurring` int(11) NOT NULL default '0',
+  `views` int(11) NOT NULL default '0',
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `favorites` int(11) NOT NULL default '0',
+  `comments` int(11) NOT NULL default '0',
+  `reports` int(11) NOT NULL default '0',
+  `featured` int(11) NOT NULL default '0',
+  `allow_view_to` varchar(32) NOT NULL DEFAULT '3',
+  `allow_purchase_to` varchar(32) NOT NULL DEFAULT '3',
+  `allow_comment_to` varchar(32) NOT NULL DEFAULT 'c',
+  `allow_vote_to` varchar(32) NOT NULL DEFAULT 'c',
+  `status` enum('active','hidden') NOT NULL DEFAULT 'active',
+  `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `name` (`name`),
+  FULLTEXT KEY `title_text` (`title`,`text`)
+);
+
+-- TABLE: subentries
+CREATE TABLE IF NOT EXISTS `bx_market_subproducts` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `initiator` int(11) NOT NULL,
+  `content` int(11) NOT NULL,
+  `added` int(10) unsigned NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `initiator` (`initiator`,`content`),
+  KEY `content` (`content`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: licenses
+CREATE TABLE IF NOT EXISTS `bx_market_licenses` (
+  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+  `profile_id` int(11) unsigned NOT NULL default '0',
+  `product_id` int(11) unsigned NOT NULL default '0',
+  `count` int(11) unsigned NOT NULL default '0',
+  `order` varchar(32) NOT NULL default '',
+  `license` varchar(32) NOT NULL default '',
+  `type` varchar(16) NOT NULL default '',
+  `domain` varchar(128) NOT NULL default '',
+  `added` int(11) unsigned NOT NULL default '0',
+  `expired` int(11) unsigned NOT NULL default '0',
+  `new` tinyint(1) NOT NULL default '1',
+  PRIMARY KEY (`id`),
+  KEY `product_id` (`product_id`, `profile_id`),
+  KEY `license` (`license`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_market_licenses_deleted` (
+  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+  `profile_id` int(11) unsigned NOT NULL default '0',
+  `product_id` int(11) unsigned NOT NULL default '0',
+  `count` int(11) unsigned NOT NULL default '0',
+  `order` varchar(32) NOT NULL default '',
+  `license` varchar(32) NOT NULL default '',
+  `type` varchar(16) NOT NULL default '',
+  `domain` varchar(128) NOT NULL default '',
+  `added` int(11) unsigned NOT NULL default '0',
+  `expired` int(11) unsigned NOT NULL default '0',
+  `new` tinyint(1) NOT NULL default '1',
+  `reason` varchar(16) NOT NULL default '',
+  `deleted` int(11) unsigned NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `product_id` (`product_id`,`profile_id`),
+  KEY `license` (`license`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: storages & transcoders
+CREATE TABLE IF NOT EXISTS `bx_market_files` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_market_files2products` (
+  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+  `content_id` int(11) unsigned NOT NULL,
+  `file_id` int(11) NOT NULL,
+  `type` enum('version','update') NOT NULL DEFAULT 'version',
+  `version` varchar(255) NOT NULL,
+  `version_to` varchar(255) NOT NULL,
+  `downloads` int(11) NOT NULL,
+  `order` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `file_content` (`file_id`,`content_id`),
+  KEY `content_id` (`content_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_market_downloads_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `file_id` int(11) NOT NULL default '0',
+  `profile_id` int(11) NOT NULL default '0',
+  `profile_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_market_photos` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_market_photos2products` (
+  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+  `content_id` int(11) unsigned NOT NULL,
+  `file_id` int(11) NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `order` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `file_content` (`file_id`,`content_id`),
+  KEY `content_id` (`content_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_market_photos_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+-- TABLE: comments
+CREATE TABLE IF NOT EXISTS `bx_market_cmts` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: votes
+CREATE TABLE IF NOT EXISTS `bx_market_votes` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_market_votes_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `value` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: views
+CREATE TABLE `bx_market_views_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: metas
+CREATE TABLE `bx_market_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE `bx_market_meta_locations` (
+  `object_id` int(10) unsigned NOT NULL,
+  `lat` double NOT NULL,
+  `lng` double NOT NULL,
+  `country` varchar(2) NOT NULL,
+  `state` varchar(255) NOT NULL,
+  `city` varchar(255) NOT NULL,
+  `zip` varchar(255) NOT NULL,
+  `street` varchar(255) NOT NULL,
+  `street_number` varchar(255) NOT NULL,
+  PRIMARY KEY (`object_id`),
+  KEY `country_state_city` (`country`,`state`(8),`city`(8))
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_market_reports` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_market_reports_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: favorites
+CREATE TABLE `bx_market_favorites_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`author_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+
+-- STORAGES & TRANSCODERS
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_market_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_market_files', 'allow-deny', 'zip', '', 0, 0, 0, 0, 0, 0),
+('bx_market_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_market_photos', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_market_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_market_photos_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
+('bx_market_preview', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0'),
+('bx_market_icon', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0'),
+('bx_market_thumb', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0'),
+('bx_market_cover', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0'),
+('bx_market_screenshot', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0'),
+('bx_market_gallery', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_market_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
+('bx_market_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_market_icon', 'Resize', 'a:3:{s:1:"w";s:2:"50";s:1:"h";s:2:"50";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_market_thumb', 'Resize', 'a:3:{s:1:"w";s:3:"100";s:1:"h";s:3:"100";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_market_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
+('bx_market_screenshot', 'Resize', 'a:3:{s:1:"w";s:3:"200";s:1:"h";s:3:"120";s:11:"crop_resize";s:1:"1";}', '0');
+
+-- FORMS
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_market', 'bx_market', '_bx_market_form_entry', '', 'a:1:{s:7:\"enctype\";s:19:\"multipart/form-data\";}', 'bx_market_products', 'id', '', '', 'do_submit', '', 0, 1, 'BxMarketFormEntry', 'modules/boonex/market/classes/BxMarketFormEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_market', 'bx_market_entry_add', 'bx_market', 0, '_bx_market_form_entry_display_add'),
+('bx_market', 'bx_market_entry_delete', 'bx_market', 0, '_bx_market_form_entry_display_delete'),
+('bx_market', 'bx_market_entry_edit', 'bx_market', 0, '_bx_market_form_entry_display_edit'),
+('bx_market', 'bx_market_entry_view', 'bx_market', 1, '_bx_market_form_entry_display_view'),
+('bx_market', 'bx_market_entry_view_full', 'bx_market', 1, '_bx_market_form_entry_display_view_full');
+
+INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_market', 'bx_market', 'allow_view_to', '', '', 0, 'custom', '_bx_market_form_entry_input_sys_allow_view_to', '_bx_market_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'allow_purchase_to', '', '', 0, 'custom', '_bx_market_form_entry_input_sys_allow_purchase_to', '_bx_market_form_entry_input_allow_purchase_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'allow_comment_to', '', '', 0, 'custom', '_bx_market_form_entry_input_sys_allow_comment_to', '_bx_market_form_entry_input_allow_comment_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'allow_vote_to', '', '', 0, 'custom', '_bx_market_form_entry_input_sys_allow_vote_to', '_bx_market_form_entry_input_allow_vote_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_market_form_entry_input_sys_delete_confirm', '_bx_market_form_entry_input_delete_confirm', '_bx_market_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_market_form_entry_input_delete_confirm_error', '', '', 1, 0),
+('bx_market', 'bx_market', 'do_publish', '_bx_market_form_entry_input_do_publish', '', 0, 'submit', '_bx_market_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'do_submit', '_bx_market_form_entry_input_do_submit', '', 0, 'submit', '_bx_market_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'pictures', 'a:1:{i:0;s:15:"bx_market_html5";}', 'a:2:{s:16:"bx_market_simple";s:26:"_sys_uploader_simple_title";s:15:"bx_market_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_market_form_entry_input_sys_pictures', '_bx_market_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'files', 'a:1:{i:0;s:15:"bx_market_html5";}', 'a:2:{s:16:"bx_market_simple";s:26:"_sys_uploader_simple_title";s:15:"bx_market_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_market_form_entry_input_sys_files', '_bx_market_form_entry_input_files', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'text', '', '', 0, 'textarea', '_bx_market_form_entry_input_sys_text', '_bx_market_form_entry_input_text', '', 1, 0, 2, '', '', '', 'Avail', '', '_bx_market_form_entry_input_text_err', 'XssHtml', '', 1, 0),
+('bx_market', 'bx_market', 'notes', '', '', 0, 'textarea', '_bx_market_form_entry_input_sys_notes', '_bx_market_form_entry_input_notes', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_market', 'bx_market', 'title', '', '', 0, 'text', '_bx_market_form_entry_input_sys_title', '_bx_market_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_market_form_entry_input_title_err', 'Xss', '', 1, 0),
+('bx_market', 'bx_market', 'name', '', '', 0, 'text', '_bx_market_form_entry_input_sys_name', '_bx_market_form_entry_input_name', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_market_form_entry_input_name_err', 'Xss', '', 1, 0),
+('bx_market', 'bx_market', 'cat', '', '#!bx_market_cats', 0, 'select', '_bx_market_form_entry_input_sys_cat', '_bx_market_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_market_form_entry_input_cat_err', 'Xss', '', 1, 0),
+('bx_market', 'bx_market', 'price_single', '', '', 0, 'text', '_bx_market_form_entry_input_sys_price_single', '_bx_market_form_entry_input_price_single', '_bx_market_form_entry_input_price_single_inf', 0, 0, 0, '', '', '', '', '', '', 'Float', '', 1, 0),
+('bx_market', 'bx_market', 'price_recurring', '', '#!bx_market_prices', 0, 'select', '_bx_market_form_entry_input_sys_price_recurring', '_bx_market_form_entry_input_price_recurring', '_bx_market_form_entry_input_price_recurring_inf', 0, 0, 0, '', '', '', '', '', '', 'Float', '', 1, 0),
+('bx_market', 'bx_market', 'duration_recurring', 'month', '#!bx_market_durations', 0, 'select', '_bx_market_form_entry_input_sys_duration_recurring', '_bx_market_form_entry_input_duration_recurring', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_market', 'bx_market', 'trial_recurring', '', '', 0, 'text', '_bx_market_form_entry_input_sys_trial_recurring', '_bx_market_form_entry_input_trial_recurring', '_bx_market_form_entry_input_trial_recurring_inf', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
+('bx_market', 'bx_market', 'added', '', '', 0, 'datetime', '_bx_market_form_entry_input_sys_added', '_bx_market_form_entry_input_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'changed', '', '', 0, 'datetime', '_bx_market_form_entry_input_sys_changed', '_bx_market_form_entry_input_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'header_beg_single', '', '', 0, 'block_header', '_bx_market_form_entry_input_sys_header_beg_single', '_bx_market_form_entry_input_header_beg_single', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'header_beg_recurring', '', '', 0, 'block_header', '_bx_market_form_entry_input_sys_header_beg_recurring', '_bx_market_form_entry_input_header_beg_recurring', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'header_beg_privacy', '', '', 0, 'block_header', '_bx_market_form_entry_input_sys_header_beg_privacy', '_bx_market_form_entry_input_header_beg_privacy', '', 0, 1, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'header_end_single', '', '', 0, 'block_end', '_bx_market_form_entry_input_sys_header_end_single', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_market', 'bx_market', 'header_end_recurring', '', '', 0, 'block_end', '_bx_market_form_entry_input_sys_header_end_recurring', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_market', 'bx_market', 'header_end_privacy', '', '', 0, 'block_end', '_bx_market_form_entry_input_sys_header_end_privacy', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_market', 'bx_market', 'warning_single', '_bx_market_err_not_accept_payments_single', '', 0, 'value', '_bx_market_form_entry_input_sys_warning_single', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'warning_recurring', '_bx_market_err_not_accept_payments_recurring', '', 0, 'value', '_bx_market_form_entry_input_sys_warning_recurring', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_market', 'bx_market', 'subentries', '', '', 0, 'custom', '_bx_market_form_entry_input_sys_subentries', '_bx_market_form_entry_input_subentries', '_bx_market_form_entry_input_subentries_inf', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_market_entry_add', 'title', 2147483647, 1, 1),
+('bx_market_entry_add', 'name', 2147483647, 1, 2),
+('bx_market_entry_add', 'cat', 2147483647, 1, 3),
+('bx_market_entry_add', 'text', 2147483647, 1, 4),
+('bx_market_entry_add', 'pictures', 2147483647, 1, 5),
+('bx_market_entry_add', 'files', 2147483647, 1, 6),
+('bx_market_entry_add', 'header_beg_single', 2147483647, 1, 7),
+('bx_market_entry_add', 'warning_single', 2147483647, 1, 8),
+('bx_market_entry_add', 'price_single', 2147483647, 1, 9),
+('bx_market_entry_add', 'header_end_single', 2147483647, 1, 10),
+('bx_market_entry_add', 'header_beg_recurring', 2147483647, 1, 11),
+('bx_market_entry_add', 'warning_recurring', 2147483647, 1, 12),
+('bx_market_entry_add', 'duration_recurring', 2147483647, 1, 13),
+('bx_market_entry_add', 'price_recurring', 2147483647, 1, 14),
+('bx_market_entry_add', 'trial_recurring', 2147483647, 1, 15),
+('bx_market_entry_add', 'header_end_recurring', 2147483647, 1, 16),
+('bx_market_entry_add', 'header_beg_privacy', 2147483647, 1, 17),
+('bx_market_entry_add', 'allow_view_to', 2147483647, 1, 18),
+('bx_market_entry_add', 'allow_purchase_to', 2147483647, 1, 19),
+('bx_market_entry_add', 'allow_comment_to', 2147483647, 1, 20),
+('bx_market_entry_add', 'allow_vote_to', 2147483647, 1, 21),
+('bx_market_entry_add', 'header_end_privacy', 2147483647, 1, 22),
+('bx_market_entry_add', 'notes', 2147483647, 1, 23),
+('bx_market_entry_add', 'location', 2147483647, 1, 24),
+('bx_market_entry_add', 'subentries', 2147483647, 1, 25),
+('bx_market_entry_add', 'do_publish', 2147483647, 1, 26),
+
+('bx_market_entry_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_market_entry_delete', 'do_submit', 2147483647, 1, 2),
+
+('bx_market_entry_edit', 'title', 2147483647, 1, 1),
+('bx_market_entry_edit', 'name', 2147483647, 1, 2),
+('bx_market_entry_edit', 'cat', 2147483647, 1, 3),
+('bx_market_entry_edit', 'text', 2147483647, 1, 4),
+('bx_market_entry_edit', 'pictures', 2147483647, 1, 5),
+('bx_market_entry_edit', 'files', 2147483647, 1, 6),
+('bx_market_entry_edit', 'header_beg_single', 2147483647, 1, 7),
+('bx_market_entry_edit', 'warning_single', 2147483647, 1, 8),
+('bx_market_entry_edit', 'price_single', 2147483647, 1, 9),
+('bx_market_entry_edit', 'header_end_single', 2147483647, 1, 10),
+('bx_market_entry_edit', 'header_beg_recurring', 2147483647, 1, 11),
+('bx_market_entry_edit', 'warning_recurring', 2147483647, 1, 12),
+('bx_market_entry_edit', 'duration_recurring', 2147483647, 1, 13),
+('bx_market_entry_edit', 'price_recurring', 2147483647, 1, 14),
+('bx_market_entry_edit', 'trial_recurring', 2147483647, 1, 15),
+('bx_market_entry_edit', 'header_end_recurring', 2147483647, 1, 16),
+('bx_market_entry_edit', 'header_beg_privacy', 2147483647, 1, 17),
+('bx_market_entry_edit', 'allow_view_to', 2147483647, 1, 18),
+('bx_market_entry_edit', 'allow_purchase_to', 2147483647, 1, 19),
+('bx_market_entry_edit', 'allow_comment_to', 2147483647, 1, 20),
+('bx_market_entry_edit', 'allow_vote_to', 2147483647, 1, 21),
+('bx_market_entry_edit', 'header_end_privacy', 2147483647, 1, 22),
+('bx_market_entry_edit', 'notes', 2147483647, 1, 23),
+('bx_market_entry_edit', 'location', 2147483647, 1, 24),
+('bx_market_entry_edit', 'subentries', 2147483647, 1, 25),
+('bx_market_entry_edit', 'do_submit', 2147483647, 1, 26),
+
+('bx_market_entry_view', 'cat', 2147483647, 1, 1),
+('bx_market_entry_view', 'added', 2147483647, 1, 2),
+('bx_market_entry_view', 'changed', 2147483647, 1, 3),
+
+('bx_market_entry_view_full', 'cat', 2147483647, 1, 1),
+('bx_market_entry_view_full', 'added', 2147483647, 1, 2),
+('bx_market_entry_view_full', 'changed', 2147483647, 1, 3),
+('bx_market_entry_view_full', 'notes', 2147483647, 1, 4);
+
+-- PRE-VALUES
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
+('bx_market_cats', '_bx_market_pre_lists_cats', 'bx_market', '0'),
+('bx_market_prices', '_bx_market_pre_lists_prices', 'bx_market', '0'),
+('bx_market_durations', '_bx_market_pre_lists_durations', 'bx_market', '0');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
+('bx_market_cats', '', 0, '_sys_please_select', ''),
+('bx_market_cats', '1', 1, '_bx_market_cat_administration', ''),
+('bx_market_cats', '2', 2, '_bx_market_cat_adult', ''),
+('bx_market_cats', '3', 3, '_bx_market_cat_advertisement', ''),
+('bx_market_cats', '4', 4, '_bx_market_cat_affiliates', ''),
+('bx_market_cats', '5', 5, '_bx_market_cat_authentication', ''),
+('bx_market_cats', '6', 6, '_bx_market_cat_calendars', ''),
+('bx_market_cats', '7', 7, '_bx_market_cat_communication', ''),
+('bx_market_cats', '8', 8, '_bx_market_cat_content', ''),
+('bx_market_cats', '9', 9, '_bx_market_cat_conversion', ''),
+('bx_market_cats', '10', 10, '_bx_market_cat_core_changes', ''),
+('bx_market_cats', '11', 11, '_bx_market_cat_dating', ''),
+('bx_market_cats', '12', 12, '_bx_market_cat_documentation', ''),
+('bx_market_cats', '13', 13, '_bx_market_cat_ecommerce', ''),
+('bx_market_cats', '14', 14, '_bx_market_cat_events', ''),
+('bx_market_cats', '15', 15, '_bx_market_cat_feedback', ''),
+('bx_market_cats', '16', 16, '_bx_market_cat_flash', ''),
+('bx_market_cats', '17', 17, '_bx_market_cat_games', ''),
+('bx_market_cats', '18', 18, '_bx_market_cat_graphics', ''),
+('bx_market_cats', '19', 19, '_bx_market_cat_hosting', ''),
+('bx_market_cats', '20', 20, '_bx_market_cat_integrations', ''),
+('bx_market_cats', '21', 21, '_bx_market_cat_location', ''),
+('bx_market_cats', '22', 22, '_bx_market_cat_management', ''),
+('bx_market_cats', '23', 23, '_bx_market_cat_mobile', ''),
+('bx_market_cats', '24', 24, '_bx_market_cat_multimedia', ''),
+('bx_market_cats', '25', 25, '_bx_market_cat_music', ''),
+('bx_market_cats', '26', 26, '_bx_market_cat_navigation', ''),
+('bx_market_cats', '27', 27, '_bx_market_cat_other', ''),
+('bx_market_cats', '28', 28, '_bx_market_cat_performance', ''),
+('bx_market_cats', '29', 29, '_bx_market_cat_photos', ''),
+('bx_market_cats', '30', 30, '_bx_market_cat_search', ''),
+('bx_market_cats', '31', 31, '_bx_market_cat_security', ''),
+('bx_market_cats', '32', 32, '_bx_market_cat_services', ''),
+('bx_market_cats', '33', 33, '_bx_market_cat_social', ''),
+('bx_market_cats', '34', 34, '_bx_market_cat_spam_prevention', ''),
+('bx_market_cats', '35', 35, '_bx_market_cat_statistics', ''),
+('bx_market_cats', '36', 36, '_bx_market_cat_templates', ''),
+('bx_market_cats', '37', 37, '_bx_market_cat_tools', ''),
+('bx_market_cats', '38', 38, '_bx_market_cat_translations', ''),
+('bx_market_cats', '39', 39, '_bx_market_cat_video', ''),
+
+('bx_market_prices', '0', 0, '_bx_market_cat_price_0', ''),
+('bx_market_prices', '1', 1, '_bx_market_cat_price_1', ''),
+('bx_market_prices', '2', 2, '_bx_market_cat_price_2', ''),
+('bx_market_prices', '3', 3, '_bx_market_cat_price_3', ''),
+('bx_market_prices', '4', 4, '_bx_market_cat_price_4', ''),
+('bx_market_prices', '5', 5, '_bx_market_cat_price_5', ''),
+
+('bx_market_durations', 'day', 1, '_bx_market_cat_duration_day', ''),
+('bx_market_durations', 'week', 2, '_bx_market_cat_duration_week', ''),
+('bx_market_durations', 'month', 3, '_bx_market_cat_duration_month', ''),
+('bx_market_durations', 'year', 4, '_bx_market_cat_duration_year', '');
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_market', 'bx_market', 'bx_market_cmts', 1, 5000, 1000, 1, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-product&id={object_id}', '', 'bx_market_products', 'id', 'author', 'title', 'comments', 'BxMarketCmts', 'modules/boonex/market/classes/BxMarketCmts.php');
+
+-- VOTES
+INSERT INTO `sys_objects_vote` (`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES 
+('bx_market', 'bx_market_votes', 'bx_market_votes_track', '604800', '1', '5', '0', '1', 'bx_market_products', 'id', 'author', 'rate', 'votes', 'BxMarketVote', 'modules/boonex/market/classes/BxMarketVote.php');
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_market', 'bx_market_reports', 'bx_market_reports_track', '1', 'page.php?i=view-product&id={object_id}', 'bx_market_products', 'id', 'author', 'reports', '', '');
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_market', 'bx_market_views_track', '86400', '1', 'bx_market_products', 'id', 'author', 'views', '', '');
+
+-- FAFORITES
+INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_market', 'bx_market_favorites_track', '1', '1', '1', 'page.php?i=view-product&id={object_id}', 'bx_market_products', 'id', 'author', 'favorites', '', '');
+
+-- FEATURED
+INSERT INTO `sys_objects_feature` (`name`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES 
+('bx_market', '1', '1', 'page.php?i=view-product&id={object_id}', 'bx_market_products', 'id', 'author', 'featured', '', '');
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_market', '_bx_market', 'bx_market', 'added', 'edited', 'deleted', '', ''),
+('bx_market_cmts', '_bx_market_cmts', 'bx_market', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
+('bx_market', 'bx_market_administration', 'id', '', ''),
+('bx_market', 'bx_market_common', 'id', '', '');
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_market', 'bx_market', 'bx_market', '_bx_market_search_extended', 1, '', ''),
+('bx_market_cmts', 'bx_market_cmts', 'bx_market', '_bx_market_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+-- STUDIO: page & widget
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_market', '_bx_market', '_bx_market', 'bx_market@modules/boonex/market/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_market', '{url_studio}module.php?name=bx_market', '', 'bx_market@modules/boonex/market/|std-icon.svg', '_bx_market', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 53 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/install/sql/uninstall.sql

@@ -0,0 +1,53 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_market_products`, `bx_market_subproducts`, `bx_market_licenses`, `bx_market_licenses_deleted`, `bx_market_files`, `bx_market_files2products`, `bx_market_downloads_track`, `bx_market_photos`, `bx_market_photos2products`, `bx_market_photos_resized`, `bx_market_cmts`, `bx_market_votes`, `bx_market_votes_track`, `bx_market_views_track`, `bx_market_meta_keywords`, `bx_market_meta_locations`, `bx_market_reports`, `bx_market_reports_track`, `bx_market_favorites_track`;
+
+-- STORAGES & TRANSCODERS
+DELETE FROM `sys_objects_storage` WHERE `object` IN('bx_market_files', 'bx_market_photos', 'bx_market_photos_resized');
+DELETE FROM `sys_storage_tokens` WHERE `object` IN('bx_market_files', 'bx_market_photos', 'bx_market_photos_resized');
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_market_preview', 'bx_market_icon', 'bx_market_thumb', 'bx_market_cover', 'bx_market_screenshot', 'bx_market_gallery');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_market_preview', 'bx_market_icon', 'bx_market_thumb', 'bx_market_cover', 'bx_market_screenshot', 'bx_market_gallery');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_market_preview', 'bx_market_icon', 'bx_market_thumb', 'bx_market_cover', 'bx_market_screenshot', 'bx_market_gallery');
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_market';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_market';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_market';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN ('bx_market_entry_add', 'bx_market_entry_edit', 'bx_market_entry_view', 'bx_market_entry_view_full', 'bx_market_entry_delete');
+
+-- PRE-VALUES
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_market';
+
+DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_market_cats', 'bx_market_prices', 'bx_market_durations');
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_market';
+
+-- VOTES
+DELETE FROM `sys_objects_vote` WHERE `Name` = 'bx_market';
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_market';
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_market';
+
+-- FAFORITES
+DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_market';
+
+-- FEATURED
+DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_market';
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_market', 'bx_market_cmts');
+
+DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_market');
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_market';
+
+-- STUDIO: page & widget
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_market';

+ 93 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/js/entry.js

@@ -0,0 +1,93 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Market Market
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxMarketEntry(oOptions) {
+	this._sActionsUri = oOptions.sActionUri;
+    this._sActionsUrl = oOptions.sActionUrl;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxMarketEntry' : oOptions.sObjName;
+    this._iOwnerId = oOptions.iOwnerId == undefined ? 0 : oOptions.iOwnerId;
+    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'slide' : oOptions.sAnimationEffect;
+    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
+    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+
+    var $this = this;
+    $(document).ready(function() {
+    	$this.initScreenshots();
+    });
+}
+
+BxMarketEntry.prototype.checkName = function(sTitleId, sNameId) {
+	var oDate = new Date();
+
+	var oName = jQuery("[name='" + sNameId + "']");
+	var oTitle = jQuery("[name='" + sTitleId + "']");
+
+	var sName = oName.val();
+	var sTitle = oTitle.val();	
+	if(sName.length != 0 || sTitle.length == 0)
+		return;
+
+	sName = sTitle.replace(/[^A-Za-z0-9_]/g, '-');
+	sName = sName.replace(/[-]{2,}/g, '-');
+	oName.val(sName.toLowerCase());
+
+	jQuery.get(
+		this._sActionsUrl + 'check_name',
+		{
+			title: sTitle,
+    		_t: oDate.getTime()
+    	},
+    	function(oData) {
+    		if(!oData || oData.name == undefined)
+    			return;
+
+    		oName.val(oData.name);
+    	},
+    	'json'
+	);
+};
+
+BxMarketEntry.prototype.changeFileType = function(oSelect) {
+	var sValue = jQuery(oSelect).val();
+
+	jQuery(oSelect).parents('.bx-uploader-ghost:first').find('.bx-uploader-ghost-type-rel:visible').bx_anim('hide', 'fade', 'fast', function() {
+		jQuery(this).parent().find('.bx-uploader-ghost-type-' + sValue).bx_anim('show', 'fade', 'fast');
+	});
+};
+
+BxMarketEntry.prototype.initScreenshots = function() {
+	var oItems = jQuery(".bx-market-screenshots .bx-market-ss-item");
+	if(oItems.length == 0)
+		return;
+
+	var iWidth = oItems.width();
+	var iWidthOuter = oItems.outerWidth();
+	var bBusy = false;
+
+	oItems.find('a[rel=group]').fancybox({
+		transitionIn: 'elastic',
+		transitionOut: 'elastic',
+		speedIn: 600,
+		speedOut: 200
+	});
+
+	if(oItems.length <= 2)
+		return;
+
+	$('.bx-market-screenshots').flickity({
+		cellSelector: '.bx-market-ss-item',
+		cellAlign: 'left',
+		pageDots: false,
+		imagesLoaded: true
+	});
+};
+
+/** @} */

+ 7 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/template/css/forms.css

@@ -0,0 +1,7 @@
+
+@import url(../../../../base/text/template/css/forms.css);
+
+.bx-form-value .bx-form-input-autotoken b 
+{
+	padding-left:0.5rem;
+}

+ 134 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/template/css/main.css

@@ -0,0 +1,134 @@
+
+@import url(../../../../base/text/template/css/main.css);
+
+/*--- Snippet ---*/
+div.bx-market-unit-gallery-cnt {
+	position: relative;
+	width: 100%;
+	overflow: hidden;
+}
+div.bx-market-unit-info {
+	position: relative;
+}
+
+/*+++ Item Author +++*/
+div.bx-market-unit-author {
+    position: relative;
+	text-align: left;
+}
+div.bx-market-unit-author-avatar {
+    position: absolute;
+    top: 0px;
+    left: 0px;
+}
+div.bx-market-unit-author-info {
+	display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    align-items: center;
+
+	margin-right: 32px;
+	margin-right: 2rem;
+}
+div.bx-market-unit-author-name a.bx-base-text-author {
+	padding-right: 10px;
+	padding-right: 0.625rem;
+
+    font-weight: 700;
+}
+
+/*+++ Item Actions +++*/
+div.bx-market-unit-actions {
+	position: absolute;
+	top: 0px;
+	right: 0px;	
+}
+
+/*+++ Item Info +++*/
+div.bx-market-unit-cnt {
+	text-align: left;
+}
+div.bx-market-unit-icon {
+    position: absolute;
+    top: 0px;
+    left: 0px;
+}
+div.bx-market-unit-icon-empty {
+	background-color: #ffffff;
+	text-align: center;
+	font-size: 32px;
+	font-size: 2rem;
+}
+div.bx-market-unit-icon-empty .sys-icon {
+    vertical-align: top;	
+}
+div.bx-market-unit-cover {
+	background-color: #ffffff;
+}
+div.bx-market-unit-cover div.bx-base-text-unit-no-thumb {
+	border-color: #f2f2f2;
+}
+div.bx-market-unit-cnt div.bx-market-unit-info {
+	white-space: nowrap;
+}
+div.bx-market-unit-title {
+	padding-top: 0.125rem;
+    text-overflow: ellipsis;
+    overflow: hidden;
+}
+.bx-market-ui-price {
+	float: none;
+	max-width: 80%;
+	margin-left: auto;
+	margin-right: auto;
+}
+.bx-market-fcell {
+	position: relative;
+	display: block;
+}
+.bx-market-fcell.fc-left {
+	float: left;
+}
+.bx-market-fcell.fc-right {
+    float: right;
+}
+.bx-market-fcell .bx-vote {
+	margin: 0px;
+}
+	
+/*--- Defaults ---*/
+.bx-market-thumb-size {
+    width: 148px;
+    width: 9.25rem;
+    height: 148px;
+    height: 9.25rem;
+    line-height: 148px;
+    line-height: 9.25rem;
+}
+.bx-market-thumb-size-min-height {
+    min-height: 148px;
+    min-height: 9.25rem;
+}
+.bx-market-thumb-size-left-indent {
+	margin-left: 164px;
+	margin-left: 10.25rem;
+}
+.bx-market-screenshot-size {
+    width: 200px;
+    width: 12.5rem;
+    height: 120px;
+    height: 7.5rem;
+    line-height: 120px;
+    line-height: 7.5rem;
+}
+	
+/*--- Attachments ---*/
+div.bx-market-attachment {
+	position: relative;
+}
+div.bx-market-a-main {
+	position: absolute;
+
+	top: 5px;
+	right: 10px;
+}

+ 78 - 0
modules/boonex/market/updates/9.0.5_9.0.6/source/template/unit_gallery.html

@@ -0,0 +1,78 @@
+<div class="bx-base-text-unit bx-base-text-unit-gallery bx-def-gal-unit-size bx-def-padding-sec">
+	<div class="bx-market-unit-gallery-cnt bx-def-round-corners bx-def-box bx-def-color-bg-box bx-def-shadow">
+        <!-- Author section -->
+        <bx_if:show_section_author>
+	        <div class="bx-market-unit-cnt bx-def-padding">
+	            <div class="bx-market-unit-author">
+			        <div class="bx-market-unit-author-avatar bx-def-thumb bx-def-thumb-size">__author_unit__</div>
+			        <div class="bx-market-unit-author-info bx-def-thumb-size-min-height bx-def-thumb-size-left-indent">
+			            <div class="bx-market-unit-author-name bx-def-font-middle bx-def-font-light bx-def-font-grayed">__author_width_date__</div>
+			        </div>
+			        <div class="bx-market-unit-actions">__actions__</div>
+	            </div>
+	        </div>
+        </bx_if:show_section_author>
+
+        <!-- Main section -->
+        <div class="bx-market-unit-cnt bx-market-unit-cover">
+		    <bx_if:show_cover>
+	            <a href="__content_url__" title="__summary_attr__">
+	                <div class="bx-base-text-unit-thumb bx-def-gal-div-size bx-def-font-middle" style="background-image:url(__cover_url__)">
+	                    <div class="bx-base-text-unit-strecher">__strecher__</div>
+	                </div>
+	            </a>
+	        </bx_if:show_cover>
+	        <bx_if:show_cover_empty>
+                <div class="bx-base-text-unit-no-thumb bx-def-gal-div-size bx-def-font-middle bx-def-font-grayed bx-def-padding bx-def-border bx-def-box-sizing">
+                    __summary_plain__
+                    <div class="bx-base-text-unit-strecher">__strecher__</div>
+                </div>
+	        </bx_if:show_cover_empty>
+        </div>
+		<div class="bx-market-unit-cnt bx-def-padding">
+            <div class="bx-market-unit-info">
+                <div class="bx-market-unit-icon bx-def-thumb-size bx-def-round-corners">
+                    <a href="__content_url__"> 
+		                <bx_if:show_icon>
+		                    <img class="bx-market-unit-icon bx-def-thumb-size bx-def-round-corners" src="__icon_url__" />
+		                </bx_if:show_icon>
+		                <bx_if:show_icon_empty>
+		                    <div class="bx-market-unit-icon-empty bx-def-thumb-size bx-def-round-corners">
+                                <i class="sys-icon __icon__"></i>
+                            </div>
+		                </bx_if:show_icon_empty>
+		            </a>
+                </div>
+			    <div class="bx-market-unit-title bx-def-thumb-size-min-height bx-def-thumb-size-left-indent">
+					<a class="bx-def-font-h3" href="__content_url__" title="__title_attr__">__title__</a><br />
+					<span class="bx-def-font-grayed">__author_name__</span>
+			    </div>
+		    </div>
+		</div>
+
+        <!-- Pricing section -->
+        <bx_if:show_section_pricing>
+			<div class="bx-market-unit-cnt bx-def-padding-leftright bx-def-padding-bottom">
+	            <div class="bx-def-font-align-center">
+	                <bx_if:show_single>
+	                    <a class="bx-market-ui-price bx-btn bx-btn-small bx-def-margin-sec-top-auto" href="javascript:void(0)" onclick="javascript:__price_single_onclick__">__price_single__</a>
+	                </bx_if:show_single>
+	                <bx_if:show_recurring>
+	                    <a class="bx-market-ui-price bx-btn bx-btn-small bx-def-margin-sec-top-auto" href="javascript:void(0)" onclick="javascript:__price_recurring_onclick__">__price_recurring__</a>
+	                </bx_if:show_recurring>
+	                <bx_if:show_free>
+	                    <a class="bx-market-ui-price bx-btn bx-btn-small bx-def-margin-sec-top-auto" href="__price_free_href__"><bx_text:_bx_market_txt_get_for_free /></a>
+	                </bx_if:show_free>
+	            </div>
+			</div>
+        </bx_if:show_section_pricing>
+
+        <!-- Voting section -->
+        <bx_if:show_section_voting>
+            <div class="bx-market-unit-cnt bx-def-padding-leftright bx-def-padding-bottom bx-clearfix">
+                <div class="bx-market-fcell fc-left">__voting__</div>
+                <div class="bx-market-fcell fc-right bx-def-font-bold">__pricing__</div>
+            </div>
+        </bx_if:show_section_voting>
+	</div>
+</div>

+ 190 - 0
modules/boonex/notifications/updates/9.0.4_9.0.5/source/classes/BxNtfsModule.php

@@ -0,0 +1,190 @@
+<?php use nspace\func;
+defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Notifications Notifications
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+bx_import('BxBaseModNotificationsModule');
+
+define('BX_NTFS_TYPE_OBJECT_OWNER_AND_CONNECTIONS', 'obj_own_and_con');
+define('BX_NTFS_TYPE_DEFAULT', BX_NTFS_TYPE_OBJECT_OWNER_AND_CONNECTIONS);
+
+class BxNtfsModule extends BxBaseModNotificationsModule
+{
+    /**
+     * Constructor
+     */
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $this->_iOwnerId = $this->getUserId();
+    }
+
+    /**
+     * ACTION METHODS
+     */
+    function actionGetPosts()
+    {
+        $aParams = $this->_prepareParamsGet();
+        $sEvents = $this->_oTemplate->getPosts($aParams);
+
+        echoJson(array('events' => $sEvents));
+    }
+
+    /**
+     * SERVICE METHODS
+     * 
+     * Get View block for a separate page. Will return a block with "Empty" message if nothing found.
+     */
+    public function serviceGetBlockView($sType = '', $iStart = -1, $iPerPage = -1, $aModules = array())
+    {
+    	$aBrowseTypes = array(BX_NTFS_TYPE_OBJECT_OWNER_AND_CONNECTIONS, BX_BASE_MOD_NTFS_TYPE_CONNECTIONS, BX_BASE_MOD_NTFS_TYPE_OBJECT_OWNER);
+
+    	if(empty($sType)) {
+    		$mixedType = bx_get('type');
+    		if($mixedType !== false && in_array($mixedType, $aBrowseTypes))
+    			$sType = $mixedType;
+
+	    	if(empty($sType))
+    			$sType = BX_NTFS_TYPE_DEFAULT;
+    	}
+
+    	$iOwnerId = $this->getUserId();
+        if(!$iOwnerId)
+            return array('content' => MsgBox(_t('_bx_ntfs_txt_msg_no_results')));
+
+		$aParams = $this->_prepareParams($sType, $iOwnerId, $iStart, $iPerPage, $aModules);
+		$sContent = $this->_oTemplate->getViewBlock($aParams);
+
+		$aParams['browse'] = 'first';
+    	$aEvent = $this->_oDb->getEvents($aParams);
+    	if(!empty($aEvent))
+			$this->_oDb->markAsRead($iOwnerId, $aEvent['id']);
+
+		$sModule = $this->_oConfig->getName();
+		$sJsObject = $this->_oConfig->getJsObject('view');
+
+        return array('content' => $sContent); 
+    }
+
+    public function serviceGetEventById($iId)
+    {
+        $aParams = array(
+            'browse' => 'id',
+            'value' => $iId,
+        );
+    	return $this->_oDb->getEvents($aParams);
+    }
+
+    public function serviceGetUnreadNotificationsNum($iOwnerId = 0)
+    {
+    	if(!$iOwnerId)
+			$iOwnerId = $this->getUserId();
+
+		if(!$iOwnerId)
+			return 0;
+
+		$aParams = $this->_prepareParams(BX_NTFS_TYPE_DEFAULT, $iOwnerId);
+		$aParams['new'] = 1;
+
+		list($aEvent, $iCount) = $this->_oDb->getEvents($aParams, true);
+		return $iCount;
+    }
+
+    public function serviceGetLiveUpdates($aMenuItemParent, $aMenuItemChild, $iCount = 0)
+    {
+        $iOwnerId = $this->getUserId();
+        $iCountNew = $this->serviceGetUnreadNotificationsNum($iOwnerId);
+        if($iCountNew == $iCount)
+			return false;
+
+        return array(
+    		'count' => $iCountNew, // required
+    		'method' => 'bx_menu_show_live_update(oData)', // required
+    		'data' => array(
+    			'code' => BxDolTemplate::getInstance()->parseHtmlByTemplateName('menu_item_addon', array(
+    				'content' => '{count}'
+                )),
+                'mi_parent' => $aMenuItemParent,
+                'mi_child' => $aMenuItemChild
+    		),  // optional, may have some additional data to be passed in JS method provided using 'method' param above.
+    	);
+    }
+
+    /*
+     * COMMON METHODS
+     */
+    public function setSubmenu($sSelected)
+    {
+    	$oSubmenuSystem = BxDolMenu::getObjectInstance('sys_site_submenu');
+        if(!$oSubmenuSystem)
+			return;
+
+		$CNF = &$this->_oConfig->CNF;
+
+        $oSubmenuSystem->setObjectSubmenu($CNF['OBJECT_MENU_SUBMENU'], array (
+            'title' => _t('_bx_ntfs'),
+            'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']),
+            'icon' => '',
+        ));
+
+        $oSubmenuModule = BxDolMenu::getObjectInstance($CNF['OBJECT_MENU_SUBMENU']);
+        if($oSubmenuModule)
+			$oSubmenuModule->setSelected($this->_oConfig->getName(), $sSelected);
+    }
+
+    public function onPost($iId)
+    {
+    	//--- Event -> Post for Alerts Engine ---//
+        $oAlert = new BxDolAlerts($this->_oConfig->getObject('alert'), 'post', $iId);
+        $oAlert->alert();
+        //--- Event -> Post for Alerts Engine ---//
+    }
+
+    protected function _prepareParams($sType = '', $iOwnerId = 0, $iStart = -1, $iPerPage = -1, $aModules = array())
+    {
+        $aParams = array();
+        $aParams['browse'] = 'list';
+        $aParams['type'] = !empty($sType) ? $sType : BX_NTFS_TYPE_DEFAULT;
+        $aParams['owner_id'] = (int)$iOwnerId != 0 ? $iOwnerId : $this->getUserId();
+        $aParams['start'] = (int)$iStart > 0 ? $iStart : 0;
+        $aParams['per_page'] = (int)$iPerPage > 0 ? $iPerPage : $this->_oConfig->getPerPage();
+        $aParams['modules'] = is_array($aModules) && !empty($aModules) ? $aModules : array();
+        $aParams['active'] = 1;
+
+        return $aParams;
+    }
+
+	protected function _prepareParamsGet()
+    {
+        $aParams = array();
+        $aParams['browse'] = 'list';
+
+        $sType = bx_get('type');
+        $aParams['type'] = $sType !== false ? bx_process_input($sType, BX_DATA_TEXT) : BX_NTFS_TYPE_DEFAULT;
+
+        $aParams['owner_id'] = $sType !== false ? bx_process_input(bx_get('owner_id'), BX_DATA_INT) : $this->getUserId();
+
+        $iStart = bx_get('start');
+        $aParams['start'] = $iStart !== false ? bx_process_input($iStart, BX_DATA_INT) : 0;
+
+        $iPerPage = bx_get('per_page');
+        $aParams['per_page'] = $iPerPage !== false ? bx_process_input($iPerPage, BX_DATA_INT) : $this->_oConfig->getPerPage();
+
+        $aModules = bx_get('modules');
+        $aParams['modules'] = $aModules !== false ? bx_process_input($aModules, BX_DATA_TEXT) : array();
+
+        $aParams['active'] = 1;
+
+        return $aParams;
+    }
+}
+
+/** @} */

+ 198 - 0
modules/boonex/notifications/updates/9.0.4_9.0.5/source/classes/BxNtfsResponse.php

@@ -0,0 +1,198 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Notifications Notifications
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxNtfsResponse extends BxBaseModNotificationsResponse
+{
+    public function __construct()
+    {
+        parent::__construct();
+
+        $this->_oModule = BxDolModule::getInstance('bx_notifications');
+    }
+
+    /**
+     * Overwritten method of parent class.
+     *
+     * @param BxDolAlerts $oAlert an instance of alert.
+     */
+    public function response($oAlert)
+    {
+    	$iObjectPrivacyView = $this->_getObjectPrivacyView($oAlert->aExtras);
+        if($iObjectPrivacyView == BX_DOL_PG_HIDDEN)
+            return;
+
+        $aHandler = $this->_oModule->_oConfig->getHandlers($oAlert->sUnit . '_' . $oAlert->sAction);
+        switch($aHandler['type']) {
+            case BX_BASE_MOD_NTFS_HANDLER_TYPE_INSERT:
+            	$sMethod = 'getInsertData' . bx_gen_method_name($oAlert->sUnit . '_' . $oAlert->sAction);           	
+            	if(!method_exists($this, $sMethod))
+            		$sMethod = 'getInsertData';
+
+                $aDataItems = $this->$sMethod($oAlert, $aHandler);
+                foreach($aDataItems as $aDataItem) {
+                    $iId = $this->_oModule->_oDb->insertEvent($aDataItem);
+    				if(!empty($iId))
+    					$this->_oModule->onPost($iId);
+                }
+				break;
+
+            case BX_BASE_MOD_NTFS_HANDLER_TYPE_UPDATE:
+                $this->_oModule->_oDb->updateEvent(array('object_privacy_view' => $iObjectPrivacyView), array('type' => $oAlert->sUnit, 'object_id' => $oAlert->iObject));
+                break;
+
+            case BX_BASE_MOD_NTFS_HANDLER_TYPE_DELETE:
+        		if($oAlert->sUnit == 'profile' && $oAlert->sAction == 'delete') {
+        			$this->_oModule->_oDb->deleteEvent(array('owner_id' => $oAlert->iObject));
+
+        			$this->_oModule->_oDb->deleteEvent(array('action' => 'connection_added', 'object_id' => $oAlert->iObject));
+					break;
+            	}
+
+            	$sMethod = 'getDeleteData' . bx_gen_method_name($oAlert->sUnit . '_' . $oAlert->sAction);           	
+            	if(!method_exists($this, $sMethod))
+            		$sMethod = 'getDeleteData';
+
+                $aDataItems = $this->$sMethod($oAlert, $aHandler);
+                foreach($aDataItems as $aDataItem)
+                    $this->_oModule->_oDb->deleteEvent($aDataItem);
+                break;
+        }
+    }
+
+    protected function getInsertData(&$oAlert, &$aHandler)
+    {
+    	return array(
+    	    array(
+    			'owner_id' => $oAlert->iSender,
+    			'type' => $oAlert->sUnit,
+    			'action' => $oAlert->sAction,
+    			'object_id' => $oAlert->iObject,
+    			'object_owner_id' => $this->_getObjectOwnerId($oAlert->aExtras),
+    			'object_privacy_view' => $this->_getObjectPrivacyView($oAlert->aExtras),
+    			'subobject_id' => $this->_getSubObjectId($oAlert->aExtras),
+    			'content' => '',
+        		'allow_view_event_to' => $this->_oModule->_oConfig->getPrivacyViewDefault('event'),
+    			'processed' => 0
+    	    )
+		);
+    }
+    
+    protected function getDeleteData(&$oAlert, &$aHandler)
+    {
+        $aHandlers = $this->_oModule->_oDb->getHandlers(array('type' => 'by_group_key_type', 'group' => $aHandler['group']));
+
+    	return array(
+    	    array(
+            	'type' => $oAlert->sUnit, 
+            	'action' => $aHandlers[BX_BASE_MOD_NTFS_HANDLER_TYPE_INSERT]['alert_action'], 
+            	'object_id' => $oAlert->iObject,
+            	'subobject_id' => $this->_getSubObjectId($oAlert->aExtras)
+            )
+        );
+    }
+
+	/**
+     * Custom insert data getter for sys_profiles_friends -> connection_added and connection_removed alerts. 
+     */
+    protected function getInsertDataSysProfilesFriendsConnectionAdded(&$oAlert, &$aHandler)
+    {
+        if(empty($oAlert->aExtras['mutual']))
+            return array();
+
+        $iObjectPrivacyView = $this->_getObjectPrivacyView($oAlert->aExtras);
+        $iPrivacyView = $this->_oModule->_oConfig->getPrivacyViewDefault('event');
+
+    	return array(
+    	    array(
+    			'owner_id' => $oAlert->aExtras['initiator'],
+    			'type' => $oAlert->sUnit,
+    			'action' => $oAlert->sAction,
+    			'object_id' => $oAlert->aExtras['content'],
+    			'object_owner_id' => $oAlert->aExtras['content'],
+    			'object_privacy_view' => $iObjectPrivacyView,
+    			'subobject_id' => 0,
+    			'content' => '',
+        		'allow_view_event_to' => $iPrivacyView,
+    			'processed' => 0
+    	    ),
+    	    array(
+    			'owner_id' => $oAlert->aExtras['content'],
+    			'type' => $oAlert->sUnit,
+    			'action' => $oAlert->sAction,
+    			'object_id' => $oAlert->aExtras['initiator'],
+    			'object_owner_id' => $oAlert->aExtras['initiator'],
+    			'object_privacy_view' => $iObjectPrivacyView,
+    			'subobject_id' => 0,
+    			'content' => '',
+        		'allow_view_event_to' => $iPrivacyView,
+    			'processed' => 0
+    	    ),
+		);
+    }
+    
+    protected function getDeleteDataSysProfilesFriendsConnectionRemoved(&$oAlert, &$aHandler)
+    {
+        $aHandlers = $this->_oModule->_oDb->getHandlers(array('type' => 'by_group_key_type', 'group' => $aHandler['group']));
+
+        $sAction = $aHandlers[BX_BASE_MOD_NTFS_HANDLER_TYPE_INSERT]['alert_action'];
+    	return array(
+    	    array(
+    	        'owner_id' => $oAlert->aExtras['initiator'],
+            	'type' => $oAlert->sUnit, 
+            	'action' => $sAction, 
+            	'object_id' => $oAlert->aExtras['content']
+            ),
+            array(
+            	'owner_id' => $oAlert->aExtras['content'],
+            	'type' => $oAlert->sUnit, 
+            	'action' => $sAction, 
+            	'object_id' => $oAlert->aExtras['initiator']
+            )
+        );
+    }
+
+    /**
+     * Custom insert data getter for sys_profiles_subscriptions -> connection_added and connection_removed alerts. 
+     */
+    protected function getInsertDataSysProfilesSubscriptionsConnectionAdded(&$oAlert, &$aHandler)
+    {
+    	return array(
+    	    array(
+    			'owner_id' => $oAlert->aExtras['initiator'],
+    			'type' => $oAlert->sUnit,
+    			'action' => $oAlert->sAction,
+    			'object_id' => $oAlert->aExtras['content'],
+    			'object_owner_id' => $oAlert->aExtras['content'],
+    			'object_privacy_view' => $this->_getObjectPrivacyView($oAlert->aExtras),
+    			'subobject_id' => 0,
+    			'content' => '',
+        		'allow_view_event_to' => $this->_oModule->_oConfig->getPrivacyViewDefault('event'),
+    			'processed' => 0
+    	    )
+		);
+    }
+
+    protected function getDeleteDataSysProfilesSubscriptionsConnectionRemoved(&$oAlert, &$aHandler)
+    {
+        $aHandlers = $this->_oModule->_oDb->getHandlers(array('type' => 'by_group_key_type', 'group' => $aHandler['group']));
+
+    	return array(
+    	    array(
+    	        'owner_id' => $oAlert->aExtras['initiator'],
+            	'type' => $oAlert->sUnit, 
+            	'action' => $aHandlers[BX_BASE_MOD_NTFS_HANDLER_TYPE_INSERT]['alert_action'], 
+            	'object_id' => $oAlert->aExtras['content']
+            )
+        );
+    }
+}
+
+/** @} */

+ 191 - 0
modules/boonex/notifications/updates/9.0.4_9.0.5/source/classes/BxNtfsTemplate.php

@@ -0,0 +1,191 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Notifications Notifications
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxNtfsTemplate extends BxBaseModNotificationsTemplate
+{
+    function __construct(&$oConfig, &$oDb)
+    {
+        parent::__construct($oConfig, $oDb);
+    }
+
+    public function getViewBlock($aParams)
+    {
+        return $this->parseHtmlByName('block_view.html', array(
+        	'html_id_view_block' => $this->_oConfig->getHtmlIds('view', 'block'),
+        	'html_id_events' => $this->_oConfig->getHtmlIds('view', 'events'),
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'content' => $this->getPosts($aParams),
+            'js_content' => $this->getJsCode('view', array(
+        		'oRequestParams' => array(
+	                'type' => $aParams['type'],
+	                'owner_id' => $aParams['owner_id'],
+	                'start' => $aParams['start'],
+	                'per_page' => $aParams['per_page'],
+	                'modules' => $aParams['modules']
+       			)
+            ))
+        ));
+    }
+
+    public function getPosts($aParams)
+    {
+    	$sJsObject = $this->_oConfig->getJsObject('view');
+
+    	$aParamsDb = $aParams;
+    	$aParamsDb['per_page'] = 3 * $aParamsDb['per_page'];
+
+        $aEvents = $this->_oDb->getEvents($aParamsDb);
+        if(empty($aEvents))
+        	return $this->getEmpty();
+
+        $aTmplVarsEvents = array();
+        foreach($aEvents as $aEvent) {
+            $sEvent = $this->getPost($aEvent, $aParams);
+            if(empty($sEvent))
+                continue;
+
+            $aTmplVarsEvents[] = array('event' => $sEvent);
+            if(count($aTmplVarsEvents) >= ($aParams['per_page'] + 1))
+            	break;
+        }
+
+        $oPaginate = new BxTemplPaginate(array(
+        	'start' => $aParams['start'],
+            'per_page' => $aParams['per_page'],
+        	'page_url' => $this->_oConfig->getViewUrl(),
+        	'on_change_page' => $sJsObject . ".changePage(this, {start}, {per_page})"
+        ));
+        $oPaginate->setNumFromDataArray($aTmplVarsEvents);
+
+        return $this->parseHtmlByName('events.html', array(
+        	'style_prefix' => $this->_oConfig->getPrefix('style'),
+        	'bx_repeat:events' => $aTmplVarsEvents,
+        	'paginate' => $oPaginate->getSimplePaginate()
+        ));
+    }
+
+    public function getPost(&$aEvent, $aBrowseParams = array())
+    {
+    	$oModule = $this->getModule();
+
+    	if((int)$aEvent['processed'] == 0)
+    		$this->_processContent($aEvent);
+
+    	$oPrivacy = $oModule->_oConfig->getPrivacyObject($aEvent['type'] . '_' . $aEvent['action']);
+    	if($oPrivacy !== false && !$oPrivacy->check($aEvent['id'])) 
+    		return '';
+
+        $sService = 'check_allowed_with_content';
+        if(BxDolRequest::serviceExists($aEvent['type'], $sService) && BxDolService::call($aEvent['type'], $sService, array('view', $aEvent['object_id'])) !== CHECK_ACTION_RESULT_ALLOWED)
+            return '';
+
+        list($sOwnerName, $sOwnerUrl, $sOwnerIcon) = $oModule->getUserInfo($aEvent['owner_id']);
+        $bAuthorIcon = !empty($sOwnerIcon);
+
+        $aEvent['content'] = unserialize($aEvent['content']);
+        $aEvent['content']['owner_name'] = $sOwnerName;
+        $aEvent['content']['owner_link'] = $sOwnerUrl;
+        if(!empty($aEvent['content']['entry_caption']))
+            $aEvent['content']['entry_caption'] = bx_process_output($aEvent['content']['entry_caption'], BX_DATA_HTML);
+
+        foreach($aEvent['content'] as $sKey => $sValue)
+        	if(substr($sValue, 0, 1) == '_')
+        		$aEvent['content'][$sKey] = _t($sValue);        
+
+    	$sContent = _t(!empty($aEvent['content']['lang_key']) ? $aEvent['content']['lang_key'] : $this->_getLangKey($aEvent));
+    	$sContent = $this->parseHtmlByContent($sContent, $aEvent['content'], array('{', '}'));
+
+        return $this->parseHtmlByName('event.html', array (
+        	'html_id' => $this->_oConfig->getHtmlIds('view', 'event') . $aEvent['id'],
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'js_object' => $this->_oConfig->getJsObject('view'),
+            'id' => $aEvent['id'],
+            'bx_if:show_icon' => array(
+                'condition' => $bAuthorIcon,
+                'content' => array(
+                    'author_icon' => $sOwnerIcon
+                )
+            ),
+            'bx_if:show_icon_empty' => array(
+                'condition' => !$bAuthorIcon,
+                'content' => array()
+            ),
+            'content' => $sContent,
+            'date' => bx_time_js($aEvent['date']),
+        ));
+    }
+
+    public function getEmpty($bVisible = true)
+    {
+        return $this->parseHtmlByName('empty.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'visible' => $bVisible ? 'block' : 'none',
+            'content' => MsgBox(_t('_bx_ntfs_txt_msg_no_results'))
+        ));
+    }
+
+    protected function _processContent(&$aEvent)
+    {
+    	$aContent = $this->_getContent($aEvent);
+		if(empty($aContent) || !is_array($aContent)) 
+			return;
+
+		$aSet = array();
+		if(!empty($aContent['entry_author'])) {
+			$aSet['object_owner_id'] = (int)$aContent['entry_author'];
+			unset($aContent['entry_author']);
+		}
+
+		if(!empty($aContent['entry_privacy'])) {
+			$aSet['allow_view_event_to'] = $aContent['entry_privacy'];
+			$aEvent['allow_view_event_to'] = $aContent['entry_privacy'];
+			unset($aContent['entry_privacy']);
+		}
+
+		$aEvent['content'] = serialize($aContent);
+		$aSet = array_merge($aSet, array(
+			'content' => $aEvent['content'], 
+			'processed' => 1
+		));
+
+		$this->_oDb->updateEvent($aSet, array('id' => $aEvent['id']));
+		return;
+    }
+
+    protected function _getContent(&$aEvent)
+    {
+        $sHandler = $aEvent['type'] . '_' . $aEvent['action'];
+        if(!$this->_oConfig->isHandler($sHandler))
+            return array();
+
+        $aHandler = $this->_oConfig->getHandlers($sHandler);
+        if(!empty($aHandler['module_name']) && !empty($aHandler['module_class']) && !empty($aHandler['module_method']))
+        	return BxDolService::call($aHandler['module_name'], $aHandler['module_method'], array($aEvent), $aHandler['module_class']);
+
+        $sMethod = 'display' . bx_gen_method_name($aHandler['alert_unit'] . '_' . $aHandler['alert_action']);
+		if(!method_exists($this, $sMethod))
+        	return array();
+
+		return $this->$sMethod($aEvent);
+    }
+
+    protected function _getLangKey(&$aEvent)
+    {
+    	$sResult = '_bx_ntfs_txt_object_added';
+
+    	if(!empty($aEvent['subobject_id']))
+    		$sResult = '_bx_ntfs_txt_subobject_added_' . (!empty($aEvent['content']['subentry_url']) ? 'link' : 'text');
+
+    	return $sResult;
+    }
+}
+
+/** @} */

+ 82 - 0
modules/boonex/notifications/updates/9.0.4_9.0.5/source/install/config.php

@@ -0,0 +1,82 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Notifications Notifications
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_notifications',
+    'title' => 'Notifications',
+    'note' => 'Notifications module.',
+    'version' => '9.0.5',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/notifications/',
+    'home_uri' => 'notifications',
+
+    'db_prefix' => 'bx_notifications_',
+    'class_prefix' => 'BxNtfs',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Notifications',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+    	'update_relations_for_all' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'update_relations_for_all' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Relations Section
+     */
+    'relation_handlers' => array(
+    	'on_install' => '',
+    	'on_uninstall' => 'delete_module_events',
+	    'on_enable' => 'add_handlers',
+	    'on_disable' => 'delete_handlers',
+    ),
+);
+
+/** @} */

+ 35 - 0
modules/boonex/notifications/updates/9.0.4_9.0.5/source/install/langs/en.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+	<string name="_bx_ntfs"><![CDATA[Notifications]]></string>
+	<string name="_bx_notifications"><![CDATA[Notifications]]></string>
+
+	<string name="_bx_ntfs_page_title_system_view"><![CDATA[Notifications]]></string>
+	<string name="_bx_ntfs_page_title_view"><![CDATA[Notifications]]></string>
+	<string name="_bx_ntfs_page_block_title_view"><![CDATA[Notifications]]></string>
+
+	<string name="_bx_ntfs_menu_title_submenu"><![CDATA[Notifications Submenu]]></string>
+	<string name="_bx_ntfs_menu_set_title_submenu"><![CDATA[Notifications Submenu]]></string>
+	<string name="_bx_ntfs_menu_item_title_system_notifications_all"><![CDATA[All Notifications]]></string>
+	<string name="_bx_ntfs_menu_item_title_notifications_all"><![CDATA[All 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_option_events_per_page"><![CDATA[Number of events are displayed on View page]]></string>
+	<string name="_bx_ntfs_option_events_hide"><![CDATA[Show notifications to followers when user performs action]]></string>
+
+	<string name="_bx_ntfs_privacy_view"><![CDATA[View event]]></string>
+
+	<string name="_bx_ntfs_alert_action_added"><![CDATA[add]]></string>
+	<string name="_bx_ntfs_alert_action_commentPost"><![CDATA[add comment]]></string>
+	<string name="_bx_ntfs_alert_action_doVote"><![CDATA[add vote]]></string>
+	<string name="_bx_ntfs_alert_action_timeline_post_common"><![CDATA[post to timeline]]></string> 
+
+	<string name="_bx_ntfs_alert_module_sys_profiles_subscriptions"><![CDATA[Profiles Subscriptions]]></string>
+	<string name="_bx_ntfs_alert_module_sys_profiles_friends"><![CDATA[Profiles Friends]]></string>
+	<string name="_bx_ntfs_alert_action_connection_added"><![CDATA[add connection]]></string>
+
+	<string name="_bx_ntfs_txt_msg_no_results"><![CDATA[Empty]]></string>
+	<string name="_bx_ntfs_txt_object_added"><![CDATA[<a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> added a new {entry_sample} <a href="{entry_url}">{entry_caption}</a>]]></string>
+	<string name="_bx_ntfs_txt_subobject_added_text"><![CDATA[<a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> added a new {subentry_sample} to <a href="{entry_url}">{entry_caption}</a>]]></string>
+	<string name="_bx_ntfs_txt_subobject_added_link"><![CDATA[<a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> added a new <a href="{subentry_url}">{subentry_sample}</a> to <a href="{entry_url}">{entry_caption}</a>]]></string>
+</resources>

+ 112 - 0
modules/boonex/oauth2/updates/9.0.4_9.0.5/source/classes/BxOAuthDb.php

@@ -0,0 +1,112 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    OAuth2 OAuth2 server
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxOAuthDb extends BxDolModuleDb
+{
+    function __construct(&$oConfig)
+    {
+        parent::__construct($oConfig);
+    }
+
+	function getClientsBy($aParams = array())
+    {
+    	$aMethod = array('name' => 'getAll', 'params' => array(0 => 'query'));
+        $sSelectClause = $sJoinClause = $sWhereClause = $sOrderClause = $sLimitClause = "";
+
+        switch($aParams['type']) {
+            case 'id':
+                $aMethod['name'] = 'getRow';
+                $aMethod['params'][1] = array(
+                	'id' => $aParams['id']
+                );
+
+                $sWhereClause .= "AND `tc`.`id`=:id";
+                $sLimitClause .= "LIMIT 1";
+                break;
+
+            case 'client_id':
+                $aMethod['name'] = 'getRow';
+                $aMethod['params'][1] = array(
+                	'client_id' => $aParams['client_id']
+                );
+
+                $sWhereClause .= "AND `tc`.`client_id`=:client_id";
+                $sLimitClause .= "LIMIT 1";
+                break;
+
+			case 'parent_id':
+                $aMethod['params'][1] = array(
+                	'parent_id' => $aParams['parent_id']
+                );
+
+                $sWhereClause .= "AND `tc`.`parent_id`=:parent_id";
+                break;
+
+            case 'user_id':
+                $aMethod['params'][1] = array(
+                	'user_id' => $aParams['user_id']
+                );
+
+                $sWhereClause .= "AND `tc`.`user_id`=:user_id";
+                break;
+        }
+
+        $aMethod['params'][0] = "SELECT * " . $sSelectClause . "
+            FROM `bx_oauth_clients` AS `tc` " . $sJoinClause . "
+            WHERE 1 " . $sWhereClause . " " . $sOrderClause . " " . $sLimitClause;
+        return call_user_func_array(array($this, $aMethod['name']), $aMethod['params']);
+    }
+
+    function getClientTitle($sClientId)
+    {
+        $sQuery = $this->prepare("SELECT `title` FROM `bx_oauth_clients` WHERE `client_id` = ?", $sClientId);
+        return $this->getOne($sQuery);
+    }
+
+	function addClient($aClient)
+    {
+        $mixedResult = $this->query("INSERT INTO `bx_oauth_clients` SET " . $this->arrayToSQL($aClient));
+        return (int)$mixedResult > 0 ? $this->lastId() : false;
+    }
+
+	function updateClientsBy($aPrmSet, $aPrmWhere)
+    {
+    	if(empty($aPrmSet) || !is_array($aPrmSet) || empty($aPrmWhere) || !is_array($aPrmWhere))
+    		return false;
+
+        return (int)$this->query("UPDATE `bx_oauth_clients` SET " . $this->arrayToSQL($aPrmSet) . " WHERE " . $this->arrayToSQL($aPrmWhere, ' AND ')) > 0;
+    }
+
+    function deleteClients($aClients)
+    {        
+        foreach ($aClients as $sClientId) {
+            $sQuery = $this->prepare("DELETE FROM `bx_oauth_clients` WHERE `client_id` = ?", $sClientId);
+            $this->query($sQuery);
+        }
+    }
+
+	function deleteClientsBy($aParams)
+    {
+    	if(empty($aParams) || !is_array($aParams))
+    		return false;
+
+        return $this->query("DELETE FROM `bx_oauth_clients` WHERE " . $this->arrayToSQL($aParams, ' AND '));
+    }
+
+    function getSavedProfile($sClientId, $aProfiles)
+    {
+        $aIds = array_keys($aProfiles);
+        return $this->getOne("SELECT `user_id` FROM `bx_oauth_refresh_tokens` WHERE `client_id` = ? AND `user_id` IN (" . $this->implode_escape($aIds) . ") LIMIT 1", array($sClientId));
+    }
+
+}
+
+/** @} */

+ 100 - 0
modules/boonex/oauth2/updates/9.0.4_9.0.5/source/classes/BxOAuthFormAdd.php

@@ -0,0 +1,100 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    OAuth2 OAuth2 server
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxOAuthFormAdd extends BxTemplFormView
+{
+    public static $LENGTH_ID = 10;
+    public static $LENGTH_SECRET = 32;
+
+    protected $_sModule;
+    protected $_oModule;
+
+    function __construct($aCustomForm = array())
+    {
+        $this->_sModule = 'bx_oauth';
+    	$this->_oModule = BxDolModule::getInstance($this->_sModule);
+
+        $aCustomForm = array_replace_recursive(array(
+            'form_attrs' => array(
+                'id' => 'bx-oauth-add',
+                'name' => 'bx-oauth-add',
+                'action' => BX_DOL_URL_ROOT . 'grid.php?' . bx_encode_url_params($_GET, array('ids', '_r')),
+                'method' => 'post',
+            ),
+            'params' => array (
+                'db' => array(
+                    'table' => 'bx_oauth_clients',
+                    'key' => 'id',
+                    'submit_name' => 'client_add',
+                ),
+            ),
+            'inputs' => array(
+                'title' => array(
+                    'type' => 'text',
+                    'name' => 'title',
+                    'caption' => _t('_Title'),
+                    'required' => true,
+                    'checker' => array (
+                        'func' => 'avail',
+                        'error' => _t ('_sys_form_account_input_name_error'),
+                    ),
+                    'db' => array (
+                        'pass' => 'Xss',
+                    ),
+                ),
+                'redirect_uri' => array(
+                    'type' => 'text',
+                    'name' => 'redirect_uri',
+                    'caption' => _t('_bx_oauth_client_url'),
+                    'required' => true,
+                    'checker' => array (
+                        'func' => 'preg',
+                        'params' => array('/^https?:\/\//'),
+                        'error' => _t ('_bx_oauth_form_valid_url'),
+                    ),
+                    'db' => array (
+                        'pass' => 'Xss',
+                    ),
+                ),
+                'Submit' => array (
+                    'type' => 'input_set',
+                    0 => array (
+                        'type' => 'submit',
+                        'name' => 'client_add',
+                        'value' => _t('_Submit'),
+                    ),
+                    1 => array (
+                        'type' => 'reset',
+                        'name' => 'close',
+                        'value' => _t('Close'),
+                        'attrs' => array(
+                            'onclick' => "$('.bx-popup-active').dolPopupHide()",
+                            'class' => 'bx-def-margin-sec-left',
+                        ),
+                    ),
+                ),
+            ),
+        ), $aCustomForm);
+
+        parent::__construct ($aCustomForm);
+    }
+
+    function insert ($aValsToAdd = array(), $isIgnore = false)
+    {
+        $aValsToAdd['client_id'] = strtolower(genRndPwd(self::$LENGTH_ID, false));
+        $aValsToAdd['client_secret'] = strtolower(genRndPwd(self::$LENGTH_SECRET, false));
+        $aValsToAdd['scope'] = 'basic';
+        $aValsToAdd['user_id'] = bx_get_logged_profile_id();
+        return parent::insert($aValsToAdd, $isIgnore);
+    }
+}
+
+/** @} */

+ 258 - 0
modules/boonex/oauth2/updates/9.0.4_9.0.5/source/classes/BxOAuthModule.php

@@ -0,0 +1,258 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    OAuth2 OAuth2 server
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+require_once (BX_DIRECTORY_PATH_PLUGINS . 'OAuth2/Autoloader.php');
+OAuth2\Autoloader::register();
+
+class BxOAuthUserCredentialsStorage implements OAuth2\Storage\UserCredentialsInterface
+{
+    public function checkUserCredentials($sLogin, $sPassword)
+    {
+        return ($sErrorMsg = bx_check_password($sLogin, $sPassword)) ? false : true;
+    }
+
+    public function getUserDetails($sLogin)
+    {
+        if (!($oAccount = BxDolAccount::getInstance($sLogin)))
+            return false;
+
+        if (!($oProfile = BxDolProfile::getInstanceByAccount($oAccount->id())))
+            return false;
+
+        return array('user_id' => $oProfile->id());
+    }
+}
+
+class BxOAuthModule extends BxDolModule
+{
+    protected $_oStorage;
+    protected $_oServer;
+    protected $_oAPI;
+
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+
+        $aConfig = array (
+            'client_table' => 'bx_oauth_clients',
+            'access_token_table' => 'bx_oauth_access_tokens',
+            'refresh_token_table' => 'bx_oauth_refresh_tokens',
+            'code_table' => 'bx_oauth_authorization_codes',
+            'user_table' => 'Profiles',
+            'jwt_table'  => '',
+            'jti_table'  => '',
+            'scope_table'  => 'bx_oauth_scopes',
+            'public_key_table'  => '',
+        );
+
+        $this->_oStorage = new OAuth2\Storage\Pdo(BxDolDb::getLink(), $aConfig);
+
+        $this->_oServer = new OAuth2\Server($this->_oStorage, array(
+            'require_exact_redirect_uri' => false,
+            'refresh_token_lifetime' => 7776000, // set lifetime to 90 days
+        ));
+
+        // Add the "Client Credentials" grant type (it is the simplest of the grant types)
+        $this->_oServer->addGrantType(new OAuth2\GrantType\ClientCredentials($this->_oStorage));
+
+        // Add the "Authorization Code" grant type (this is where the oauth magic happens)
+        $this->_oServer->addGrantType(new OAuth2\GrantType\AuthorizationCode($this->_oStorage));
+
+        // Add the "Password" grant type (generate client_id with empty client_secret)
+        // Example: curl http://example.com/path-to-una/m/oauth2/token -d 'grant_type=password&username=user@example.com&password=pwd&client_id=aefygahcgw'
+        $oStorage = new BxOAuthUserCredentialsStorage();
+        $this->_oServer->addGrantType(new OAuth2\GrantType\UserCredentials($oStorage));
+    }
+
+    /**
+     * @page public_api API Public
+     * @section public_api_token /m/oauth2/token
+     * 
+     * Get the token for the future communication with @ref private_api
+     * 
+     * **HTTP Method:** 
+     * `POST`
+     *
+     * **Request params:**
+     * - `grant_type` - for API it's better to use 'password' grant type
+     * - `username` - login email
+     * - `password` - login password
+     * - `client_id` - client ID from bx_oauth_clients table
+     *
+     * **Response (success):**
+     * @code
+     * {  
+     *    "access_token":"cdd7056d0adafa9ead87526ca22367c6b0df8273",
+     *    "expires_in":3600,
+     *    "token_type":"Bearer",
+     *    "scope":"basic",
+     *    "refresh_token":"c3d7f6f4b7cc640214ae0cba2b194872c3089f1c"
+     * }
+     * @endcode
+     *
+     * **Response (error):**
+     * @code
+     * {  
+     *    "error":"short error description here",
+     *    "error_description":"long error description here"
+     * }
+     * @endcode
+     */     
+    function actionToken ()
+    {
+        // Handle a request for an OAuth2.0 Access Token and send the response to the client
+        $this->_oServer->handleTokenRequest(OAuth2\Request::createFromGlobals())->send();
+    }
+
+    function actionApi ($sAction)
+    {
+        // Handle a request to a resource and authenticate the access token
+        if (!$this->_oServer->verifyResourceRequest(OAuth2\Request::createFromGlobals())) {
+            $this->_oServer->getResponse()->send();
+            return;
+        }
+
+        $aToken = $this->_oServer->getAccessTokenData(OAuth2\Request::createFromGlobals());
+
+        if (!$this->_oAPI) {
+            bx_import('API', $this->_aModule);
+            $this->_oAPI = new BxOAuthAPI($this);
+        }
+
+        if (!$sAction || !method_exists($this->_oAPI, $sAction) || 0 === strcasecmp('errorOutput', $sAction) || 0 === strcasecmp('output', $sAction)) {
+            $this->_oAPI->errorOutput(404, 'not_found', 'No such API endpoint available');
+            return;
+        }
+
+        $sScope = $this->_oAPI->aAction2Scope[$sAction];
+        if (false === strpos($sScope, $aToken['scope'])) {
+            $this->_oAPI->errorOutput(403, 'insufficient_scope', 'The request requires higher privileges than provided by the access token');
+            return;
+        }
+
+        $this->_oAPI->$sAction($aToken);
+    }
+
+    function actionAuth ()
+    {
+        $oRequest = OAuth2\Request::createFromGlobals();
+        $oResponse = new OAuth2\Response();
+
+        // validate the authorize request
+        if (!$this->_oServer->validateAuthorizeRequest($oRequest, $oResponse)) {
+            require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');
+            $o = json_decode($oResponse->getResponseBody());
+            $this->_oTemplate->getPage(false, MsgBox($o->error_description));
+        }
+
+        if (!isLogged()) {
+            require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');
+            $sForceRelocate = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'auth/?client_id=' . bx_get('client_id') . '&response_type=' . bx_get('response_type') . '&scope=' . bx_get('scope') . '&state=' . bx_get('state') . '&redirect_uri=' . bx_get('redirect_uri');
+            bx_login_form(false, false, $sForceRelocate);
+            return;
+        }
+
+        $aProfiles = BxDolAccount::getInstance()->getProfiles();
+
+        if (1 == count($aProfiles)) { // in case of one profile, don't display dialog with profiles choice
+            $aProfile = array_pop($aProfiles);
+            $_POST['profile_id'] = $aProfile['id'];
+        }
+
+        if (!($iProfileId = $this->_oDb->getSavedProfile(bx_get('client_id'), $aProfiles)) && empty($_POST)) {
+            $oPage = BxDolPage::getObjectInstanceByURI('oauth-authorization');
+            $this->_oTemplate->getPage(false, $oPage->getCode());
+            return;
+        } 
+
+        if (!$iProfileId)
+            $iProfileId = bx_get('profile_id');
+
+        $this->_oServer->handleAuthorizeRequest($oRequest, $oResponse, (bool)$iProfileId, $iProfileId);
+
+        $oResponse->send();
+    }
+
+    function serviceAuthorization ()
+    {
+        $sTitle = $this->_oDb->getClientTitle(bx_get('client_id'));
+        $this->_oTemplate->addCss('main.css');
+        return $this->_oTemplate->parseHtmlByName('page_auth.html', array(
+            'text' => _t('_bx_oauth_authorize_app', htmlspecialchars_adv($sTitle)),
+            'url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'auth',
+            'client_id' => bx_get('client_id'),
+            'response_type' => bx_get('response_type'),
+            'redirect_uri' => bx_get('redirect_uri'),
+        	'scope' => bx_get('scope'),
+            'state' => bx_get('state'),
+            'profiles' => BxDolService::call('system', 'account_profile_switcher', array(getLoggedId(), false, "javascript: $('#bx-auth-profile-id').val('{profile_id}'); $('#bx-auth-form form').submit(); void(0);", true, _t('_bx_oauth_connect'), 'unit_wo_links'), 'TemplServiceProfiles')['content'],
+        ));
+    }
+
+    function serviceGetClientsBy ($aParams = array())
+    {
+    	return $this->_oDb->getClientsBy($aParams);
+    }
+
+    function serviceAddClient ($aClient)
+    {
+        if (!isset($aClient['client_id'])) {
+            bx_import('FormAdd', 'bx_oauth');
+            for ($i = 0; $i < 99 ; ++$i) {
+                $aClient['client_id'] = strtolower(genRndPwd(BxOAuthFormAdd::$LENGTH_ID, false));
+                if (!$this->_oDb->getClientTitle($aClient['client_id'])) // check for uniq
+                    break;
+            }
+        }
+
+        if (!isset($aClient['client_secret'])) {
+            bx_import('FormAdd', 'bx_oauth');
+            $aClient['client_secret'] = strtolower(genRndPwd(BxOAuthFormAdd::$LENGTH_SECRET, false));
+        }
+
+        if (!isset($aClient['scope']))
+            $aClient['scope'] = 'market';
+
+        if (!isset($aClient['user_id']))
+            $aClient['user_id'] = bx_get_logged_profile_id();
+
+        if (!isset($aClient['title']) && isset($aClient['redirect_uri']) && ($sHost = parse_url($aClient['redirect_uri'], PHP_URL_HOST)))
+            $aClient['title'] = $sHost;
+
+    	return $this->_oDb->addClient($aClient);
+    }
+
+	function serviceUpdateClientsBy ($aParamsSet, $aParamsWhere)
+    {
+    	return $this->_oDb->updateClientsBy($aParamsSet, $aParamsWhere);
+    }
+
+	function serviceDeleteClientsBy ($aParams)
+    {
+    	return $this->_oDb->deleteClientsBy($aParams);
+    }
+
+    function studioSettings ()
+    {
+        if (!isAdmin()) {
+            $this->_oTemplate->displayAccessDenied ();
+            return;
+        }
+
+        $oGrid = BxDolGrid::getObjectInstance('bx_oauth', BxDolStudioTemplate::getInstance());
+        if ($oGrid)
+            return $oGrid->getCode();
+
+        return '';
+    }
+}
+
+/** @} */

+ 68 - 0
modules/boonex/oauth2/updates/9.0.4_9.0.5/source/install/config.php

@@ -0,0 +1,68 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    OAuth2 OAuth2 server
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_oauth',
+    'title' => 'OAuth2 Server',
+    'note' => 'Allow to use site user credentials and basic API',
+    'version' => '9.0.4',
+    'vendor' => 'BoonEx',
+    'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/oauth2/',
+    'home_uri' => 'oauth2',
+
+    'db_prefix' => 'bx_oauth_',
+    'class_prefix' => 'BxOAuth',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'OAuth2 Server',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 24 - 0
modules/boonex/oauth2/updates/9.0.4_9.0.5/source/install/langs/en.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+	<string name="_sys_module_oauth2"><![CDATA[OAuth2 Server]]></string>
+	<string name="_bx_oauth_administration"><![CDATA[OAuth2 Server]]></string>
+	<string name="_bx_oauth"><![CDATA[OAuth2 Server]]></string>
+	<string name="_bx_oauth_help"><![CDATA[Information]]></string>
+	<string name="_bx_oauth_help_text"><![CDATA[Add clients to allow them to use profile information from this site on client's sites. <br />
+Client's sites must have "UNA Connect" module installed. <br />
+Specify the following "Main UNA Site URL" on the client sites:<br />
+<strong>{0}</strong>]]></string>
+    <string name="_bx_oauth_client_url"><![CDATA[Client Site URL]]></string>
+	<string name="_bx_oauth_client_id"><![CDATA[Client Key]]></string>
+	<string name="_bx_oauth_client_secret"><![CDATA[Client Secret]]></string>
+	<string name="_bx_oauth_add"><![CDATA[Add new client]]></string>
+	<string name="_bx_oauth_clients"><![CDATA[OAuth2 clients]]></string>
+	<string name="_bx_oauth_authorization"><![CDATA[Authorization]]></string>
+    <string name="_bx_oauth_authorize_app"><![CDATA[Choose which profile to connect with "{0}":]]></string>
+    <string name="_bx_oauth_form_valid_url"><![CDATA[Valid URL is required]]></string>
+    <string name="_bx_oauth_url"><![CDATA[URL]]></string>
+    <string name="_bx_oauth_connect"><![CDATA[Connect]]></string>
+
+	<string name="_bx_oauth_adm_stg_cpt_type"><![CDATA[OAuth2 Server]]></string>
+	<string name="_bx_oauth_adm_stg_cpt_category_general"><![CDATA[General]]></string>
+</resources>

+ 51 - 0
modules/boonex/ocean/updates/9.0.4_9.0.5/install/config.php

@@ -0,0 +1,51 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'title' => 'Ocean',
+    'version_from' => '9.0.4',
+	'version_to' => '9.0.5',
+    'vendor' => 'BoonEx',
+
+	'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/ocean/updates/update_9.0.4_9.0.5/',
+	'home_uri' => 'ocean_update_904_905',
+
+	'module_dir' => 'boonex/ocean/',
+	'module_uri' => 'ocean',
+
+    'db_prefix' => 'bx_ocean_',
+    'class_prefix' => 'BxOcean',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+		'execute_sql' => 0,
+        'update_files' => 1,
+        'update_languages' => 0,
+		'clear_db_cache' => 0,
+    ),
+
+	/**
+     * Category for language keys.
+     */
+    'language_category' => 'BoonEx Ocean',
+
+	/**
+     * Files Section
+     */
+    'delete_files' => array(),
+);

+ 26 - 0
modules/boonex/ocean/updates/9.0.4_9.0.5/install/installer.php

@@ -0,0 +1,26 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+class BxOceanUpdater extends BxDolStudioUpdater
+{
+    function __construct($aConfig)
+	{
+        parent::__construct($aConfig);
+    }
+
+    public function update($aParams)
+    {
+        $aResult = parent::update($aParams);
+		if(!$aResult['result'])
+			return $aResult;
+
+        $oCacheUtilities = BxDolCacheUtilities::getInstance();
+        $oCacheUtilities->clear('css');
+        $oCacheUtilities->clear('template');
+
+        return $aResult;
+    }
+}

+ 46 - 0
modules/boonex/ocean/updates/9.0.4_9.0.5/source/data/template/system/_sub_footer.html

@@ -0,0 +1,46 @@
+		
+		                <bx_injection:injection_content_after />
+		
+		                <div class="bx-clear"></div>
+		
+		            <bx_injection:banner_bottom />
+		
+		        </div> <!-- #bx-content-main -->
+		
+		        <bx_injection:injection_between_content_footer />
+		
+		    </div> <!-- #bx-content-container -->
+		
+		</div>
+	
+	</div> <!-- #bx-content-wrapper -->
+	
+	<div id="bx-footer-wrapper">
+		<div class="bx-def-centered bx-def-padding-topbottom bx-def-padding-sec-leftright bx-def-page-width bx-def-box-sizing">
+		
+		    <div id="bx-footer" class="bx-def-padding-sec-left bx-def-padding-sec-right bx-clearfix">
+		        <bx_injection:injection_footer_before />
+		
+		        <div id="bx-menu-bottom">
+		            <bx_menu:sys_footer />
+		        </div>
+		        <div id="bx-footer-copyright">
+		        	<i title="__copyright_attr__" class="sys-icon copyright"></i>
+		        </div>
+		        <div class="bx-clear"></div>
+		        <div class="bx-menu-switch-language-inline bx-def-margin-sec-top">
+		        	<bx_menu:sys_switch_language_inline />
+		        </div>
+		
+		        <bx_injection:injection_footer_after />
+		    </div>
+		
+		</div>
+	
+	</div>
+	
+	<bx_menu:sys_site_action />
+
+</div>
+
+<bx_include_auto:_footer.html />

+ 60 - 0
modules/boonex/ocean/updates/9.0.4_9.0.5/source/data/template/system/css/general.css

@@ -0,0 +1,60 @@
+@import url(../../../../../../../template/css/general.css);
+
+/* --------------- toolbar */
+#bx-toolbar {
+	height: 64px;
+    height: 4rem;
+
+	background: -webkit-linear-gradient(#2aaadc, #0079a9);
+	background: -o-linear-gradient(#2aaadc, #0079a9);
+	background: -moz-linear-gradient(#2aaadc, #0079a9);
+	background: linear-gradient(#2aaadc, #0079a9);
+  	border-bottom: 1px solid #4c4c4c;
+	box-shadow: 0px 1px 3px #888;
+}
+#bx-logo-container {
+	height: 64px;
+    height: 4rem;
+
+	line-height: 64px;
+    line-height: 4rem;
+}
+
+/*---------------- main menu */
+#bx-menu-main-bar {
+	text-align: center;
+	overflow-x: auto;
+}
+
+/* --------------- content */
+#bx-content-wrapper {
+	padding-bottom: 120px;
+	padding-bottom: 7.5rem;
+
+	background-image: url(../images/bg-page.png);
+	background-repeat: repeat-x;
+	border-top: 1px solid #3498bf;
+}
+
+/* --------------- footer */
+#bx-footer-wrapper {
+	position: absolute;
+
+	width: 100%;
+	height: 100px;
+	height: 6.5625rem;
+	bottom: 0;
+
+	background-color: #ffffff;
+	border-top: 1px solid #93b3c3;
+}
+
+/* --------------- menu bottom */
+#bx-menu-bottom,
+#bx-footer-copyright {
+	line-height: 24px;
+	line-height: 1.5rem;
+}
+#bx-menu-bottom {
+	float: left;
+}

+ 68 - 0
modules/boonex/ocean/updates/9.0.4_9.0.5/source/install/config.php

@@ -0,0 +1,68 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Ocean Ocean Template
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_TEMPLATE,
+    'name' => 'bx_ocean',
+    'title' => 'Ocean',
+    'note' => 'Design template',
+    'version' => '9.0.5',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/ocean/',
+    'home_uri' => 'ocean',
+
+    'db_prefix' => 'bx_ocean_',
+    'class_prefix' => 'BxOcean',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'BoonEx Ocean',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'clear_db_cache' => 1
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'clear_db_cache' => 1
+    ),
+    'enable' => array(
+        'execute_sql' => 1
+    ),
+    'disable' => array(
+        'execute_sql' => 1
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 198 - 0
modules/boonex/organizations/updates/9.0.4_9.0.5/source/classes/BxOrgsConfig.php

@@ -0,0 +1,198 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Organizations Organizations
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxOrgsConfig extends BxBaseModProfileConfig
+{
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $aMenuItems2MethodsSubmenu = array (
+        	'organization-profile-subscriptions' => 'checkAllowedSubscriptionsView'
+        );
+
+        $aMenuItems2MethodsActions = array (
+            'view-organization-profile' => 'checkAllowedView',
+            'edit-organization-profile' => 'checkAllowedEdit',
+            'edit-organization-cover' => 'checkAllowedChangeCover',
+            'delete-organization-profile' => 'checkAllowedDelete',
+            'profile-friend-add' => 'checkAllowedFriendAdd',
+            'profile-friend-remove' => 'checkAllowedFriendRemove',
+            'profile-subscribe-add' => 'checkAllowedSubscribeAdd',
+            'profile-subscribe-remove' => 'checkAllowedSubscribeRemove',
+            'profile-actions-more' => 'checkAllowedViewMoreMenu',
+            'profile-set-acl-level' => 'checkAllowedSetMembership',
+            'convos-compose' => 'checkAllowedCompose',
+        );
+
+        $this->CNF = array (
+
+            // module icon
+            'ICON' => 'briefcase col-red2',
+
+            // database tables
+            'TABLE_ENTRIES' => $aModule['db_prefix'] . 'data',
+            'TABLE_ENTRIES_FULLTEXT' => 'search_fields',
+
+            // database fields
+            'FIELD_ID' => 'id',
+            'FIELD_AUTHOR' => 'author',
+            'FIELD_ADDED' => 'added',
+            'FIELD_CHANGED' => 'changed',
+            'FIELD_NAME' => 'org_name',
+        	'FIELD_TITLE' => 'org_name',
+        	'FIELD_TEXT' => 'org_desc',
+            'FIELD_PICTURE' => 'picture',
+            'FIELD_COVER' => 'cover',
+            'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
+            'FIELDS_QUICK_SEARCH' => array('org_name'),
+        	'FIELD_LOCATION_PREFIX' => 'location',
+            'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
+
+            // page URIs
+            'URI_VIEW_ENTRY' => 'view-organization-profile',
+        	'URI_VIEW_FRIENDS' => 'organization-profile-friends',
+        	'URI_VIEW_FRIEND_REQUESTS' => 'organization-friend-requests',
+        	'URI_VIEW_FAVORITES' => 'organization-profile-favorites',
+            'URI_EDIT_ENTRY' => 'edit-organization-profile',
+            'URI_EDIT_COVER' => 'edit-organization-cover',
+        	'URI_MANAGE_COMMON' => 'organizations-manage',
+
+            'URL_HOME' => 'page.php?i=organizations-home',
+        	'URL_CREATE' => 'page.php?i=create-organization-profile',
+        	'URL_MANAGE_COMMON' => 'page.php?i=organizations-manage',
+        	'URL_MANAGE_ADMINISTRATION' => 'page.php?i=organizations-administration',
+
+            // some params
+            'PARAM_AUTOAPPROVAL' => 'bx_organizations_autoapproval',
+            'PARAM_DEFAULT_ACL_LEVEL' => 'bx_organizations_default_acl_level',
+            'PARAM_NUM_RSS' => 'bx_organizations_num_rss',
+            'PARAM_NUM_CONNECTIONS_QUICK' => 'bx_organizations_num_connections_quick',
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_organizations_searchable_fields',
+        	'PARAM_PUBLIC_SBSN' => 'bx_organizations_public_subscriptions',
+            'PARAM_PUBLIC_SBSD' => 'bx_organizations_public_subscribed_me',
+        	'PARAM_REDIRECT_AADD' => 'bx_persons_redirect_aadd',
+            'PARAM_REDIRECT_AADD_CUSTOM_URL' => 'bx_persons_redirect_aadd_custom_url',
+
+            // objects
+            'OBJECT_STORAGE' => 'bx_organizations_pics',
+            'OBJECT_STORAGE_COVER' => 'bx_organizations_pics',
+            'OBJECT_IMAGES_TRANSCODER_THUMB' => 'bx_organizations_thumb',
+            'OBJECT_IMAGES_TRANSCODER_ICON' => 'bx_organizations_icon',
+            'OBJECT_IMAGES_TRANSCODER_AVATAR' => 'bx_organizations_avatar',
+            'OBJECT_IMAGES_TRANSCODER_PICTURE' => 'bx_organizations_picture',
+            'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_organizations_cover',
+            'OBJECT_IMAGES_TRANSCODER_COVER_THUMB' => 'bx_organizations_cover_thumb',
+        	'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_organizations_gallery',
+            'OBJECT_VIEWS' => 'bx_organizations',
+        	'OBJECT_FAVORITES' => 'bx_organizations',
+        	'OBJECT_FEATURED' => 'bx_organizations',
+            'OBJECT_COMMENTS' => 'bx_organizations',
+        	'OBJECT_REPORTS' => 'bx_organizations',
+            'OBJECT_METATAGS' => 'bx_organizations',
+            'OBJECT_FORM_ENTRY' => 'bx_organization',
+            'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_organization_view',
+        	'OBJECT_FORM_ENTRY_DISPLAY_VIEW_FULL' => 'bx_organization_view_full', // for "info" tab on view profile page
+            'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_organization_add',
+            'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_organization_edit',
+            'OBJECT_FORM_ENTRY_DISPLAY_EDIT_COVER' => 'bx_organization_edit_cover',
+            'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_organization_delete',
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_organizations_view_actions', // actions menu on view entry page
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_organizations_view_actions_more', // actions menu on view entry page for "more" popup
+            'OBJECT_MENU_SUBMENU' => 'bx_organizations_submenu', // main module submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_organizations_view_submenu',  // view entry submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_COVER' => 'bx_organizations_view_submenu_cover',  // view entry submenu displayed in cover
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'organizations-home', // first item in view entry submenu from main module submenu
+            'OBJECT_MENU_MANAGE_TOOLS' => 'bx_organizations_menu_manage_tools', //manage menu in content administration tools
+            'OBJECT_PAGE_VIEW_ENTRY' => 'bx_organizations_view_profile',
+            'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_organizations_view_profile_closed',
+            'OBJECT_PRIVACY_VIEW' => 'bx_organizations_allow_view_to',
+            'OBJECT_GRID_ADMINISTRATION' => 'bx_organizations_administration',
+            'OBJECT_GRID_COMMON' => 'bx_organizations_common',
+            'OBJECT_UPLOADERS_COVER' => array('bx_organizations_cover_crop'),
+            'OBJECT_UPLOADERS_PICTURE' => array('bx_organizations_picture_crop'),
+
+            'EMAIL_FRIEND_REQUEST' => 'bx_organizations_friend_request',
+
+            'TRIGGER_MENU_PROFILE_VIEW_SUBMENU' => 'trigger_profile_view_submenu',
+            'TRIGGER_MENU_PROFILE_VIEW_ACTIONS' => 'trigger_profile_view_actions',
+        	'TRIGGER_PAGE_VIEW_ENTRY' => 'trigger_page_profile_view_entry',
+
+            // menu items which visibility depends on custom visibility checking
+            'MENU_ITEM_TO_METHOD' => array (
+        		'bx_organizations_view_submenu' => $aMenuItems2MethodsSubmenu,
+                'bx_organizations_view_actions' => $aMenuItems2MethodsActions,
+                'bx_organizations_view_actions_more' => $aMenuItems2MethodsActions,
+            ),
+
+            // informer messages
+            'INFORMERS' => array (
+                'status' => array (
+                    'name' => 'bx-organizations-status-not-active',
+                    'map' => array (
+                        BX_PROFILE_STATUS_PENDING => '_bx_orgs_txt_account_pending',
+                        BX_PROFILE_STATUS_SUSPENDED => '_bx_orgs_txt_account_suspended',
+                    ),
+                ),
+                'status_moderation' => array (
+                    'name' => 'bx-organizations-status-not-active-moderation',
+                    'map' => array (
+                        BX_PROFILE_STATUS_PENDING => '_bx_orgs_txt_account_pending_moderation',
+                        BX_PROFILE_STATUS_SUSPENDED => '_bx_orgs_txt_account_suspended_moderation',
+                    ),
+                ),
+            ),
+
+            // some language keys
+            'T' => array (
+                'txt_sample_single' => '_bx_orgs_txt_sample_single',
+            	'txt_sample_comment_single' => '_bx_orgs_txt_sample_comment_single',
+                'txt_N_fans' => '_bx_orgs_txt_N_friends',
+                'menu_item_title_befriend_sent' => '_bx_orgs_menu_item_title_befriend_sent',
+                'menu_item_title_unfriend_cancel_request' => '_bx_orgs_menu_item_title_unfriend_cancel_request',
+                'menu_item_title_befriend_confirm' => '_bx_orgs_menu_item_title_befriend_confirm',
+                'menu_item_title_unfriend_reject_request' => '_bx_orgs_menu_item_title_unfriend_reject_request',
+                'menu_item_title_befriend' => '_bx_orgs_menu_item_title_befriend',
+                'menu_item_title_unfriend' => '_bx_orgs_menu_item_title_unfriend',
+            	'grid_action_err_delete' => '_bx_orgs_grid_action_err_delete',
+            	'grid_txt_account_manager' => '_bx_orgs_grid_txt_account_manager',
+				'filter_item_active' => '_bx_orgs_grid_filter_item_title_adm_active',
+            	'filter_item_pending' => '_bx_orgs_grid_filter_item_title_adm_pending',
+            	'filter_item_suspended' => '_bx_orgs_grid_filter_item_title_adm_suspended',
+            	'filter_item_select_one_filter1' => '_bx_orgs_grid_filter_item_title_adm_select_one_filter1',
+            	'menu_item_manage_my' => '_bx_orgs_menu_item_title_manage_my',
+            	'menu_item_manage_all' => '_bx_orgs_menu_item_title_manage_all',
+            	'txt_browse_favorites' => '_bx_orgs_page_title_browse_favorites',
+            	'option_redirect_aadd_profile' => '_bx_persons_option_redirect_aadd_profile',
+            	'option_redirect_aadd_last' => '_bx_persons_option_redirect_aadd_last',
+            	'option_redirect_aadd_custom' => '_bx_persons_option_redirect_aadd_custom'
+            ),
+
+        );
+
+        $this->_aJsClasses = array(
+        	'manage_tools' => 'BxOrgsManageTools'
+        );
+
+        $this->_aJsObjects = array(
+        	'manage_tools' => 'oBxOrgsManageTools'
+        );
+
+        $this->_aGridObjects = array(
+        	'common' => $this->CNF['OBJECT_GRID_COMMON'],
+        	'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
+        	
+        );
+    }
+
+}
+
+/** @} */

+ 191 - 0
modules/boonex/organizations/updates/9.0.4_9.0.5/source/classes/BxOrgsSearchResult.php

@@ -0,0 +1,191 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Organizations Organizations
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxOrgsSearchResult extends BxBaseModProfileSearchResult
+{
+    function __construct($sMode = '', $aParams = false)
+    {
+        parent::__construct($sMode, $aParams);
+
+        $this->sUnitTemplate = 'unit_with_cover.html';
+
+        $this->aCurrent =  array(
+            'name' => 'bx_organizations',
+            'module_name' => 'bx_organizations',
+            'object_metatags' => 'bx_organizations',
+            'title' => _t('_bx_orgs_page_title_browse'),
+            'table' => 'sys_profiles',
+            'tableSearch' => 'bx_organizations_data',
+            'ownFields' => array(),
+            'searchFields' => array(),
+            'restriction' => array(
+        		'account_id' => array('value' => '', 'field' => 'account_id', 'operator' => '='),
+                'perofileStatus' => array('value' => 'active', 'field' => 'status', 'operator' => '='),
+                'perofileType' => array('value' => 'bx_organizations', 'field' => 'type', 'operator' => '='),
+                'owner' => array('value' => '', 'field' => 'author', 'operator' => '=', 'table' => 'bx_organizations_data'),
+        		'featured' => array('value' => '', 'field' => 'featured', 'operator' => '<>', 'table' => 'bx_organizations_data'),
+        		'online' => array('value' => '', 'field' => 'date', 'operator' => '>', 'table' => 'sys_sessions'),
+            ),
+            'join' => array (
+                'profile' => array(
+                    'type' => 'INNER',
+                    'table' => 'bx_organizations_data',
+                    'mainField' => 'content_id',
+                    'onField' => 'id',
+                    'joinFields' => array('id', 'org_name', 'picture', 'cover', 'added', 'author', 'allow_view_to'),
+                ),
+                'account' => array(
+                    'type' => 'INNER',
+                    'table' => 'sys_accounts',
+                    'mainField' => 'account_id',
+                    'onField' => 'id',
+                    'joinFields' => array(),
+                ),
+            ),
+            'paginate' => array('perPage' => getParam('bx_organizations_per_page_browse'), 'start' => 0),
+            'sorting' => 'none',
+            'rss' => array(
+                'title' => '',
+                'link' => '',
+                'image' => '',
+                'profile' => 0,
+                'fields' => array (
+                    'Guid' => 'link',
+                    'Link' => 'link',
+                    'Title' => 'org_name',
+                    'DateTimeUTS' => 'added',
+                    'Desc' => 'org_name',
+                    'Picture' => 'picture',
+                ),
+            ),
+            'ident' => 'id'
+        );
+
+        $this->sFilterName = 'bx_organizations_data_filter';
+        $this->oModule = $this->getMain();
+        $this->aCurrent['searchFields'] = explode(',', getParam($this->oModule->_oConfig->CNF['PARAM_SEARCHABLE_FIELDS']));
+
+        $CNF = &$this->oModule->_oConfig->CNF;
+
+        switch ($sMode) {
+
+            case 'connections':
+                if ($this->_setConnectionsConditions($aParams)) {
+                    $oProfile = BxDolProfile::getInstance($aParams['profile']);
+                    $oProfile2 = isset($aParams['profile2']) ? BxDolProfile::getInstance($aParams['profile2']) : null;
+
+                    if (isset($aParams['type']) && $aParams['type'] == 'common' && $oProfile && $oProfile2)
+                        $this->aCurrent['title'] = _t('_bx_orgs_page_title_browse_connections_mutual', $oProfile->getDisplayName(), $oProfile2->getDisplayName());
+                    elseif ((!isset($aParams['type']) || $aParams['type'] != 'common') && $oProfile)
+                        $this->aCurrent['title'] = _t('_bx_orgs_page_title_browse_connections', $oProfile->getDisplayName());
+
+                    $this->aCurrent['rss']['link'] = 'modules/?r=orgs/rss/' . $sMode . '/' . $aParams['object'] . '/' . $aParams['type'] . '/' . (int)$aParams['profile'] . '/' . (int)$aParams['profile2'] . '/' . (int)$aParams['mutual'];
+                }
+                break;
+
+			case 'acl':
+                if ($this->_setAclConditions($aParams)) {
+					$this->aCurrent['title'] = _t('_bx_orgs_page_title_browse_by_acl', implode(', ', $this->aCurrent['title']));
+                    unset($this->aCurrent['rss']);
+                }
+                break;
+
+            case 'favorite':
+                $oProfileAuthor = null;
+                if(!$this->_setFavoriteConditions($sMode, $aParams, $oProfileAuthor)) {
+                    $this->isError = true;
+                    break;
+                }
+                break;
+
+            case 'recent':
+                $this->aCurrent['rss']['link'] = 'modules/?r=orgs/rss/' . $sMode;
+                $this->aCurrent['title'] = _t('_bx_orgs_page_title_browse_recent');
+                $this->aCurrent['sorting'] = 'last';
+                $this->sBrowseUrl = 'page.php?i=organizations-home';
+                break;
+
+            case 'featured':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_orgs_page_title_browse_featured');
+                $this->aCurrent['restriction']['featured']['value'] = '0';
+                $this->aCurrent['rss']['link'] = 'modules/?r=orgs/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'featured';
+                break;
+
+            case 'active':
+                $this->aCurrent['rss']['link'] = 'modules/?r=orgs/rss/' . $sMode;
+                $this->aCurrent['title'] = _t('_bx_orgs_page_title_browse_active');
+                $this->aCurrent['sorting'] = 'active';
+                $this->sBrowseUrl = 'page.php?i=organizations-active';
+                break;
+
+			case 'online':
+                $this->aCurrent['rss']['link'] = 'modules/?r=orgs/rss/' . $sMode;
+                $this->aCurrent['title'] = _t('_bx_orgs_page_title_browse_online');
+                $this->aCurrent['restriction']['online']['value'] = time() - 60 * (int)getParam('sys_account_online_time');
+                $this->aCurrent['restriction_sql'] = ' AND `sys_accounts`.`profile_id`=`sys_profiles`.`id`';
+                $this->aCurrent['join']['session'] = array(
+                    'type' => 'INNER',
+                    'table' => 'sys_sessions',
+                    'mainField' => 'account_id',
+                    'onField' => 'user_id',
+                    'joinFields' => array('date'),
+                    'groupTable' => $this->aCurrent['table'],
+                    'groupField' => 'id'
+                );
+                $this->aCurrent['sorting'] = 'online';
+                $this->sBrowseUrl = 'page.php?i=organizations-online';
+                break;
+
+            case '': // search results
+                $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
+                $this->aCurrent['title'] = _t('_bx_orgs');
+                unset($this->aCurrent['paginate']['perPage'], $this->aCurrent['rss']);
+                break;
+
+            default:
+                $this->isError = true;
+        }
+
+        $this->sCenterContentUnitSelector = false;
+    }
+
+    function getAlterOrder()
+    {
+        switch ($this->aCurrent['sorting']) {
+            case 'featured':
+                return array('order' => ' ORDER BY `bx_organizations_data`.`featured` DESC ');
+	        case 'none':
+	            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
+			case 'active':
+	            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
+			case 'online':
+	            return array('order' => ' ORDER BY `sys_sessions`.`date` DESC ');
+	        case 'last':
+	        default:                        
+	            return array('order' => ' ORDER BY `bx_organizations_data`.`added` DESC ');
+        }
+    }
+
+    function _getPseud ()
+    {
+        return array(
+            'id' => 'id',
+            'org_name' => 'org_name',
+            'added' => 'added',
+            'author' => 'author',
+            'picture' => 'picture',
+        );
+    }
+}
+
+/** @} */

+ 148 - 0
modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/config.php

@@ -0,0 +1,148 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Organizations Organizations
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_organizations',
+    'title' => 'Organizations',
+    'note' => 'Basic organization profiles functionality.',
+    'version' => '9.0.5',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/organizations/',
+    'home_uri' => 'orgs',
+
+    'db_prefix' => 'bx_organizations_',
+    'class_prefix' => 'BxOrgs',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Organizations',
+
+    /**
+     * Connections.
+     */
+    'connections' => array(
+    	'sys_profiles_friends' => array ('type' => 'profiles'),
+		'sys_profiles_subscriptions' => array ('type' => 'profiles'),
+    ),
+
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu',
+        'trigger_profile_view_actions',
+    ),
+
+    /**
+     * Page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry', 
+    ),
+
+    /**
+     * Storages.
+     */
+    'storages' => array(
+    	'bx_organizations_pics'
+    ),
+
+	/**
+     * Transcoders.
+     */
+    'transcoders' => array(
+    	'bx_organizations_icon', 
+    	'bx_organizations_thumb', 
+    	'bx_organizations_avatar', 
+    	'bx_organizations_picture', 
+    	'bx_organizations_cover', 
+    	'bx_organizations_cover_thumb',
+    	'bx_organizations_gallery'
+    ),
+
+	/**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_organizations',
+    	'bx_organizations_cmts',
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+    	'process_storages' => 1,
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'process_connections' => 1,
+    	'process_deleted_profiles' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+    	'process_menu_triggers' => 1,
+    	'process_page_triggers' => 1,
+    	'process_esearches' => 1,
+    	'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'unregister_transcoders' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Connections Section
+     */
+    'relations' => array(
+        'bx_notifications',
+    ),
+);
+
+/** @} */

+ 298 - 0
modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/langs/en.xml

@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+	<string name="_bx_orgs"><![CDATA[Organizations]]></string>
+	<string name="_bx_organizations"><![CDATA[Organizations]]></string>
+	<string name="_bx_orgs_cmts"><![CDATA[Organizations' Comments]]></string>
+
+	<string name="_bx_orgs_option_autoapproval"><![CDATA[Activate all organizations after creation automatically]]></string>
+	<string name="_bx_orgs_option_default_acl_level"><![CDATA[Default level to assign after organizations's profile creation]]></string>
+	<string name="_bx_orgs_option_redirect_aadd"><![CDATA[Redirect after organizations's profile creation to]]></string>
+    <string name="_bx_orgs_option_redirect_aadd_profile"><![CDATA[Profile Page]]></string>
+    <string name="_bx_orgs_option_redirect_aadd_last"><![CDATA[Last Page]]></string>
+    <string name="_bx_orgs_option_redirect_aadd_custom"><![CDATA[Custom Page]]></string>
+    <string name="_bx_orgs_option_redirect_aadd_custom_url"><![CDATA[URL for 'Custom Page' redirect]]></string>
+	<string name="_bx_orgs_option_num_connections_quick"><![CDATA[Number of items in friends block]]></string>
+	<string name="_bx_orgs_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+    <string name="_bx_orgs_option_num_rss"><![CDATA[Number of items in RSS feed]]></string>
+    <string name="_bx_orgs_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+    <string name="_bx_orgs_option_public_subscriptions"><![CDATA[Public following list]]></string>
+    <string name="_bx_orgs_option_public_subscribed_me"><![CDATA[Public followers list]]></string>
+
+	<string name="_bx_orgs_form_profile"><![CDATA[Organizations]]></string>
+	<string name="_bx_orgs_form_profile_display_add"><![CDATA[Add Organization]]></string>
+	<string name="_bx_orgs_form_profile_display_edit"><![CDATA[Edit Organization]]></string>
+	<string name="_bx_orgs_form_profile_display_edit_cover"><![CDATA[Edit Cover]]></string>
+	<string name="_bx_orgs_form_profile_display_delete"><![CDATA[Delete Organization]]></string>
+	<string name="_bx_orgs_form_profile_display_view"><![CDATA[View Organization]]></string>
+	<string name="_bx_orgs_form_profile_display_view_full"><![CDATA[Full View Organization]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_allow_view_to"><![CDATA[Visible to]]></string>
+    <string name="_bx_orgs_form_profile_input_allow_view_to"><![CDATA[Visible to]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_org_name"><![CDATA[Organization Name]]></string>
+    <string name="_bx_orgs_form_profile_input_org_name"><![CDATA[Organization Name]]></string>
+    <string name="_bx_orgs_form_profile_input_org_name_err"><![CDATA[This information is essential. Please, fill in this field.]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_org_desc"><![CDATA[Description]]></string>
+    <string name="_bx_orgs_form_profile_input_org_desc"><![CDATA[Description]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_org_cat"><![CDATA[Category]]></string>
+	<string name="_bx_orgs_form_profile_input_org_cat"><![CDATA[Category]]></string>
+    <string name="_bx_orgs_form_profile_input_org_cat_err"><![CDATA[Category field is mandatory]]></string>
+	<string name="_bx_orgs_form_profile_input_sys_picture"><![CDATA[Profile Picture]]></string>
+	<string name="_bx_orgs_form_profile_input_picture"><![CDATA[Upload a profile picture]]></string>
+	<string name="_bx_orgs_form_profile_input_picture_err"><![CDATA[Profile picture is mandatory.]]></string>
+	<string name="_bx_orgs_form_profile_input_sys_cover"><![CDATA[Cover Picture]]></string>
+	<string name="_bx_orgs_form_profile_input_cover"><![CDATA[Upload New Cover Picture]]></string>
+	<string name="_bx_orgs_form_profile_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_orgs_form_profile_input_delete_confirm"><![CDATA[I am sure I want to delete this profile]]></string>
+	<string name="_bx_orgs_form_profile_input_delete_confirm_info"><![CDATA[This action can not be undone.]]></string>
+	<string name="_bx_orgs_form_profile_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete your profile.]]></string>
+	<string name="_bx_orgs_form_profile_input_sys_profile_email"><![CDATA[Email]]></string>
+    <string name="_bx_orgs_form_profile_input_profile_email"><![CDATA[Email]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_profile_status"><![CDATA[Status]]></string>
+    <string name="_bx_orgs_form_profile_input_profile_status"><![CDATA[Status]]></string>
+
+	<string name="_bx_orgs_acl_action_create_profile"><![CDATA[Create Organization's Profile]]></string>
+	<string name="_bx_orgs_acl_action_delete_profile"><![CDATA[Delete Organization's Profile]]></string>
+	<string name="_bx_orgs_acl_action_view_profile"><![CDATA[View Organization's Profile]]></string>
+	<string name="_bx_orgs_acl_action_edit_any_profile"><![CDATA[Edit Any Organization's Profile]]></string>
+
+	<string name="_bx_orgs_page_title_sys_create_profile"><![CDATA[Create a Profile - Organization]]></string>
+	<string name="_bx_orgs_page_title_create_profile"><![CDATA[Create a Profile - Organization]]></string>
+	<string name="_bx_orgs_page_title_sys_edit_profile"><![CDATA[Edit Profile]]></string>
+	<string name="_bx_orgs_page_title_edit_profile"><![CDATA[Edit Profile]]></string>
+	<string name="_bx_orgs_page_title_sys_edit_profile_cover"><![CDATA[Edit Profile Cover]]></string>
+	<string name="_bx_orgs_page_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+	<string name="_bx_orgs_page_title_sys_delete_profile"><![CDATA[Delete Profile]]></string>
+	<string name="_bx_orgs_page_title_delete_profile"><![CDATA[Delete Profile]]></string>
+	<string name="_bx_orgs_page_title_sys_view_profile"><![CDATA[View Profile]]></string>
+	<string name="_bx_orgs_page_title_sys_view_profile_closed"><![CDATA[View Profile with Limited Visibility]]></string>
+	<string name="_bx_orgs_page_title_view_profile"><![CDATA[{display_name}]]></string>
+	<string name="_bx_orgs_page_title_browse"><![CDATA[Organizations]]></string>
+	<string name="_bx_orgs_page_title_browse_featured"><![CDATA[Featured Organizations]]></string>
+	<string name="_bx_orgs_page_title_browse_active"><![CDATA[Active Organizations]]></string>
+	<string name="_bx_orgs_page_title_browse_online"><![CDATA[Online Organizations]]></string>
+	<string name="_bx_orgs_page_title_browse_recent"><![CDATA[New Organizations]]></string>
+	<string name="_bx_orgs_page_title_browse_connections"><![CDATA[{0} connections]]></string>
+	<string name="_bx_orgs_page_title_browse_connections_mutual"><![CDATA[{0} and {1} mutual connections]]></string>
+	<string name="_bx_orgs_page_title_browse_favorites"><![CDATA[{0} favorites]]></string>
+	<string name="_bx_orgs_page_title_browse_by_acl"><![CDATA[{0} Organizations]]></string>
+	<string name="_bx_orgs_page_title_sys_profile_favorites"><![CDATA[Favorite Organizations]]></string>
+	<string name="_bx_orgs_page_title_profile_favorites"><![CDATA[Favorite Organizations]]></string>
+	<string name="_bx_orgs_page_title_sys_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_orgs_page_title_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_orgs_page_title_sys_friend_requests"><![CDATA[Friend Requests]]></string>
+    <string name="_bx_orgs_page_title_friend_requests"><![CDATA[Friend Requests]]></string>
+	<string name="_bx_orgs_page_title_sys_profile_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_orgs_page_title_profile_subscriptions"><![CDATA[Following & Followers]]></string>
+    <string name="_bx_orgs_page_title_sys_profile_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_orgs_page_title_profile_comments"><![CDATA[Comments]]></string>
+	<string name="_bx_orgs_page_title_sys_profile_info"><![CDATA[Profile Info]]></string>
+	<string name="_bx_orgs_page_title_profile_info"><![CDATA[Info about {display_name}]]></string>
+	<string name="_bx_orgs_page_title_sys_recent"><![CDATA[New Organizations]]></string>
+	<string name="_bx_orgs_page_title_recent"><![CDATA[New Organizations]]></string>
+	<string name="_bx_orgs_page_title_sys_manage"><![CDATA[Manage Own Organizations]]></string>
+	<string name="_bx_orgs_page_title_sys_manage_administration"><![CDATA[Manage All Organizations]]></string>
+	<string name="_bx_orgs_page_title_manage"><![CDATA[Manage Organizations]]></string>
+	<string name="_bx_orgs_page_title_sys_active"><![CDATA[Active Organizations]]></string>
+	<string name="_bx_orgs_page_title_active"><![CDATA[Active Organizations]]></string>
+	<string name="_bx_orgs_page_title_sys_online"><![CDATA[Online Organizations]]></string>
+	<string name="_bx_orgs_page_title_online"><![CDATA[Online Organizations]]></string>
+	<string name="_bx_orgs_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_orgs_page_title_entries_search"><![CDATA[Search]]></string>
+
+    <string name="_bx_orgs_page_block_title_profile_private"><![CDATA[Private Profile]]></string>
+    <string name="_bx_orgs_page_block_title_choose_type"><![CDATA[Choose Profile Type]]></string>
+	<string name="_bx_orgs_page_block_title_create_profile"><![CDATA[Create a Profile - Organization]]></string>
+	<string name="_bx_orgs_page_block_title_edit_profile"><![CDATA[Edit Profile]]></string>
+	<string name="_bx_orgs_page_block_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+	<string name="_bx_orgs_page_block_title_delete_profile"><![CDATA[Delete Profile]]></string>
+	<string name="_bx_orgs_page_block_title_profile_all_actions"><![CDATA[All Actions]]></string>
+	<string name="_bx_orgs_page_block_title_profile_info_link"><![CDATA[About <a href="{profile_link}">{display_name}</a>]]></string>
+	<string name="_bx_orgs_page_block_title_profile_info"><![CDATA[Info]]></string>
+	<string name="_bx_orgs_page_block_title_system_profile_info"><![CDATA[Info]]></string>
+	<string name="_bx_orgs_page_block_title_profile_membership"><![CDATA[Membership]]></string>
+	<string name="_bx_orgs_page_block_title_system_profile_membership"><![CDATA[Membership]]></string>
+	<string name="_bx_orgs_page_block_title_profile_description"><![CDATA[Description]]></string>
+	<string name="_bx_orgs_page_block_title_profile_favorites"><![CDATA[Favorite Organizations]]></string>
+	<string name="_bx_orgs_page_block_title_system_profile_favorites"><![CDATA[Favorite Organizations]]></string>
+	<string name="_bx_orgs_page_block_title_profile_friends_link"><![CDATA[Friends of <a href="{profile_link}">{display_name}</a>]]></string>
+	<string name="_bx_orgs_page_block_title_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_orgs_page_block_title_system_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_orgs_page_block_title_friend_requests_link"><![CDATA[Friend Requests for <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_orgs_page_block_title_system_friend_requests"><![CDATA[Friend Requests]]></string>
+	<string name="_bx_orgs_page_block_title_profile_location"><![CDATA[Location]]></string>
+	<string name="_bx_orgs_page_block_title_system_profile_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_orgs_page_block_title_profile_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_orgs_page_block_title_system_profile_subscribed_me"><![CDATA[Followers]]></string>
+    <string name="_bx_orgs_page_block_title_profile_subscribed_me"><![CDATA[Followers]]></string>
+    <string name="_bx_orgs_page_block_title_profile_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_orgs_page_block_title_profile_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
+	<string name="_bx_orgs_page_block_title_profile_actions"><![CDATA[Actions]]></string>
+	<string name="_bx_orgs_page_block_title_featured_profiles"><![CDATA[Featured Organizations]]></string>
+	<string name="_bx_orgs_page_block_title_latest_profiles"><![CDATA[New Organizations]]></string>
+	<string name="_bx_orgs_page_block_title_system_manage"><![CDATA[Manage Own Organizations]]></string>
+	<string name="_bx_orgs_page_block_title_system_manage_administration"><![CDATA[Manage All Organizations]]></string>
+	<string name="_bx_orgs_page_block_title_manage"><![CDATA[Manage Organizations]]></string>
+    <string name="_bx_orgs_page_block_title_active_profiles"><![CDATA[Active Organizations]]></string>
+    <string name="_bx_orgs_page_block_title_online_profiles"><![CDATA[Online Organizations]]></string>
+    <string name="_bx_orgs_page_block_title_categories"><![CDATA[Organization categories]]></string>
+    <string name="_bx_orgs_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_orgs_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_orgs_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_orgs_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+
+    <string name="_bx_orgs_menu_title_submenu"><![CDATA[Organizations Submenu]]></string>
+    <string name="_bx_orgs_menu_set_title_submenu"><![CDATA[Organizations Submenu]]></string>
+    <string name="_bx_orgs_menu_set_title_view_profile_actions"><![CDATA[Organization Actions]]></string>
+    <string name="_bx_orgs_menu_title_view_profile_actions"><![CDATA[Organization Actions]]></string>
+    <string name="_bx_orgs_menu_set_title_view_profile_actions_more"><![CDATA[Organization More Actions]]></string>
+    <string name="_bx_orgs_menu_title_view_profile_actions_more"><![CDATA[Organization More Actions]]></string>
+    <string name="_bx_orgs_menu_set_title_view_profile_submenu"><![CDATA[View Organization Submenu]]></string>
+    <string name="_bx_orgs_menu_title_view_profile_submenu"><![CDATA[View Organization Submenu]]></string>
+    <string name="_bx_orgs_menu_title_view_profile_submenu_cover"><![CDATA[Organization Cover Submenu]]></string>
+	<string name="_bx_orgs_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_orgs_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_orgs_menu_item_title_system_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_orgs_menu_item_title_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_orgs_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
+    <string name="_bx_orgs_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
+    <string name="_bx_orgs_menu_item_title_system_edit_cover"><![CDATA[Edit Cover]]></string>
+    <string name="_bx_orgs_menu_item_title_edit_cover"><![CDATA[Edit Cover]]></string>
+    <string name="_bx_orgs_menu_item_title_system_edit_profile"><![CDATA[Edit Organization]]></string>
+    <string name="_bx_orgs_menu_item_title_edit_profile"><![CDATA[Edit Profile]]></string>
+    <string name="_bx_orgs_menu_item_title_system_delete_profile"><![CDATA[Delete Organization]]></string>
+    <string name="_bx_orgs_menu_item_title_delete_profile"><![CDATA[Delete Profile]]></string>
+    <string name="_bx_orgs_menu_item_title_system_delete_account"><![CDATA[Delete Account]]></string>
+    <string name="_bx_orgs_menu_item_title_delete_account"><![CDATA[Delete Account]]></string>
+    <string name="_bx_orgs_menu_item_title_system_delete_account_content"><![CDATA[Delete Account with Content]]></string>
+    <string name="_bx_orgs_menu_item_title_delete_account_content"><![CDATA[Delete Account with Content]]></string>
+    <string name="_bx_orgs_menu_item_title_system_profile_type"><![CDATA[Organization]]></string>
+    <string name="_bx_orgs_menu_item_title_profile_type"><![CDATA[Organization]]></string>
+    <string name="_bx_orgs_menu_item_title_system_create_profile"><![CDATA[Organization]]></string>
+    <string name="_bx_orgs_menu_item_title_create_profile"><![CDATA[Organization]]></string>
+    <string name="_bx_orgs_menu_item_title_system_view_profile_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_orgs_menu_item_title_view_profile_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_orgs_menu_item_title_system_view_profile_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_orgs_menu_item_title_view_profile_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_orgs_menu_item_title_system_view_profile_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_orgs_menu_item_title_view_profile_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_orgs_menu_item_title_system_view_profile_info"><![CDATA[Info]]></string>
+    <string name="_bx_orgs_menu_item_title_view_profile_info"><![CDATA[Info]]></string>
+    <string name="_bx_orgs_menu_item_title_system_view_profile_view"><![CDATA[Organization]]></string>
+    <string name="_bx_orgs_menu_item_title_view_profile_view"><![CDATA[Organization]]></string>
+    <string name="_bx_orgs_menu_item_title_system_befriend"><![CDATA[Add friend]]></string>
+    <string name="_bx_orgs_menu_item_title_befriend"><![CDATA[Add friend]]></string>
+    <string name="_bx_orgs_menu_item_title_befriend_sent"><![CDATA[Add friend (requested)]]></string>
+    <string name="_bx_orgs_menu_item_title_befriend_confirm"><![CDATA[Accept friend request]]></string>
+    <string name="_bx_orgs_menu_item_title_system_unfriend"><![CDATA[Unfriend]]></string>
+    <string name="_bx_orgs_menu_item_title_unfriend"><![CDATA[Unfriend]]></string>
+    <string name="_bx_orgs_menu_item_title_unfriend_cancel_request"><![CDATA[Cancel friend request]]></string>
+    <string name="_bx_orgs_menu_item_title_unfriend_reject_request"><![CDATA[Reject friend request]]></string>
+    <string name="_bx_orgs_menu_item_title_system_subscribe"><![CDATA[Follow]]></string>
+    <string name="_bx_orgs_menu_item_title_subscribe"><![CDATA[Follow]]></string>
+    <string name="_bx_orgs_menu_item_title_system_unsubscribe"><![CDATA[Unfollow]]></string>
+    <string name="_bx_orgs_menu_item_title_unsubscribe"><![CDATA[Unfollow]]></string>
+    <string name="_bx_orgs_menu_item_title_system_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_orgs_menu_item_title_more_actions"><![CDATA[]]></string>
+    <string name="_bx_orgs_menu_item_title_system_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_orgs_menu_item_title_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_orgs_menu_item_title_system_friend_requests"><![CDATA[Friend requests number]]></string>
+    <string name="_bx_orgs_menu_item_title_friend_requests"><![CDATA[{addon} friend requests]]></string>
+    <string name="_bx_orgs_menu_item_title_system_manage_my_organizations"><![CDATA[My organizations]]></string>
+    <string name="_bx_orgs_menu_item_title_manage_my_organizations"><![CDATA[{addon} organizations]]></string>
+    <string name="_bx_orgs_menu_item_title_system_favorites"><![CDATA[Favorite Organizations]]></string>
+    <string name="_bx_orgs_menu_item_title_favorites"><![CDATA[{addon} favorite organizations]]></string>
+    <string name="_bx_orgs_menu_item_title_system_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_orgs_menu_item_title_subscriptions"><![CDATA[{addon} following]]></string>
+    <string name="_bx_orgs_menu_item_title_system_subscribed_me"><![CDATA[Followers]]></string>
+    <string name="_bx_orgs_menu_item_title_subscribed_me"><![CDATA[{addon} followers]]></string>
+    <string name="_bx_orgs_menu_item_title_system_entries_recent"><![CDATA[New]]></string>
+    <string name="_bx_orgs_menu_item_title_entries_recent"><![CDATA[New]]></string>
+    <string name="_bx_orgs_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_orgs_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_orgs_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_orgs_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_orgs_menu_item_title_system_entries_home"><![CDATA[Orgs]]></string>
+    <string name="_bx_orgs_menu_item_title_entries_home"><![CDATA[Orgs]]></string>
+    <string name="_bx_orgs_menu_item_title_system_admt_organizations"><![CDATA[Organizations]]></string>
+	<string name="_bx_orgs_menu_item_title_admt_organizations"><![CDATA[Organizations - {addon} unapproved]]></string>
+	<string name="_bx_orgs_menu_item_title_manage_my"><![CDATA[My Organizations]]></string>
+	<string name="_bx_orgs_menu_item_title_manage_all"><![CDATA[All Organizations]]></string>
+	<string name="_bx_orgs_menu_item_title_system_entries_active"><![CDATA[Active]]></string>
+	<string name="_bx_orgs_menu_item_title_entries_active"><![CDATA[Active]]></string>
+	<string name="_bx_orgs_menu_item_title_system_entries_online"><![CDATA[Online]]></string>
+	<string name="_bx_orgs_menu_item_title_entries_online"><![CDATA[Online]]></string>
+
+	<string name="_bx_orgs_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_orgs_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_orgs_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
+	<string name="_bx_orgs_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>
+	<string name="_bx_orgs_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_orgs_grid_column_title_adm_fullname"><![CDATA[Name]]></string>
+    <string name="_bx_orgs_grid_column_title_adm_last_online"><![CDATA[Last Online]]></string>
+    <string name="_bx_orgs_grid_column_title_adm_account"><![CDATA[Account]]></string>
+    <string name="_bx_orgs_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_orgs_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
+    <string name="_bx_orgs_grid_action_title_adm_set_acl_level"><![CDATA[Set Membership]]></string>
+    <string name="_bx_orgs_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+	<string name="_bx_orgs_grid_action_err_delete"><![CDATA[Cannot delete the selected organization(s).]]></string>
+	<string name="_bx_orgs_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_orgs_chart_growth"><![CDATA[Organizations: Growth]]></string>
+    <string name="_bx_orgs_chart_growth_speed"><![CDATA[Organizations: Growth Speed]]></string>
+
+    <string name="_bx_orgs_search_extended"><![CDATA[Organizations Search]]></string>
+    <string name="_bx_orgs_search_extended_cmts"><![CDATA[Organizations Comments Search]]></string>
+
+    <string name="_bx_orgs_txt_account_pending"><![CDATA[This profile is pending approval, please wait until it is activated.]]></string>
+    <string name="_bx_orgs_txt_account_pending_moderation"><![CDATA[This <a href="{0}">profile</a> is pending approval.]]></string>
+    <string name="_bx_orgs_txt_account_suspended"><![CDATA[This profile is suspended.]]></string>
+    <string name="_bx_orgs_txt_account_suspended_moderation"><![CDATA[This <a href="{0}">profile</a> is suspended.]]></string>
+
+    <string name="_bx_orgs_pre_lists_cats"><![CDATA[Organization categories]]></string>
+    <string name="_bx_orgs_cat_Agriculture"><![CDATA[Agriculture]]></string>
+    <string name="_bx_orgs_cat_Financial"><![CDATA[Financial]]></string>
+    <string name="_bx_orgs_cat_Biotech"><![CDATA[Biotech]]></string>
+    <string name="_bx_orgs_cat_Cause"><![CDATA[Cause]]></string>
+    <string name="_bx_orgs_cat_Chemical"><![CDATA[Chemical]]></string>
+    <string name="_bx_orgs_cat_Religious"><![CDATA[Religious]]></string>
+    <string name="_bx_orgs_cat_Community"><![CDATA[Community]]></string>
+    <string name="_bx_orgs_cat_Company"><![CDATA[Company]]></string>
+    <string name="_bx_orgs_cat_Entertainment"><![CDATA[Entertainment]]></string>
+    <string name="_bx_orgs_cat_Technology"><![CDATA[Technology]]></string>
+    <string name="_bx_orgs_cat_Consulting"><![CDATA[Consulting]]></string>
+    <string name="_bx_orgs_cat_Education"><![CDATA[Education]]></string>
+    <string name="_bx_orgs_cat_Energy"><![CDATA[Energy]]></string>
+    <string name="_bx_orgs_cat_Engineering"><![CDATA[Engineering]]></string>
+    <string name="_bx_orgs_cat_Food"><![CDATA[Food]]></string>
+    <string name="_bx_orgs_cat_Government"><![CDATA[Government]]></string>
+    <string name="_bx_orgs_cat_Health"><![CDATA[Health]]></string>
+    <string name="_bx_orgs_cat_Medical"><![CDATA[Medical]]></string>
+    <string name="_bx_orgs_cat_Industrial"><![CDATA[Industrial]]></string>
+    <string name="_bx_orgs_cat_Insurance"><![CDATA[Insurance]]></string>
+    <string name="_bx_orgs_cat_Internet"><![CDATA[Internet]]></string>
+    <string name="_bx_orgs_cat_Software"><![CDATA[Software]]></string>
+    <string name="_bx_orgs_cat_Legal"><![CDATA[Legal]]></string>
+    <string name="_bx_orgs_cat_Media"><![CDATA[Media]]></string>
+    <string name="_bx_orgs_cat_School"><![CDATA[School]]></string>
+    <string name="_bx_orgs_cat_NGO"><![CDATA[NGO]]></string>
+    <string name="_bx_orgs_cat_NPO"><![CDATA[NPO]]></string>
+    <string name="_bx_orgs_cat_Political"><![CDATA[Political]]></string>
+    <string name="_bx_orgs_cat_Retail"><![CDATA[Retail]]></string>
+    <string name="_bx_orgs_cat_Small_Business"><![CDATA[Small Business]]></string>
+    <string name="_bx_orgs_cat_Telecommunication"><![CDATA[Telecommunication]]></string>
+    <string name="_bx_orgs_cat_Transport"><![CDATA[Transport]]></string>
+    <string name="_bx_orgs_cat_Travel"><![CDATA[Travel]]></string>
+    <string name="_bx_orgs_cat_University"><![CDATA[University]]></string>
+    <string name="_bx_orgs_cat_Other"><![CDATA[Other]]></string>
+
+    <string name="_bx_orgs_txt_ntfs_timeline_post_common"><![CDATA[New post in <a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> organization timeline from <a href="{subentry_url}">{subentry_sample}</a>]]></string>
+    <string name="_bx_orgs_txt_sample_single"><![CDATA[organization]]></string>
+    <string name="_bx_orgs_txt_sample_comment_single"><![CDATA[organization's comment]]></string>
+    <string name="_bx_orgs_txt_N_friends"><![CDATA[{0} friends]]></string>
+
+    <string name="_bx_organizations_email_friend_request"><![CDATA[Friend request]]></string>
+    <string name="_bx_organizations_email_friend_request_subject"><![CDATA[Friendship Request]]></string>
+    <string name="_bx_organizations_email_friend_request_body"><![CDATA[{email_header}
+<p><a href="{SenderUrl}">{SenderDisplayName}</a> wants to be friends with you. <a href="{FriendsLink}">Respond</a>.</p>
+{email_footer}]]></string>
+</resources>

+ 75 - 0
modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/sql/disable.sql

@@ -0,0 +1,75 @@
+
+-- SETTINGS
+
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_organizations' LIMIT 1);
+SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
+DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
+DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
+DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
+
+-- PAGES
+
+DELETE FROM `sys_objects_page` WHERE `module` = 'bx_organizations';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_organizations' OR `object` IN('bx_organizations_create_profile', 'bx_organizations_delete_profile', 'bx_organizations_edit_profile', 'bx_organizations_edit_profile_cover', 'bx_organizations_view_profile', 'bx_organizations_view_profile_closed', 'bx_organizations_profile_info', 'bx_organizations_profile_friends', 'bx_organizations_friend_requests', 'bx_organizations_profile_favorites', 'bx_organizations_profile_subscriptions', 'bx_organizations_profile_comments', 'bx_organizations_home', 'bx_organizations_search', 'bx_organizations_manage');
+
+-- MENU
+
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_organizations';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_organizations';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_organizations' OR `set_name` IN('bx_organizations_view_submenu', 'bx_organizations_submenu', 'bx_organizations_view_actions', 'bx_organizations_view_actions_more');
+
+-- ACL
+DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_organizations';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_organizations';
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_organizations';
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_organizations';
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_organizations';
+
+-- FAFORITES
+DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_organizations';
+
+-- FEATURED
+DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_organizations';
+
+-- METATAGS
+DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_organizations';
+
+-- CATEGORY
+DELETE FROM `sys_objects_category` WHERE `object` = 'bx_organizations_cats';
+
+-- SEARCH
+DELETE FROM `sys_objects_search` WHERE `ObjectName` = 'bx_organizations';
+
+-- STATS
+DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_organizations%';
+
+-- CHARTS
+DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_organizations%';
+
+-- GRIDS
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_organizations_administration', 'bx_organizations_moderation', 'bx_organizations_common');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_organizations_administration', 'bx_organizations_moderation', 'bx_organizations_common');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_organizations_administration', 'bx_organizations_moderation', 'bx_organizations_common');
+
+-- LIVE UPDATES
+DELETE FROM `sys_objects_live_updates` WHERE `name` = 'bx_organizations_friend_requests';
+
+-- ALERTS
+SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_organizations' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
+
+-- PRIVACY 
+DELETE FROM `sys_objects_privacy` WHERE `object` IN('bx_organizations_allow_view_to');
+
+-- EMAIL TEMPLATES
+DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_organizations';
+
+-- UPLOADERS
+DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_organizations_cover_crop', 'bx_organizations_picture_crop');

+ 469 - 0
modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/sql/enable.sql

@@ -0,0 +1,469 @@
+
+-- SETTINGS
+
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_organizations', '_bx_orgs', 'bx_organizations@modules/boonex/organizations/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_organizations', '_bx_orgs', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
+('bx_organizations_autoapproval', 'on', @iCategId, '_bx_orgs_option_autoapproval', 'checkbox', '', '', '', 1),
+('bx_organizations_default_acl_level', '3', @iCategId, '_bx_orgs_option_default_acl_level', 'select', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"get_memberships";s:6:"params";a:2:{i:0;b:0;i:1;b:1;}s:5:"class";s:16:"TemplAclServices";}', '', '', 2),
+('bx_organizations_redirect_aadd', 'profile', @iCategId, '_bx_orgs_option_redirect_aadd', 'select', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:30:"get_options_redirect_after_add";}', '', '', 3),
+('bx_organizations_redirect_aadd_custom_url', '', @iCategId, '_bx_orgs_option_redirect_aadd_custom_url', 'digit', '', '', '', 4),
+('bx_organizations_num_connections_quick', '4', @iCategId, '_bx_orgs_option_num_connections_quick', 'digit', '', '', '', 10),
+('bx_organizations_per_page_browse', '20', @iCategId, '_bx_orgs_option_per_page_browse', 'digit', '', '', '', 11),
+('bx_organizations_num_rss', '10', @iCategId, '_bx_orgs_option_num_rss', 'digit', '', '', '', 12),
+('bx_organizations_searchable_fields', 'org_name,org_desc', @iCategId, '_bx_orgs_option_searchable_fields', 'list', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:21:"get_searchable_fields";}', '', '', 20),
+('bx_organizations_public_subscriptions', '', @iCategId, '_bx_orgs_option_public_subscriptions', 'checkbox', '', '', '', 30),
+('bx_organizations_public_subscribed_me', '', @iCategId, '_bx_orgs_option_public_subscribed_me', 'checkbox', '', '', '', 31);
+
+-- PAGES
+
+-- PAGE: create profile
+
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_create_profile', 'create-organization-profile', '_bx_orgs_page_title_sys_create_profile', '_bx_orgs_page_title_create_profile', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=create-organization-profile', '', '', '', 0, 1, 0, '', '');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('bx_organizations_create_profile', 1, 'bx_organizations', '_bx_orgs_page_block_title_choose_type', 11, 2147483647, 'menu', 'sys_add_profile_vertical', 0, 1, 0, 0),
+('bx_organizations_create_profile', 1, 'bx_organizations', '_bx_orgs_page_block_title_create_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:13:\"entity_create\";}', 0, 1, 1, 1);
+
+-- PAGE: view profile
+
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_view_profile', 'view-organization-profile', '_bx_orgs_page_title_sys_view_profile', '_bx_orgs_page_title_view_profile', 'bx_organizations', 7, 2147483647, 1, 'page.php?i=view-organization-profile', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('bx_organizations_view_profile', 2, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 0),
+('bx_organizations_view_profile', 2, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_description', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 0),
+('bx_organizations_view_profile', 2, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_friends', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:15:\"profile_friends\";}', 0, 0, 1, 1),
+('bx_organizations_view_profile', 3, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_location', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:15:\"entity_location\";}', 0, 0, 0, 0),
+('bx_organizations_view_profile', 3, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 0),
+('bx_organizations_view_profile', 3, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 1, 1),
+('bx_organizations_view_profile', 3, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_membership', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:18:\"profile_membership\";}', 0, 0, 1, 2),
+('bx_organizations_view_profile', 3, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_location', 3, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:13:\"locations_map\";s:6:\"params\";a:2:{i:0;s:16:\"bx_organizations\";i:1;s:12:\"{content_id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 3);
+
+-- PAGE: view closed profile 
+
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_view_profile_closed', 'view-organization-profile-closed', '_bx_orgs_page_title_sys_view_profile_closed', '_bx_orgs_page_title_view_profile', 'bx_organizations', 10, 2147483647, 1, 'page.php?i=view-organization-profile', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_organizations_view_profile_closed', 1, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_private', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:19:\"private_profile_msg\";}', 0, 1, 1, 0);
+
+-- PAGE: edit profile
+
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_edit_profile', 'edit-organization-profile', '_bx_orgs_page_title_sys_edit_profile', '_bx_orgs_page_title_edit_profile', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=edit-organization-profile', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_organizations_edit_profile', 1, 'bx_organizations', '_bx_orgs_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
+
+-- PAGE: edit profile cover
+
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_edit_profile_cover', 'edit-organization-cover', '_bx_orgs_page_title_sys_edit_profile_cover', '_bx_orgs_page_title_edit_profile_cover', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=edit-organization-cover', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_organizations_edit_profile_cover', 1, 'bx_organizations', '_bx_orgs_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
+
+-- PAGE: delete profile
+
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_delete_profile', 'delete-organization-profile', '_bx_orgs_page_title_sys_delete_profile', '_bx_orgs_page_title_delete_profile', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=delete-organization-profile', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_organizations_delete_profile', 1, 'bx_organizations', '_bx_orgs_page_block_title_delete_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:13:\"entity_delete\";}', 0, 0, 0);
+
+-- PAGE: profile info
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_profile_info', 'organization-profile-info', '_bx_orgs_page_title_sys_profile_info', '_bx_orgs_page_title_profile_info', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=organization-profile-info', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_organizations_profile_info', 1, 'bx_organizations', '_bx_orgs_page_block_title_system_profile_info', '_bx_orgs_page_block_title_profile_info_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:16:\"entity_info_full\";}', 0, 0, 1, 1),
+('bx_organizations_profile_info', 1, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_description', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 2);
+
+-- PAGE: profile friends
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_profile_friends', 'organization-profile-friends', '_bx_orgs_page_title_sys_profile_friends', '_bx_orgs_page_title_profile_friends', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=organization-profile-friends', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_organizations_profile_friends', 1, 'bx_organizations', '_bx_orgs_page_block_title_system_profile_friends', '_bx_orgs_page_block_title_profile_friends_link', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:17:\"connections_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 0, 1, 1);
+
+-- PAGE: profile friend requests
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_friend_requests', 'organization-friend-requests', '_bx_orgs_page_title_sys_friend_requests', '_bx_orgs_page_title_friend_requests', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=organization-friend-requests', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_organizations_friend_requests', 1, 'bx_organizations', '_bx_orgs_page_block_title_system_friend_requests', '_bx_orgs_page_block_title_friend_requests_link', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:25:\"connections_request_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 0, 1, 1);
+
+-- PAGE: profile favorites
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_profile_favorites', 'organization-profile-favorites', '_bx_orgs_page_title_sys_profile_favorites', '_bx_orgs_page_title_profile_favorites', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=organization-profile-favorites', '', '', '', 0, 1, 0, 'BxOrgsPageBrowse', 'modules/boonex/organizations/classes/BxOrgsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_organizations_profile_favorites', 1, 'bx_organizations', '_bx_orgs_page_block_title_system_profile_favorites', '_bx_orgs_page_block_title_profile_favorites', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:15:"browse_favorite";}', 0, 1, 1, 1);
+
+-- PAGE: profile subscriptions
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_profile_subscriptions', 'organization-profile-subscriptions', '_bx_orgs_page_title_sys_profile_subscriptions', '_bx_orgs_page_title_profile_subscriptions', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=organization-profile-subscriptions', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_organizations_profile_subscriptions', 1, 'bx_organizations', '_bx_orgs_page_block_title_system_profile_subscriptions', '_bx_orgs_page_block_title_profile_subscriptions', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:19:\"subscriptions_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 1, 1, 1),
+('bx_organizations_profile_subscriptions', 1, 'bx_organizations', '_bx_orgs_page_block_title_system_profile_subscribed_me', '_bx_orgs_page_block_title_profile_subscribed_me', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:19:\"subscribed_me_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 1, 1, 2);
+
+-- PAGE: view entry comments
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_profile_comments', '_bx_orgs_page_title_sys_profile_comments', '_bx_orgs_page_title_profile_comments', 'bx_organizations', 5, 2147483647, 1, 'organization-profile-comments', '', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_organizations_profile_comments', 1, 'bx_organizations', '_bx_orgs_page_block_title_profile_comments', '_bx_orgs_page_block_title_profile_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 1);
+
+-- PAGE: module home
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_home', '_bx_orgs_page_title_sys_recent', '_bx_orgs_page_title_recent', 'bx_organizations', 5, 2147483647, 1, 'organizations-home', 'page.php?i=organizations-home', '', '', '', 0, 1, 0, 'BxOrgsPageBrowse', 'modules/boonex/organizations/classes/BxOrgsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_organizations_home', 1, 'bx_organizations', '_bx_orgs_page_block_title_featured_profiles', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:7:"gallery";}}', 0, 1, 0),
+('bx_organizations_home', 1, 'bx_organizations', '_bx_orgs_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:22:\"browse_recent_profiles\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 1);
+
+-- PAGE: active profiles
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_active', '_bx_orgs_page_title_sys_active', '_bx_orgs_page_title_active', 'bx_organizations', 5, 2147483647, 1, 'organizations-active', 'page.php?i=organizations-active', '', '', '', 0, 1, 0, 'BxOrgsPageBrowse', 'modules/boonex/organizations/classes/BxOrgsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_organizations_active', 1, 'bx_organizations', '_bx_orgs_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 0);
+
+-- PAGE: online profiles
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_online', '_bx_orgs_page_title_sys_online', '_bx_orgs_page_title_online', 'bx_organizations', 5, 2147483647, 1, 'organizations-online', 'page.php?i=organizations-online', '', '', '', 0, 1, 0, 'BxOrgsPageBrowse', 'modules/boonex/organizations/classes/BxOrgsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_organizations_online', 1, 'bx_organizations', '_bx_orgs_page_block_title_online_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:22:\"browse_online_profiles\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 0);
+
+-- PAGE: search for entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_search', '_bx_orgs_page_title_sys_entries_search', '_bx_orgs_page_title_entries_search', 'bx_organizations', 5, 2147483647, 1, 'organizations-search', 'page.php?i=organizations-search', '', '', '', 0, 1, 0, 'BxOrgsPageBrowse', 'modules/boonex/organizations/classes/BxOrgsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_organizations_search', 1, 'bx_organizations', '_bx_orgs_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:16:"bx_organizations";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_organizations_search', 1, 'bx_organizations', '_bx_orgs_page_block_title_search_results', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:16:"bx_organizations";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 2),
+('bx_organizations_search', 1, 'bx_organizations', '_bx_orgs_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:21:"bx_organizations_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_organizations_search', 1, 'bx_organizations', '_bx_orgs_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:21:"bx_organizations_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
+
+-- PAGE: module manage own
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_manage', '_bx_orgs_page_title_sys_manage', '_bx_orgs_page_title_manage', 'bx_organizations', 5, 2147483647, 1, 'organizations-manage', 'page.php?i=organizations-manage', '', '', '', 0, 1, 0, 'BxOrgsPageBrowse', 'modules/boonex/organizations/classes/BxOrgsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_organizations_manage', 1, 'bx_organizations', '_bx_orgs_page_block_title_system_manage', '_bx_orgs_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:12:\"manage_tools\";}}', 0, 1, 0);
+
+-- PAGE: module manage all
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_administration', '_bx_orgs_page_title_sys_manage_administration', '_bx_orgs_page_title_manage', 'bx_organizations', 5, 192, 1, 'organizations-administration', 'page.php?i=organizations-administration', '', '', '', 0, 1, 0, 'BxOrgsPageBrowse', 'modules/boonex/organizations/classes/BxOrgsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_organizations_administration', 1, 'bx_organizations', '_bx_orgs_page_block_title_system_manage_administration', '_bx_orgs_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
+
+-- PAGE: add block to homepage
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('sys_home', 1, 'bx_organizations', '_bx_orgs_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:22:"browse_recent_profiles";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
+
+-- PAGE: service blocks
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('', 0, 'bx_organizations', '', '_bx_orgs_page_block_title_categories', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"categories_list";s:6:"params";a:2:{i:0;s:21:"bx_organizations_cats";i:1;a:2:{s:10:\"show_empty\";b:1;s:21:\"show_empty_categories\";b:1;}}s:5:"class";s:20:"TemplServiceCategory";}', 1, 1, 1, IFNULL(@iBlockOrder, 0) + 1);
+
+
+-- MENU
+
+-- MENU: add to site menu
+
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_site', 'bx_organizations', 'organizations-home', '_bx_orgs_menu_item_title_system_entries_home', '_bx_orgs_menu_item_title_entries_home', 'page.php?i=organizations-home', '', '', 'briefcase col-red2', 'bx_organizations_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+-- MENU: add to homepage menu
+
+SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_homepage', 'bx_organizations', 'organizations-home', '_bx_orgs_menu_item_title_system_entries_home', '_bx_orgs_menu_item_title_entries_home', 'page.php?i=organizations-home', '', '', 'briefcase col-red2', 'bx_organizations_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+
+--SET @iCreateProfileMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_profiles_create' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+--INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+--('sys_profiles_create', 'bx_organizations', 'create-organization-profile', '_bx_orgs_menu_item_title_system_profile_type', '_bx_orgs_menu_item_title_profile_type', 'page.php?i=create-organization-profile', '', '', 'briefcase', '', 2147483647, 1, 1, IFNULL(@iCreateProfileMenuOrder, 0) + 1);
+
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_profile_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_add_profile_links', 'bx_organizations', 'create-organization-profile', '_bx_orgs_menu_item_title_system_create_profile', '_bx_orgs_menu_item_title_create_profile', 'page.php?i=create-organization-profile', '', '', 'briefcase col-red2', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: view actions
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_view_actions', '_bx_orgs_menu_title_view_profile_actions', 'bx_organizations_view_actions', 'bx_organizations', 9, 0, 1, 'BxOrgsMenuView', 'modules/boonex/organizations/classes/BxOrgsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_organizations_view_actions', 'bx_organizations', '_bx_orgs_menu_set_title_view_profile_actions', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_organizations_view_actions', 'bx_organizations', 'profile-friend-add', '_bx_orgs_menu_item_title_system_befriend', '{title_add_friend}', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_friends\', \'add\', \'{profile_id}\')', '', 'user-plus', '', 0, 2147483647, 1, 0, 10),
+('bx_organizations_view_actions', 'bx_organizations', 'profile-subscribe-add', '_bx_orgs_menu_item_title_system_subscribe', '_bx_orgs_menu_item_title_subscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'add\', \'{profile_id}\')', '', 'check', '', 0, 2147483647, 1, 0, 20),
+('bx_organizations_view_actions', 'bx_organizations', 'profile-set-acl-level', '_sys_menu_item_title_system_set_acl_level', '_sys_menu_item_title_set_acl_level', 'javascript:void(0)', 'bx_menu_popup(''sys_set_acl_level'', window, {}, {profile_id: {profile_id}});', '', 'certificate', '', 0, 192, 1, 0, 30),
+('bx_organizations_view_actions', 'bx_organizations', 'profile-actions-more', '_bx_orgs_menu_item_title_system_more_actions', '_bx_orgs_menu_item_title_more_actions', 'javascript:void(0)', 'bx_menu_popup(''bx_organizations_view_actions_more'', this, {}, {profile_id:{profile_id}});', '', 'cog', 'bx_organizations_view_actions_more', 1, 2147483647, 1, 0, 9999);
+
+-- MENU: view actions more
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_view_actions_more', '_bx_orgs_menu_title_view_profile_actions_more', 'bx_organizations_view_actions_more', 'bx_organizations', 6, 0, 1, 'BxOrgsMenuView', 'modules/boonex/organizations/classes/BxOrgsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_organizations_view_actions_more', 'bx_organizations', '_bx_orgs_menu_set_title_view_profile_actions_more', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_organizations_view_actions_more', 'bx_organizations', 'profile-friend-remove', '_bx_orgs_menu_item_title_system_unfriend', '{title_remove_friend}', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_friends\', \'remove\', \'{profile_id}\')', '', 'user-times', '', 2147483647, 1, 0, 10),
+('bx_organizations_view_actions_more', 'bx_organizations', 'profile-subscribe-remove', '_bx_orgs_menu_item_title_system_unsubscribe', '_bx_orgs_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, 1, 0, 20),
+('bx_organizations_view_actions_more', 'bx_organizations', 'edit-organization-cover', '_bx_orgs_menu_item_title_system_edit_cover', '_bx_orgs_menu_item_title_edit_cover', 'page.php?i=edit-organization-cover&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 25),
+('bx_organizations_view_actions_more', 'bx_organizations', 'edit-organization-profile', '_bx_orgs_menu_item_title_system_edit_profile', '_bx_orgs_menu_item_title_edit_profile', 'page.php?i=edit-organization-profile&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 30),
+('bx_organizations_view_actions_more', 'bx_organizations', 'delete-organization-profile', '_bx_orgs_menu_item_title_system_delete_profile', '_bx_orgs_menu_item_title_delete_profile', 'page.php?i=delete-organization-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 40),
+('bx_organizations_view_actions_more', 'bx_organizations', 'delete-organization-account', '_bx_orgs_menu_item_title_system_delete_account', '_bx_orgs_menu_item_title_delete_account', 'page.php?i=account-settings-delete&id={account_id}', '', '', 'remove', '', 128, 1, 0, 50),
+('bx_organizations_view_actions_more', 'bx_organizations', 'delete-organization-account-content', '_bx_orgs_menu_item_title_system_delete_account_content', '_bx_orgs_menu_item_title_delete_account_content', 'page.php?i=account-settings-delete&id={account_id}&content=1', '', '', 'remove', '', 128, 1, 0, 60);
+
+-- MENU: module sub-menu
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_submenu', '_bx_orgs_menu_title_submenu', 'bx_organizations_submenu', 'bx_organizations', 8, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_organizations_submenu', 'bx_organizations', '_bx_orgs_menu_set_title_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_organizations_submenu', 'bx_organizations', 'organizations-home', '_bx_orgs_menu_item_title_system_entries_recent', '_bx_orgs_menu_item_title_entries_recent', 'page.php?i=organizations-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_organizations_submenu', 'bx_organizations', 'organizations-active', '_bx_orgs_menu_item_title_system_entries_active', '_bx_orgs_menu_item_title_entries_active', 'page.php?i=organizations-active', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_organizations_submenu', 'bx_organizations', 'organizations-online', '_bx_orgs_menu_item_title_system_entries_online', '_bx_orgs_menu_item_title_entries_online', 'page.php?i=organizations-online', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_organizations_submenu', 'bx_organizations', 'organizations-search', '_bx_orgs_menu_item_title_system_entries_search', '_bx_orgs_menu_item_title_entries_search', 'page.php?i=organizations-search', '', '', '', '', 2147483647, 1, 1, 4),
+('bx_organizations_submenu', 'bx_organizations', 'organizations-manage', '_bx_orgs_menu_item_title_system_entries_manage', '_bx_orgs_menu_item_title_entries_manage', 'page.php?i=organizations-manage', '', '', '', '', 2147483646, 1, 1, 5);
+
+-- MENU: view submenu
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_view_submenu', '_bx_orgs_menu_title_view_profile_submenu', 'bx_organizations_view_submenu', 'bx_organizations', 8, 0, 1, 'BxOrgsMenuView', 'modules/boonex/organizations/classes/BxOrgsMenuView.php'),
+('bx_organizations_view_submenu_cover', '_bx_orgs_menu_title_view_profile_submenu_cover', 'bx_organizations_view_submenu', 'bx_organizations', 7, 0, 1, 'BxOrgsMenuView', 'modules/boonex/organizations/classes/BxOrgsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_organizations_view_submenu', 'bx_organizations', '_bx_orgs_menu_set_title_view_profile_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_organizations_view_submenu', 'bx_organizations', 'view-organization-profile', '_bx_orgs_menu_item_title_system_view_profile_view', '_bx_orgs_menu_item_title_view_profile_view', 'page.php?i=view-organization-profile&id={content_id}', '', '', 'briefcase col-red2', '', 2147483647, 1, 0, 1),
+('bx_organizations_view_submenu', 'bx_organizations', 'organization-profile-info', '_bx_orgs_menu_item_title_system_view_profile_info', '_bx_orgs_menu_item_title_view_profile_info', 'page.php?i=organization-profile-info&id={content_id}', '', '', 'info-circle col-gray', '', 2147483647, 1, 0, 2),
+('bx_organizations_view_submenu', 'bx_organizations', 'organization-profile-friends', '_bx_orgs_menu_item_title_system_view_profile_friends', '_bx_orgs_menu_item_title_view_profile_friends', 'page.php?i=organization-profile-friends&profile_id={profile_id}', '', '', 'group col-blue3', '', 2147483647, 1, 0, 3),
+('bx_organizations_view_submenu', 'bx_organizations', 'organization-profile-subscriptions', '_bx_orgs_menu_item_title_system_view_profile_subscriptions', '_bx_orgs_menu_item_title_view_profile_subscriptions', 'page.php?i=organization-profile-subscriptions&profile_id={profile_id}', '', '', 'check col-blue3', '', 2147483647, 1, 0, 4),
+('bx_organizations_view_submenu', 'bx_organizations', 'organization-profile-comments', '_bx_orgs_menu_item_title_system_view_profile_comments', '_bx_orgs_menu_item_title_view_profile_comments', 'page.php?i=organization-profile-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 5);
+
+-- MENU: notifications menu in account popup
+
+SET @iNotifMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_account_notifications' AND `active` = 1 AND `order` < 9999 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_account_notifications', 'bx_organizations', 'notifications-friend-requests', '_bx_orgs_menu_item_title_system_friends', '_bx_orgs_menu_item_title_friends', 'page.php?i=organization-profile-friends&profile_id={member_id}', '', '', 'group col-red2', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:31:"get_unconfirmed_connections_num";s:6:"params";a:1:{i:0;s:20:"sys_profiles_friends";}s:5:"class";s:23:"TemplServiceConnections";}', '', 2147483646, 1, 0, IFNULL(@iNotifMenuOrder, 0) + 1);
+
+-- MENU: profile stats
+SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_profile_stats', 'bx_organizations', 'profile-stats-friend-requests', '_bx_orgs_menu_item_title_system_friend_requests', '_bx_orgs_menu_item_title_friend_requests', 'page.php?i=organization-profile-friends&profile_id={member_id}', '', '', 'briefcase col-red2', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:31:"get_unconfirmed_connections_num";s:6:"params";a:1:{i:0;s:20:"sys_profiles_friends";}s:5:"class";s:23:"TemplServiceConnections";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1),
+('sys_profile_stats', 'bx_organizations', 'profile-stats-manage-organizations', '_bx_orgs_menu_item_title_system_manage_my_organizations', '_bx_orgs_menu_item_title_manage_my_organizations', 'page.php?i=organizations-manage', '', '_self', 'briefcase col-red2', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 2),
+('sys_profile_stats', 'bx_organizations', 'profile-stats-favorite-organizations', '_bx_orgs_menu_item_title_system_favorites', '_bx_orgs_menu_item_title_favorites', 'page.php?i=organization-profile-favorites&profile_id={member_id}', '', '', 'star col-red2', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:38:"get_menu_addon_favorites_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 3),
+('sys_profile_stats', 'bx_organizations', 'profile-stats-subscriptions', '_bx_orgs_menu_item_title_system_subscriptions', '_bx_orgs_menu_item_title_subscriptions', 'page.php?i=organization-profile-subscriptions&profile_id={member_id}#subscriptions', '', '_self', 'rss col-red2', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:25:"get_connected_content_num";s:6:"params";a:1:{i:0;s:26:"sys_profiles_subscriptions";}s:5:"class";s:23:"TemplServiceConnections";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 4),
+('sys_profile_stats', 'bx_organizations', 'profile-stats-subscribed-me', '_bx_orgs_menu_item_title_system_subscribed_me', '_bx_orgs_menu_item_title_subscribed_me', 'page.php?i=organization-profile-subscribed-me&profile_id={member_id}#subscribers', '', '_self', 'rss col-red2', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:28:"get_connected_initiators_num";s:6:"params";a:1:{i:0;s:26:"sys_profiles_subscriptions";}s:5:"class";s:23:"TemplServiceConnections";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 5);
+
+-- MENU: manage tools submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_menu_manage_tools', '_bx_orgs_menu_title_manage_tools', 'bx_organizations_menu_manage_tools', 'bx_organizations', 6, 0, 1, 'BxOrgsMenuManageTools', 'modules/boonex/organizations/classes/BxOrgsMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_organizations_menu_manage_tools', 'bx_organizations', '_bx_orgs_menu_set_title_manage_tools', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_organizations_menu_manage_tools', 'bx_organizations', 'delete', '_bx_orgs_menu_item_title_system_delete', '_bx_orgs_menu_item_title_delete', 'javascript:void(0)', 'javascript:{js_object}.onClickDelete({content_id});', '_self', 'trash-o', '', 2147483647, 1, 0, 1),
+('bx_organizations_menu_manage_tools', 'bx_organizations', 'delete-with-content', '_bx_orgs_menu_item_title_system_delete_with_content', '_bx_orgs_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'trash-o', '', 2147483647, 1, 0, 2);
+
+-- MENU: dashboard manage tools
+SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_account_dashboard_manage_tools', 'bx_organizations', 'organizations-administration', '_bx_orgs_menu_item_title_system_admt_organizations', '_bx_orgs_menu_item_title_admt_organizations', 'page.php?i=organizations-administration', '', '_self', '', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_organizations', 'create entry', NULL, '_bx_orgs_acl_action_create_profile', '', 1, 1);
+SET @iIdActionProfileCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_organizations', 'delete entry', NULL, '_bx_orgs_acl_action_delete_profile', '', 1, 1);
+SET @iIdActionProfileDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_organizations', 'view entry', NULL, '_bx_orgs_acl_action_view_profile', '', 1, 0);
+SET @iIdActionProfileView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_organizations', 'edit any entry', NULL, '_bx_orgs_acl_action_edit_any_profile', '', 1, 3);
+SET @iIdActionProfileEditAny = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- profile create
+(@iAccount, @iIdActionProfileCreate),
+(@iStandard, @iIdActionProfileCreate),
+(@iUnconfirmed, @iIdActionProfileCreate),
+(@iPending, @iIdActionProfileCreate),
+(@iModerator, @iIdActionProfileCreate),
+(@iAdministrator, @iIdActionProfileCreate),
+(@iPremium, @iIdActionProfileCreate),
+
+-- profile delete
+(@iAccount, @iIdActionProfileDelete),
+(@iStandard, @iIdActionProfileDelete),
+(@iUnconfirmed, @iIdActionProfileDelete),
+(@iPending, @iIdActionProfileDelete),
+(@iModerator, @iIdActionProfileDelete),
+(@iAdministrator, @iIdActionProfileDelete),
+(@iPremium, @iIdActionProfileDelete),
+
+-- profile view
+(@iUnauthenticated, @iIdActionProfileView),
+(@iAccount, @iIdActionProfileView),
+(@iStandard, @iIdActionProfileView),
+(@iUnconfirmed, @iIdActionProfileView),
+(@iPending, @iIdActionProfileView),
+(@iModerator, @iIdActionProfileView),
+(@iAdministrator, @iIdActionProfileView),
+(@iPremium, @iIdActionProfileView),
+
+-- any profile edit
+(@iModerator, @iIdActionProfileEditAny),
+(@iAdministrator, @iIdActionProfileEditAny);
+
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_organizations', 'bx_organizations', 'bx_organizations_cmts', 1, 5000, 1000, 1, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-organization-profile&id={object_id}', '', 'bx_organizations_data', 'id', 'author', 'org_name', 'comments', '', '');
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_organizations', 'bx_organizations_views_track', '86400', '1', 'bx_organizations_data', 'id', 'author', 'views', '', '');
+
+-- FAFORITES
+INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_organizations', 'bx_organizations_favorites_track', '1', '1', '0', 'page.php?i=view-organization-profile&id={object_id}', 'bx_organizations_data', 'id', 'author', 'favorites', 'BxOrgsFavorite', 'modules/boonex/organizations/classes/BxOrgsFavorite.php');
+
+-- FEATURED
+INSERT INTO `sys_objects_feature` (`name`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES 
+('bx_organizations', '1', '1', 'page.php?i=view-organization-profile&id={object_id}', 'bx_organizations_data', 'id', 'author', 'featured', '', '');
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_organizations', 'bx_organizations_reports', 'bx_organizations_reports_track', '1', 'page.php?i=view-organization-profile&id={object_id}', 'bx_organizations_data', 'id', 'author', 'reports', 'BxOrgsReport', 'modules/boonex/organizations/classes/BxOrgsReport.php');
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_organizations', 'bx_organizations_meta_keywords', 'bx_organizations_meta_locations', '', '', '');
+
+-- CATEGORY
+INSERT INTO `sys_objects_category` (`object`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
+('bx_organizations_cats', 'bx_organizations', 'bx_organization', 'bx_organizations_cats', 'bx_organizations_data', 'org_cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`content_id` = `bx_organizations_data`.`id` AND `sys_profiles`.`type` = ''bx_organizations'')', 'AND `sys_profiles`.`status` = ''active''', '', '');
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_organizations', '_bx_orgs', @iSearchOrder + 1, 'BxOrgsSearchResult', 'modules/boonex/organizations/classes/BxOrgsSearchResult.php');
+
+-- STATS
+SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
+INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
+('bx_organizations', 'bx_organizations', '_bx_orgs', 'page.php?i=organizations-home', 'briefcase col-red2', 'SELECT COUNT(*) FROM `bx_organizations_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_organizations'' WHERE 1 AND `tp`.`status`=''active''', @iMaxOrderStats + 1);
+
+-- CHARTS
+SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
+INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
+('bx_organizations_growth', '_bx_orgs_chart_growth', 'bx_organizations_data', 'added', '', '', 'SELECT {field_date_formatted} AS `period`, COUNT(*) AS {object} FROM {table} LEFT JOIN `sys_profiles` AS `tp` ON {table}.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_organizations'' WHERE 1 AND `tp`.`status`=''active'' {where_inteval} GROUP BY `period` ORDER BY {table}.{field_date} ASC', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_organizations_growth_speed', '_bx_orgs_chart_growth_speed', 'bx_organizations_data', 'added', '', '', 'SELECT {field_date_formatted} AS `period`, COUNT(*) AS {object} FROM {table} LEFT JOIN `sys_profiles` AS `tp` ON {table}.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_organizations'' WHERE 1 AND `tp`.`status`=''active'' {where_inteval} GROUP BY `period` ORDER BY {table}.{field_date} ASC', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
+
+-- GRIDS: administration
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
+('bx_organizations_administration', 'Sql', 'SELECT `td`.*, `td`.`org_name` AS `fullname`, `ta`.`email` AS `account`, `ta`.`logged` AS `last_online`, `tp`.`status` AS `status` FROM `bx_organizations_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_organizations'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_organizations_data', 'id', 'last_online', 'status', '', 20, NULL, 'start', '', 'org_name', '', 'like', '', '', 192, 'BxOrgsGridAdministration', 'modules/boonex/organizations/classes/BxOrgsGridAdministration.php'),
+('bx_organizations_common', 'Sql', 'SELECT `td`.*, `td`.`org_name` AS `fullname`, `ta`.`email` AS `account`, `ta`.`logged` AS `last_online`, `tp`.`status` AS `status` FROM `bx_organizations_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_organizations'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_organizations_data', 'id', 'last_online', 'status', '', 20, NULL, 'start', '', 'org_name', '', 'like', '', '', 2147483647, 'BxOrgsGridCommon', 'modules/boonex/organizations/classes/BxOrgsGridCommon.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_organizations_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_organizations_administration', 'switcher', '_bx_orgs_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_organizations_administration', 'fullname', '_bx_orgs_grid_column_title_adm_fullname', '25%', 0, '', '', 3),
+('bx_organizations_administration', 'last_online', '_bx_orgs_grid_column_title_adm_last_online', '20%', 1, '25', '', 4),
+('bx_organizations_administration', 'account', '_bx_orgs_grid_column_title_adm_account', '25%', 0, '25', '', 5),
+('bx_organizations_administration', 'actions', '', '20%', 0, '', '', 6),
+('bx_organizations_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_organizations_common', 'fullname', '_bx_orgs_grid_column_title_adm_fullname', '48%', 0, '', '', 2),
+('bx_organizations_common', 'last_online', '_bx_orgs_grid_column_title_adm_last_online', '30%', 1, '25', '', 3),
+('bx_organizations_common', 'actions', '', '20%', 0, '', '', 4);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_organizations_administration', 'bulk', 'set_acl_level', '_bx_orgs_grid_action_title_adm_set_acl_level', '', 0, 0, 1),
+('bx_organizations_administration', 'bulk', 'delete', '_bx_orgs_grid_action_title_adm_delete', '', 0, 1, 2),
+('bx_organizations_administration', 'bulk', 'delete_with_content', '_bx_orgs_grid_action_title_adm_delete_with_content', '', 0, 1, 3),
+('bx_organizations_administration', 'single', 'set_acl_level', '_bx_orgs_grid_action_title_adm_set_acl_level', 'certificate', 1, 0, 1),
+('bx_organizations_administration', 'single', 'settings', '_bx_orgs_grid_action_title_adm_more_actions', 'cog', 1, 0, 2),
+('bx_organizations_common', 'bulk', 'delete', '_bx_orgs_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_organizations_common', 'bulk', 'delete_with_content', '_bx_orgs_grid_action_title_adm_delete_with_content', '', 0, 1, 2),
+('bx_organizations_common', 'single', 'settings', '_bx_orgs_grid_action_title_adm_more_actions', 'cog', 1, 0, 1);
+
+-- LIVE UPDATES
+INSERT INTO `sys_objects_live_updates`(`name`, `frequency`, `service_call`, `active`) VALUES
+('bx_organizations_friend_requests', 1, 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:40:"get_live_updates_unconfirmed_connections";s:6:"params";a:5:{i:0;s:16:"bx_organizations";i:1;s:20:"sys_profiles_friends";i:2;a:2:{s:11:"menu_object";s:18:"sys_toolbar_member";s:9:"menu_item";s:7:"account";}i:3;a:2:{s:11:"menu_object";s:25:"sys_account_notifications";s:9:"menu_item";s:29:"notifications-friend-requests";}i:4;s:7:"{count}";}s:5:"class";s:23:"TemplServiceConnections";}', 1);
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_organizations', 'BxOrgsAlertsResponse', 'modules/boonex/organizations/classes/BxOrgsAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('sys_profiles_friends', 'connection_added', @iHandler),
+('bx_timeline', 'post_common', @iHandler),
+('bx_organizations_pics', 'file_deleted', @iHandler),
+('bx_organizations', 'timeline_view', @iHandler),
+('bx_organizations', 'timeline_post', @iHandler),
+('bx_organizations', 'timeline_delete', @iHandler),
+('bx_organizations', 'timeline_comment', @iHandler),
+('bx_organizations', 'timeline_vote', @iHandler),
+('bx_organizations', 'timeline_report', @iHandler),
+('bx_organizations', 'timeline_repost', @iHandler);
+
+-- PRIVACY 
+
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_organizations_allow_view_to', 'bx_organizations', 'view', '_bx_orgs_form_profile_input_allow_view_to', '3', 'bx_organizations_data', 'id', 'author', 'BxOrgsPrivacy', 'modules/boonex/organizations/classes/BxOrgsPrivacy.php');
+
+-- EMAIL TEMPLATES
+INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES
+('bx_organizations', '_bx_organizations_email_friend_request', 'bx_organizations_friend_request', '_bx_organizations_email_friend_request_subject', '_bx_organizations_email_friend_request_body');
+
+-- UPLOADERS
+INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
+('bx_organizations_cover_crop', 1, 'BxOrgsUploaderCoverCrop', 'modules/boonex/organizations/classes/BxOrgsUploaderCoverCrop.php'),
+('bx_organizations_picture_crop', 1, 'BxOrgsUploaderPictureCrop', 'modules/boonex/organizations/classes/BxOrgsUploaderPictureCrop.php');

+ 293 - 0
modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/sql/install.sql

@@ -0,0 +1,293 @@
+
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+-- TABLE: PROFILES
+CREATE TABLE IF NOT EXISTS `bx_organizations_data` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL,
+  `added` int(11) NOT NULL,
+  `changed` int(11) NOT NULL,
+  `picture` int(11) NOT NULL,
+  `cover` int(11) NOT NULL,
+  `org_name` varchar(255) NOT NULL,
+  `org_cat` int(11) NOT NULL,
+  `org_desc` text NOT NULL,
+  `views` int(11) NOT NULL default '0',
+  `favorites` int(11) NOT NULL default '0',
+  `comments` int(11) NOT NULL default '0',
+  `reports` int(11) NOT NULL default '0',
+  `featured` int(11) NOT NULL default '0',
+  `allow_view_to` int(11) NOT NULL DEFAULT '3',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `search_fields` (`org_name`,`org_desc`)
+);
+
+-- TABLE: STORAGES & TRANSCODERS
+CREATE TABLE IF NOT EXISTS `bx_organizations_pics` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_organizations_pics_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+-- TABLE: comments
+CREATE TABLE IF NOT EXISTS `bx_organizations_cmts` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: VIEWS
+CREATE TABLE IF NOT EXISTS `bx_organizations_views_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: favorites
+CREATE TABLE IF NOT EXISTS `bx_organizations_favorites_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`author_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_organizations_reports` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_organizations_reports_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: metas
+CREATE TABLE IF NOT EXISTS `bx_organizations_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_organizations_meta_locations` (
+  `object_id` int(10) unsigned NOT NULL,
+  `lat` double NOT NULL,
+  `lng` double NOT NULL,
+  `country` varchar(2) NOT NULL,
+  `state` varchar(255) NOT NULL,
+  `city` varchar(255) NOT NULL,
+  `zip` varchar(255) NOT NULL,
+  `street` varchar(255) NOT NULL,
+  `street_number` varchar(255) NOT NULL,
+  PRIMARY KEY (`object_id`),
+  KEY `country_state_city` (`country`,`state`(8),`city`(8))
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- STORAGES & TRANSCODERS
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_organizations_pics', @sStorageEngine, '', 360, 2592000, 3, 'bx_organizations_pics', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_organizations_pics_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_organizations_pics_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
+('bx_organizations_icon', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0'),
+('bx_organizations_thumb', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0'),
+('bx_organizations_avatar', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0'),
+('bx_organizations_picture', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0'),
+('bx_organizations_cover', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0'),
+('bx_organizations_cover_thumb', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0'),
+('bx_organizations_gallery', 'bx_organizations_pics_resized', 'Storage', 'a:1:{s:6:"object";s:21:"bx_organizations_pics";}', 'no', '1', '2592000', '0');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_organizations_icon', 'Resize', 'a:3:{s:1:"w";s:2:"32";s:1:"h";s:2:"32";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_organizations_thumb', 'Resize', 'a:3:{s:1:"w";s:2:"48";s:1:"h";s:2:"48";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_organizations_avatar', 'Resize', 'a:3:{s:1:"w";s:2:"96";s:1:"h";s:2:"96";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_organizations_picture', 'Resize', 'a:3:{s:1:"w";s:4:"1024";s:1:"h";s:4:"1024";s:13:"square_resize";s:1:"0";}', '0'),
+('bx_organizations_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
+('bx_organizations_cover_thumb', 'Resize', 'a:3:{s:1:"w";s:2:"48";s:1:"h";s:2:"48";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_organizations_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
+
+-- FORMS
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organization', 'bx_organizations', '_bx_orgs_form_profile', '', 'a:1:{s:7:\"enctype\";s:19:\"multipart/form-data\";}', 'bx_organizations_data', 'id', '', '', 'do_submit', '', 0, 1, 'BxOrgsFormEntry', 'modules/boonex/organizations/classes/BxOrgsFormEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_organization', 'bx_organization_add', 'bx_organizations', 0, '_bx_orgs_form_profile_display_add'),
+('bx_organization', 'bx_organization_delete', 'bx_organizations', 0, '_bx_orgs_form_profile_display_delete'),
+('bx_organization', 'bx_organization_edit', 'bx_organizations', 0, '_bx_orgs_form_profile_display_edit'),
+('bx_organization', 'bx_organization_edit_cover', 'bx_organizations', 0, '_bx_orgs_form_profile_display_edit_cover'),
+('bx_organization', 'bx_organization_view', 'bx_organizations', 1, '_bx_orgs_form_profile_display_view'),
+('bx_organization', 'bx_organization_view_full', 'bx_organizations', 1, '_bx_orgs_form_profile_display_view_full');
+
+INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_organization', 'bx_organizations', 'allow_view_to', 3, '', 0, 'custom', '_bx_orgs_form_profile_input_sys_allow_view_to', '_bx_orgs_form_profile_input_allow_view_to', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_organization', 'bx_organizations', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_orgs_form_profile_input_sys_delete_confirm', '_bx_orgs_form_profile_input_delete_confirm', '_bx_orgs_form_profile_input_delete_confirm_info', 1, 0, 0, '', '', '', 'avail', '', '_bx_orgs_form_profile_input_delete_confirm_error', '', '', 1, 0),
+('bx_organization', 'bx_organizations', 'do_submit', '_sys_form_account_input_submit', '', 0, 'submit', '_bx_orgs_form_profile_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_organization', 'bx_organizations', 'org_desc', '', '', 0, 'textarea', '_bx_orgs_form_profile_input_sys_org_desc', '_bx_orgs_form_profile_input_org_desc', '', 0, 0, 0, '', '', '', '', '', '', 'XssMultiline', '', 1, 1),
+('bx_organization', 'bx_organizations', 'org_cat', '', '#!bx_organizations_cats', 0, 'select', '_bx_orgs_form_profile_input_sys_org_cat', '_bx_orgs_form_profile_input_org_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_orgs_form_profile_input_org_cat_err', 'Xss', '', 1, 1),
+('bx_organization', 'bx_organizations', 'org_name', '', '', 0, 'text', '_bx_orgs_form_profile_input_sys_org_name', '_bx_orgs_form_profile_input_org_name', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_orgs_form_profile_input_org_name_err', 'Xss', '', 1, 0),
+('bx_organization', 'bx_organizations', 'cover', 'a:1:{i:0;s:27:"bx_organizations_cover_crop";}', 'a:1:{s:27:"bx_organizations_cover_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_orgs_form_profile_input_sys_cover', '_bx_orgs_form_profile_input_cover', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_organization', 'bx_organizations', 'picture', 'a:1:{i:0;s:29:"bx_organizations_picture_crop";}', 'a:1:{s:29:"bx_organizations_picture_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_orgs_form_profile_input_sys_picture', '_bx_orgs_form_profile_input_picture', '', 0, 0, 0, '', '', '', '', '', '_bx_orgs_form_profile_input_picture_err', '', '', 1, 0),
+('bx_organization', 'bx_organizations', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_organization', 'bx_organizations', 'profile_email', '', '', 0, 'text', '_bx_orgs_form_profile_input_sys_profile_email', '_bx_orgs_form_profile_input_profile_email', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_organization', 'bx_organizations', 'profile_status', '', '', 0, 'custom', '_bx_orgs_form_profile_input_sys_profile_status', '_bx_orgs_form_profile_input_profile_status', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0);
+
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_organization_add', 'picture', 2147483647, 1, 1),
+('bx_organization_add', 'org_name', 2147483647, 1, 2),
+('bx_organization_add', 'org_cat', 2147483647, 1, 3),
+('bx_organization_add', 'org_desc', 2147483647, 1, 4),
+('bx_organization_add', 'location', 2147483647, 1, 5),
+('bx_organization_add', 'allow_view_to', 2147483647, 1, 6),
+('bx_organization_add', 'do_submit', 2147483647, 1, 7),
+
+('bx_organization_delete', 'picture', 2147483647, 0, 0),
+('bx_organization_delete', 'delete_confirm', 2147483647, 1, 0),
+('bx_organization_delete', 'cover', 2147483647, 0, 0),
+('bx_organization_delete', 'do_submit', 2147483647, 1, 1),
+('bx_organization_delete', 'org_name', 2147483647, 0, 2),
+('bx_organization_delete', 'org_cat', 2147483647, 0, 3),
+
+('bx_organization_edit', 'picture', 2147483647, 1, 1),
+('bx_organization_edit', 'org_name', 2147483647, 1, 2),
+('bx_organization_edit', 'org_cat', 2147483647, 1, 3),
+('bx_organization_edit', 'org_desc', 2147483647, 1, 4),
+('bx_organization_edit', 'location', 2147483647, 1, 5),
+('bx_organization_edit', 'allow_view_to', 2147483647, 1, 6),
+('bx_organization_edit', 'do_submit', 2147483647, 1, 7),
+
+('bx_organization_edit_cover', 'delete_confirm', 2147483647, 0, 1),
+('bx_organization_edit_cover', 'org_name', 2147483647, 0, 2),
+('bx_organization_edit_cover', 'picture', 2147483647, 0, 3),
+('bx_organization_edit_cover', 'org_cat', 2147483647, 0, 5),
+('bx_organization_edit_cover', 'cover', 2147483647, 1, 7),
+('bx_organization_edit_cover', 'do_submit', 2147483647, 1, 8),
+
+('bx_organization_view', 'org_name', 2147483647, 1, 1),
+('bx_organization_view', 'org_cat', 2147483647, 1, 2),
+('bx_organization_view', 'profile_email', 192, 1, 3),
+('bx_organization_view', 'profile_status', 192, 1, 4),
+
+('bx_organization_view_full', 'org_name', 2147483647, 1, 1),
+('bx_organization_view_full', 'org_cat', 2147483647, 1, 2),
+('bx_organization_view_full', 'org_desc', 2147483647, 1, 3),
+('bx_organization_view_full', 'profile_email', 192, 1, 4),
+('bx_organization_view_full', 'profile_status', 192, 1, 5);
+
+-- PRE-VALUES
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
+('bx_organizations_cats', '_bx_orgs_pre_lists_cats', 'bx_organizations', '0');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
+('bx_organizations_cats', '', 0, '_sys_please_select', ''),
+('bx_organizations_cats', '1', 1, '_bx_orgs_cat_Agriculture', ''),
+('bx_organizations_cats', '2', 2, '_bx_orgs_cat_Financial', ''),
+('bx_organizations_cats', '3', 3, '_bx_orgs_cat_Biotech', ''),
+('bx_organizations_cats', '4', 4, '_bx_orgs_cat_Cause', ''),
+('bx_organizations_cats', '5', 5, '_bx_orgs_cat_Chemical', ''),
+('bx_organizations_cats', '6', 6, '_bx_orgs_cat_Religious', ''),
+('bx_organizations_cats', '7', 7, '_bx_orgs_cat_Community', ''),
+('bx_organizations_cats', '8', 8, '_bx_orgs_cat_Company', ''),
+('bx_organizations_cats', '9', 9, '_bx_orgs_cat_Entertainment', ''),
+('bx_organizations_cats', '10', 10, '_bx_orgs_cat_Technology', ''),
+('bx_organizations_cats', '11', 11, '_bx_orgs_cat_Consulting', ''),
+('bx_organizations_cats', '12', 12, '_bx_orgs_cat_Education', ''),
+('bx_organizations_cats', '13', 13, '_bx_orgs_cat_Energy', ''),
+('bx_organizations_cats', '14', 14, '_bx_orgs_cat_Engineering', ''),
+('bx_organizations_cats', '15', 15, '_bx_orgs_cat_Food', ''),
+('bx_organizations_cats', '16', 16, '_bx_orgs_cat_Government', ''),
+('bx_organizations_cats', '17', 17, '_bx_orgs_cat_Health', ''),
+('bx_organizations_cats', '18', 18, '_bx_orgs_cat_Medical', ''),
+('bx_organizations_cats', '19', 19, '_bx_orgs_cat_Industrial', ''),
+('bx_organizations_cats', '20', 20, '_bx_orgs_cat_Insurance', ''),
+('bx_organizations_cats', '21', 21, '_bx_orgs_cat_Internet', ''),
+('bx_organizations_cats', '22', 22, '_bx_orgs_cat_Software', ''),
+('bx_organizations_cats', '23', 23, '_bx_orgs_cat_Legal', ''),
+('bx_organizations_cats', '24', 24, '_bx_orgs_cat_Media', ''),
+('bx_organizations_cats', '25', 25, '_bx_orgs_cat_School', ''),
+('bx_organizations_cats', '26', 26, '_bx_orgs_cat_NGO', ''),
+('bx_organizations_cats', '27', 27, '_bx_orgs_cat_NPO', ''),
+('bx_organizations_cats', '28', 28, '_bx_orgs_cat_Political', ''),
+('bx_organizations_cats', '29', 29, '_bx_orgs_cat_Retail', ''),
+('bx_organizations_cats', '30', 30, '_bx_orgs_cat_Small_Business', ''),
+('bx_organizations_cats', '31', 31, '_bx_orgs_cat_Telecommunication', ''),
+('bx_organizations_cats', '32', 32, '_bx_orgs_cat_Transport', ''),
+('bx_organizations_cats', '33', 33, '_bx_orgs_cat_Travel', ''),
+('bx_organizations_cats', '34', 34, '_bx_orgs_cat_University', ''),
+('bx_organizations_cats', '35', 35, '_bx_orgs_cat_Other', '');
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_organizations', '_bx_orgs', 'bx_organizations', 'added', 'edited', 'deleted', '', ''),
+('bx_organizations_cmts', '_bx_orgs_cmts', 'bx_organizations', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
+('bx_organizations', 'bx_organizations_administration', 'td`.`id', '', ''),
+('bx_organizations', 'bx_organizations_common', 'td`.`id', '', '');
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_organizations', 'bx_organizations', 'bx_organizations', '_bx_orgs_search_extended', 1, '', ''),
+('bx_organizations_cmts', 'bx_organizations_cmts', 'bx_organizations', '_bx_orgs_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+-- STUDIO PAGE & WIDGET
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_organizations', '_bx_orgs', '_bx_orgs', 'bx_organizations@modules/boonex/organizations/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_organizations', '{url_studio}module.php?name=bx_organizations', '', 'bx_organizations@modules/boonex/organizations/|std-icon.svg', '_bx_orgs', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));
+

+ 38 - 0
modules/boonex/organizations/updates/9.0.4_9.0.5/source/install/sql/uninstall.sql

@@ -0,0 +1,38 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_organizations_data`, `bx_organizations_pics`, `bx_organizations_pics_resized`, `bx_organizations_cmts`, `bx_organizations_views_track`, `bx_organizations_favorites_track`, `bx_organizations_reports`, `bx_organizations_reports_track`, `bx_organizations_meta_keywords`, `bx_organizations_meta_locations`;
+
+-- PROFILES
+DELETE FROM sys_profiles WHERE `type` = 'bx_organizations';
+
+-- STORAGES & TRANSCODERS
+DELETE FROM `sys_objects_storage` WHERE `object` IN('bx_organizations_pics', 'bx_organizations_pics_resized');
+DELETE FROM `sys_storage_tokens` WHERE `object` IN('bx_organizations_pics', 'bx_organizations_pics_resized');
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_organizations_icon', 'bx_organizations_thumb', 'bx_organizations_avatar', 'bx_organizations_picture', 'bx_organizations_cover', 'bx_organizations_cover_thumb', 'bx_organizations_gallery');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_organizations_icon', 'bx_organizations_thumb', 'bx_organizations_avatar', 'bx_organizations_picture', 'bx_organizations_cover', 'bx_organizations_cover_thumb', 'bx_organizations_gallery');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_organizations_icon', 'bx_organizations_thumb', 'bx_organizations_avatar', 'bx_organizations_picture', 'bx_organizations_cover', 'bx_organizations_cover_thumb', 'bx_organizations_gallery');
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_organizations';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_organizations';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_organizations';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN('bx_organization_add', 'bx_organization_delete', 'bx_organization_edit', 'bx_organization_edit_cover', 'bx_organization_view', 'bx_organization_view_full');
+
+-- PRE-VALUES
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_organizations';
+
+DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_organizations_cats');
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_organizations', 'bx_organizations_cmts');
+
+DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_organizations');
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_organizations';
+
+-- STUDIO PAGE & WIDGET
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_organizations';

+ 1 - 0
modules/boonex/organizations/updates/9.0.4_9.0.5/source/template/unit_wo_info.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/unit_wo_info.html />

+ 1 - 0
modules/boonex/organizations/updates/9.0.4_9.0.5/source/template/unit_wo_links.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/unit_wo_links.html />

+ 154 - 0
modules/boonex/payment/updates/9.0.4_9.0.5/source/classes/BxPaymentGridCart.php

@@ -0,0 +1,154 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Payment Payment
+ * @ingroup     UnaModules
+ * 
+ * @{
+ */
+
+
+class BxPaymentGridCart extends BxBaseModPaymentGridCarts
+{
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+    	$this->MODULE = 'bx_payment';
+
+        parent::__construct ($aOptions, $oTemplate);
+
+        $this->_bSelectAll = true;
+    }
+
+    public function performActionCheckout()
+    {
+    	$aParams = array(
+			'seller_id' => bx_process_input(bx_get('seller_id'), BX_DATA_INT), 
+			'provider' => bx_process_input(bx_get('provider')), 
+			'items' => bx_process_input(bx_get('ids'))    		
+    	);
+    	if(empty($aParams['seller_id']) || empty($aParams['provider']))
+    		return echoJson(array());
+
+        if(empty($aParams['items']) || !is_array($aParams['items'])) 
+        	return echoJson(array('msg' => _t('_bx_payment_err_nothing_selected')));
+
+		$oProvider = $this->_oModule->getObjectProvider($aParams['provider'], $aParams['seller_id']);
+		if($oProvider !== false && method_exists($oProvider, 'getCheckoutParamsSingle'))
+			$aParams = $oProvider->getCheckoutParamsSingle($aParams, $this);
+
+		$sLink = $this->_oModule->_oConfig->getUrl('URL_CART_CHECKOUT');
+		$sLink = $sLink . (strpos($sLink, '?') === false ? '?' : '&') . http_build_query($aParams);
+
+		echoJson(array(
+			'eval' => $this->_oModule->_oConfig->getJsObject('cart') . '.onCartCheckout(oData);', 
+			'link' => $sLink
+		));
+    }
+
+    protected function _getCellTitle($mixedValue, $sKey, $aField, $aRow)
+    {
+    	return parent::_getCellDefault($this->_oModule->_oTemplate->displayLink('link', array(
+    		'href' => $aRow['url'],
+    		'title' => $aRow['title'],
+    		'content' => $aRow['title']
+    	)), $sKey, $aField, $aRow);
+    }
+
+	protected function _getCellPriceSingle($mixedValue, $sKey, $aField, $aRow)
+    {
+        return parent::_getCellDefault($this->_sCurrencySign . $mixedValue, $sKey, $aField, $aRow);
+    }
+
+    protected function _getActionCheckout ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
+    {
+        return '';
+    }
+
+    protected function _getActions ($sType, $sActionData = false, $isSmall = false, $isDisabled = false, $isPermanentState = false, $aRow = array())
+    {
+    	$CNF = &$this->_oModule->_oConfig->CNF;
+
+    	$sActions = '';
+    	if($sType == 'bulk' && !empty($this->_aQueryAppend['seller_id'])) {
+    		$sActionName = 'checkout';
+
+    		$iClientId = (int)$this->_aQueryAppend['client_id'];
+            $iSellerId = (int)$this->_aQueryAppend['seller_id'];
+
+            $oCart = $this->_oModule->getObjectCart();
+    		$aProviders = $this->_oModule->_oDb->getVendorInfoProvidersSingle($iSellerId);
+    		foreach($aProviders as $aProvider) {
+				$sAction = $this->_getActionDefault($sType, $sActionName, array(
+					'title'=> _t('_bx_payment_grid_action_title_crt_checkout', _t($CNF['T']['TXT_CART_PROVIDER'] . $aProvider['name'])),
+	    			'icon' => '',
+					'icon_only' => 0,
+	    			'confirm' => 0,
+					'attr' => array(
+						'bx_grid_action_' . $sType => $sActionName,
+						'bx_grid_action_append' => json_encode(array('provider' => $aProvider['name'])),
+						'bx_grid_action_confirm' => 0,
+						'bx_grid_action_reset_paginate' => 0,
+					)
+				), $isSmall, $isDisabled, $aRow);
+
+    			$oProvider = $this->_oModule->getObjectProvider($aProvider['name'], $iSellerId);
+    			if($oProvider !== false && method_exists($oProvider, 'getButtonSingle')) {
+    			    $aParams = array(
+    					'sObjNameGrid' => $this->getObject()
+    				);
+
+    			    $aCartInfo = $oCart->getInfo(BX_PAYMENT_TYPE_SINGLE, $iClientId, $iSellerId);
+    			    if(!empty($aCartInfo['items_price']) && !empty($aCartInfo['items']) && is_array($aCartInfo['items'])) {
+    			        $aTitles = array();
+    			        foreach ($aCartInfo['items'] as $aItem)
+    			            $aTitles[] = $aItem['title'];
+    
+    			        $aParams = array_merge($aParams, array(
+    			            'iAmount' => (int)round(100 * (float)$aCartInfo['items_price']),
+    			        	'sItemTitle' => implode(', ', $aTitles)
+    			        ));
+    			    }
+
+    				$sAction = $oProvider->getButtonSingle($iClientId, $iSellerId, $aParams);
+    			}
+
+    			$sActions .= $sAction;
+    		}
+    	}
+
+    	return $sActions . parent::_getActions ($sType, $sActionData, $isSmall, $isDisabled, $isPermanentState, $aRow);
+    }
+
+	protected function _getDataArray($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
+    {
+		if(empty($this->_aQueryAppend['client_id']) || empty($this->_aQueryAppend['seller_id']))
+			return array();
+
+		$aCart = $this->_oCart->getInfo(BX_PAYMENT_TYPE_SINGLE, $this->_aQueryAppend['client_id'], $this->_aQueryAppend['seller_id']);
+		if(empty($aCart) || empty($aCart['items']) || !is_array($aCart['items']))
+			return array();
+
+        $this->_aOptions['source'] = array();
+		foreach($aCart['items'] as $aCartItem) {
+			$aCartItem['descriptor'] = $this->_oModule->_oConfig->descriptorA2S(array($aCart['vendor_id'], $aCartItem['module_id'], $aCartItem['id'], $aCartItem['quantity']));
+			$aCartItem['description'] = strip_tags($aCartItem['description']);
+
+			$this->_aOptions['source'][] = $aCartItem;
+		}
+
+        return parent::_getDataArray($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
+    }
+
+    protected function _delete($mixedId)
+    {
+    	list($iVendorId, $iModuleId, $iItemId) = $this->_oModule->_oConfig->descriptorS2A($mixedId);
+    	if((int)$iVendorId != (int)$this->_aQueryAppend['seller_id'])
+    		return false;
+
+    	return $this->_oCart->serviceDeleteFromCart($iVendorId, $iModuleId, $iItemId);
+    }
+}
+
+/** @} */

+ 710 - 0
modules/boonex/payment/updates/9.0.4_9.0.5/source/classes/BxPaymentModule.php

@@ -0,0 +1,710 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Payment Payment
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+define('BX_PAYMENT_ORDERS_TYPE_PENDING', 'pending');
+define('BX_PAYMENT_ORDERS_TYPE_PROCESSED', 'processed');
+define('BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION', 'subscription');
+define('BX_PAYMENT_ORDERS_TYPE_HISTORY', 'history');
+
+define('BX_PAYMENT_EMPTY_ID', 0);
+
+define('BX_PAYMENT_RESULT_SUCCESS', 0);
+
+/**
+ * Payment module by BoonEx
+ *
+ * This module is needed to work with payment providers and organize the process
+ * of some item purchasing. Shopping Cart and Orders Manager are included.
+ *
+ * Integration notes:
+ * To integrate your module with this one, you need:
+ * 1. Get 'Add To Cart' button using serviceGetAddToCartLink service.
+ * 2. Add info about your module in the 'bx_pmt_modules' table.
+ * 3. Realize the following service methods in your Module class.
+ *   a. serviceGetItems($iSellerId) - Is used in Orders Administration to get all products of the requested seller(vendor).
+ *   b. serviceGetCartItem($iClientId, $iItemId) - Is used in Shopping Cart to get one product by specified id.
+ *   c. serviceRegisterCartItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrderId) - Register purchased product.
+ *   d. serviceUnregisterCartItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrderId) - Unregister the product purchased earlier.
+ * @see You may see an example of integration in Membership module.
+ *
+ *
+ * Profile's Wall:
+ * no spy events
+ *
+ *
+ *
+ * Spy:
+ * no spy events
+ *
+ *
+ *
+ * Memberships/ACL:
+ * Doesn't depend on user's membership.
+ *
+ *
+ *
+ * Service methods:
+ *
+ * Is used to get "Add to cart" link for some item(s) in your module.
+ * @see BxPmtModule::serviceGetAddToCartLink
+ * BxDolService::call('payment', 'get_add_to_cart_link', array($iSellerId, $mixedModuleId, $iItemId, $iItemCount));
+ *
+ * Check transaction(s) in database which satisty all conditions.
+ * @see BxPmtModule::serviceGetOrdersInfo
+ * BxDolService::call('payment', 'get_orders_info', array($aConditions), 'Orders');
+ *
+ * Get total count of items in Shopping Cart.
+ * @see BxPmtModule::serviceGetCartItemsCount
+ * BxDolService::call('payment', 'get_cart_items_count', array($iUserId, $iOldCount));
+ * @note is needed for internal usage(integration with member tool bar).
+ *
+ * Get Shopping cart content.
+ * @see BxPmtModule::serviceGetCartItems
+ * BxDolService::call('payment', 'get_cart_items');
+ * @note is needed for internal usage(integration with member tool bar).
+ *
+ *
+ * Alerts:
+ * no alerts available
+ *
+ */
+class BxPaymentModule extends BxBaseModPaymentModule
+{
+    protected $_iUserId;
+
+    protected $_aOrderTypes;
+
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $this->_iUserId = $this->getProfileId();
+
+        $this->_aOrderTypes = array(
+        	BX_PAYMENT_ORDERS_TYPE_PENDING, 
+        	BX_PAYMENT_ORDERS_TYPE_PROCESSED, 
+        	BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION, 
+        	BX_PAYMENT_ORDERS_TYPE_HISTORY
+        );
+    }
+
+    /**
+     * Manage Orders Methods
+     */
+	public function actionGetClients()
+    {
+        $sTerm = bx_get('term');
+
+        $aResult = BxDolService::call('system', 'profiles_search', array($sTerm), 'TemplServiceProfiles');
+
+        echoJson($aResult);
+    }
+
+    public function actionGetItems($sType, $iModuleId)
+    {
+    	$iSellerId = $this->getProfileId();
+        $aItems = $this->callGetCartItems((int)$iModuleId, array($iSellerId));
+
+		echoJson(array(
+			'code' => 0, 
+			'data' => $this->_oTemplate->displayItems($sType, $aItems)
+		));
+    }
+
+
+    /**
+     * Payment Details Methods
+     */
+    public function serviceIsAcceptingPayments($iVendorId, $sPaymentType = '')
+    {
+    	$bResult = false;
+
+    	switch($sPaymentType) {
+    		case BX_PAYMENT_TYPE_SINGLE:
+    			$aProvidersCart = $this->_oDb->getVendorInfoProvidersSingle($iVendorId);
+    			$bResult = !empty($aProvidersCart);
+    			break;
+
+    		case BX_PAYMENT_TYPE_RECURRING:
+    			$aProvidersSubscription = $this->_oDb->getVendorInfoProvidersRecurring($iVendorId);
+    			$bResult = !empty($aProvidersSubscription);
+    			break;
+
+    		default:
+    			$aProviders = $this->_oDb->getVendorInfoProviders($iVendorId);
+    			$bResult = !empty($aProviders);
+    	}
+
+		return $bResult;
+    }
+
+    public function serviceIsPaymentProvider($iVendorId, $sVendorProvider, $sPaymentType = '')
+    {
+    	$aProvider = $this->serviceGetPaymentProvider($iVendorId, $sVendorProvider, $sPaymentType);
+    	return $aProvider !== false;
+    }
+
+    public function serviceGetPaymentProvider($iVendorId, $sVendorProvider, $sPaymentType = '')
+    {
+    	$aProviders = array();
+    	switch($sPaymentType) {
+    		case BX_PAYMENT_TYPE_SINGLE:
+    			$aProviders = $this->_oDb->getVendorInfoProvidersSingle($iVendorId);
+    			break;
+
+    		case BX_PAYMENT_TYPE_RECURRING:
+    			$aProviders = $this->_oDb->getVendorInfoProvidersRecurring($iVendorId);
+    			break;
+
+    		default:
+    			$aProviders = $this->_oDb->getVendorInfoProviders($iVendorId);
+    	}
+
+    	return !empty($aProviders) && !empty($aProviders[$sVendorProvider]) && is_array(($aProviders[$sVendorProvider])) ? $aProviders[$sVendorProvider] : false;
+    }
+
+    public function serviceGetOptionsDefaultCurrencyCode()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aCurrencies = BxDolForm::getDataItems($CNF['OBJECT_FORM_PRELISTS_CURRENCIES']);
+
+        $aResult = array();
+        foreach($aCurrencies as $sKey => $sValue)
+            $aResult[] = array(
+                'key' => $sKey,
+                'value' => $sValue
+            );
+
+        return $aResult;
+    }
+
+    public function serviceGetOptionsSiteAdmin()
+    {
+        $aResult = array(
+            array('key' => '', 'value' => _t('_Select_one'))
+        );
+
+        $aIds = $this->_oDb->getAdminsIds();
+        foreach($aIds as $iId) {
+        	$aUser = $this->getProfileInfo($iId);
+
+            $aResult[] = array(
+                'key' => $iId,
+                'value' => $aUser['name']
+            );
+        }
+
+        return $aResult;
+    }
+
+    /**
+     * Cart Processing Methods
+     */
+    public function actionAddToCart($iSellerId, $iModuleId, $iItemId, $iItemCount)
+    {
+        $aResult = $this->getObjectCart()->serviceAddToCart($iSellerId, $iModuleId, $iItemId, $iItemCount);
+		echoJson($aResult);
+    }
+
+    /**
+     * Isn't used yet.
+     */
+    public function actionDeleteFromCart($iSellerId, $iModuleId, $iItemId)
+    {
+        $aResult = $this->getObjectCart()->serviceDeleteFromCart($iSellerId, $iModuleId, $iItemId);
+        echoJson($aResult);
+    }
+
+    /**
+     * Isn't used yet.
+     */
+    public function actionEmptyCart($iSellerId)
+    {
+        $aResult = $this->getObjectCart()->serviceDeleteFromCart($iSellerId);
+		echoJson($aResult);
+    }
+
+	public function actionSubscribe()
+    {
+    	$iSellerId = bx_process_input(bx_get('seller_id'), BX_DATA_INT);
+    	$sSellerProvider = bx_process_input(bx_get('seller_provider'));
+    	$iModuleId = bx_process_input(bx_get('module_id'), BX_DATA_INT);
+    	$iItemId = bx_process_input(bx_get('item_id'), BX_DATA_INT);
+    	$iItemCount = bx_process_input(bx_get('item_count'), BX_DATA_INT);
+    	if(empty($iItemCount))
+    		$iItemCount = 1;
+
+        $aResult = $this->getObjectCart()->serviceSubscribe($iSellerId, $sSellerProvider, $iModuleId, $iItemId, $iItemCount);
+        $bRedirect = !empty($aResult['redirect']);
+
+        if(!empty($aResult['popup'])) {
+            $sContent = '';
+            $sContent .= $this->_oTemplate->displayCartJs(BX_PAYMENT_TYPE_RECURRING, $iSellerId);
+            $sContent .= !empty($aResult['popup']['html']) ? $aResult['popup']['html'] : $aResult['popup'];
+
+			return $this->_oTemplate->displayPageCodeResponse($sContent, false, true);
+        }
+
+		if(!empty($aResult['code']))
+			return $this->_oTemplate->displayPageCodeError($aResult['message']);
+
+		if(!empty($aResult['message']) && !$bRedirect)
+			return $this->_oTemplate->displayPageCodeResponse($aResult['message']);
+
+        if($bRedirect) {
+    		header('Location: ' . $aResult['redirect']);
+            exit;
+        }
+    }
+
+    public function actionSubscribeJson()
+    {
+    	$iSellerId = bx_process_input(bx_get('seller_id'), BX_DATA_INT);
+    	$sSellerProvider = bx_process_input(bx_get('seller_provider'));
+    	$iModuleId = bx_process_input(bx_get('module_id'), BX_DATA_INT);
+    	$iItemId = bx_process_input(bx_get('item_id'), BX_DATA_INT);
+    	$iItemCount = bx_process_input(bx_get('item_count'), BX_DATA_INT);
+    	if(empty($iItemCount))
+    		$iItemCount = 1;
+        $sRedirect = bx_process_input(bx_get('redirect'));
+
+        $aResult = $this->getObjectCart()->serviceSubscribe($iSellerId, $sSellerProvider, $iModuleId, $iItemId, $iItemCount, $sRedirect);
+		echoJson($aResult);
+    }
+
+    public function actionSubscriptionGetDetails($iId)
+    {
+        $aResult = $this->_oTemplate->displaySubscriptionGetDetails($iId);
+		echoJson($aResult);
+    }
+
+    public function actionSubscriptionChangeDetails($iId)
+    {
+        $aResult = $this->_oTemplate->displaySubscriptionChangeDetails($iId);
+		echoJson($aResult);
+    }
+
+    public function actionSubscriptionGetBilling($iId)
+    {
+        $aResult = $this->_oTemplate->displaySubscriptionGetBilling($iId);
+		echoJson($aResult);
+    }
+
+    public function actionSubscriptionChangeBilling($iId)
+    {
+        $aResult = $this->_oTemplate->displaySubscriptionChangeBilling($iId);
+		echoJson($aResult);
+    }
+
+    public function actionSubscriptionCancelation($iId)
+    {
+        $aResult = array('code' => 1, 'message' => _t('_bx_payment_err_cannot_perform'));
+
+        $aPending = $this->_oDb->getOrderPending(array('type' => 'id', 'id' => $iId));
+        if(empty($aPending) && !is_array($aPending))
+            return echoJson($aResult);
+
+        $aSubscription = $this->_oDb->getSubscription(array('type' => 'pending_id', 'pending_id' => $iId));
+        if(empty($aSubscription) && !is_array($aSubscription))
+            return echoJson($aResult);
+
+        $oRecipient = BxDolProfile::getInstance((int)$aPending['seller_id']);
+        if(!$oRecipient)
+            return echoJson($aResult);
+
+		$aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate($this->_oConfig->getPrefix('general') . 'cancelation_request', array(
+			'sibscription_id' => $aSubscription['subscription_id'],
+			'sibscription_customer' => $aSubscription['customer_id'],
+		    'sibscription_date' => bx_time_js($aSubscription['date'], BX_FORMAT_DATE, true)
+		), 0, (int)$aPending['client_id']);
+
+		$sEmail = '';
+		$oProvider = $this->getObjectProvider($aPending['provider'], $aPending['seller_id']);
+		if($oProvider !== false && $oProvider->isActive())
+		    $sEmail = $oProvider->getOption('cancellation_email');
+
+		if(empty($sEmail))
+		    $sEmail = $oRecipient->getAccountObject()->getEmail();
+
+		if(!sendMail($sEmail, $aTemplate['Subject'], $aTemplate['Body'], 0, array(), BX_EMAIL_SYSTEM))
+		    return echoJson($aResult);
+
+        echoJson(array('code' => 0, 'message' => _t('_bx_payment_msg_cancelation_request_sent')));
+    }
+
+
+    /**
+     * Payment Processing Methods
+     */
+	public function actionInitializeCheckout($sType)
+    {
+    	if(!$this->isLogged())
+            return $this->_oTemplate->displayPageCodeError($this->_sLangsPrefix . 'err_required_login');
+
+		if(bx_get('seller_id') !== false && bx_get('provider') !== false && bx_get('items') !== false) {
+			$iSellerId = bx_process_input(bx_get('seller_id'), BX_DATA_INT);
+			$sProvider = bx_process_input(bx_get('provider'));
+			$aItems = bx_process_input(bx_get('items'));
+
+			$mixedResult = $this->serviceInitializeCheckout(BX_PAYMENT_TYPE_SINGLE, $iSellerId, $sProvider, $aItems);
+			if($mixedResult !== true)
+	    		return $this->_oTemplate->displayPageCodeError($mixedResult);
+		}
+
+        header('Location: ' . $this->_oConfig->getUrl('URL_CART'));
+        exit;
+    }
+
+	public function serviceInitializeCheckout($sType, $iSellerId, $sProvider, $aItems = array(), $sRedirect = '')
+	{
+		if(!is_array($aItems))
+			$aItems = array($aItems);
+
+		$iSellerId = (int)$iSellerId;
+        if($iSellerId == BX_PAYMENT_EMPTY_ID)
+            return $this->_sLangsPrefix . 'err_unknown_vendor';
+
+		$oProvider = $this->getObjectProvider($sProvider, $iSellerId);
+        if($oProvider === false || !$oProvider->isActive())
+        	return $this->_sLangsPrefix . 'err_incorrect_provider';
+
+        $aInfo = $this->getObjectCart()->getInfo($sType, $this->_iUserId, $iSellerId, $aItems);
+        if(empty($aInfo) || $aInfo['vendor_id'] == BX_PAYMENT_EMPTY_ID || empty($aInfo['items']))
+            return $this->_sLangsPrefix . 'err_empty_order';
+
+		/*
+		 * Process FREE (price = 0) items for LOGGED IN members
+		 * WITHOUT processing via payment provider.
+		 */
+		$bProcessedFree = false;
+		$sKeyPriceSingle = $this->_oConfig->getKey('KEY_ARRAY_PRICE_SINGLE');
+		$sKeyPriceRecurring = $this->_oConfig->getKey('KEY_ARRAY_PRICE_RECURRING');
+		foreach($aInfo['items'] as $iIndex => $aItem)
+			if((int)$aInfo['client_id'] != 0 && (float)$aItem[$sKeyPriceSingle] == 0 && (float)$aItem[$sKeyPriceRecurring] == 0) {
+				$aItemInfo = $this->callRegisterCartItem((int)$aItem['module_id'], array($aInfo['client_id'], $aInfo['vendor_id'], $aItem['id'], $aItem['quantity'], $this->_oConfig->getLicense()));
+	            if(is_array($aItemInfo) && !empty($aItemInfo))
+	            	$bProcessedFree = true;
+
+	            $aInfo['items_count'] -= 1;
+	            unset($aInfo['items'][$iIndex]);
+
+	            $sCartItems = $this->_oDb->getCartItems($aInfo['client_id']);
+	            $sCartItems = trim(preg_replace("'" . $this->_oConfig->descriptorA2S(array($aInfo['vendor_id'], $aItem['module_id'], $aItem['id'], $aItem['quantity'])) . ":?'", "", $sCartItems), ":");
+	            $this->_oDb->setCartItems($aInfo['client_id'], $sCartItems);
+			}
+
+		if(empty($aInfo['items']))
+            return $this->_sLangsPrefix . ($bProcessedFree ? 'msg_successfully_processed_free' : 'err_empty_order');
+
+        $iPendingId = $this->_oDb->insertOrderPending($this->_iUserId, $sType, $sProvider, $aInfo);
+        if(empty($iPendingId))
+            return $this->_sLangsPrefix . 'err_access_db';
+
+		/*
+		 * Perform Join WITHOUT processing via payment provider
+		 * if a client ISN'T logged in and has only ONE FREE item in the card.
+		 */
+		if((int)$aInfo['client_id'] == 0 && (int)$aInfo['items_count'] == 1) {
+			reset($aInfo['items']);
+			$aItem = current($aInfo['items']);
+
+			if(!empty($aItem) && $this->_oConfig->getPrice($sType, $aItem)) {
+				$this->_oDb->updateOrderPending($iPendingId, array(
+		            'order' => $this->_oConfig->getLicense(),
+		            'error_code' => '1',
+		            'error_msg' => ''
+		        ));
+
+				$this->getObjectJoin()->performJoin($iPendingId);
+			}
+		}
+
+		return $oProvider->initializeCheckout($iPendingId, $aInfo, $sRedirect);
+	}
+
+    public function actionFinalizeCheckout($sProvider, $mixedVendorId = "")
+    {
+        $aData = &$_REQUEST;
+
+        $oProvider = $this->getObjectProvider($sProvider, $mixedVendorId);
+        if($oProvider === false || !$oProvider->isActive())
+        	return $this->_oTemplate->displayPageCodeError($this->_sLangsPrefix . 'err_incorrect_provider');
+
+        $aResult = $oProvider->finalizeCheckout($aData);
+        if((int)$aResult['code'] != BX_PAYMENT_RESULT_SUCCESS) 
+        	return $this->_oTemplate->displayPageCodeError($aResult['message']);
+
+		$aPending = $this->_oDb->getOrderPending(array('type' => 'id', 'id' => (int)$aResult['pending_id']));
+		$bTypeRecurring = $aPending['type'] == BX_PAYMENT_TYPE_RECURRING;
+		if($bTypeRecurring)
+		    $this->registerSubscription($aPending, array(
+		        'customer_id' => $aResult['customer_id'], 
+		    	'subscription_id' => $aResult['subscription_id']
+		    ));
+
+		$this->onPaymentRegisterBefore($aPending);
+
+		//--- Check "Pay Before Join" situation
+		if((int)$aPending['client_id'] == 0)
+			$this->getObjectJoin()->performJoin((int)$aPending['id'], isset($aResult['client_name']) ? $aResult['client_name'] : '', isset($aResult['client_email']) ? $aResult['client_email'] : '');
+
+		//--- Register payment for purchased items in associated modules 
+		if(!empty($aResult['paid']) || ($bTypeRecurring && !empty($aResult['trial'])))
+			$this->registerPayment($aPending);
+
+        bx_alert($this->getName(), 'finalize_checkout', 0, bx_get_logged_profile_id(), array(
+            'pending' => $aPending,
+            'transactions' => $this->_oDb->getOrderProcessed(array('type' => 'pending_id', 'pending_id' => (int)$aPending['id'])),
+            'provider' => $oProvider,
+            'message' => &$aResult['message'],
+        ));
+
+        if($oProvider->needRedirect()) {
+			header('Location: ' . $oProvider->getReturnUrl());
+			exit;
+		}
+
+		if(!empty($aResult['redirect'])) {
+			header('Location: ' . base64_decode(urldecode($aResult['redirect'])));
+			exit;
+		}
+
+		$this->_oTemplate->displayPageCodeResponse($aResult['message']);
+    }
+
+    public function actionFinalizedCheckout($sProvider, $mixedVendorId = "")
+    {
+        $oProvider = $this->getObjectProvider($sProvider, $mixedVendorId);
+        if($oProvider === false || !$oProvider->isActive())
+        	return $this->_oTemplate->displayPageCodeError($this->_sLangsPrefix . 'err_incorrect_provider');
+
+        $aResult = $oProvider->finalizedCheckout();
+        $this->_oTemplate->displayPageCodeResponse($aResult['message']);
+    }
+
+    public function actionNotify($sProvider, $mixedVendorId = "")
+    {
+    	$oProvider = $this->getObjectProvider($sProvider, $mixedVendorId);
+        if($oProvider === false || !$oProvider->isActive())
+        	return $this->_oTemplate->displayPageCodeError($this->_sLangsPrefix . 'err_incorrect_provider');
+
+		$oProvider->notify();
+    }
+
+    public function onProfileJoin($iProfileId)
+    {
+    	$this->getObjectJoin()->onProfileJoin($iProfileId);
+    }
+
+    public function onProfileDelete($iProfileId)
+    {
+		$this->_oDb->onProfileDelete($iProfileId);
+    }
+
+    public function isAllowedSell($aItem, $bPerform = false)
+    {
+		$iUserId = (int)$this->getProfileId();
+        if(!$iUserId)
+        	return false;
+
+		$aItemInfo = $this->callGetCartItem($aItem['module_id'], array($aItem['item_id']));
+		if(empty($aItemInfo))
+			return false;
+
+        if(isAdmin())
+            return true;
+
+        $aCheckResult = checkActionModule($iUserId, 'sell', $this->getName(), $bPerform);
+        if((int)$aItemInfo['author_id'] == $iUserId && $aCheckResult[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED)
+			return true;
+
+        return $aCheckResult[CHECK_ACTION_MESSAGE];
+    }
+
+	public function registerPayment($mixedPending)
+    {
+    	$aPending = is_array($mixedPending) ? $mixedPending : $this->_oDb->getOrderPending(array('type' => 'id', 'id' => (int)$mixedPending));
+    	if(empty($aPending) || !is_array($aPending))
+    		return false;
+
+		$sType = $aPending['type'];
+		$bTypeSingle = $sType == BX_PAYMENT_TYPE_SINGLE;
+
+		if($bTypeSingle && (int)$aPending['processed'] == 1)
+			return true;
+
+		$iClientId = (int)$aPending['client_id'];
+		$sLicense = $this->_oConfig->getLicense();
+
+		$sCartItems = '';
+		if($bTypeSingle)
+			$sCartItems = $this->_oDb->getCartItems($iClientId);
+
+		$bResult = false;
+        $aItems = $this->_oConfig->descriptorsM2A($aPending['items']);
+        foreach($aItems as $aItem) {
+        	$sMethod = $bTypeSingle ? 'callRegisterCartItem' : 'callRegisterSubscriptionItem';
+        	$aItemInfo = $this->$sMethod((int)$aItem['module_id'], array($aPending['client_id'], $aPending['seller_id'], $aItem['item_id'], $aItem['item_count'], $aPending['order'], $sLicense));
+            if(empty($aItemInfo) || !is_array($aItemInfo))
+                continue;
+
+            $this->_oDb->insertOrderProcessed(array(
+                'pending_id' => $aPending['id'],
+                'client_id' => $aPending['client_id'],
+                'seller_id' => $aPending['seller_id'],
+                'module_id' => $aItem['module_id'],
+                'item_id' => $aItem['item_id'],
+                'item_count' => $aItem['item_count'],
+                'amount' => $aItem['item_count'] * $this->_oConfig->getPrice($sType, $aItemInfo),
+            	'license' => $sLicense,
+            ));
+
+            if($bTypeSingle)
+            	$sCartItems = trim(preg_replace("'" . $this->_oConfig->descriptorA2S($aItem) . ":?'", "", $sCartItems), ":");
+
+			$bResult = true;
+        }
+
+        if($bTypeSingle)
+			$this->_oDb->setCartItems($iClientId, $sCartItems);
+
+        if($bResult) {
+        	$this->_oDb->updateOrderPending($aPending['id'], array('processed' => 1));
+
+        	$this->onPaymentRegister($aPending);
+        }
+
+        return $bResult;
+    }
+
+	public function refundPayment($mixedPending)
+	{
+		$aPending = is_array($mixedPending) ? $mixedPending : $this->_oDb->getOrderPending(array('type' => 'id', 'id' => (int)$mixedPending));
+    	if(empty($aPending) || !is_array($aPending))
+    		return false;
+
+		$bTypeSingle = $aPending['type'] == BX_PAYMENT_TYPE_SINGLE;
+
+		$iCanceled = 0;
+		$aOrders = $this->_oDb->getOrderProcessed(array('type' => 'pending_id', 'pending_id' => (int)$aPending['id']));
+		foreach($aOrders as $aOrder) {
+			$sMethod = $bTypeSingle ? 'callUnregisterCartItem' : 'callUnregisterSubscriptionItem';
+			$bResult = $this->$sMethod((int)$aOrder['module_id'], array($aOrder['client_id'], $aOrder['seller_id'], $aOrder['item_id'], $aOrder['item_count'], $aPending['order'], $aOrder['license']));
+			if(!$bResult)
+                continue;
+
+            if($this->_oDb->deleteOrderProcessed($aOrder['id']))
+            	$iCanceled++;
+		}
+
+		if($iCanceled != count($aOrders))
+			return false;
+
+		$bResult = $this->_oDb->deleteOrderPending($aPending['id']);
+		if($bResult)
+			$this->onPaymentRefund($aPending);
+
+		return $bResult;
+	}
+
+	public function registerSubscription($aPending, $aParams = array())
+	{
+	    $this->_oDb->insertSubscription(array(
+	        'pending_id' => $aPending['id'],
+	        'customer_id' => $aParams['customer_id'],
+	        'subscription_id' => $aParams['subscription_id']
+	    ));
+
+	    $this->onSubscriptionCreate($aPending);
+	}
+
+	public function updateSubscription($aPending, $aParams = array())
+	{
+	    $this->_oDb->updateSubscription($aParams, array(
+	        'pending_id' => $aPending['id']
+	    ));
+
+	    $this->onSubscriptionUpdate($aPending);
+	}
+
+	public function cancelSubscription($mixedPending)
+	{
+		$aPending = is_array($mixedPending) ? $mixedPending : $this->_oDb->getOrderPending(array('type' => 'id', 'id' => (int)$mixedPending));
+    	if(empty($aPending) || !is_array($aPending) || $aPending['type'] != BX_PAYMENT_TYPE_RECURRING)
+    		return false;
+
+		$aItems = $this->_oConfig->descriptorsM2A($aPending['items']);
+        foreach($aItems as $aItem)
+			$this->callCancelSubscriptionItem((int)$aItem['module_id'], array($aPending['client_id'], $aPending['seller_id'], $aItem['item_id'], $aItem['item_count'], $aPending['order']));
+
+		$this->onSubscriptionCancel($aPending);
+	}
+
+	public function onPaymentRegisterBefore($aPending, $aResult = array())
+	{
+		//--- 'System' -> 'Before Register Payment' for Alerts Engine ---//
+		bx_alert('system', 'before_register_payment', 0, $aPending['client_id'], array('pending' => $aPending));
+		//--- 'System' -> 'Before Register Payment' for Alerts Engine ---//
+	}
+
+	public function onPaymentRegister($aPending, $aResult = array())
+	{
+		//--- 'System' -> 'Register Payment' for Alerts Engine ---//
+		bx_alert('system', 'register_payment', 0, $aPending['client_id'], array('pending' => $aPending));
+		//--- 'System' -> 'Register Payment' for Alerts Engine ---//
+	}
+
+	public function onPaymentRefund($aPending, $aResult = array())
+	{
+		//--- 'System' -> 'Refund Payment' for Alerts Engine ---//
+		bx_alert('system', 'refund_payment', 0, $aPending['client_id'], array('pending' => $aPending));
+		//--- 'System' -> 'Refund Payment' for Alerts Engine ---//
+	}
+
+	public function onSubscriptionCreate($aPending, $aResult = array())
+	{
+		//--- 'System' -> 'Create Subscription' for Alerts Engine ---//
+		bx_alert('system', 'create_subscription', 0, $aPending['client_id'], array('pending' => $aPending));
+		//--- 'System' -> 'Create Subscription' for Alerts Engine ---//
+	}
+
+	public function onSubscriptionUpdate($aPending, $aResult = array())
+	{
+	    //--- 'System' -> 'Update Subscription' for Alerts Engine ---//
+		bx_alert('system', 'update_subscription', 0, $aPending['client_id'], array('pending' => $aPending));
+		//--- 'System' -> 'Update Subscription' for Alerts Engine ---//
+	}
+	
+	public function onSubscriptionCancel($aPending, $aResult = array())
+	{
+		//--- 'System' -> 'Cancel Subscription' for Alerts Engine ---//
+		bx_alert('system', 'cancel_subscription', 0, $aPending['client_id'], array('pending' => $aPending));
+		//--- 'System' -> 'Cancel Subscription' for Alerts Engine ---//
+	}
+
+    public function setSiteSubmenu($sSubmenu, $sSelModule, $sSelName)
+    {
+        $oSiteSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
+        if(!$oSiteSubmenu)
+            return;
+
+        $sModuleSubmenu = $this->_oConfig->getObject($sSubmenu);
+        $oModuleSubmenu = BxDolMenu::getObjectInstance($sModuleSubmenu);
+        if(!$oModuleSubmenu) 
+            return;
+
+        $oSiteSubmenu->setObjectSubmenu($sModuleSubmenu);
+        $oModuleSubmenu->setSelected($sSelModule, $sSelName);
+    }
+}
+
+/** @} */

+ 438 - 0
modules/boonex/payment/updates/9.0.4_9.0.5/source/classes/BxPaymentTemplate.php

@@ -0,0 +1,438 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Payment Payment
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxPaymentTemplate extends BxBaseModPaymentTemplate
+{
+	protected $_sLangsPrefix;
+
+    function __construct(&$oConfig, &$oDb)
+    {
+    	$this->MODULE = 'bx_payment';
+
+        parent::__construct($oConfig, $oDb);
+
+        $this->_sLangsPrefix = $this->_oConfig->getPrefix('langs');
+    }
+
+    public function addJsCssOrders()
+    {
+    	$this->addJs(array(
+    		'jquery-ui/jquery.ui.widget.min.js',
+    		'jquery-ui/jquery.ui.menu.min.js', 
+    		'jquery-ui/jquery.ui.autocomplete.min.js', 
+    		'jquery.form.min.js', 
+    		'jquery.anim.js', 
+    		'jquery.webForms.js',
+    		'orders.js'
+    	));
+    	$this->addCss(array('orders.css'));
+    }
+    public function addJsCssSubscriptions()
+    {
+        $this->addJs(array('jquery.form.min.js', 'jquery.anim.js', 'jquery.webForms.js', 'main.js', 'subscriptions.js'));
+        $this->addCss(array('orders.css', 'subscriptions.css'));
+    }
+
+    public function addJsCssCart($sType = '', $iVendorId = 0)
+    {
+    	$this->addJsTranslation(array('_bx_payment_err_nothing_selected'));
+    	$this->addJs(array('jquery.anim.js', 'main.js', 'cart.js'));
+    	$this->addCss(array('orders.css', 'cart.css'));
+
+    	$oModule = $this->getModule();
+    	if(!empty($iVendorId)) {
+    		$sMethod = 'getVendorInfoProviders' . bx_gen_method_name($sType);
+    		$aProviders = $this->_oDb->$sMethod($iVendorId);
+    		foreach($aProviders as $sProvider => $aProvider)
+				$oModule->getObjectProvider($sProvider, $iVendorId)->addJsCss();
+    	}
+    }
+
+	public function displayCartJs($sType = '', $iVendorId = 0)
+    {
+        $this->addJsCssCart($sType, $iVendorId);
+        return $this->displayJsCode('cart');
+    }
+
+    public function displayAddToCartJs($iVendorId, $iModuleId, $iItemId, $iItemCount, $bNeedRedirect = false)
+    {
+        $sJsCode = $this->displayCartJs(BX_PAYMENT_TYPE_SINGLE, $iVendorId);
+        $sJsMethod = $this->parseHtmlByName('add_to_cart_js.html', array(
+            'js_object' => $this->_oConfig->getJsObject('cart'),
+            'vendor_id' => $iVendorId,
+            'module_id' => $iModuleId,
+            'item_id' => $iItemId,
+            'item_count' => $iItemCount,
+            'need_redirect' => (int)$bNeedRedirect
+        ));
+
+        return array($sJsCode, $sJsMethod);
+    }
+
+    public function displayAddToCartLink($iVendorId, $iModuleId, $iItemId, $iItemCount, $bNeedRedirect = false)
+    {
+        $this->addJsCssCart(BX_PAYMENT_TYPE_SINGLE, $iVendorId);
+        return $this->parseHtmlByName('add_to_cart.html', array(
+        	'js_object' => $this->_oConfig->getJsObject('cart'),
+        	'js_content' => $this->displayJsCode('cart'),
+        	'txt_add_to_cart' => _t($this->_sLangsPrefix . 'txt_add_to_cart'),
+            'vendor_id' => $iVendorId,
+            'module_id' => $iModuleId,
+            'item_id' => $iItemId,
+            'item_count' => $iItemCount,
+            'need_redirect' => (int)$bNeedRedirect
+        ));
+    }
+
+	public function displaySubscribeJs($iVendorId, $sVendorProvider, $iModuleId, $iItemId, $iItemCount = 1, $sRedirect = '')
+    {
+        $sJsCode = $this->displayCartJs(BX_PAYMENT_TYPE_RECURRING, $iVendorId);
+        $sJsMethod = $this->parseHtmlByName('subscribe_js.html', array(
+            'js_object' => $this->_oConfig->getJsObject('cart'),
+            'vendor_id' => $iVendorId,
+        	'vendor_provider' => $sVendorProvider,
+            'module_id' => $iModuleId,
+            'item_id' => $iItemId,
+            'item_count' => $iItemCount,
+            'bx_if:show_redirect' => array(
+                'condition' => !empty($sRedirect),
+                'content' => array(
+                    'redirect' => $sRedirect
+                )
+            )
+        ));
+
+        return array($sJsCode, $sJsMethod);
+    }
+
+    public function displaySubscribeLink($iVendorId, $sVendorProvider, $iModuleId, $iItemId, $iItemCount = 1, $sRedirect = '')
+    {
+        $this->addJsCssCart(BX_PAYMENT_TYPE_RECURRING, $iVendorId);
+        return $this->parseHtmlByName('subscribe.html', array(
+        	'js_object' => $this->_oConfig->getJsObject('cart'),
+        	'js_content' => $this->displayJsCode('cart'),
+        	'txt_add_to_cart' => _t($this->_sLangsPrefix . 'txt_subscribe'),
+            'vendor_id' => $iVendorId,
+        	'vendor_provider' => $sVendorProvider,
+            'module_id' => $iModuleId,
+            'item_id' => $iItemId,
+            'item_count' => $iItemCount,
+            'bx_if:show_redirect' => array(
+                'condition' => !empty($sRedirect),
+                'content' => array(
+                    'redirect' => $sRedirect
+                )
+            )
+        ));
+    }
+
+    public function displaySubscriptionGetDetails($iId)
+    {
+    	return $this->_displaySubscriptionData('get_details', $iId);
+    }
+
+    public function displaySubscriptionChangeDetails($iId)
+    {
+    	return $this->_displaySubscriptionData('change_details', $iId);
+    }
+
+    public function displaySubscriptionGetBilling($iId)
+    {
+    	return $this->_displaySubscriptionData('get_billing', $iId);
+    }
+
+    public function displaySubscriptionChangeBilling($iId)
+    {
+    	return $this->_displaySubscriptionData('change_billing', $iId);
+    }
+
+	public function displayBlockCarts($iClientId)
+    {
+    	$oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_carts'));
+        if(!$oGrid)
+            return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
+
+		$oGrid->addQueryParam('client_id', $iClientId);
+
+		$this->addJsCssCart(BX_PAYMENT_TYPE_SINGLE);
+        return $this->displayJsCode('cart') . $oGrid->getCode();
+    }
+
+	public function displayBlockCart($iClientId, $iSellerId = 0)
+    {
+    	$oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_cart'));
+        if(!$oGrid || empty($iSellerId))
+            return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
+
+		$oGrid->addQueryParam('client_id', $iClientId);
+		$oGrid->addQueryParam('seller_id', $iSellerId);
+
+		$this->addJsCssCart(BX_PAYMENT_TYPE_SINGLE, $iSellerId);
+        return $this->displayJsCode('cart') . $oGrid->getCode();
+    }
+
+    public function displayBlockHistory($iClientId, $iSellerId)
+    {
+        return $this->_displayBlockHistory('grid_history', $iClientId, $iSellerId);
+    }
+
+    public function displayBlockSbsListMy($iClientId)
+    {
+        $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_sbs_list_my'), $this->getModule()->_oTemplate);
+        if(!$oGrid || empty($iClientId))
+            return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
+
+		$oGrid->addQueryParam('client_id', $iClientId);
+
+		$this->addJsCssSubscriptions();
+        return $this->displayJsCode(BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION) . $oGrid->getCode();
+    }
+
+    public function displayBlockSbsListAll()
+    {
+        $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_sbs_list_all'), $this->getModule()->_oTemplate);
+        if(!$oGrid)
+            return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
+
+		$this->addJsCssSubscriptions();
+        return $this->displayJsCode(BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION) . $oGrid->getCode();
+    }
+
+    public function displayBlockSbsHistory($iClientId)
+    {
+        return $this->_displayBlockHistory('grid_sbs_history', $iClientId);
+    }
+
+    public function displayBlockSbsDetails($iClientId)
+    {
+        return 'Details would be here';
+    }
+
+	public function displayBlockOrders($sType, $iSellerId)
+    {
+    	$oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_' . $sType));
+        if(!$oGrid || empty($iSellerId))
+            return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
+
+		$oGrid->addQueryParam('seller_id', $iSellerId);
+
+		$this->addJsCssOrders();
+        return $this->displayJsCode($sType) . $oGrid->getCode();
+    }
+
+	public function displayOrder($sType, $iId)
+    {
+        $sMethodName = 'getOrder' . bx_gen_method_name($sType);
+        $aOrder = $this->_oDb->$sMethodName(array('type' => 'id', 'id' => $iId));
+
+        $oModule = $this->getModule();
+        $aSeller = $oModule->getVendorInfo((int)$aOrder['seller_id']);
+        $aClient = $oModule->getProfileInfo((int)$aOrder['client_id']);
+
+        $aResult = array(
+        	'txt_client' => _t($this->_sLangsPrefix . 'txt_client'),
+        	'txt_seller' => _t($this->_sLangsPrefix . 'txt_seller'),
+        	'txt_order' => _t($this->_sLangsPrefix . 'txt_order'),
+        	'txt_processed_with' => _t($this->_sLangsPrefix . 'txt_processed_with'),
+        	'txt_message' => _t($this->_sLangsPrefix . 'txt_message'),
+        	'txt_date' => _t($this->_sLangsPrefix . 'txt_date'),
+        	'txt_products' => _t($this->_sLangsPrefix . 'txt_products'),
+            'client_name' => $aClient['name'],
+            'client_url' => $aClient['link'],
+            'bx_if:show_link' => array(
+                'condition' => !empty($aSeller['link']),
+                'content' => array(
+                    'seller_name' => $aSeller['name'],
+                    'seller_url' => $aSeller['link'],
+                )
+            ),
+            'bx_if:show_text' => array(
+                'condition' => empty($aSeller['link']),
+                'content' => array(
+                    'seller_name' => $aSeller['name']
+                )
+            ),
+            'order' => $aOrder['order'],
+            'provider' => _t('_bx_payment_txt_name_' . $aOrder['provider']),
+            'error' => $aOrder['error_msg'],
+            'date' => bx_time_js($aOrder['date']),
+            'bx_repeat:items' => array()
+        );
+
+        if(in_array($sType, array(BX_PAYMENT_ORDERS_TYPE_PENDING, BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION)))
+            $aItems = $this->_oConfig->descriptorsM2A($aOrder['items']);
+        else
+            $aItems = $this->_oConfig->descriptorsM2A($this->_oConfig->descriptorA2S(array($aOrder['seller_id'], $aOrder['module_id'], $aOrder['item_id'], $aOrder['item_count'])));
+
+        foreach($aItems as $aItem) {
+            $aInfo = $oModule->callGetCartItem((int)$aItem['module_id'], array($aItem['item_id']));
+            if(!empty($aInfo) && is_array($aInfo))
+	            $aResult['bx_repeat:items'][] = array(
+	                'bx_if:link' => array(
+	                    'condition' => !empty($aInfo['url']),
+	                    'content' => array(
+	                        'title' => $aInfo['title'],
+	                        'url' => $aInfo['url']
+	                    )
+	                ),
+	                'bx_if:text' => array(
+	                    'condition' => empty($aInfo['url']),
+	                    'content' => array(
+	                        'title' => $aInfo['title'],
+	                    )
+	                ),
+	                'quantity' => $aItem['item_count'],
+	                'price' => $this->_oConfig->getPrice($aOrder['type'], $aInfo),
+	                'currency_code' => $aSeller['currency_code']
+	            );
+        }
+
+        return $this->parseHtmlByName('order_' . $sType . '.html', $aResult);
+    }
+
+    public function displayItems($sType, $aItems = array())
+    {
+        $aTmplVarsItems = array();
+
+        if(!empty($aItems) && is_array($aItems))
+            foreach($aItems as $aItem) {
+                $aTmplVarsItems[$aItem['title']] = array(
+                    'id' => $aItem['id'],
+                    'price' => $this->_oConfig->getPrice($sType, $aItem),
+                    'bx_if:link' => array(
+                        'condition' => !empty($aItem['url']),
+                        'content' => array(
+                            'url' => $aItem['url'],
+                            'title' => $aItem['title']
+                        )
+                    ),
+                    'bx_if:text' => array(
+                        'condition' => empty($aItem['url']),
+                        'content' => array(
+                            'title' => $aItem['title']
+                        )
+                    ),
+                );
+            }
+
+        if(!empty($aTmplVarsItems) && is_array($aTmplVarsItems)) {
+            ksort($aTmplVarsItems);
+            $aTmplVarsItems = array_values($aTmplVarsItems);
+        }
+        else 
+        	$aTmplVarsItems = MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
+
+        return $this->parseHtmlByName('items.html', array(
+        	'html_id' => $this->_oConfig->getHtmlIds('processed', 'order_processed_items'),
+        	'bx_repeat:items' => $aTmplVarsItems
+        ));
+    }
+
+    public function displayProvidersSelector($aCartItem, $aProviders, $sRedirect = '')
+    {
+    	$oModule = $this->getModule();
+    	$iClientId = $oModule->getProfileId();
+
+		$oCart = $oModule->getObjectCart();
+		list($iSellerId, $iModuleId, $iItemId, $iItemCount) = $aCartItem;
+
+		$aTmplVarsProviders = array();
+		foreach($aProviders as $sProvider => $aProvider) {
+			$oProvider = $oModule->getObjectProvider($sProvider, $iSellerId);
+			if($oProvider !== false && method_exists($oProvider, 'getButtonRecurring')) {
+			    $aParams = array(
+					'sObjNameCart' => $oModule->_oConfig->getJsObject('cart'),
+					'iSellerId' => $iSellerId,
+					'iModuleId' => $iModuleId,
+					'iItemId' => $iItemId,
+					'iItemCount' => $iItemCount,
+				    'sRedirect' => $sRedirect
+				);
+
+			    $aCartInfo = $oCart->getInfo(BX_PAYMENT_TYPE_RECURRING, $iClientId, $iSellerId, $this->_oConfig->descriptorA2S($aCartItem));
+			    if(!empty($aCartInfo['items_price']) && !empty($aCartInfo['items']) && is_array($aCartInfo['items'])) {
+			        $aTitles = array();
+			        foreach ($aCartInfo['items'] as $aItem)
+			            $aTitles[] = $aItem['title'];
+
+			        $aParams = array_merge($aParams, array(
+			            'iAmount' => (int)round(100 * (float)$aCartInfo['items_price']),
+			        	'sItemTitle' => implode(', ', $aTitles)
+			        ));
+			    }
+
+				$sButton = $oProvider->getButtonRecurring($iClientId, $iSellerId, $aParams);
+			}
+			else {
+				list($sJsCode, $sJsOnclick) = $oCart->serviceGetSubscribeJs($iSellerId, $aProvider['name'], $iModuleId, $iItemId, $iItemCount, $sRedirect);
+
+				$sButton = $this->parsePageByName('providers_select_button.html', array(
+					'onclick' => $sJsOnclick,
+					'title' => _t('_bx_payment_txt_checkout_with', _t($aProvider['caption']))
+				));
+			}
+
+			$aTmplVarsProviders[] = array(
+				'button' => $sButton
+			);
+		}
+
+		return $this->parseHtmlByName('providers_select.html', array(
+			'bx_repeat:providers' => $aTmplVarsProviders
+		));
+    }
+
+    protected function _displayBlockHistory($sObject, $iClientId, $iSellerId = 0)
+    {
+    	$oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject($sObject), $this->getModule()->_oTemplate);
+        if(!$oGrid || empty($iClientId))
+            return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
+
+		$oGrid->addQueryParam('client_id', $iClientId);
+		if(!empty($iSellerId))
+			$oGrid->addQueryParam('seller_id', $iSellerId);
+
+		$this->addJsCssOrders();
+        return $this->displayJsCode(BX_PAYMENT_ORDERS_TYPE_HISTORY) . $oGrid->getCode();
+    }
+
+    protected function _displaySubscriptionData($sType, $iId)
+    {
+        $aPending = $this->_oDb->getOrderPending(array('type' => 'id', 'id' => $iId));
+        if(empty($aPending) && !is_array($aPending))
+            return array();
+
+        $aSubscription = $this->_oDb->getSubscription(array('type' => 'pending_id', 'pending_id' => $iId));
+        if(empty($aSubscription) && !is_array($aSubscription))
+            return array();
+
+        $sMethod = bx_gen_method_name($sType) . 'Recurring';
+        $oProvider = $this->getModule()->getObjectProvider($aPending['provider'], $aPending['seller_id']);
+        if($oProvider === false || !$oProvider->isActive() || !method_exists($oProvider, $sMethod))
+        	return array();
+
+        $mixedContent = $oProvider->$sMethod($iId, $aSubscription['customer_id'], $aSubscription['subscription_id']);
+        if(empty($mixedContent))
+            return array();
+        else if(is_array($mixedContent))
+            return $mixedContent;
+//TODO: Continue from here. Popup Should use correct HTML ID to avoid duplocations. 
+        $sKey = 'order_' . BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION . '_' . $sType;
+    	$sId = $this->_oConfig->getHtmlIds(BX_PAYMENT_ORDERS_TYPE_SUBSCRIPTION, $sKey);
+    	$sTitle = _t($this->_sLangsPrefix . 'popup_title_ods_' . $sKey);
+    	return array('popup' => array(
+    		'html' => BxTemplFunctions::getInstance()->popupBox($sId, $sTitle, $mixedContent), 
+    		'options' => array('closeOnOuterClick' => 1)
+    	));
+    }
+}
+
+/** @} */

+ 70 - 0
modules/boonex/payment/updates/9.0.4_9.0.5/source/install/config.php

@@ -0,0 +1,70 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Payment Payment
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+	'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_payment',
+    'title' => 'Payment',
+    'note' => 'Payment module.',
+    'version' => '9.0.5',
+    'vendor' => 'Boonex',
+    'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/payment/',
+    'home_uri' => 'payment',
+
+    'db_prefix' => 'bx_payment_',
+    'class_prefix' => 'BxPayment',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Payment',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+	'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 496 - 0
modules/boonex/payment/updates/9.0.4_9.0.5/source/install/langs/en.xml

@@ -0,0 +1,496 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+	<string name="_bx_payment"><![CDATA[Payments]]></string>
+
+	<!-- OPTIONS -->
+	<string name="_bx_payment_option_default_currency_code"><![CDATA[Currency]]></string>
+	<string name="_bx_payment_option_err_default_currency_code"><![CDATA[Currency code cannot be empty.]]></string>
+	<string name="_bx_payment_option_site_admin"><![CDATA[Site administrator]]></string>
+
+	<!-- PAGES and BLOCKS -->
+	<string name="_bx_payment_page_title_sys_carts"><![CDATA[Shopping Carts]]></string>
+	<string name="_bx_payment_page_title_carts"><![CDATA[Shopping Carts]]></string>
+	<string name="_bx_payment_page_title_sys_cart"><![CDATA[Shopping Cart]]></string>
+	<string name="_bx_payment_page_title_cart"><![CDATA[Shopping Cart]]></string>
+    <string name="_bx_payment_page_title_sys_cart_thank_you"><![CDATA[Thank you!]]></string>
+    <string name="_bx_payment_page_title_cart_thank_you"><![CDATA[Thank you!]]></string>
+	<string name="_bx_payment_page_block_title_carts"><![CDATA[Shopping Carts]]></string>
+	<string name="_bx_payment_page_block_title_cart"><![CDATA[{0}'s Shopping Cart]]></string>
+    <string name="_bx_payment_page_block_title_cart_thank_you"><![CDATA[Thank you!]]></string>
+    <string name="_bx_payment_page_block_content_cart_thank_you"><![CDATA[Thank you! Payment was successfully performed. The data will be processed shortly. Please wait.]]></string>
+
+    <string name="_bx_payment_page_title_sys_sbs_list_my"><![CDATA[My Subscriptions]]></string>
+    <string name="_bx_payment_page_title_sbs_list_my"><![CDATA[My Subscriptions]]></string>
+    <string name="_bx_payment_page_block_title_sbs_list_my"><![CDATA[My Subscriptions]]></string>
+
+    <string name="_bx_payment_page_title_sys_sbs_list_all"><![CDATA[All Subscriptions]]></string>
+    <string name="_bx_payment_page_title_sbs_list_all"><![CDATA[All Subscriptions]]></string>
+    <string name="_bx_payment_page_block_title_sbs_list_all"><![CDATA[All Subscriptions]]></string>
+
+    <string name="_bx_payment_page_title_sys_sbs_history"><![CDATA[My Payments]]></string>
+    <string name="_bx_payment_page_title_sbs_history"><![CDATA[My Payments]]></string>
+    <string name="_bx_payment_page_block_title_sbs_history"><![CDATA[My Payments]]></string>
+
+	<string name="_bx_payment_page_title_sys_history"><![CDATA[Shopping History]]></string>
+	<string name="_bx_payment_page_title_history"><![CDATA[Shopping History]]></string>
+	<string name="_bx_payment_page_block_title_history"><![CDATA[Shopping History]]></string>
+
+	<string name="_bx_payment_page_title_sys_orders"><![CDATA[Orders]]></string>
+	<string name="_bx_payment_page_title_orders"><![CDATA[Orders]]></string>
+	<string name="_bx_payment_page_block_title_orders"><![CDATA[Orders]]></string>
+
+	<string name="_bx_payment_page_title_sys_details"><![CDATA[Payments Details]]></string>
+	<string name="_bx_payment_page_title_details"><![CDATA[Payments Details]]></string>
+	<string name="_bx_payment_page_block_title_details"><![CDATA[Payments Details]]></string>
+
+	<string name="_bx_payment_page_block_title_orders_processed"><![CDATA[Processed Orders]]></string>
+	<string name="_bx_payment_page_block_title_orders_pending"><![CDATA[Pending Orders]]></string>
+
+	<string name="_bx_payment_page_title_response"><![CDATA[Payment Response]]></string>
+	<string name="_bx_payment_page_title_error"><![CDATA[Payment Error]]></string>
+
+	<string name="_bx_payment_page_title_sys_join"><![CDATA[Join]]></string>
+	<string name="_bx_payment_page_title_join"><![CDATA[Join]]></string>
+	<string name="_bx_payment_page_block_title_join"><![CDATA[Join]]></string>
+
+	<!-- MENUS -->
+	<string name="_bx_payment_menu_title_orders_submenu"><![CDATA[Orders Submenu]]></string>
+    <string name="_bx_payment_menu_set_title_orders_submenu"><![CDATA[Orders Submenu]]></string>
+    <string name="_bx_payment_menu_item_title_system_orders_processed"><![CDATA[Processed Orders]]></string>
+    <string name="_bx_payment_menu_item_title_orders_processed"><![CDATA[Processed]]></string>
+    <string name="_bx_payment_menu_item_title_system_orders_pending"><![CDATA[Pending Orders]]></string>
+    <string name="_bx_payment_menu_item_title_orders_pending"><![CDATA[Pending]]></string>
+    <string name="_bx_payment_menu_item_title_system_details"><![CDATA[Payments Details]]></string>
+    <string name="_bx_payment_menu_item_title_details"><![CDATA[Payments]]></string>
+
+	<string name="_bx_payment_menu_title_cart_submenu"><![CDATA[Cart Submenu]]></string>
+    <string name="_bx_payment_menu_set_title_cart_submenu"><![CDATA[Cart Submenu]]></string>
+    <string name="_bx_payment_menu_item_title_system_cart"><![CDATA[Cart]]></string>
+    <string name="_bx_payment_menu_item_title_cart"><![CDATA[Cart]]></string>
+    <string name="_bx_payment_menu_item_title_system_cart_history"><![CDATA[Cart History]]></string>
+    <string name="_bx_payment_menu_item_title_cart_history"><![CDATA[Cart History]]></string>
+
+    <string name="_bx_payment_menu_title_sbs_submenu"><![CDATA[Subscriptions Submenu]]></string>
+    <string name="_bx_payment_menu_set_title_sbs_submenu"><![CDATA[Subscriptions Submenu]]></string>
+    <string name="_bx_payment_menu_item_title_system_sbs_list_my"><![CDATA[My Subscriptions List]]></string>
+    <string name="_bx_payment_menu_item_title_sbs_list_my"><![CDATA[My Subscriptions]]></string>
+    <string name="_bx_payment_menu_item_title_system_sbs_list_all"><![CDATA[All Subscriptions List]]></string>
+    <string name="_bx_payment_menu_item_title_sbs_list_all"><![CDATA[All Subscriptions]]></string>
+    <string name="_bx_payment_menu_item_title_system_sbs_history"><![CDATA[My Payments History]]></string>
+    <string name="_bx_payment_menu_item_title_sbs_history"><![CDATA[My Payments]]></string>
+
+    <string name="_bx_payment_menu_title_sbs_actions"><![CDATA[Subscription Actions]]></string>
+    <string name="_bx_payment_menu_set_title_sbs_actions"><![CDATA[Subscription Actions]]></string>
+    <string name="_bx_payment_menu_item_title_system_sbs_cancel"><![CDATA[Request Cancelation]]></string>
+    <string name="_bx_payment_menu_item_title_sbs_cancel"><![CDATA[Request Cancelation]]></string>
+
+	<!-- GRIDS -->
+	<string name="_bx_payment_grid_column_title_ods_client_id"><![CDATA[Client]]></string>
+	<string name="_bx_payment_grid_column_title_ods_seller_id"><![CDATA[Seller]]></string>
+	<string name="_bx_payment_grid_column_title_ods_transaction"><![CDATA[Transaction]]></string>
+	<string name="_bx_payment_grid_column_title_ods_license"><![CDATA[License]]></string>
+	<string name="_bx_payment_grid_column_title_ods_amount"><![CDATA[Amount]]></string>
+	<string name="_bx_payment_grid_column_title_ods_date"><![CDATA[Date]]></string>
+	<string name="_bx_payment_grid_column_title_sbs_seller_id"><![CDATA[Seller]]></string>
+	<string name="_bx_payment_grid_column_title_sbs_client_id"><![CDATA[Client]]></string>
+	<string name="_bx_payment_grid_column_title_sbs_customer_id"><![CDATA[Customer ID]]></string>
+	<string name="_bx_payment_grid_column_title_sbs_subscription_id"><![CDATA[Subscription]]></string>
+    <string name="_bx_payment_grid_column_title_sbs_transaction"><![CDATA[Transaction]]></string>
+    <string name="_bx_payment_grid_column_title_sbs_license"><![CDATA[License]]></string>
+    <string name="_bx_payment_grid_column_title_sbs_amount"><![CDATA[Amount]]></string>
+    <string name="_bx_payment_grid_column_title_sbs_provider"><![CDATA[Provider]]></string>
+    <string name="_bx_payment_grid_column_title_sbs_paid"><![CDATA[Paid]]></string>
+    <string name="_bx_payment_grid_column_title_sbs_date"><![CDATA[Date]]></string>
+	<string name="_bx_payment_grid_column_title_crts_vendor_id"><![CDATA[Vendor]]></string>
+	<string name="_bx_payment_grid_column_title_crts_items_count"><![CDATA[Count]]></string>
+	<string name="_bx_payment_grid_column_title_crts_items_price"><![CDATA[Price]]></string>
+	<string name="_bx_payment_grid_column_title_crt_title"><![CDATA[Product]]></string>
+	<string name="_bx_payment_grid_column_title_crt_description"><![CDATA[Description]]></string>
+	<string name="_bx_payment_grid_column_title_crt_quantity"><![CDATA[Quantity]]></string>
+	<string name="_bx_payment_grid_column_title_crt_price"><![CDATA[Price]]></string>
+
+	<string name="_bx_payment_grid_action_title_ods_add"><![CDATA[Manual Order]]></string>
+	<string name="_bx_payment_grid_action_title_ods_cancel"><![CDATA[Cancel]]></string>
+	<string name="_bx_payment_grid_action_title_ods_process"><![CDATA[Process]]></string>
+	<string name="_bx_payment_grid_action_title_ods_view_order"><![CDATA[View]]></string>
+	<string name="_bx_payment_grid_action_title_sbs_actions"><![CDATA[Actions]]></string>
+	<string name="_bx_payment_grid_action_title_sbs_view_order"><![CDATA[View]]></string>
+	<string name="_bx_payment_grid_action_title_sbs_cancel"><![CDATA[Cancel]]></string>
+	<string name="_bx_payment_grid_action_title_crts_delete"><![CDATA[Delete]]></string>
+	<string name="_bx_payment_grid_action_title_crts_continue"><![CDATA[Continue to checkout]]></string>
+	<string name="_bx_payment_grid_action_title_crt_checkout"><![CDATA[Checkout with {0}]]></string>
+	<string name="_bx_payment_grid_action_title_crt_delete"><![CDATA[Delete]]></string>
+
+    <string name="_bx_payment_popup_title_ods_order_subscription_view"><![CDATA[Subscription]]></string>
+    <string name="_bx_payment_popup_title_ods_order_subscription_get_details"><![CDATA[Subscription Details]]></string>
+    <string name="_bx_payment_popup_title_ods_order_subscription_change_details"><![CDATA[Change Subscription Details]]></string>
+    <string name="_bx_payment_popup_title_ods_order_subscription_get_billing"><![CDATA[Billing Information]]></string>
+    <string name="_bx_payment_popup_title_ods_order_subscription_change_billing"><![CDATA[Change Billing Information]]></string>
+	<string name="_bx_payment_popup_title_ods_order_history_view"><![CDATA[Order]]></string>
+	<string name="_bx_payment_popup_title_ods_order_pending_view"><![CDATA[Pending Order]]></string>
+	<string name="_bx_payment_popup_title_ods_order_pending_process"><![CDATA[Process Pending Order]]></string>
+	<string name="_bx_payment_popup_title_ods_order_processed_view"><![CDATA[Processed Order]]></string>
+	<string name="_bx_payment_popup_title_ods_order_processed_add"><![CDATA[Manual Order]]></string>
+	<string name="_bx_payment_popup_title_crd_providers_select"><![CDATA[Select Payment Method]]></string>
+
+	<!-- FORMS -->
+	<string name="_bx_payment_form_cart_input_do_delete"><![CDATA[Delete]]></string>
+	<string name="_bx_payment_form_cart_input_do_checkout"><![CDATA[Checkout]]></string>
+	<string name="_bx_payment_form_details_input_do_submit"><![CDATA[Save]]></string>
+
+	<string name="_bx_payment_form_pendings_form"><![CDATA[Pendings Form]]></string>
+	<string name="_bx_payment_form_processed_form"><![CDATA[Processed Form]]></string>
+	<string name="_bx_payment_form_pendings_display_process"><![CDATA[Process Pending Display]]></string>
+	<string name="_bx_payment_form_processed_display_add"><![CDATA[Add Processed Display]]></string>
+	<string name="_bx_payment_form_pendings_input_id_sys"><![CDATA[ID]]></string>
+	<string name="_bx_payment_form_pendings_input_seller_id_sys"><![CDATA[Seller ID]]></string>
+	<string name="_bx_payment_form_pendings_input_order_sys"><![CDATA[Order]]></string>
+	<string name="_bx_payment_form_pendings_input_order"><![CDATA[Order]]></string>
+	<string name="_bx_payment_form_pendings_input_order_err"><![CDATA[You need to fill in order number here.]]></string>
+	<string name="_bx_payment_form_pendings_input_process_sys"><![CDATA[Process]]></string>
+	<string name="_bx_payment_form_pendings_input_process"><![CDATA[Process]]></string>
+	<string name="_bx_payment_form_pendings_input_cancel_sys"><![CDATA[Cancel]]></string>
+	<string name="_bx_payment_form_pendings_input_cancel"><![CDATA[Cancel]]></string>
+	<string name="_bx_payment_form_processed_input_seller_id_sys"><![CDATA[Seller ID]]></string>
+	<string name="_bx_payment_form_processed_input_client_id_sys"><![CDATA[Client ID]]></string>
+	<string name="_bx_payment_form_processed_input_client_sys"><![CDATA[Client]]></string>
+	<string name="_bx_payment_form_processed_input_client"><![CDATA[Client]]></string>
+	<string name="_bx_payment_form_processed_input_client_err"><![CDATA[You need to enter a name of an existed member here.]]></string>
+	<string name="_bx_payment_form_processed_input_order_sys"><![CDATA[Order]]></string>
+	<string name="_bx_payment_form_processed_input_order"><![CDATA[Order]]></string>
+	<string name="_bx_payment_form_processed_input_order_err"><![CDATA[You need to fill in order number here.]]></string>
+	<string name="_bx_payment_form_processed_input_module_id_sys"><![CDATA[Module]]></string>
+	<string name="_bx_payment_form_processed_input_module_id"><![CDATA[Module]]></string>
+	<string name="_bx_payment_form_processed_input_module_id_err"><![CDATA[You need to select a module here.]]></string>
+	<string name="_bx_payment_form_processed_input_items_sys"><![CDATA[Items]]></string>
+	<string name="_bx_payment_form_processed_input_items"><![CDATA[Items]]></string>
+	<string name="_bx_payment_form_processed_input_items_err"><![CDATA[You need to select at least one item from the list here.]]></string>
+	<string name="_bx_payment_form_processed_input_add"><![CDATA[Add]]></string>
+	<string name="_bx_payment_form_processed_input_add_sys"><![CDATA[Add]]></string>
+	<string name="_bx_payment_form_processed_input_cancel"><![CDATA[Cancel]]></string>
+	<string name="_bx_payment_form_processed_input_cancel_sys"><![CDATA[Cancel]]></string>
+
+    <!-- Predefined Values -->
+    <string name="_bx_payment_pre_lists_currencies"><![CDATA[Currencies]]></string>
+
+	<!-- ACL -->
+	<string name="_bx_payment_acl_action_purchase"><![CDATA[Purchase]]></string>
+	<string name="_bx_payment_acl_action_sell"><![CDATA[Sell]]></string>
+
+	<!-- EMAIL TEMPLATES -->
+	<string name="_bx_payment_et_txt_name_paid_need_join"><![CDATA[Paid and need to join.]]></string>
+	<string name="_bx_payment_et_txt_subject_paid_need_join"><![CDATA[Payment was processed.]]></string>
+	<string name="_bx_payment_et_txt_body_paid_need_join"><![CDATA[{email_header}
+<p>Hello, {RealName}.</p>
+<p>Your payment was processed. If you did not fill in the join form yet, then you may do it using the following link.</p>
+<p><a href="{JoinLink}">Join Now</a></p>
+{email_footer}]]></string>
+
+    <string name="_bx_payment_et_txt_name_cancelation_request"><![CDATA[Subscription cancelation request.]]></string>
+    <string name="_bx_payment_et_txt_subject_cancelation_request"><![CDATA[Subscription cancelation request.]]></string>
+    <string name="_bx_payment_et_txt_body_cancelation_request"><![CDATA[{email_header}
+<p>Hello,</p>
+<p>A user with {profile_name} profile name requested cancelation for a subscription.</p>
+<p>Subscription info:<br />ID: {sibscription_id}<br />Customer: {sibscription_customer}<br />Date: {sibscription_date}</p>
+{email_footer}]]></string>
+
+	<!-- MESSAGES, WARNINGS and ERRORS -->
+	<string name="_bx_payment_msg_no_results"><![CDATA[Empty]]></string>
+	<string name="_bx_payment_msg_redirecting"><![CDATA[Redirecting... Please wait.]]></string>
+	<string name="_bx_payment_msg_item_added"><![CDATA[The item was successfully added to your shopping cart.]]></string>
+	<string name="_bx_payment_msg_item_deleted"><![CDATA[The item was successfully deleted from your shopping cart.]]></string>
+	<string name="_bx_payment_msg_successfully_processed_free"><![CDATA[Free item was successfully processed]]></string>
+	<string name="_bx_payment_msg_cancelation_request_sent"><![CDATA[Cancelation request was sent. Please wait.]]></string>
+	<string name="_bx_payment_err_access_db"><![CDATA[Database access error.]]></string>
+	<string name="_bx_payment_err_cannot_validate"><![CDATA[Can't connect to remote host for validation.]]></string>
+	<string name="_bx_payment_err_empty_items"><![CDATA[There are no items selected.]]></string>
+	<string name="_bx_payment_err_empty_order"><![CDATA[The order is empty.]]></string>
+	<string name="_bx_payment_err_inactive_vendor"><![CDATA[The vendor status is not active.]]></string>
+	<string name="_bx_payment_err_incorrect_provider"><![CDATA[Incorrect or unavailable payment provider.]]></string>
+	<string name="_bx_payment_err_not_accept_payments"><![CDATA[The vendor does not accept payments.]]></string>
+	<string name="_bx_payment_err_nothing_selected"><![CDATA[You need to select at least one item.]]></string>
+	<string name="_bx_payment_err_self_purchase"><![CDATA[You cannot purchase your own item. It's just a bad luck thing, you know.]]></string>
+	<string name="_bx_payment_err_required_login"><![CDATA[You need to login.]]></string>
+	<string name="_bx_payment_err_unknown_vendor"><![CDATA[Unknown vendor.]]></string>
+	<string name="_bx_payment_err_wrong_data"><![CDATA[Incorrect input data.]]></string>
+	<string name="_bx_payment_err_not_found_pending"><![CDATA[Pending order was not found.]]></string>
+	<string name="_bx_payment_err_cannot_perform"><![CDATA[Cannot perform the action. Please report.]]></string>
+	<string name="_bx_payment_err_wrong_quantity"><![CDATA[Incorrect quantity specified.]]></string>
+	<string name="_bx_payment_err_already_processed"><![CDATA[This payment has already processed.]]></string>
+
+	<!-- Other -->
+	<string name="_bx_payment_txt_add_to_cart"><![CDATA[Add to Cart]]></string>
+	<string name="_bx_payment_txt_subscribe"><![CDATA[Subscribe]]></string>
+	<string name="_bx_payment_txt_payment_to"><![CDATA[Payment to {0}]]></string>
+	<string name="_bx_payment_txt_payment_to_for"><![CDATA[Payment to {0} for:]]></string>
+	<string name="_bx_payment_txt_checkout_to"><![CDATA[Continue checkouting to {0}]]></string>
+	<string name="_bx_payment_txt_checkout_with"><![CDATA[Checkout with {0}]]></string>
+	<string name="_bx_payment_txt_client"><![CDATA[Client]]></string>
+	<string name="_bx_payment_txt_seller"><![CDATA[Seller]]></string>
+	<string name="_bx_payment_txt_order"><![CDATA[Order ID]]></string>
+	<string name="_bx_payment_txt_processed_with"><![CDATA[Processed with]]></string>
+	<string name="_bx_payment_txt_message"><![CDATA[Result]]></string>
+	<string name="_bx_payment_txt_date"><![CDATA[Date]]></string>
+	<string name="_bx_payment_txt_products"><![CDATA[Products]]></string>
+	<string name="_bx_payment_txt_buyer_name_mask"><![CDATA[{0} {1}]]></string>
+	<string name="_bx_payment_txt_none"><![CDATA[none]]></string>
+	<string name="_bx_payment_txt_name_manual"><![CDATA[Manually]]></string>
+	<string name="_bx_payment_txt_yes"><![CDATA[Yes]]></string>
+	<string name="_bx_payment_txt_no"><![CDATA[No]]></string>
+
+	<!-- PayPal payment provider -->
+	<string name="_bx_payment_pp_cpt"><![CDATA[PayPal]]></string>
+	<string name="_bx_payment_pp_dsc"><![CDATA[PayPal payment provider]]></string>
+	<string name="_bx_payment_pp_active_cpt"><![CDATA[Active]]></string>
+	<string name="_bx_payment_pp_active_dsc"><![CDATA[Activate(Deactivate) provider]]></string>
+	<string name="_bx_payment_pp_mode_cpt"><![CDATA[Mode]]></string>
+	<string name="_bx_payment_pp_mode_dsc"><![CDATA[Mode to process payments]]></string>
+	<string name="_bx_payment_pp_mode_live"><![CDATA[live]]></string>
+	<string name="_bx_payment_pp_mode_test"><![CDATA[test]]></string>
+	<string name="_bx_payment_pp_business_cpt"><![CDATA[Business]]></string>
+	<string name="_bx_payment_pp_business_dsc"><![CDATA[Business email address]]></string>
+	<string name="_bx_payment_pp_prc_type_cpt"><![CDATA[Process type]]></string>
+	<string name="_bx_payment_pp_prc_type_dsc"><![CDATA[The type in which data is to be processed. In IPN mode use URL like the following http://www.your-site.com/your-path/m/payment/act_finalize_checkout/paypal as notify URL in your PayPal account]]></string>
+	<string name="_bx_payment_pp_prc_type_direct"><![CDATA[direct]]></string>
+	<string name="_bx_payment_pp_prc_type_pdt"><![CDATA[PDT]]></string>
+	<string name="_bx_payment_pp_prc_type_ipn"><![CDATA[IPN]]></string>
+	<string name="_bx_payment_pp_token_cpt"><![CDATA[Identity token]]></string>
+	<string name="_bx_payment_pp_token_dsc"><![CDATA[Identity token]]></string>
+	<string name="_bx_payment_pp_sandbox_cpt"><![CDATA[Sandbox]]></string>
+	<string name="_bx_payment_pp_sandbox_dsc"><![CDATA[Sandbox email address]]></string>
+	<string name="_bx_payment_pp_return_data_url_cpt"><![CDATA[Data return URL]]></string>
+	<string name="_bx_payment_pp_err_no_data_given"><![CDATA[No data given.]]></string>
+	<string name="_bx_payment_pp_err_not_completed"><![CDATA[Payment is not completed.]]></string>
+	<string name="_bx_payment_pp_err_wrong_vendor"><![CDATA[Wrong vendor.]]></string>
+	<string name="_bx_payment_pp_err_wrong_business"><![CDATA[Wrong receiver email.]]></string>
+	<string name="_bx_payment_pp_err_wrong_transaction"><![CDATA[Transaction verification failed.]]></string>
+	<string name="_bx_payment_pp_err_wrong_verification_status"><![CDATA[No verification status received.]]></string>
+	<string name="_bx_payment_pp_err_wrong_amount"><![CDATA[Wrong amount.]]></string>
+	<string name="_bx_payment_pp_err_wrong_custom_data"><![CDATA[Incorrect custom data.]]></string>
+	<string name="_bx_payment_pp_msg_verified"><![CDATA[Payment was successfully processed.]]></string>
+	<string name="_bx_payment_txt_name_paypal"><![CDATA[PayPal]]></string>
+	<string name="_bx_payment_txt_cart_paypal"><![CDATA[PayPal]]></string>
+
+	<!-- 2Checkout payment provider -->
+	<string name="_bx_payment_2co_cpt"><![CDATA[2Checkout]]></string>
+	<string name="_bx_payment_2co_dsc"><![CDATA[2Checkout payment provider]]></string>
+	<string name="_bx_payment_2co_active_cpt"><![CDATA[Active]]></string>
+	<string name="_bx_payment_2co_active_dsc"><![CDATA[Activate(Deactivate) provider]]></string>
+	<string name="_bx_payment_2co_mode_cpt"><![CDATA[Mode]]></string>
+	<string name="_bx_payment_2co_mode_dsc"><![CDATA[Mode to process payments]]></string>
+	<string name="_bx_payment_2co_mode_live"><![CDATA[live]]></string>
+	<string name="_bx_payment_2co_mode_test"><![CDATA[test]]></string>
+	<string name="_bx_payment_2co_account_id_cpt"><![CDATA[Account number]]></string>
+	<string name="_bx_payment_2co_account_id_dsc"><![CDATA[Your 2Checkout vendor account number]]></string>
+	<string name="_bx_payment_2co_payment_method_cpt"><![CDATA[Payment Method]]></string>
+	<string name="_bx_payment_2co_payment_method_dsc"><![CDATA[This will set the default selection on the payment method step during the checkout process]]></string>
+	<string name="_bx_payment_2co_payment_method_cc"><![CDATA[Credit Card(CC)]]></string>
+	<string name="_bx_payment_2co_payment_method_ppi"><![CDATA[PayPal(PPI)]]></string>
+	<string name="_bx_payment_2co_secret_word_cpt"><![CDATA[Secret Word]]></string>
+	<string name="_bx_payment_2co_secret_word_dsc"><![CDATA[Secret word is used to calculate a check hash]]></string>
+	<string name="_bx_payment_2co_return_data_url_cpt"><![CDATA[Data return URL]]></string>
+	<string name="_bx_payment_2co_err_no_vendor_given"><![CDATA[Unknown vendor]]></string>
+	<string name="_bx_payment_2co_err_no_data_given"><![CDATA[No data given.]]></string>
+	<string name="_bx_payment_2co_err_wrong_key"><![CDATA[Check key is incorrect.]]></string>
+	<string name="_bx_payment_2co_err_wrong_payment"><![CDATA[Wrong payment.]]></string>
+	<string name="_bx_payment_2co_err_already_processed"><![CDATA[This payment has already processed]]></string>
+	<string name="_bx_payment_2co_msg_verified"><![CDATA[Successfully verified.]]></string>
+	<string name="_bx_payment_txt_name_2checkout"><![CDATA[2Checkout]]></string>
+	<string name="_bx_payment_txt_cart_2checkout"><![CDATA[2Checkout]]></string>
+
+	<!-- BitPay payment provider -->
+	<string name="_bx_payment_bp_cpt"><![CDATA[BitPay]]></string>
+	<string name="_bx_payment_bp_dsc"><![CDATA[BitPay payment provider]]></string>
+	<string name="_bx_payment_bp_active_cpt"><![CDATA[Active]]></string>
+	<string name="_bx_payment_bp_active_dsc"><![CDATA[Activate(Deactivate) provider]]></string>
+	<string name="_bx_payment_bp_active_err"><![CDATA[You should have SSL certificate (HTTPS connection) to activate and use BitPay on your site.]]></string>
+	<string name="_bx_payment_bp_api_key_cpt"><![CDATA[API Key]]></string>
+	<string name="_bx_payment_bp_api_key_dsc"><![CDATA[Your merchant BitPay API Access key]]></string>
+	<string name="_bx_payment_bp_transaction_speed_cpt"><![CDATA[Transaction speed]]></string>
+	<string name="_bx_payment_bp_transaction_speed_dsc"><![CDATA[Determines when an invoice is confirmed]]></string>
+	<string name="_bx_payment_bp_transaction_speed_high"><![CDATA[High]]></string>
+	<string name="_bx_payment_bp_transaction_speed_medium"><![CDATA[Medium]]></string>
+	<string name="_bx_payment_bp_transaction_speed_low"><![CDATA[Low]]></string>
+	<string name="_bx_payment_bp_full_notifications_cpt"><![CDATA[Enable full notifications]]></string>
+	<string name="_bx_payment_bp_full_notifications_dsc"><![CDATA[When enabled notifications will be sent on every status change, otherwise when an invoice is confirmed only.]]></string>
+	<string name="_bx_payment_bp_notification_email_cpt"><![CDATA[Notification Email]]></string>
+	<string name="_bx_payment_bp_notification_email_dsc"><![CDATA[Email where invoice update notifications will be sent. Leave empty to disable.]]></string>
+	<string name="_bx_payment_bp_err_posdata_exceed_limit"><![CDATA[The value of posData exceeds limit. Contact with administrator.]]></string>
+	<string name="_bx_payment_bp_err_no_data_given"><![CDATA[No data given.]]></string>
+	<string name="_bx_payment_bp_err_no_vendor_given"><![CDATA[Unknown vendor.]]></string>
+	<string name="_bx_payment_bp_err_incorrect_data"><![CDATA[Incorrect order data.]]></string>
+	<string name="_bx_payment_bp_err_wrong_amount"><![CDATA[Wrong payment amount.]]></string>
+	<string name="_bx_payment_bp_err_already_processed"><![CDATA[This payment has already processed.]]></string>
+	<string name="_bx_payment_bp_err_no_confirmation_given"><![CDATA[Payment is waiting for full confirmation from the Bitcoin network.]]></string>
+	<string name="_bx_payment_bp_msg_checkout_finished"><![CDATA[A payment has been confirmed. Once the transaction is fully confirmed on the Bitcoin network, the payment will be processed automatically here. Then the purchased product(s) will be displayed in shopping cart history.<br /><b>Note.</b> If it doesn't happen for some reason, you need to contact with product\'s vendor and provide him with your payment's details. He'll be able to process payment manually if the payment was received.]]></string>
+	<string name="_bx_payment_txt_name_bitpay"><![CDATA[BitPay]]></string>
+	<string name="_bx_payment_txt_cart_bitpay"><![CDATA[BitPay]]></string>
+
+	<!-- Chargebee payment provider -->
+	<string name="_bx_payment_cbee_cpt"><![CDATA[Chargebee]]></string>
+	<string name="_bx_payment_cbee_dsc"><![CDATA[Chargebee payment provider]]></string>
+	<string name="_bx_payment_cbee_active_cpt"><![CDATA[Active]]></string>
+	<string name="_bx_payment_cbee_active_dsc"><![CDATA[Activate(Deactivate) provider. Note. It's recommended to use SSL for better payment processing.]]></string>
+	<string name="_bx_payment_cbee_mode_cpt"><![CDATA[Mode]]></string>
+	<string name="_bx_payment_cbee_mode_dsc"><![CDATA[Mode to process payments]]></string>
+	<string name="_bx_payment_cbee_mode_live"><![CDATA[live]]></string>
+	<string name="_bx_payment_cbee_mode_test"><![CDATA[test]]></string>
+	<string name="_bx_payment_cbee_live_site_cpt"><![CDATA[Site (live)]]></string>
+	<string name="_bx_payment_cbee_live_site_dsc"><![CDATA[Your site name registered in Chargebee for 'live' mode]]></string>
+	<string name="_bx_payment_cbee_live_api_key_cpt"><![CDATA[API Key (live)]]></string>
+	<string name="_bx_payment_cbee_live_api_key_dsc"><![CDATA[Your Chargebee API Access key for 'live' mode]]></string>
+	<string name="_bx_payment_cbee_test_site_cpt"><![CDATA[Site (test)]]></string>
+	<string name="_bx_payment_cbee_test_site_dsc"><![CDATA[Your site name registered in Chargebee for 'test' mode]]></string>
+	<string name="_bx_payment_cbee_test_api_key_cpt"><![CDATA[API Key (test)]]></string>
+	<string name="_bx_payment_cbee_test_api_key_dsc"><![CDATA[Your Chargebee API Access key for 'test' mode]]></string>
+	<string name="_bx_payment_cbee_ssl_cpt"><![CDATA[Enable SSL]]></string>
+	<string name="_bx_payment_cbee_ssl_dsc"><![CDATA[Enable SSL connection to communicate with Chargebee. Note. URLs below will be updated after saving.]]></string>
+	<string name="_bx_payment_cbee_return_data_url_cpt"><![CDATA[Data return URL]]></string>
+	<string name="_bx_payment_cbee_notify_url_cpt"><![CDATA[Webhooks URL]]></string>
+	<string name="_bx_payment_cbee_msg_subscribed"><![CDATA[Thank you! Subscription created. Please, check your email for further instructions.]]></string>
+	<string name="_bx_payment_txt_name_chargebee"><![CDATA[Chargebee]]></string>
+	<string name="_bx_payment_txt_cart_chargebee"><![CDATA[Chargebee]]></string>
+
+	<!-- Recurly payment provider -->
+	<string name="_bx_payment_rcrl_cpt"><![CDATA[Recurly]]></string>
+	<string name="_bx_payment_rcrl_dsc"><![CDATA[Recurly payment provider]]></string>
+	<string name="_bx_payment_rcrl_active_cpt"><![CDATA[Active]]></string>
+	<string name="_bx_payment_rcrl_active_dsc"><![CDATA[Activate(Deactivate) provider.]]></string>
+	<string name="_bx_payment_rcrl_active_err"><![CDATA[You should have SSL certificate (HTTPS connection) to activate and use Recurly on your site.]]></string>
+	<string name="_bx_payment_rcrl_mode_cpt"><![CDATA[Mode]]></string>
+	<string name="_bx_payment_rcrl_mode_dsc"><![CDATA[Mode to process payments]]></string>
+	<string name="_bx_payment_rcrl_mode_live"><![CDATA[live]]></string>
+	<string name="_bx_payment_rcrl_mode_test"><![CDATA[test]]></string>
+	<string name="_bx_payment_rcrl_site_cpt"><![CDATA[Site]]></string>
+	<string name="_bx_payment_rcrl_site_dsc"><![CDATA[Your site name registered in Recurly]]></string>
+	<string name="_bx_payment_rcrl_api_key_private_cpt"><![CDATA[Private API Key]]></string>
+	<string name="_bx_payment_rcrl_api_key_private_dsc"><![CDATA[Your Recurly Private API Access key]]></string>
+	<string name="_bx_payment_rcrl_api_key_public_cpt"><![CDATA[Public API Key]]></string>
+	<string name="_bx_payment_rcrl_api_key_public_dsc"><![CDATA[Your Recurly Public API Access key]]></string>
+	<string name="_bx_payment_rcrl_return_data_url_cpt"><![CDATA[Data return URL]]></string>
+	<string name="_bx_payment_rcrl_notify_url_cpt"><![CDATA[Webhooks URL]]></string>
+	<string name="_bx_payment_rcrl_msg_subscribed"><![CDATA[Thank you! Subscription created. Please, check your email for further instructions.]]></string>
+	<string name="_bx_payment_txt_name_recurly"><![CDATA[Recurly]]></string>
+	<string name="_bx_payment_txt_cart_recurly"><![CDATA[Recurly]]></string>
+
+	<string name="_bx_payment_form_rcrl_card"><![CDATA[Recurly: Card Form]]></string>
+	<string name="_bx_payment_form_rcrl_card_display_add"><![CDATA[Recurly: Add Card Display]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_pending_id_sys"><![CDATA[Pending ID]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_item_sys"><![CDATA[Item]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_token_sys"><![CDATA[Token]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_first_name_sys"><![CDATA[First Name]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_first_name"><![CDATA[First Name]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_first_name_err"><![CDATA[You need to fill in your first name here.]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_last_name_sys"><![CDATA[Last Name]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_last_name"><![CDATA[Last Name]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_last_name_err"><![CDATA[You need to fill in your last name here.]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_email_sys"><![CDATA[Email]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_email"><![CDATA[Email]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_email_err"><![CDATA[You need to fill in your email here.]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_number_sys"><![CDATA[Card Number]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_number"><![CDATA[Card Number]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_number_inf"><![CDATA[16 digits without spaces describing your card number]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_expire_sys"><![CDATA[Expiry Date]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_expire"><![CDATA[Expiry Date]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_expire_month"><![CDATA[Month]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_expire_year"><![CDATA[Year]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_expire_inf"><![CDATA[Use 'mm yyyy' format]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_cvv_sys"><![CDATA[CVV]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_cvv"><![CDATA[CVV]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_card_cvv_inf"><![CDATA[Three digits from the back side of your card.]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_submit_sys"><![CDATA[Submit]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_cancel_sys"><![CDATA[Cancel]]></string>
+	<string name="_bx_payment_form_rcrl_card_input_cancel"><![CDATA[Cancel]]></string>
+	
+	<string name="_bx_payment_popup_title_rcrl_card_add"><![CDATA[Card details]]></string>
+
+	<!-- Stripe payment provider -->
+	<string name="_bx_payment_strp_cpt"><![CDATA[Stripe]]></string>
+	<string name="_bx_payment_strp_dsc"><![CDATA[Stripe payment provider]]></string>
+	<string name="_bx_payment_strp_active_cpt"><![CDATA[Active]]></string>
+	<string name="_bx_payment_strp_active_dsc"><![CDATA[Activate(Deactivate) provider. Note. It's recommended to use SSL for better payment processing.]]></string>
+	<string name="_bx_payment_strp_mode_cpt"><![CDATA[Mode]]></string>
+	<string name="_bx_payment_strp_mode_dsc"><![CDATA[Mode to process payments]]></string>
+	<string name="_bx_payment_strp_mode_live"><![CDATA[live]]></string>
+	<string name="_bx_payment_strp_mode_test"><![CDATA[test]]></string>
+	<string name="_bx_payment_strp_live_pub_key_cpt"><![CDATA[Public Key (live)]]></string>
+	<string name="_bx_payment_strp_live_pub_key_dsc"><![CDATA[Your Public Key generated in Stripe for 'live' mode]]></string>
+	<string name="_bx_payment_strp_live_sec_key_cpt"><![CDATA[Secret Key (live)]]></string>
+	<string name="_bx_payment_strp_live_sec_key_dsc"><![CDATA[Your Stripe Secret Key for 'live' mode]]></string>
+	<string name="_bx_payment_strp_test_pub_key_cpt"><![CDATA[Public Key (test)]]></string>
+	<string name="_bx_payment_strp_test_pub_key_dsc"><![CDATA[Your Public Key generated in Stripe for 'test' mode]]></string>
+	<string name="_bx_payment_strp_test_sec_key_cpt"><![CDATA[Secret Key (test)]]></string>
+	<string name="_bx_payment_strp_test_sec_key_dsc"><![CDATA[Your Stripe Secret Key for 'test' mode]]></string>
+	<string name="_bx_payment_strp_check_amount_cpt"><![CDATA[Enable amount checking]]></string>
+	<string name="_bx_payment_strp_check_amount_dsc"><![CDATA[Enable amount checking for Stripe Webhooks (recomended). However checking should be disabled when discounts and coupons are used.]]></string>
+	<string name="_bx_payment_strp_ssl_cpt"><![CDATA[Enable SSL]]></string>
+	<string name="_bx_payment_strp_ssl_dsc"><![CDATA[Enable SSL connection to communicate with Stripe. Note. URLs below will be updated after saving.]]></string>
+	<string name="_bx_payment_strp_notify_url_cpt"><![CDATA[Webhooks URL]]></string>
+	<string name="_bx_payment_strp_cancellation_email_cpt"><![CDATA[Cancellation Email]]></string>
+	<string name="_bx_payment_strp_msg_charged"><![CDATA[Payment was successfully processed.]]></string>
+	<string name="_bx_payment_strp_msg_subscribed"><![CDATA[Thank you! Subscription created. Please, check your email for further instructions.]]></string>
+	<string name="_bx_payment_strp_msg_details_changed"><![CDATA[Subscription details were changed.]]></string>
+    <string name="_bx_payment_strp_err_details_changed"><![CDATA[Cannot change subscription details. Recheck provided data and try again.]]></string>
+	<string name="_bx_payment_strp_msg_billing_changed"><![CDATA[Billing information was changed.]]></string>
+	<string name="_bx_payment_strp_err_billing_changed"><![CDATA[Cannot change billing information. Recheck provided data and try again.]]></string>
+	<string name="_bx_payment_strp_txt_checkout_with_single"><![CDATA[Checkout with {0}]]></string>
+	<string name="_bx_payment_strp_txt_checkout_with_recurring"><![CDATA[Checkout with {0}]]></string>
+	<string name="_bx_payment_strp_menu_item_title_details"><![CDATA[Details]]></string>
+	<string name="_bx_payment_strp_menu_item_title_details_change"><![CDATA[Change Details]]></string>
+	<string name="_bx_payment_strp_menu_item_title_billing"><![CDATA[Billing Info]]></string>
+	<string name="_bx_payment_strp_menu_item_title_billing_change"><![CDATA[Change Billing Info]]></string>	
+	<string name="_bx_payment_strp_txt_plan"><![CDATA[Plan]]></string>
+	<string name="_bx_payment_strp_txt_cost"><![CDATA[Cost]]></string>
+	<string name="_bx_payment_strp_txt_cost_mask"><![CDATA[{0} {1} / {2}]]></string>
+	<string name="_bx_payment_strp_txt_status"><![CDATA[Status]]></string>
+	<string name="_bx_payment_strp_txt_created"><![CDATA[Created]]></string>
+	<string name="_bx_payment_strp_txt_started"><![CDATA[Started]]></string>
+	<string name="_bx_payment_strp_txt_trial_start"><![CDATA[Trial start]]></string>
+	<string name="_bx_payment_strp_txt_trial_end"><![CDATA[Trial end]]></string>
+	<string name="_bx_payment_strp_txt_cperiod_start"><![CDATA[Current period start]]></string>
+	<string name="_bx_payment_strp_txt_cperiod_end"><![CDATA[Current period end]]></string>
+	<string name="_bx_payment_strp_txt_card_brand"><![CDATA[Brand]]></string>
+	<string name="_bx_payment_strp_txt_card_origin"><![CDATA[Origin]]></string>
+	<string name="_bx_payment_strp_txt_card_type"><![CDATA[Type]]></string>
+	<string name="_bx_payment_strp_txt_card_number"><![CDATA[Number]]></string>
+	<string name="_bx_payment_strp_txt_card_number_mask"><![CDATA[....{0}]]></string>
+	<string name="_bx_payment_strp_txt_card_expires"><![CDATA[Expires]]></string>
+	<string name="_bx_payment_strp_txt_card_expires_mask"><![CDATA[{0} / {1}]]></string>
+	<string name="_bx_payment_strp_txt_card_cvc"><![CDATA[CVC check]]></string>
+	<string name="_bx_payment_strp_txt_card_cvc_passed"><![CDATA[passed]]></string>
+
+    <string name="_bx_payment_form_strp_details"><![CDATA[Stripe: Details Form]]></string>
+    <string name="_bx_payment_form_strp_details_display_edit"><![CDATA[Stripe: Edit Details Display]]></string>
+    <string name="_bx_payment_form_strp_details_input_item_id_sys"><![CDATA[Plan]]></string>
+    <string name="_bx_payment_form_strp_details_input_item_id"><![CDATA[Plan]]></string>
+    <string name="_bx_payment_form_strp_details_input_item_id_err"><![CDATA[You need to select some plan here]]></string>
+    <string name="_bx_payment_form_strp_details_input_submit_sys"><![CDATA[Submit]]></string>
+    <string name="_bx_payment_form_strp_details_input_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_payment_form_strp_details_input_cancel_sys"><![CDATA[Cancel]]></string>
+    <string name="_bx_payment_form_strp_details_input_cancel"><![CDATA[Cancel]]></string>
+
+    <string name="_bx_payment_form_strp_card"><![CDATA[Stripe: Card Form]]></string>
+    <string name="_bx_payment_form_strp_card_display_add"><![CDATA[Stripe: Add Card Display]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_number_sys"><![CDATA[Card Number]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_number"><![CDATA[Card Number]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_number_inf"><![CDATA[16 digits without spaces describing your card number]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_number_err"><![CDATA[You need to enter card number here]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_expire_sys"><![CDATA[Expiry Date]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_expire"><![CDATA[Expiry Date]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_expire_month"><![CDATA[Month]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_expire_year"><![CDATA[Year]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_expire_inf"><![CDATA[Use 'mm yyyy' format]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_expire_err"><![CDATA[You need to enter expiry date in specified format here]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_cvv_sys"><![CDATA[CVV]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_cvv"><![CDATA[CVV]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_cvv_inf"><![CDATA[Three digits from the back side of your card.]]></string>
+    <string name="_bx_payment_form_strp_card_input_card_cvv_err"><![CDATA[You need to enter card CVV here]]></string>
+    <string name="_bx_payment_form_strp_card_input_submit_sys"><![CDATA[Submit]]></string>
+    <string name="_bx_payment_form_strp_card_input_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_payment_form_strp_card_input_cancel_sys"><![CDATA[Cancel]]></string>
+    <string name="_bx_payment_form_strp_card_input_cancel"><![CDATA[Cancel]]></string>
+
+	<string name="_bx_payment_txt_name_stripe"><![CDATA[Stripe]]></string>
+	<string name="_bx_payment_txt_cart_stripe"><![CDATA[Stripe]]></string>
+</resources>

+ 5 - 0
modules/boonex/payment/updates/9.0.4_9.0.5/source/template/providers_select.html

@@ -0,0 +1,5 @@
+<div class="bx-payment-providers-select bx-def-color-bg-block">
+    <div class="bx-payment-providers-select-cnt bx-def-padding">
+		<bx_repeat:providers>__button__</bx_repeat:providers>
+    </div>
+</div>

+ 197 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/classes/BxPersonsConfig.php

@@ -0,0 +1,197 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Persons Persons
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxPersonsConfig extends BxBaseModProfileConfig
+{
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $aMenuItems2MethodsSubmenu = array (
+        	'persons-profile-subscriptions' => 'checkAllowedSubscriptionsView'
+        );
+
+        $aMenuItems2MethodsActions = array (
+            'view-persons-profile' => 'checkAllowedView',
+            'edit-persons-profile' => 'checkAllowedEdit',
+            'edit-persons-cover' => 'checkAllowedChangeCover',
+            'delete-persons-profile' => 'checkAllowedDelete',
+            'profile-friend-add' => 'checkAllowedFriendAdd',
+            'profile-friend-remove' => 'checkAllowedFriendRemove',
+            'profile-subscribe-add' => 'checkAllowedSubscribeAdd',
+            'profile-subscribe-remove' => 'checkAllowedSubscribeRemove',
+            'profile-actions-more' => 'checkAllowedViewMoreMenu',
+            'profile-set-acl-level' => 'checkAllowedSetMembership',
+            'convos-compose' => 'checkAllowedCompose',
+        );
+
+        $this->CNF = array (
+
+            // module icon
+            'ICON' => 'user col-blue3',
+
+            // database tables
+            'TABLE_ENTRIES' => $aModule['db_prefix'] . 'data',
+            'TABLE_ENTRIES_FULLTEXT' => 'search_fields',
+
+            // database fields
+            'FIELD_ID' => 'id',
+            'FIELD_AUTHOR' => 'author',
+            'FIELD_ADDED' => 'added',
+            'FIELD_CHANGED' => 'changed',
+            'FIELD_NAME' => 'fullname',
+        	'FIELD_TITLE' => 'fullname',
+        	'FIELD_TEXT' => 'description',
+            'FIELD_PICTURE' => 'picture',
+            'FIELD_COVER' => 'cover',
+            'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
+            'FIELDS_QUICK_SEARCH' => array('fullname'),
+        	'FIELD_LOCATION_PREFIX' => 'location',
+            'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
+
+            // page URIs
+            'URI_VIEW_ENTRY' => 'view-persons-profile',
+        	'URI_VIEW_FRIENDS' => 'persons-profile-friends',
+        	'URI_VIEW_FRIEND_REQUESTS' => 'persons-friend-requests',
+        	'URI_VIEW_FAVORITES' => 'persons-profile-favorites',
+            'URI_EDIT_ENTRY' => 'edit-persons-profile',
+            'URI_EDIT_COVER' => 'edit-persons-cover',
+        	'URI_MANAGE_COMMON' => 'persons-manage',
+
+            'URL_HOME' => 'page.php?i=persons-home',
+        	'URL_CREATE' => 'page.php?i=create-persons-profile',
+        	'URL_MANAGE_COMMON' => 'page.php?i=persons-manage',
+        	'URL_MANAGE_ADMINISTRATION' => 'page.php?i=persons-administration',
+
+            // some params
+            'PARAM_AUTOAPPROVAL' => 'bx_persons_autoapproval',
+            'PARAM_DEFAULT_ACL_LEVEL' => 'bx_persons_default_acl_level',
+            'PARAM_NUM_RSS' => 'bx_persons_num_rss',
+            'PARAM_NUM_CONNECTIONS_QUICK' => 'bx_persons_num_connections_quick',
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_persons_searchable_fields',
+            'PARAM_PUBLIC_SBSN' => 'bx_persons_public_subscriptions',
+            'PARAM_PUBLIC_SBSD' => 'bx_persons_public_subscribed_me',
+            'PARAM_REDIRECT_AADD' => 'bx_persons_redirect_aadd',
+            'PARAM_REDIRECT_AADD_CUSTOM_URL' => 'bx_persons_redirect_aadd_custom_url',
+
+            // objects
+            'OBJECT_STORAGE' => 'bx_persons_pictures',
+            'OBJECT_STORAGE_COVER' => 'bx_persons_pictures',
+            'OBJECT_IMAGES_TRANSCODER_THUMB' => 'bx_persons_thumb',
+            'OBJECT_IMAGES_TRANSCODER_ICON' => 'bx_persons_icon',
+            'OBJECT_IMAGES_TRANSCODER_AVATAR' => 'bx_persons_avatar',
+            'OBJECT_IMAGES_TRANSCODER_PICTURE' => 'bx_persons_picture',
+            'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_persons_cover',
+            'OBJECT_IMAGES_TRANSCODER_COVER_THUMB' => 'bx_persons_cover_thumb',
+        	'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_persons_gallery',
+            'OBJECT_VIEWS' => 'bx_persons',
+        	'OBJECT_FAVORITES' => 'bx_persons',
+        	'OBJECT_FEATURED' => 'bx_persons',
+        	'OBJECT_COMMENTS' => 'bx_persons',
+        	'OBJECT_REPORTS' => 'bx_persons',
+            'OBJECT_METATAGS' => 'bx_persons',
+            'OBJECT_FORM_ENTRY' => 'bx_person',
+            'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_person_view',
+        	'OBJECT_FORM_ENTRY_DISPLAY_VIEW_FULL' => 'bx_person_view_full', // for "info" tab on view profile page 
+            'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_person_add',
+            'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_person_edit',
+            'OBJECT_FORM_ENTRY_DISPLAY_EDIT_COVER' => 'bx_person_edit_cover',
+            'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_person_delete',
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_persons_view_actions', // actions menu on view entry page
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_persons_view_actions_more', // actions menu on view entry page for "more" popup
+            'OBJECT_MENU_SUBMENU' => 'bx_persons_submenu', // main module submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_persons_view_submenu',  // view entry submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_COVER' => 'bx_persons_view_submenu_cover',  // view entry submenu displayed in cover
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'persons-home', // first item in view entry submenu from main module submenu
+            'OBJECT_MENU_MANAGE_TOOLS' => 'bx_persons_menu_manage_tools', //manage menu in content administration tools
+            'OBJECT_PAGE_VIEW_ENTRY' => 'bx_persons_view_profile',
+            'OBJECT_PAGE_VIEW_ENTRY_CLOSED' => 'bx_persons_view_profile_closed',
+            'OBJECT_PRIVACY_VIEW' => 'bx_persons_allow_view_to',
+            'OBJECT_GRID_ADMINISTRATION' => 'bx_persons_administration',
+            'OBJECT_GRID_COMMON' => 'bx_persons_common',
+            'OBJECT_UPLOADERS_COVER' => array('bx_persons_cover_crop'),
+            'OBJECT_UPLOADERS_PICTURE' => array('bx_persons_picture_crop'),
+
+        	'EMAIL_FRIEND_REQUEST' => 'bx_persons_friend_request',
+
+            'TRIGGER_MENU_PROFILE_VIEW_SUBMENU' => 'trigger_profile_view_submenu',
+            'TRIGGER_MENU_PROFILE_VIEW_ACTIONS' => 'trigger_profile_view_actions',
+        	'TRIGGER_PAGE_VIEW_ENTRY' => 'trigger_page_profile_view_entry',
+
+            // menu items which visibility depends on custom visibility checking
+            'MENU_ITEM_TO_METHOD' => array (
+                'bx_persons_view_submenu' => $aMenuItems2MethodsSubmenu,
+                'bx_persons_view_actions' => $aMenuItems2MethodsActions,
+                'bx_persons_view_actions_more' => $aMenuItems2MethodsActions,
+            ),
+
+            // informer messages
+            'INFORMERS' => array (
+                'status' => array (
+                    'name' => 'bx-persons-status-not-active',
+                    'map' => array (
+                        BX_PROFILE_STATUS_PENDING => '_bx_persons_txt_account_pending',
+                        BX_PROFILE_STATUS_SUSPENDED => '_bx_persons_txt_account_suspended',
+                    ),
+                ),
+                'status_moderation' => array (
+                    'name' => 'bx-persons-status-not-active-moderation',
+                    'map' => array (
+                        BX_PROFILE_STATUS_PENDING => '_bx_persons_txt_account_pending_moderation',
+                        BX_PROFILE_STATUS_SUSPENDED => '_bx_persons_txt_account_suspended_moderation',
+                    ),
+                ),
+            ),
+
+            // some language keys
+            'T' => array (
+                'txt_sample_single' => '_bx_persons_txt_sample_single',
+            	'txt_sample_comment_single' => '_bx_persons_txt_sample_comment_single',
+                'txt_N_fans' => '_bx_persons_txt_N_friends',
+                'menu_item_title_befriend_sent' => '_bx_persons_menu_item_title_befriend_sent',
+                'menu_item_title_unfriend_cancel_request' => '_bx_persons_menu_item_title_unfriend_cancel_request',
+                'menu_item_title_befriend_confirm' => '_bx_persons_menu_item_title_befriend_confirm',
+                'menu_item_title_unfriend_reject_request' => '_bx_persons_menu_item_title_unfriend_reject_request',
+                'menu_item_title_befriend' => '_bx_persons_menu_item_title_befriend',
+                'menu_item_title_unfriend' => '_bx_persons_menu_item_title_unfriend',
+            	'grid_action_err_delete' => '_bx_persons_grid_action_err_delete',
+            	'grid_txt_account_manager' => '_bx_persons_grid_txt_account_manager',
+            	'filter_item_active' => '_bx_persons_grid_filter_item_title_adm_active',
+            	'filter_item_pending' => '_bx_persons_grid_filter_item_title_adm_pending',
+            	'filter_item_suspended' => '_bx_persons_grid_filter_item_title_adm_suspended',
+            	'filter_item_select_one_filter1' => '_bx_persons_grid_filter_item_title_adm_select_one_filter1',
+            	'menu_item_manage_my' => '_bx_persons_menu_item_title_manage_my',
+            	'menu_item_manage_all' => '_bx_persons_menu_item_title_manage_all',
+            	'txt_browse_favorites' => '_bx_persons_page_title_browse_favorites',
+                'option_redirect_aadd_profile' => '_bx_persons_option_redirect_aadd_profile',
+            	'option_redirect_aadd_last' => '_bx_persons_option_redirect_aadd_last',
+            	'option_redirect_aadd_custom' => '_bx_persons_option_redirect_aadd_custom'
+            ),
+
+        );
+
+        $this->_aJsClasses = array(
+        	'manage_tools' => 'BxPersonsManageTools'
+        );
+
+        $this->_aJsObjects = array(
+        	'manage_tools' => 'oBxPersonsManageTools'
+        );
+
+        $this->_aGridObjects = array(
+        	'common' => $this->CNF['OBJECT_GRID_COMMON'],
+        	'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
+        	
+        );
+    }
+}
+
+/** @} */

+ 28 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/classes/BxPersonsFormEntry.php

@@ -0,0 +1,28 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Persons Persons
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Create/Edit Person Form.
+ */
+class BxPersonsFormEntry extends BxBaseModProfileFormEntry
+{
+    public function __construct($aInfo, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_persons';
+        parent::__construct($aInfo, $oTemplate);
+
+        if (isset($this->aInputs['birthday']))
+            $this->aInputs['birthday']['attrs']['max'] = date('Y');
+        
+    }
+}
+
+/** @} */

+ 191 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/classes/BxPersonsSearchResult.php

@@ -0,0 +1,191 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Persons Persons
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxPersonsSearchResult extends BxBaseModProfileSearchResult
+{
+    function __construct($sMode = '', $aParams = false)
+    {
+        parent::__construct($sMode, $aParams);
+
+        $this->sUnitTemplate = 'unit_with_cover.html';
+
+        $this->aCurrent =  array(
+            'name' => 'bx_persons',
+            'module_name' => 'bx_persons',
+            'object_metatags' => 'bx_persons',
+            'title' => _t('_bx_persons_page_title_browse'),
+            'table' => 'sys_profiles',
+            'tableSearch' => 'bx_persons_data',
+            'ownFields' => array(),
+            'searchFields' => array(),
+            'restriction' => array(
+        		'account_id' => array('value' => '', 'field' => 'account_id', 'operator' => '='),
+                'perofileStatus' => array('value' => 'active', 'field' => 'status', 'operator' => '='),
+                'perofileType' => array('value' => 'bx_persons', 'field' => 'type', 'operator' => '='),
+                'owner' => array('value' => '', 'field' => 'author', 'operator' => '=', 'table' => 'bx_persons_data'),
+        		'featured' => array('value' => '', 'field' => 'featured', 'operator' => '<>', 'table' => 'bx_persons_data'),
+        		'online' => array('value' => '', 'field' => 'date', 'operator' => '>', 'table' => 'sys_sessions'),
+            ),
+            'join' => array (
+                'profile' => array(
+                    'type' => 'INNER',
+                    'table' => 'bx_persons_data',
+                    'mainField' => 'content_id',
+                    'onField' => 'id',
+                    'joinFields' => array('id', 'fullname', 'picture', 'cover', 'added', 'author', 'allow_view_to'),
+                ),
+                'account' => array(
+                    'type' => 'INNER',
+                    'table' => 'sys_accounts',
+                    'mainField' => 'account_id',
+                    'onField' => 'id',
+                    'joinFields' => array(),
+                ),
+            ),
+            'paginate' => array('perPage' => getParam('bx_persons_per_page_browse'), 'start' => 0),
+            'sorting' => 'none',
+            'rss' => array(
+                'title' => '',
+                'link' => '',
+                'image' => '',
+                'profile' => 0,
+                'fields' => array (
+                    'Guid' => 'link',
+                    'Link' => 'link',
+                    'Title' => 'fullname',
+                    'DateTimeUTS' => 'added',
+                    'Desc' => 'fullname',
+                    'Picture' => 'picture',
+                ),
+            ),
+            'ident' => 'id'
+        );
+
+        $this->sFilterName = 'bx_persons_filter';
+        $this->oModule = $this->getMain();
+        $this->aCurrent['searchFields'] = explode(',', getParam($this->oModule->_oConfig->CNF['PARAM_SEARCHABLE_FIELDS']));
+
+        $CNF = &$this->oModule->_oConfig->CNF;
+
+        switch ($sMode) {
+
+            case 'connections':
+                if ($this->_setConnectionsConditions($aParams)) {
+                    $oProfile = BxDolProfile::getInstance($aParams['profile']);
+                    $oProfile2 = isset($aParams['profile2']) ? BxDolProfile::getInstance($aParams['profile2']) : null;
+
+                    if (isset($aParams['type']) && $aParams['type'] == 'common' && $oProfile && $oProfile2)
+                        $this->aCurrent['title'] = _t('_bx_persons_page_title_browse_connections_mutual', $oProfile->getDisplayName(), $oProfile2->getDisplayName());
+                    elseif ((!isset($aParams['type']) || $aParams['type'] != 'common') && $oProfile)
+                        $this->aCurrent['title'] = _t('_bx_persons_page_title_browse_connections', $oProfile->getDisplayName());
+
+                    $this->aCurrent['rss']['link'] = 'modules/?r=persons/rss/' . $sMode . '/' . $aParams['object'] . '/' . $aParams['type'] . '/' . (int)$aParams['profile'] . '/' . (int)$aParams['profile2'] . '/' . (int)$aParams['mutual'];
+                }
+                break;
+
+			case 'acl':
+                if ($this->_setAclConditions($aParams)) {
+					$this->aCurrent['title'] = _t('_bx_persons_page_title_browse_by_acl', implode(', ', $this->aCurrent['title']));
+                    unset($this->aCurrent['rss']);
+                }
+                break;
+
+            case 'favorite':
+                $oProfileAuthor = null;
+                if(!$this->_setFavoriteConditions($sMode, $aParams, $oProfileAuthor)) {
+                    $this->isError = true;
+                    break;
+                }
+                break;
+
+            case 'recent':
+                $this->aCurrent['rss']['link'] = 'modules/?r=persons/rss/' . $sMode;
+                $this->aCurrent['title'] = _t('_bx_persons_page_title_browse_recent');
+                $this->aCurrent['sorting'] = 'last';
+                $this->sBrowseUrl = 'page.php?i=persons-home';
+                break;
+
+            case 'featured':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_persons_page_title_browse_featured');
+                $this->aCurrent['restriction']['featured']['value'] = '0';
+                $this->aCurrent['rss']['link'] = 'modules/?r=persons/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'featured';
+                break;
+
+            case 'active':
+                $this->aCurrent['rss']['link'] = 'modules/?r=persons/rss/' . $sMode;
+                $this->aCurrent['title'] = _t('_bx_persons_page_title_browse_active');
+                $this->aCurrent['sorting'] = 'active';
+                $this->sBrowseUrl = 'page.php?i=persons-active';
+                break;
+
+			case 'online':
+                $this->aCurrent['rss']['link'] = 'modules/?r=persons/rss/' . $sMode;
+                $this->aCurrent['title'] = _t('_bx_persons_page_title_browse_online');
+                $this->aCurrent['restriction']['online']['value'] = time() - 60 * (int)getParam('sys_account_online_time');
+                $this->aCurrent['restriction_sql'] = ' AND `sys_accounts`.`profile_id`=`sys_profiles`.`id`';
+                $this->aCurrent['join']['session'] = array(
+                    'type' => 'INNER',
+                    'table' => 'sys_sessions',
+                    'mainField' => 'account_id',
+                    'onField' => 'user_id',
+                    'joinFields' => array('date'),
+                    'groupTable' => $this->aCurrent['table'],
+                    'groupField' => 'id'
+                );
+                $this->aCurrent['sorting'] = 'online';
+                $this->sBrowseUrl = 'page.php?i=persons-online';
+                break;
+
+            case '': // search results
+                $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
+                $this->aCurrent['title'] = _t('_bx_persons');
+                unset($this->aCurrent['paginate']['perPage'], $this->aCurrent['rss']);
+                break;
+
+            default:
+                $this->isError = true;
+        }
+
+        $this->sCenterContentUnitSelector = false;
+    }
+
+    function getAlterOrder()
+    {
+        switch ($this->aCurrent['sorting']) {
+            case 'featured':
+                return array('order' => ' ORDER BY `bx_persons_data`.`featured` DESC ');
+	        case 'none':
+	            return array();
+	        case 'active':
+	            return array('order' => ' ORDER BY `sys_accounts`.`logged` DESC ');
+			case 'online':
+	            return array('order' => ' ORDER BY `sys_sessions`.`date` DESC ');
+	        case 'last':
+	        default:
+	            return array('order' => ' ORDER BY `bx_persons_data`.`added` DESC ');
+        }
+    }
+
+    function _getPseud ()
+    {
+        return array(
+            'id' => 'id',
+            'fullname' => 'fullname',
+            'added' => 'added',
+            'author' => 'author',
+            'picture' => 'picture',
+        );
+    }
+}
+
+/** @} */

+ 148 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/install/config.php

@@ -0,0 +1,148 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Persons Persons
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_persons',
+    'title' => 'Persons',
+    'note' => 'Basic person profiles functionality.',
+    'version' => '9.0.5',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/persons/',
+    'home_uri' => 'persons',
+
+    'db_prefix' => 'bx_persons_',
+    'class_prefix' => 'BxPersons',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Persons',
+
+    /**
+     * Connections.
+     */
+    'connections' => array(
+		'sys_profiles_friends' => array ('type' => 'profiles'),
+		'sys_profiles_subscriptions' => array ('type' => 'profiles'),
+    ),
+
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu', 
+    	'trigger_profile_view_actions',
+    ),
+
+	/**
+     * Page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry', 
+    ),
+
+    /**
+     * Storages.
+     */
+    'storages' => array(
+    	'bx_persons_pictures'
+    ),
+
+	/**
+     * Transcoders.
+     */
+    'transcoders' => array(
+    	'bx_persons_icon',
+    	'bx_persons_thumb',
+    	'bx_persons_avatar',
+    	'bx_persons_picture',
+    	'bx_persons_cover',
+    	'bx_persons_cover_thumb',
+        'bx_persons_gallery'
+    ),
+
+    /**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_persons',
+    	'bx_persons_cmts',
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+    	'process_storages' => 1,
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'process_connections' => 1,
+    	'process_deleted_profiles' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+	'enable_success' => array(
+    	'process_menu_triggers' => 1,
+    	'process_page_triggers' => 1,
+    	'process_esearches' => 1,
+    	'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'unregister_transcoders' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Connections Section
+     */
+    'relations' => array(
+        'bx_notifications',
+    ),
+);
+
+/** @} */

+ 261 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/install/langs/en.xml

@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_persons"><![CDATA[Persons]]></string>
+	<string name="_bx_persons_cmts"><![CDATA[Persons' Comments]]></string>
+
+	<string name="_bx_persons_option_autoapproval"><![CDATA[Activate all persons after creation automatically]]></string>
+	<string name="_bx_persons_option_default_acl_level"><![CDATA[Default member's level to assign after person's profile creation]]></string>
+	<string name="_bx_persons_option_redirect_aadd"><![CDATA[Redirect after person's profile creation to]]></string>
+	<string name="_bx_persons_option_redirect_aadd_profile"><![CDATA[Profile Page]]></string>
+	<string name="_bx_persons_option_redirect_aadd_last"><![CDATA[Last Page]]></string>
+	<string name="_bx_persons_option_redirect_aadd_custom"><![CDATA[Custom Page]]></string>
+	<string name="_bx_persons_option_redirect_aadd_custom_url"><![CDATA[URL for 'Custom Page' redirect]]></string>
+	<string name="_bx_persons_option_num_connections_quick"><![CDATA[Number of items in friends block]]></string>
+	<string name="_bx_persons_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_persons_option_num_rss"><![CDATA[Number of items in RSS feed]]></string>
+	<string name="_bx_persons_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+    <string name="_bx_persons_option_public_subscriptions"><![CDATA[Public following list]]></string>
+    <string name="_bx_persons_option_public_subscribed_me"><![CDATA[Public followers list]]></string>
+
+	<string name="_bx_persons_form_profile"><![CDATA[Persons]]></string>
+	<string name="_bx_persons_form_profile_display_add"><![CDATA[Add Person]]></string>
+	<string name="_bx_persons_form_profile_display_edit"><![CDATA[Edit Person]]></string>
+	<string name="_bx_persons_form_profile_display_edit_cover"><![CDATA[Edit Cover]]></string>
+	<string name="_bx_persons_form_profile_display_delete"><![CDATA[Delete Person]]></string>
+	<string name="_bx_persons_form_profile_display_view"><![CDATA[View Person]]></string>
+	<string name="_bx_persons_form_profile_display_view_full"><![CDATA[Full View Person]]></string>
+    <string name="_bx_persons_form_profile_input_sys_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_persons_form_profile_input_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_persons_form_profile_input_sys_allow_view_to"><![CDATA[Visible to]]></string>
+    <string name="_bx_persons_form_profile_input_allow_view_to"><![CDATA[Visible to]]></string>
+	<string name="_bx_persons_form_profile_input_sys_fullname"><![CDATA[Full Name]]></string>
+	<string name="_bx_persons_form_profile_input_fullname"><![CDATA[Full Name]]></string>
+	<string name="_bx_persons_form_profile_input_fullname_err"><![CDATA[This information is essential. Please, fill in this field.]]></string>
+	<string name="_bx_persons_form_profile_input_sys_desc"><![CDATA[Description]]></string>
+	<string name="_bx_persons_form_profile_input_desc"><![CDATA[Description]]></string>
+	<string name="_bx_persons_form_profile_input_sys_picture"><![CDATA[Profile Picture]]></string>
+	<string name="_bx_persons_form_profile_input_picture"><![CDATA[Upload a profile picture]]></string>
+	<string name="_bx_persons_form_profile_input_picture_err"><![CDATA[Profile picture is mandatory.]]></string>
+	<string name="_bx_persons_form_profile_input_sys_cover"><![CDATA[Cover Picture]]></string>
+	<string name="_bx_persons_form_profile_input_cover"><![CDATA[Upload New Cover Picture]]></string>
+	<string name="_bx_persons_form_profile_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_persons_form_profile_input_delete_confirm"><![CDATA[I am sure I want to delete this profile]]></string>
+	<string name="_bx_persons_form_profile_input_delete_confirm_info"><![CDATA[This action can not be undone.]]></string>
+	<string name="_bx_persons_form_profile_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete your profile.]]></string>
+    <string name="_bx_persons_form_profile_input_sys_birthday"><![CDATA[Birthday]]></string>
+    <string name="_bx_persons_form_profile_input_birthday"><![CDATA[Birthday]]></string>
+    <string name="_bx_persons_form_profile_input_sys_gender"><![CDATA[Gender]]></string>
+    <string name="_bx_persons_form_profile_input_gender"><![CDATA[Gender]]></string>
+    <string name="_bx_persons_form_profile_input_sys_profile_email"><![CDATA[Email]]></string>
+    <string name="_bx_persons_form_profile_input_profile_email"><![CDATA[Email]]></string>
+    <string name="_bx_persons_form_profile_input_sys_profile_status"><![CDATA[Status]]></string>
+    <string name="_bx_persons_form_profile_input_profile_status"><![CDATA[Status]]></string>
+
+	<string name="_bx_persons_acl_action_create_profile"><![CDATA[Create Person's Profile]]></string>
+	<string name="_bx_persons_acl_action_delete_profile"><![CDATA[Delete Person's Profile]]></string>
+	<string name="_bx_persons_acl_action_view_profile"><![CDATA[View Person's Profile]]></string>
+	<string name="_bx_persons_acl_action_edit_any_profile"><![CDATA[Edit Any Person's Profile]]></string>
+
+	<string name="_bx_persons_page_title_sys_create_profile"><![CDATA[Create a Profile - Person]]></string>
+	<string name="_bx_persons_page_title_create_profile"><![CDATA[Create a Profile - Person]]></string>
+	<string name="_bx_persons_page_title_sys_edit_profile"><![CDATA[Edit Profile]]></string>
+	<string name="_bx_persons_page_title_edit_profile"><![CDATA[Edit Profile]]></string>
+	<string name="_bx_persons_page_title_sys_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+	<string name="_bx_persons_page_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+	<string name="_bx_persons_page_title_sys_delete_profile"><![CDATA[Delete Profile]]></string>
+	<string name="_bx_persons_page_title_delete_profile"><![CDATA[Delete Profile]]></string>
+    <string name="_bx_persons_page_title_sys_view_profile"><![CDATA[View Profile]]></string>
+    <string name="_bx_persons_page_title_sys_view_profile_closed"><![CDATA[View Profile with Limited Visibility]]></string>
+	<string name="_bx_persons_page_title_view_profile"><![CDATA[{display_name}]]></string>
+	<string name="_bx_persons_page_title_browse"><![CDATA[People]]></string>
+	<string name="_bx_persons_page_title_browse_featured"><![CDATA[Featured People]]></string>
+	<string name="_bx_persons_page_title_browse_active"><![CDATA[Active People]]></string>
+	<string name="_bx_persons_page_title_browse_online"><![CDATA[Online People]]></string>
+	<string name="_bx_persons_page_title_browse_recent"><![CDATA[New People]]></string>
+	<string name="_bx_persons_page_title_browse_connections"><![CDATA[{0} connections]]></string>
+	<string name="_bx_persons_page_title_browse_connections_mutual"><![CDATA[{0} and {1} mutual connections]]></string>
+	<string name="_bx_persons_page_title_browse_favorites"><![CDATA[{0} favorites]]></string>
+	<string name="_bx_persons_page_title_browse_by_acl"><![CDATA[{0} People]]></string>
+	<string name="_bx_persons_page_title_sys_profile_favorites"><![CDATA[Favorite persons]]></string>
+	<string name="_bx_persons_page_title_profile_favorites"><![CDATA[Favorite persons]]></string>
+	<string name="_bx_persons_page_title_sys_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_persons_page_title_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_persons_page_title_sys_friend_requests"><![CDATA[Friend Requests]]></string>
+	<string name="_bx_persons_page_title_friend_requests"><![CDATA[Friend Requests]]></string>
+	<string name="_bx_persons_page_title_sys_profile_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_persons_page_title_profile_subscriptions"><![CDATA[Following & Followers]]></string>
+    <string name="_bx_persons_page_title_sys_profile_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_persons_page_title_profile_comments"><![CDATA[Comments]]></string>
+	<string name="_bx_persons_page_title_sys_profile_info"><![CDATA[Profile Info]]></string>
+	<string name="_bx_persons_page_title_profile_info"><![CDATA[Info about {display_name}]]></string>
+	<string name="_bx_persons_page_title_sys_recent"><![CDATA[New People]]></string>
+	<string name="_bx_persons_page_title_recent"><![CDATA[New People]]></string>
+	<string name="_bx_persons_page_title_sys_manage"><![CDATA[Manage Own People]]></string>
+	<string name="_bx_persons_page_title_sys_manage_administration"><![CDATA[Manage All People]]></string>
+	<string name="_bx_persons_page_title_manage"><![CDATA[Manage People]]></string>
+	<string name="_bx_persons_page_title_sys_active"><![CDATA[Active People]]></string>
+	<string name="_bx_persons_page_title_active"><![CDATA[Active People]]></string>
+	<string name="_bx_persons_page_title_sys_online"><![CDATA[Online People]]></string>
+	<string name="_bx_persons_page_title_online"><![CDATA[Online People]]></string>
+	<string name="_bx_persons_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_persons_page_title_entries_search"><![CDATA[Search]]></string>
+
+	<string name="_bx_persons_page_block_title_profile_private"><![CDATA[Private Profile]]></string>
+	<string name="_bx_persons_page_block_title_choose_type"><![CDATA[Choose Profile Type]]></string>
+	<string name="_bx_persons_page_block_title_create_profile"><![CDATA[Create a Profile - Person]]></string>
+	<string name="_bx_persons_page_block_title_edit_profile"><![CDATA[Edit Profile]]></string>
+	<string name="_bx_persons_page_block_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+	<string name="_bx_persons_page_block_title_delete_profile"><![CDATA[Delete Profile]]></string>
+	<string name="_bx_persons_page_block_title_profile_all_actions"><![CDATA[All Actions]]></string>
+	<string name="_bx_persons_page_block_title_profile_info_link"><![CDATA[About <a href="{profile_link}">{display_name}</a>]]></string>
+	<string name="_bx_persons_page_block_title_profile_info"><![CDATA[Info]]></string>
+	<string name="_bx_persons_page_block_title_system_profile_info"><![CDATA[Info]]></string>
+	<string name="_bx_persons_page_block_title_profile_membership"><![CDATA[Membership]]></string>
+	<string name="_bx_persons_page_block_title_system_profile_membership"><![CDATA[Membership]]></string>
+	<string name="_bx_persons_page_block_title_profile_description"><![CDATA[Description]]></string>
+	<string name="_bx_persons_page_block_title_profile_favorites"><![CDATA[Favorite persons]]></string>
+	<string name="_bx_persons_page_block_title_system_profile_favorites"><![CDATA[Favorite persons]]></string>
+	<string name="_bx_persons_page_block_title_profile_friends_link"><![CDATA[Friends of <a href="{profile_link}">{display_name}</a>]]></string>
+	<string name="_bx_persons_page_block_title_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_persons_page_block_title_system_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_persons_page_block_title_friend_requests_link"><![CDATA[Friend Requests for <a href="{profile_link}">{display_name}</a>]]></string>
+	<string name="_bx_persons_page_block_title_system_friend_requests"><![CDATA[Friend Requests]]></string>
+	<string name="_bx_persons_page_block_title_profile_location"><![CDATA[Location]]></string>
+	<string name="_bx_persons_page_block_title_system_profile_subscriptions"><![CDATA[Following]]></string>
+	<string name="_bx_persons_page_block_title_profile_subscriptions"><![CDATA[Following]]></string>
+	<string name="_bx_persons_page_block_title_system_profile_subscribed_me"><![CDATA[Followers]]></string>
+    <string name="_bx_persons_page_block_title_profile_subscribed_me"><![CDATA[Followers]]></string>
+    <string name="_bx_persons_page_block_title_profile_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_persons_page_block_title_profile_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
+	<string name="_bx_persons_page_block_title_featured_profiles"><![CDATA[Featured People]]></string>
+	<string name="_bx_persons_page_block_title_profile_actions"><![CDATA[Actions]]></string>
+	<string name="_bx_persons_page_block_title_latest_profiles"><![CDATA[New People]]></string>
+	<string name="_bx_persons_page_block_title_system_manage"><![CDATA[Manage Own People]]></string>
+	<string name="_bx_persons_page_block_title_system_manage_administration"><![CDATA[Manage All People]]></string>
+	<string name="_bx_persons_page_block_title_manage"><![CDATA[Manage People]]></string>
+	<string name="_bx_persons_page_block_title_active_profiles"><![CDATA[Active People]]></string>
+	<string name="_bx_persons_page_block_title_online_profiles"><![CDATA[Online People]]></string>
+	<string name="_bx_persons_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_persons_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_persons_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_persons_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+
+    <string name="_bx_persons_menu_title_submenu"><![CDATA[Persons Submenu]]></string>
+    <string name="_bx_persons_menu_set_title_submenu"><![CDATA[Persons Submenu]]></string>
+    <string name="_bx_persons_menu_set_title_view_profile_actions"><![CDATA[Person Actions]]></string>
+    <string name="_bx_persons_menu_title_view_profile_actions"><![CDATA[Person Actions]]></string>
+    <string name="_bx_persons_menu_set_title_view_profile_actions_more"><![CDATA[Person More Actions]]></string>
+    <string name="_bx_persons_menu_title_view_profile_actions_more"><![CDATA[Person More Actions]]></string>
+    <string name="_bx_persons_menu_set_title_view_profile_submenu"><![CDATA[View Person Submenu]]></string>
+    <string name="_bx_persons_menu_title_view_profile_submenu"><![CDATA[View Person Submenu]]></string>
+    <string name="_bx_persons_menu_title_view_profile_submenu_cover"><![CDATA[Person Cover Submenu]]></string>
+	<string name="_bx_persons_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_persons_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_persons_menu_item_title_system_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_persons_menu_item_title_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_persons_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
+    <string name="_bx_persons_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
+    <string name="_bx_persons_menu_item_title_system_edit_cover"><![CDATA[Edit Cover]]></string>
+    <string name="_bx_persons_menu_item_title_edit_cover"><![CDATA[Edit Cover]]></string>
+    <string name="_bx_persons_menu_item_title_system_edit_profile"><![CDATA[Edit Person]]></string>
+    <string name="_bx_persons_menu_item_title_edit_profile"><![CDATA[Edit Profile]]></string>
+    <string name="_bx_persons_menu_item_title_system_delete_profile"><![CDATA[Delete Person]]></string>
+    <string name="_bx_persons_menu_item_title_delete_profile"><![CDATA[Delete Profile]]></string>
+    <string name="_bx_persons_menu_item_title_system_delete_account"><![CDATA[Delete Account]]></string>
+    <string name="_bx_persons_menu_item_title_delete_account"><![CDATA[Delete Account]]></string>
+    <string name="_bx_persons_menu_item_title_system_delete_account_content"><![CDATA[Delete Account with Content]]></string>
+    <string name="_bx_persons_menu_item_title_delete_account_content"><![CDATA[Delete Account with Content]]></string>
+    <string name="_bx_persons_menu_item_title_system_profile_type"><![CDATA[Person]]></string>
+    <string name="_bx_persons_menu_item_title_profile_type"><![CDATA[Person]]></string>
+    <string name="_bx_persons_menu_item_title_system_create_profile"><![CDATA[Person]]></string>
+    <string name="_bx_persons_menu_item_title_create_profile"><![CDATA[Person]]></string>
+    <string name="_bx_persons_menu_item_title_system_view_profile_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_persons_menu_item_title_view_profile_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_persons_menu_item_title_system_view_profile_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_persons_menu_item_title_view_profile_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_persons_menu_item_title_system_view_profile_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_persons_menu_item_title_view_profile_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_persons_menu_item_title_system_view_profile_info"><![CDATA[Info]]></string>
+    <string name="_bx_persons_menu_item_title_view_profile_info"><![CDATA[Info]]></string>
+    <string name="_bx_persons_menu_item_title_system_view_profile_view"><![CDATA[Profile]]></string>
+    <string name="_bx_persons_menu_item_title_view_profile_view"><![CDATA[Profile]]></string>
+    <string name="_bx_persons_menu_item_title_system_befriend"><![CDATA[Add friend]]></string>
+    <string name="_bx_persons_menu_item_title_befriend"><![CDATA[Add friend]]></string>
+    <string name="_bx_persons_menu_item_title_befriend_sent"><![CDATA[Add friend (requested)]]></string>
+    <string name="_bx_persons_menu_item_title_befriend_confirm"><![CDATA[Accept friend request]]></string>
+    <string name="_bx_persons_menu_item_title_system_unfriend"><![CDATA[Unfriend]]></string>
+    <string name="_bx_persons_menu_item_title_unfriend"><![CDATA[Unfriend]]></string>
+    <string name="_bx_persons_menu_item_title_unfriend_cancel_request"><![CDATA[Cancel friend request]]></string>
+    <string name="_bx_persons_menu_item_title_unfriend_reject_request"><![CDATA[Reject friend request]]></string>
+    <string name="_bx_persons_menu_item_title_system_subscribe"><![CDATA[Follow]]></string>
+    <string name="_bx_persons_menu_item_title_subscribe"><![CDATA[Follow]]></string>
+    <string name="_bx_persons_menu_item_title_system_unsubscribe"><![CDATA[Unfollow]]></string>
+    <string name="_bx_persons_menu_item_title_unsubscribe"><![CDATA[Unfollow]]></string>
+    <string name="_bx_persons_menu_item_title_system_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_persons_menu_item_title_more_actions"><![CDATA[]]></string>
+    <string name="_bx_persons_menu_item_title_system_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_persons_menu_item_title_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_persons_menu_item_title_system_friend_requests"><![CDATA[Friend requests number]]></string>
+    <string name="_bx_persons_menu_item_title_friend_requests"><![CDATA[{addon} friend requests]]></string>
+    <string name="_bx_persons_menu_item_title_system_manage_my_profiles"><![CDATA[My profiles]]></string>
+    <string name="_bx_persons_menu_item_title_manage_my_profiles"><![CDATA[{addon} profiles]]></string>
+    <string name="_bx_persons_menu_item_title_system_favorites"><![CDATA[Favorite Persons]]></string>
+    <string name="_bx_persons_menu_item_title_favorites"><![CDATA[{addon} favorite persons]]></string>    
+    <string name="_bx_persons_menu_item_title_system_subscriptions"><![CDATA[Following]]></string>
+    <string name="_bx_persons_menu_item_title_subscriptions"><![CDATA[{addon} following]]></string>
+    <string name="_bx_persons_menu_item_title_system_subscribed_me"><![CDATA[Followers]]></string>
+    <string name="_bx_persons_menu_item_title_subscribed_me"><![CDATA[{addon} followers]]></string>
+    <string name="_bx_persons_menu_item_title_system_entries_recent"><![CDATA[New]]></string>
+    <string name="_bx_persons_menu_item_title_entries_recent"><![CDATA[New]]></string>
+    <string name="_bx_persons_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_persons_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_persons_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_persons_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_persons_menu_item_title_system_entries_home"><![CDATA[Persons]]></string>
+    <string name="_bx_persons_menu_item_title_entries_home"><![CDATA[People]]></string>
+	<string name="_bx_persons_menu_item_title_system_admt_persons"><![CDATA[Profiles]]></string>
+	<string name="_bx_persons_menu_item_title_admt_persons"><![CDATA[Profiles - {addon} unapproved]]></string>
+	<string name="_bx_persons_menu_item_title_manage_my"><![CDATA[My Profiles]]></string>
+	<string name="_bx_persons_menu_item_title_manage_all"><![CDATA[All Profiles]]></string>   
+	<string name="_bx_persons_menu_item_title_system_entries_active"><![CDATA[Active]]></string>
+	<string name="_bx_persons_menu_item_title_entries_active"><![CDATA[Active]]></string>
+	<string name="_bx_persons_menu_item_title_system_entries_online"><![CDATA[Online]]></string>
+	<string name="_bx_persons_menu_item_title_entries_online"><![CDATA[Online]]></string>
+
+	<string name="_bx_persons_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_persons_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_persons_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
+	<string name="_bx_persons_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>
+	<string name="_bx_persons_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_persons_grid_column_title_adm_fullname"><![CDATA[Name]]></string>
+    <string name="_bx_persons_grid_column_title_adm_last_online"><![CDATA[Last Online]]></string>
+    <string name="_bx_persons_grid_column_title_adm_account"><![CDATA[Account]]></string>
+    <string name="_bx_persons_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_persons_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
+    <string name="_bx_persons_grid_action_title_adm_set_acl_level"><![CDATA[Set Membership]]></string>
+    <string name="_bx_persons_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_persons_grid_action_err_delete"><![CDATA[Cannot delete the selected person(s).]]></string>
+    <string name="_bx_persons_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_persons_chart_growth"><![CDATA[Persons: Growth]]></string>
+    <string name="_bx_persons_chart_growth_speed"><![CDATA[Persons: Growth Speed]]></string>
+
+    <string name="_bx_persons_search_extended"><![CDATA[Persons Search]]></string>
+    <string name="_bx_persons_search_extended_cmts"><![CDATA[Persons Comments Search]]></string>
+
+    <string name="_bx_persons_txt_account_pending"><![CDATA[This profile is pending approval, please wait until it is activated.]]></string>
+    <string name="_bx_persons_txt_account_pending_moderation"><![CDATA[This <a href="{0}">profile</a> is pending approval.]]></string>
+    <string name="_bx_persons_txt_account_suspended"><![CDATA[This profile is suspended.]]></string>
+    <string name="_bx_persons_txt_account_suspended_moderation"><![CDATA[This <a href="{0}">profile</a> is suspended.]]></string>
+    <string name="_bx_persons_txt_N_friends"><![CDATA[{0} friends]]></string>
+    <string name="_bx_persons_txt_ntfs_timeline_post_common"><![CDATA[New post in <a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> profile timeline from <a href="{subentry_url}">{subentry_sample}</a>]]></string>
+    <string name="_bx_persons_txt_sample_single"><![CDATA[person]]></string>
+    <string name="_bx_persons_txt_sample_comment_single"><![CDATA[person's comment]]></string>
+
+    <string name="_bx_persons_email_friend_request"><![CDATA[Friend request]]></string>
+    <string name="_bx_persons_email_friend_request_subject"><![CDATA[Friendship Request]]></string>
+    <string name="_bx_persons_email_friend_request_body"><![CDATA[{email_header}
+<p><a href="{SenderUrl}">{SenderDisplayName}</a> wants to be friends with you. <a href="{FriendsLink}">Respond</a>.</p>
+{email_footer}]]></string>
+</resources>

+ 72 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/install/sql/disable.sql

@@ -0,0 +1,72 @@
+
+-- SETTINGS
+
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_persons' LIMIT 1);
+SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
+DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
+DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
+DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
+
+-- PAGES
+
+DELETE FROM `sys_objects_page` WHERE `module` = 'bx_persons';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_persons' OR `object` IN('bx_persons_create_profile', 'bx_persons_delete_profile', 'bx_persons_edit_profile', 'bx_persons_edit_profile_cover', 'bx_persons_view_profile', 'bx_persons_view_profile_closed', 'bx_persons_profile_info', 'bx_persons_profile_friends', 'bx_persons_friend_requests', 'bx_persons_profile_favorites', 'bx_persons_profile_subscriptions', 'bx_persons_profile_comments', 'bx_persons_home', 'bx_persons_search', 'bx_persons_manage');
+
+-- MENU
+
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_persons';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_persons';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_persons' OR `set_name` IN('bx_persons_view_submenu', 'bx_persons_submenu', 'bx_persons_view_actions', 'bx_persons_view_actions_more');
+
+-- ACL
+DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_persons';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_persons';
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_persons';
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_persons';
+
+-- FAFORITES
+DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_persons';
+
+-- FEATURED
+DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_persons';
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_persons';
+
+-- METATAGS
+DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_persons';
+
+-- SEARCH
+DELETE FROM `sys_objects_search` WHERE `ObjectName` = 'bx_persons';
+
+-- STATS
+DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_persons%';
+
+-- CHARTS
+DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_persons%';
+
+-- GRIDS
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_persons_administration', 'bx_persons_common');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_persons_administration', 'bx_persons_common');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_persons_administration', 'bx_persons_common');
+
+-- LIVE UPDATES
+DELETE FROM `sys_objects_live_updates` WHERE `name` = 'bx_persons_friend_requests';
+
+-- ALERTS
+SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_persons' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
+
+-- PRIVACY 
+DELETE FROM `sys_objects_privacy` WHERE `object` IN('bx_persons_allow_view_to');
+
+-- EMAIL TEMPLATES
+DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_persons';
+
+-- UPLOADERS
+DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_persons_cover_crop', 'bx_persons_picture_crop');

+ 455 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/install/sql/enable.sql

@@ -0,0 +1,455 @@
+
+-- SETTINGS
+
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_persons', '_bx_persons', 'bx_persons@modules/boonex/persons/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_persons', '_bx_persons', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
+('bx_persons_autoapproval', 'on', @iCategId, '_bx_persons_option_autoapproval', 'checkbox', '', '', '', 1),
+('bx_persons_default_acl_level', '3', @iCategId, '_bx_persons_option_default_acl_level', 'select', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"get_memberships";s:6:"params";a:2:{i:0;b:0;i:1;b:1;}s:5:"class";s:16:"TemplAclServices";}', '', '', 2),
+('bx_persons_redirect_aadd', 'profile', @iCategId, '_bx_persons_option_redirect_aadd', 'select', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:30:"get_options_redirect_after_add";}', '', '', 3),
+('bx_persons_redirect_aadd_custom_url', '', @iCategId, '_bx_persons_option_redirect_aadd_custom_url', 'digit', '', '', '', 4),
+('bx_persons_num_connections_quick', '4', @iCategId, '_bx_persons_option_num_connections_quick', 'digit', '', '', '', 10),
+('bx_persons_per_page_browse', '20', @iCategId, '_bx_persons_option_per_page_browse', 'digit', '', '', '', 11),
+('bx_persons_num_rss', '10', @iCategId, '_bx_persons_option_num_rss', 'digit', '', '', '', 12),
+('bx_persons_searchable_fields', 'fullname,description', @iCategId, '_bx_persons_option_searchable_fields', 'list', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:21:"get_searchable_fields";}', '', '', 20),
+('bx_persons_public_subscriptions', '', @iCategId, '_bx_persons_option_public_subscriptions', 'checkbox', '', '', '', 30),
+('bx_persons_public_subscribed_me', '', @iCategId, '_bx_persons_option_public_subscribed_me', 'checkbox', '', '', '', 31);
+
+-- PAGES
+
+-- PAGE: create profile
+
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_create_profile', 'create-persons-profile', '_bx_persons_page_title_sys_create_profile', '_bx_persons_page_title_create_profile', 'bx_persons', 5, 2147483647, 1, 'page.php?i=create-persons-profile', '', '', '', 0, 1, 0, '', '');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_persons_create_profile', 1, 'bx_persons', '_bx_persons_page_block_title_choose_type', 11, 2147483647, 'menu', 'sys_add_profile_vertical', 0, 1, 0, 0),
+('bx_persons_create_profile', 1, 'bx_persons', '_bx_persons_page_block_title_create_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:13:\"entity_create\";}', 0, 1, 1, 1);
+
+-- PAGE: view profile
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_view_profile', 'view-persons-profile', '_bx_persons_page_title_sys_view_profile', '_bx_persons_page_title_view_profile', 'bx_persons', 7, 2147483647, 1, 'page.php?i=view-persons-profile', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('bx_persons_view_profile', 2, 'bx_persons', '', '_bx_persons_page_block_title_profile_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 0),
+('bx_persons_view_profile', 2, 'bx_persons', '', '_bx_persons_page_block_title_profile_description', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 0),
+('bx_persons_view_profile', 2, 'bx_persons', '', '_bx_persons_page_block_title_profile_friends', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:15:\"profile_friends\";}', 0, 0, 1, 1),
+('bx_persons_view_profile', 3, 'bx_persons', '', '_bx_persons_page_block_title_profile_location', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:15:\"entity_location\";}', 0, 0, 0, 0),
+('bx_persons_view_profile', 3, 'bx_persons', '', '_bx_persons_page_block_title_profile_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 0),
+('bx_persons_view_profile', 3, 'bx_persons', '', '_bx_persons_page_block_title_profile_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 1, 1),
+('bx_persons_view_profile', 3, 'bx_persons', '', '_bx_persons_page_block_title_profile_membership', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:18:\"profile_membership\";}', 0, 0, 1, 2),
+('bx_persons_view_profile', 3, 'bx_persons', '', '_bx_persons_page_block_title_profile_location', 3, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:13:\"locations_map\";s:6:\"params\";a:2:{i:0;s:10:\"bx_persons\";i:1;s:12:\"{content_id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 3);
+
+-- PAGE: view closed profile 
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_view_profile_closed', 'view-person-profile-closed', '_bx_persons_page_title_sys_view_profile_closed', '_bx_persons_page_title_view_profile', 'bx_persons', 10, 2147483647, 1, 'page.php?i=view-person-profile', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_persons_view_profile_closed', 1, 'bx_persons', '', '_bx_persons_page_block_title_profile_private', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:19:\"private_profile_msg\";}', 0, 1, 1, 0);
+
+-- PAGE: edit profile
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_edit_profile', 'edit-persons-profile', '_bx_persons_page_title_sys_edit_profile', '_bx_persons_page_title_edit_profile', 'bx_persons', 5, 2147483647, 1, 'page.php?i=edit-persons-profile', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_persons_edit_profile', 1, 'bx_persons', '_bx_persons_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
+
+-- PAGE: edit profile cover
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_edit_profile_cover', 'edit-persons-cover', '_bx_persons_page_title_sys_edit_profile_cover', '_bx_persons_page_title_edit_profile_cover', 'bx_persons', 5, 2147483647, 1, 'page.php?i=edit-persons-cover', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_persons_edit_profile_cover', 1, 'bx_persons', '_bx_persons_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
+
+-- PAGE: delete profile
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_delete_profile', 'delete-persons-profile', '_bx_persons_page_title_sys_delete_profile', '_bx_persons_page_title_delete_profile', 'bx_persons', 5, 2147483647, 1, 'page.php?i=delete-persons-profile', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_persons_delete_profile', 1, 'bx_persons', '_bx_persons_page_block_title_delete_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:13:\"entity_delete\";}', 0, 0, 0);
+
+-- PAGE: profile info
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_profile_info', 'persons-profile-info', '_bx_persons_page_title_sys_profile_info', '_bx_persons_page_title_profile_info', 'bx_persons', 5, 2147483647, 1, 'page.php?i=persons-profile-info', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_persons_profile_info', 1, 'bx_persons', '_bx_persons_page_block_title_system_profile_info', '_bx_persons_page_block_title_profile_info_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:16:\"entity_info_full\";}', 0, 0, 1, 1),
+('bx_persons_profile_info', 1, 'bx_persons', '', '_bx_persons_page_block_title_profile_description', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 2);
+
+-- PAGE: profile friends
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_profile_friends', 'persons-profile-friends', '_bx_persons_page_title_sys_profile_friends', '_bx_persons_page_title_profile_friends', 'bx_persons', 5, 2147483647, 1, 'page.php?i=persons-profile-friends', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_persons_profile_friends', 1, 'bx_persons', '_bx_persons_page_block_title_system_profile_friends', '_bx_persons_page_block_title_profile_friends_link', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:17:\"connections_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 0, 1, 1);
+
+-- PAGE: profile friend requests
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_friend_requests', 'persons-friend-requests', '_bx_persons_page_title_sys_friend_requests', '_bx_persons_page_title_friend_requests', 'bx_persons', 5, 2147483647, 1, 'page.php?i=persons-friend-requests', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_persons_friend_requests', 1, 'bx_persons', '_bx_persons_page_block_title_system_friend_requests', '_bx_persons_page_block_title_friend_requests_link', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:25:\"connections_request_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 0, 1, 1);
+
+-- PAGE: profile favorites
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_profile_favorites', 'persons-profile-favorites', '_bx_persons_page_title_sys_profile_favorites', '_bx_persons_page_title_profile_favorites', 'bx_persons', 5, 2147483647, 1, 'page.php?i=persons-profile-favorites', '', '', '', 0, 1, 0, 'BxPersonsPageBrowse', 'modules/boonex/persons/classes/BxPersonsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_persons_profile_favorites', 1, 'bx_persons', '_bx_persons_page_block_title_system_profile_favorites', '_bx_persons_page_block_title_profile_favorites', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:15:"browse_favorite";}', 0, 1, 1, 1);
+
+-- PAGE: profile subscriptions
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_profile_subscriptions', 'persons-profile-subscriptions', '_bx_persons_page_title_sys_profile_subscriptions', '_bx_persons_page_title_profile_subscriptions', 'bx_persons', 5, 2147483647, 1, 'page.php?i=persons-profile-subscriptions', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_persons_profile_subscriptions', 1, 'bx_persons', '_bx_persons_page_block_title_system_profile_subscriptions', '_bx_persons_page_block_title_profile_subscriptions', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:19:\"subscriptions_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 1, 1, 1),
+('bx_persons_profile_subscriptions', 1, 'bx_persons', '_bx_persons_page_block_title_system_profile_subscribed_me', '_bx_persons_page_block_title_profile_subscribed_me', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:19:\"subscribed_me_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 1, 1, 2);
+
+-- PAGE: view entry comments
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_profile_comments', '_bx_persons_page_title_sys_profile_comments', '_bx_persons_page_title_profile_comments', 'bx_persons', 5, 2147483647, 1, 'persons-profile-comments', '', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_persons_profile_comments', 1, 'bx_persons', '_bx_persons_page_block_title_profile_comments', '_bx_persons_page_block_title_profile_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 1);
+
+
+-- PAGE: module home
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_home', '_bx_persons_page_title_sys_recent', '_bx_persons_page_title_recent', 'bx_persons', 5, 2147483647, 1, 'persons-home', 'page.php?i=persons-home', '', '', '', 0, 1, 0, 'BxPersonsPageBrowse', 'modules/boonex/persons/classes/BxPersonsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_persons_home', 1, 'bx_persons', '_bx_persons_page_block_title_featured_profiles', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_persons";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:7:"gallery";}}', 0, 1, 0),
+('bx_persons_home', 1, 'bx_persons', '_bx_persons_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_recent_profiles\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 1);
+
+-- PAGE: active profiles
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_active', '_bx_persons_page_title_sys_active', '_bx_persons_page_title_active', 'bx_persons', 5, 2147483647, 1, 'persons-active', 'page.php?i=persons-active', '', '', '', 0, 1, 0, 'BxPersonsPageBrowse', 'modules/boonex/persons/classes/BxPersonsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_persons_active', 1, 'bx_persons', '_bx_persons_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 0);
+
+-- PAGE: online profiles
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_online', '_bx_persons_page_title_sys_online', '_bx_persons_page_title_online', 'bx_persons', 5, 2147483647, 1, 'persons-online', 'page.php?i=persons-online', '', '', '', 0, 1, 0, 'BxPersonsPageBrowse', 'modules/boonex/persons/classes/BxPersonsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_persons_online', 1, 'bx_persons', '_bx_persons_page_block_title_online_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_online_profiles\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 0);
+
+-- PAGE: search for entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_search', '_bx_persons_page_title_sys_entries_search', '_bx_persons_page_title_entries_search', 'bx_persons', 5, 2147483647, 1, 'persons-search', 'page.php?i=persons-search', '', '', '', 0, 1, 0, 'BxPersonsPageBrowse', 'modules/boonex/persons/classes/BxPersonsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_persons_search', 1, 'bx_persons', '_bx_persons_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:10:"bx_persons";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_persons_search', 1, 'bx_persons', '_bx_persons_page_block_title_search_results', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:10:"bx_persons";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 2),
+('bx_persons_search', 1, 'bx_persons', '_bx_persons_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:15:"bx_persons_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_persons_search', 1, 'bx_persons', '_bx_persons_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:15:"bx_persons_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
+
+-- PAGE: module manage own
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_manage', '_bx_persons_page_title_sys_manage', '_bx_persons_page_title_manage', 'bx_persons', 5, 2147483647, 1, 'persons-manage', 'page.php?i=persons-manage', '', '', '', 0, 1, 0, 'BxPersonsPageBrowse', 'modules/boonex/persons/classes/BxPersonsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_persons_manage', 1, 'bx_persons', '_bx_persons_page_block_title_system_manage', '_bx_persons_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:12:\"manage_tools\";}}', 0, 1, 0);
+
+-- PAGE: module manage all
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_administration', '_bx_persons_page_title_sys_manage_administration', '_bx_persons_page_title_manage', 'bx_persons', 5, 192, 1, 'persons-administration', 'page.php?i=persons-administration', '', '', '', 0, 1, 0, 'BxPersonsPageBrowse', 'modules/boonex/persons/classes/BxPersonsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_persons_administration', 1, 'bx_persons', '_bx_persons_page_block_title_system_manage_administration', '_bx_persons_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
+
+-- PAGE: add block to homepage
+
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('sys_home', 1, 'bx_persons', '_bx_persons_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:22:"browse_recent_profiles";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
+
+-- MENU
+
+-- MENU: add to site menu
+
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_site', 'bx_persons', 'persons-home', '_bx_persons_menu_item_title_system_entries_home', '_bx_persons_menu_item_title_entries_home', 'page.php?i=persons-home', '', '', 'user col-blue3', 'bx_persons_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+-- MENU: add to homepage menu
+
+SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_homepage', 'bx_persons', 'persons-home', '_bx_persons_menu_item_title_system_entries_home', '_bx_persons_menu_item_title_entries_home', 'page.php?i=persons-home', '', '', 'user col-blue3', 'bx_persons_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+
+-- SET @iCreateProfileMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_profiles_create' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+-- INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+-- ('sys_profiles_create', 'bx_persons', 'create-person-profile', '_bx_persons_menu_item_title_system_profile_type', '_bx_persons_menu_item_title_profile_type', 'page.php?i=create-persons-profile', '', '', 'user', '', 2147483647, 1, 1, IFNULL(@iCreateProfileMenuOrder, 0) + 1);
+
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_profile_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_add_profile_links', 'bx_persons', 'create-persons-profile', '_bx_persons_menu_item_title_system_create_profile', '_bx_persons_menu_item_title_create_profile', 'page.php?i=create-persons-profile', '', '', 'user col-blue3', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: view actions
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_view_actions', '_bx_persons_menu_title_view_profile_actions', 'bx_persons_view_actions', 'bx_persons', 9, 0, 1, 'BxPersonsMenuView', 'modules/boonex/persons/classes/BxPersonsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_persons_view_actions', 'bx_persons', '_bx_persons_menu_set_title_view_profile_actions', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_persons_view_actions', 'bx_persons', 'profile-friend-add', '_bx_persons_menu_item_title_system_befriend', '{title_add_friend}', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_friends\', \'add\', \'{profile_id}\')', '', 'user-plus', '', 0, 2147483647, 1, 0, 10),
+('bx_persons_view_actions', 'bx_persons', 'profile-subscribe-add', '_bx_persons_menu_item_title_system_subscribe', '_bx_persons_menu_item_title_subscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'add\', \'{profile_id}\')', '', 'check', '', 0, 2147483647, 1, 0, 20),
+('bx_persons_view_actions', 'bx_persons', 'profile-set-acl-level', '_sys_menu_item_title_system_set_acl_level', '_sys_menu_item_title_set_acl_level', 'javascript:void(0)', 'bx_menu_popup(''sys_set_acl_level'', window, {}, {profile_id: {profile_id}});', '', 'certificate', '', 0, 192, 1, 0, 30),
+('bx_persons_view_actions', 'bx_persons', 'profile-actions-more', '_bx_persons_menu_item_title_system_more_actions', '_bx_persons_menu_item_title_more_actions', 'javascript:void(0)', 'bx_menu_popup(''bx_persons_view_actions_more'', this, {}, {profile_id:{profile_id}});', '', 'cog', 'bx_persons_view_actions_more', 1, 2147483647, 1, 0, 9999);
+
+-- MENU: view actions more
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_view_actions_more', '_bx_persons_menu_title_view_profile_actions_more', 'bx_persons_view_actions_more', 'bx_persons', 6, 0, 1, 'BxPersonsMenuView', 'modules/boonex/persons/classes/BxPersonsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_persons_view_actions_more', 'bx_persons', '_bx_persons_menu_set_title_view_profile_actions_more', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_persons_view_actions_more', 'bx_persons', 'profile-friend-remove', '_bx_persons_menu_item_title_system_unfriend', '{title_remove_friend}', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_friends\', \'remove\', \'{profile_id}\')', '', 'user-times', '', 2147483647, 1, 0, 10),
+('bx_persons_view_actions_more', 'bx_persons', 'profile-subscribe-remove', '_bx_persons_menu_item_title_system_unsubscribe', '_bx_persons_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, 1, 0, 20),
+('bx_persons_view_actions_more', 'bx_persons', 'edit-persons-cover', '_bx_persons_menu_item_title_system_edit_cover', '_bx_persons_menu_item_title_edit_cover', 'page.php?i=edit-persons-cover&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 25),
+('bx_persons_view_actions_more', 'bx_persons', 'edit-persons-profile', '_bx_persons_menu_item_title_system_edit_profile', '_bx_persons_menu_item_title_edit_profile', 'page.php?i=edit-persons-profile&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 30),
+('bx_persons_view_actions_more', 'bx_persons', 'delete-persons-profile', '_bx_persons_menu_item_title_system_delete_profile', '_bx_persons_menu_item_title_delete_profile', 'page.php?i=delete-persons-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 40),
+('bx_persons_view_actions_more', 'bx_persons', 'delete-persons-account', '_bx_persons_menu_item_title_system_delete_account', '_bx_persons_menu_item_title_delete_account', 'page.php?i=account-settings-delete&id={account_id}', '', '', 'remove', '', 128, 1, 0, 50),
+('bx_persons_view_actions_more', 'bx_persons', 'delete-persons-account-content', '_bx_persons_menu_item_title_system_delete_account_content', '_bx_persons_menu_item_title_delete_account_content', 'page.php?i=account-settings-delete&id={account_id}&content=1', '', '', 'remove', '', 128, 1, 0, 60);
+
+-- MENU: module sub-menu
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_submenu', '_bx_persons_menu_title_submenu', 'bx_persons_submenu', 'bx_persons', 8, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_persons_submenu', 'bx_persons', '_bx_persons_menu_set_title_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_persons_submenu', 'bx_persons', 'persons-home', '_bx_persons_menu_item_title_system_entries_recent', '_bx_persons_menu_item_title_entries_recent', 'page.php?i=persons-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_persons_submenu', 'bx_persons', 'persons-active', '_bx_persons_menu_item_title_system_entries_active', '_bx_persons_menu_item_title_entries_active', 'page.php?i=persons-active', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_persons_submenu', 'bx_persons', 'persons-online', '_bx_persons_menu_item_title_system_entries_online', '_bx_persons_menu_item_title_entries_online', 'page.php?i=persons-online', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_persons_submenu', 'bx_persons', 'persons-search', '_bx_persons_menu_item_title_system_entries_search', '_bx_persons_menu_item_title_entries_search', 'page.php?i=persons-search', '', '', '', '', 2147483647, 1, 1, 4),
+('bx_persons_submenu', 'bx_persons', 'persons-manage', '_bx_persons_menu_item_title_system_entries_manage', '_bx_persons_menu_item_title_entries_manage', 'page.php?i=persons-manage', '', '', '', '', 2147483646, 1, 1, 5);
+
+-- MENU: view submenu
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_view_submenu', '_bx_persons_menu_title_view_profile_submenu', 'bx_persons_view_submenu', 'bx_persons', 8, 0, 1, 'BxPersonsMenuView', 'modules/boonex/persons/classes/BxPersonsMenuView.php'),
+('bx_persons_view_submenu_cover', '_bx_persons_menu_title_view_profile_submenu_cover', 'bx_persons_view_submenu', 'bx_persons', 7, 0, 1, 'BxPersonsMenuView', 'modules/boonex/persons/classes/BxPersonsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_persons_view_submenu', 'bx_persons', '_bx_persons_menu_set_title_view_profile_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_persons_view_submenu', 'bx_persons', 'view-persons-profile', '_bx_persons_menu_item_title_system_view_profile_view', '_bx_persons_menu_item_title_view_profile_view', 'page.php?i=view-persons-profile&id={content_id}', '', '', 'user col-blue3', '', 2147483647, 1, 0, 1),
+('bx_persons_view_submenu', 'bx_persons', 'persons-profile-info', '_bx_persons_menu_item_title_system_view_profile_info', '_bx_persons_menu_item_title_view_profile_info', 'page.php?i=persons-profile-info&id={content_id}', '', '', 'info-circle col-gray', '', 2147483647, 1, 0, 2),
+('bx_persons_view_submenu', 'bx_persons', 'persons-profile-friends', '_bx_persons_menu_item_title_system_view_profile_friends', '_bx_persons_menu_item_title_view_profile_friends', 'page.php?i=persons-profile-friends&profile_id={profile_id}', '', '', 'group col-blue3', '', 2147483647, 1, 0, 3),
+('bx_persons_view_submenu', 'bx_persons', 'persons-profile-subscriptions', '_bx_persons_menu_item_title_system_view_profile_subscriptions', '_bx_persons_menu_item_title_view_profile_subscriptions', 'page.php?i=persons-profile-subscriptions&profile_id={profile_id}', '', '', 'check col-blue3', '', 2147483647, 1, 0, 4),
+('bx_persons_view_submenu', 'bx_persons', 'persons-profile-comments', '_bx_persons_menu_item_title_system_view_profile_comments', '_bx_persons_menu_item_title_view_profile_comments', 'page.php?i=persons-profile-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 5);
+
+-- MENU: notifications menu in account popup
+SET @iNotifMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_account_notifications' AND `active` = 1 AND `order` < 9999 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_account_notifications', 'bx_persons', 'notifications-friend-requests', '_bx_persons_menu_item_title_system_friends', '_bx_persons_menu_item_title_friends', 'page.php?i=persons-profile-friends&profile_id={member_id}', '', '', 'group col-blue3', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:31:"get_unconfirmed_connections_num";s:6:"params";a:1:{i:0;s:20:"sys_profiles_friends";}s:5:"class";s:23:"TemplServiceConnections";}', '', 2147483646, 1, 0, IFNULL(@iNotifMenuOrder, 0) + 1);
+
+-- MENU: profile stats
+SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_profile_stats', 'bx_persons', 'profile-stats-friend-requests', '_bx_persons_menu_item_title_system_friend_requests', '_bx_persons_menu_item_title_friend_requests', 'page.php?i=persons-profile-friends&profile_id={member_id}', '', '', 'group col-blue3', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:31:"get_unconfirmed_connections_num";s:6:"params";a:1:{i:0;s:20:"sys_profiles_friends";}s:5:"class";s:23:"TemplServiceConnections";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1),
+('sys_profile_stats', 'bx_persons', 'profile-stats-manage-profiles', '_bx_persons_menu_item_title_system_manage_my_profiles', '_bx_persons_menu_item_title_manage_my_profiles', 'page.php?i=persons-manage', '', '_self', 'group col-blue3', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 2),
+('sys_profile_stats', 'bx_persons', 'profile-stats-favorite-persons', '_bx_persons_menu_item_title_system_favorites', '_bx_persons_menu_item_title_favorites', 'page.php?i=persons-profile-favorites&profile_id={member_id}', '', '', 'star col-blue3', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:38:"get_menu_addon_favorites_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 3),
+('sys_profile_stats', 'bx_persons', 'profile-stats-subscriptions', '_bx_persons_menu_item_title_system_subscriptions', '_bx_persons_menu_item_title_subscriptions', 'page.php?i=persons-profile-subscriptions&profile_id={member_id}#subscriptions', '', '_self', 'rss col-blue3', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:25:"get_connected_content_num";s:6:"params";a:1:{i:0;s:26:"sys_profiles_subscriptions";}s:5:"class";s:23:"TemplServiceConnections";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 4),
+('sys_profile_stats', 'bx_persons', 'profile-stats-subscribed-me', '_bx_persons_menu_item_title_system_subscribed_me', '_bx_persons_menu_item_title_subscribed_me', 'page.php?i=persons-profile-subscriptions&profile_id={member_id}#subscribers', '', '_self', 'rss col-blue3', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:28:"get_connected_initiators_num";s:6:"params";a:1:{i:0;s:26:"sys_profiles_subscriptions";}s:5:"class";s:23:"TemplServiceConnections";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 5);
+
+-- MENU: manage tools submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_menu_manage_tools', '_bx_persons_menu_title_manage_tools', 'bx_persons_menu_manage_tools', 'bx_persons', 6, 0, 1, 'BxPersonsMenuManageTools', 'modules/boonex/persons/classes/BxPersonsMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_persons_menu_manage_tools', 'bx_persons', '_bx_persons_menu_set_title_manage_tools', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_persons_menu_manage_tools', 'bx_persons', 'delete', '_bx_persons_menu_item_title_system_delete', '_bx_persons_menu_item_title_delete', 'javascript:void(0)', 'javascript:{js_object}.onClickDelete({content_id});', '_self', 'trash-o', '', 2147483647, 1, 0, 1),
+('bx_persons_menu_manage_tools', 'bx_persons', 'delete-with-content', '_bx_persons_menu_item_title_system_delete_with_content', '_bx_persons_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'trash-o', '', 2147483647, 1, 0, 2);
+
+-- MENU: dashboard manage tools
+SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_account_dashboard_manage_tools', 'bx_persons', 'persons-administration', '_bx_persons_menu_item_title_system_admt_persons', '_bx_persons_menu_item_title_admt_persons', 'page.php?i=persons-administration', '', '_self', '', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_persons', 'create entry', NULL, '_bx_persons_acl_action_create_profile', '', 1, 1);
+SET @iIdActionProfileCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_persons', 'delete entry', NULL, '_bx_persons_acl_action_delete_profile', '', 1, 1);
+SET @iIdActionProfileDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_persons', 'view entry', NULL, '_bx_persons_acl_action_view_profile', '', 1, 0);
+SET @iIdActionProfileView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_persons', 'edit any entry', NULL, '_bx_persons_acl_action_edit_any_profile', '', 1, 3);
+SET @iIdActionProfileEditAny = LAST_INSERT_ID();
+
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- profile create
+(@iAccount, @iIdActionProfileCreate),
+(@iStandard, @iIdActionProfileCreate),
+(@iUnconfirmed, @iIdActionProfileCreate),
+(@iPending, @iIdActionProfileCreate),
+(@iModerator, @iIdActionProfileCreate),
+(@iAdministrator, @iIdActionProfileCreate),
+(@iPremium, @iIdActionProfileCreate),
+
+-- profile delete
+(@iAccount, @iIdActionProfileDelete),
+(@iStandard, @iIdActionProfileDelete),
+(@iUnconfirmed, @iIdActionProfileDelete),
+(@iPending, @iIdActionProfileDelete),
+(@iModerator, @iIdActionProfileDelete),
+(@iAdministrator, @iIdActionProfileDelete),
+(@iPremium, @iIdActionProfileDelete),
+
+-- profile view
+(@iUnauthenticated, @iIdActionProfileView),
+(@iAccount, @iIdActionProfileView),
+(@iStandard, @iIdActionProfileView),
+(@iUnconfirmed, @iIdActionProfileView),
+(@iPending, @iIdActionProfileView),
+(@iModerator, @iIdActionProfileView),
+(@iAdministrator, @iIdActionProfileView),
+(@iPremium, @iIdActionProfileView),
+
+-- any profile edit
+(@iModerator, @iIdActionProfileEditAny),
+(@iAdministrator, @iIdActionProfileEditAny);
+
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_persons', 'bx_persons', 'bx_persons_cmts', 1, 5000, 1000, 1, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-persons-profile&id={object_id}', '', 'bx_persons_data', 'id', 'author', 'fullname', 'comments', '', '');
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_persons', 'bx_persons_views_track', '86400', '1', 'bx_persons_data', 'id', 'author', 'views', '', '');
+
+-- FAFORITES
+INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_persons', 'bx_persons_favorites_track', '1', '1', '0', 'page.php?i=view-persons-profile&id={object_id}', 'bx_persons_data', 'id', 'author', 'favorites', 'BxPersonsFavorite', 'modules/boonex/persons/classes/BxPersonsFavorite.php');
+
+-- FEATURED
+INSERT INTO `sys_objects_feature` (`name`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES 
+('bx_persons', '1', '1', 'page.php?i=view-persons-profile&id={object_id}', 'bx_persons_data', 'id', 'author', 'featured', '', '');
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_persons', 'bx_persons_reports', 'bx_persons_reports_track', '1', 'page.php?i=view-persons-profile&id={object_id}', 'bx_persons_data', 'id', 'author', 'reports', 'BxPersonsReport', 'modules/boonex/persons/classes/BxPersonsReport.php');
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_persons', 'bx_persons_meta_keywords', 'bx_persons_meta_locations', '', '', '');
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_persons', '_bx_persons', @iSearchOrder + 1, 'BxPersonsSearchResult', 'modules/boonex/persons/classes/BxPersonsSearchResult.php');
+
+-- STATS
+SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
+INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
+('bx_persons', 'bx_persons', '_bx_persons', 'page.php?i=persons-home', 'user col-blue3', 'SELECT COUNT(*) FROM `bx_persons_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_persons'' WHERE 1 AND `tp`.`status`=''active''', @iMaxOrderStats + 1);
+
+-- CHARTS
+SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
+INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
+('bx_persons_growth', '_bx_persons_chart_growth', 'bx_persons_data', 'added', '', '', 'SELECT {field_date_formatted} AS `period`, COUNT(*) AS {object} FROM {table} LEFT JOIN `sys_profiles` AS `tp` ON {table}.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_persons'' WHERE 1 AND `tp`.`status`=''active'' {where_inteval} GROUP BY `period` ORDER BY {table}.{field_date} ASC', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_persons_growth_speed', '_bx_persons_chart_growth_speed', 'bx_persons_data', 'added', '', '', 'SELECT {field_date_formatted} AS `period`, COUNT(*) AS {object} FROM {table} LEFT JOIN `sys_profiles` AS `tp` ON {table}.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_persons'' WHERE 1 AND `tp`.`status`=''active'' {where_inteval} GROUP BY `period` ORDER BY {table}.{field_date} ASC', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
+
+-- GRIDS: administration
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
+('bx_persons_administration', 'Sql', 'SELECT `td`.*, `ta`.`email` AS `account`, `ta`.`logged` AS `last_online`, `tp`.`status` AS `status` FROM `bx_persons_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_persons'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_persons_data', 'id', 'last_online', 'status', '', 20, NULL, 'start', '', 'fullname', '', 'like', '', '', 192, 'BxPersonsGridAdministration', 'modules/boonex/persons/classes/BxPersonsGridAdministration.php'),
+('bx_persons_common', 'Sql', 'SELECT `td`.*, `ta`.`email` AS `account`, `ta`.`logged` AS `last_online`, `tp`.`status` AS `status` FROM `bx_persons_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_persons'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_persons_data', 'id', 'last_online', 'status', '', 20, NULL, 'start', '', 'fullname', '', 'like', '', '', 2147483647, 'BxPersonsGridCommon', 'modules/boonex/persons/classes/BxPersonsGridCommon.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_persons_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_persons_administration', 'switcher', '_bx_persons_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_persons_administration', 'fullname', '_bx_persons_grid_column_title_adm_fullname', '25%', 0, '', '', 3),
+('bx_persons_administration', 'last_online', '_bx_persons_grid_column_title_adm_last_online', '20%', 1, '25', '', 4),
+('bx_persons_administration', 'account', '_bx_persons_grid_column_title_adm_account', '25%', 0, '25', '', 5),
+('bx_persons_administration', 'actions', '', '20%', 0, '', '', 6),
+('bx_persons_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_persons_common', 'fullname', '_bx_persons_grid_column_title_adm_fullname', '48%', 0, '', '', 2),
+('bx_persons_common', 'last_online', '_bx_persons_grid_column_title_adm_last_online', '30%', 1, '25', '', 3),
+('bx_persons_common', 'actions', '', '20%', 0, '', '', 4);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_persons_administration', 'bulk', 'set_acl_level', '_bx_persons_grid_action_title_adm_set_acl_level', '', 0, 0, 1),
+('bx_persons_administration', 'bulk', 'delete', '_bx_persons_grid_action_title_adm_delete', '', 0, 1, 2),
+('bx_persons_administration', 'bulk', 'delete_with_content', '_bx_persons_grid_action_title_adm_delete_with_content', '', 0, 1, 3),
+('bx_persons_administration', 'single', 'set_acl_level', '_bx_persons_grid_action_title_adm_set_acl_level', 'certificate', 1, 0, 1),
+('bx_persons_administration', 'single', 'settings', '_bx_persons_grid_action_title_adm_more_actions', 'cog', 1, 0, 2),
+('bx_persons_common', 'bulk', 'delete', '_bx_persons_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_persons_common', 'bulk', 'delete_with_content', '_bx_persons_grid_action_title_adm_delete_with_content', '', 0, 1, 2),
+('bx_persons_common', 'single', 'settings', '_bx_persons_grid_action_title_adm_more_actions', 'cog', 1, 0, 1);
+
+-- LIVE UPDATES
+INSERT INTO `sys_objects_live_updates`(`name`, `frequency`, `service_call`, `active`) VALUES
+('bx_persons_friend_requests', 1, 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:40:"get_live_updates_unconfirmed_connections";s:6:"params";a:5:{i:0;s:10:"bx_persons";i:1;s:20:"sys_profiles_friends";i:2;a:2:{s:11:"menu_object";s:18:"sys_toolbar_member";s:9:"menu_item";s:7:"account";}i:3;a:2:{s:11:"menu_object";s:25:"sys_account_notifications";s:9:"menu_item";s:29:"notifications-friend-requests";}i:4;s:7:"{count}";}s:5:"class";s:23:"TemplServiceConnections";}', 1);
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_persons', 'BxPersonsAlertsResponse', 'modules/boonex/persons/classes/BxPersonsAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('sys_profiles_friends', 'connection_added', @iHandler),
+('bx_timeline', 'post_common', @iHandler),
+('bx_persons_pictures', 'file_deleted', @iHandler),
+('bx_persons', 'timeline_view', @iHandler),
+('bx_persons', 'timeline_post', @iHandler),
+('bx_persons', 'timeline_delete', @iHandler),
+('bx_persons', 'timeline_comment', @iHandler),
+('bx_persons', 'timeline_vote', @iHandler),
+('bx_persons', 'timeline_report', @iHandler),
+('bx_persons', 'timeline_repost', @iHandler);
+
+-- PRIVACY 
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_persons_allow_view_to', 'bx_persons', 'view', '_bx_persons_form_profile_input_allow_view_to', '3', 'bx_persons_data', 'id', 'author', 'BxPersonsPrivacy', 'modules/boonex/persons/classes/BxPersonsPrivacy.php');
+
+-- EMAIL TEMPLATES
+INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES
+('bx_persons', '_bx_persons_email_friend_request', 'bx_persons_friend_request', '_bx_persons_email_friend_request_subject', '_bx_persons_email_friend_request_body');
+
+-- UPLOADERS
+INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
+('bx_persons_cover_crop', 1, 'BxPersonsUploaderCoverCrop', 'modules/boonex/persons/classes/BxPersonsUploaderCoverCrop.php'),
+('bx_persons_picture_crop', 1, 'BxPersonsUploaderPictureCrop', 'modules/boonex/persons/classes/BxPersonsUploaderPictureCrop.php');

+ 254 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/install/sql/install.sql

@@ -0,0 +1,254 @@
+
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+-- TABLE: PROFILES
+CREATE TABLE IF NOT EXISTS `bx_persons_data` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL,
+  `added` int(11) NOT NULL,
+  `changed` int(11) NOT NULL,
+  `picture` int(11) NOT NULL,
+  `cover` int(11) NOT NULL,
+  `fullname` varchar(255) NOT NULL,
+  `description` text NOT NULL,
+  `gender` varchar(255) DEFAULT NULL,
+  `birthday` date DEFAULT NULL,
+  `views` int(11) NOT NULL default '0',
+  `favorites` int(11) NOT NULL default '0',
+  `comments` int(11) NOT NULL default '0',
+  `reports` int(11) NOT NULL default '0',
+  `featured` int(11) NOT NULL default '0',
+  `allow_view_to` int(11) NOT NULL DEFAULT '3',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `search_fields` (`fullname`,`description`)
+);
+
+-- TABLE: STORAGES & TRANSCODERS
+CREATE TABLE IF NOT EXISTS `bx_persons_pictures` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_persons_pictures_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+-- TABLE: comments
+CREATE TABLE IF NOT EXISTS `bx_persons_cmts` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: VIEWS
+CREATE TABLE IF NOT EXISTS `bx_persons_views_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: favorites
+CREATE TABLE IF NOT EXISTS `bx_persons_favorites_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`author_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_persons_reports` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_persons_reports_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: metas
+CREATE TABLE IF NOT EXISTS `bx_persons_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_persons_meta_locations` (
+  `object_id` int(10) unsigned NOT NULL,
+  `lat` double NOT NULL,
+  `lng` double NOT NULL,
+  `country` varchar(2) NOT NULL,
+  `state` varchar(255) NOT NULL,
+  `city` varchar(255) NOT NULL,
+  `zip` varchar(255) NOT NULL,
+  `street` varchar(255) NOT NULL,
+  `street_number` varchar(255) NOT NULL,
+  PRIMARY KEY (`object_id`),
+  KEY `country_state_city` (`country`,`state`(8),`city`(8))
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- STORAGES & TRANSCODERS
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_persons_pictures', @sStorageEngine, '', 360, 2592000, 3, 'bx_persons_pictures', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_persons_pictures_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_persons_pictures_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
+('bx_persons_icon', 'bx_persons_pictures_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_persons_pictures";}', 'no', '1', '2592000', '0'),
+('bx_persons_thumb', 'bx_persons_pictures_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_persons_pictures";}', 'no', '1', '2592000', '0'),
+('bx_persons_avatar', 'bx_persons_pictures_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_persons_pictures";}', 'no', '1', '2592000', '0'),
+('bx_persons_picture', 'bx_persons_pictures_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_persons_pictures";}', 'no', '1', '2592000', '0'),
+('bx_persons_cover', 'bx_persons_pictures_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_persons_pictures";}', 'no', '1', '2592000', '0'),
+('bx_persons_cover_thumb', 'bx_persons_pictures_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_persons_pictures";}', 'no', '1', '2592000', '0'),
+('bx_persons_gallery', 'bx_persons_pictures_resized', 'Storage', 'a:1:{s:6:"object";s:19:"bx_persons_pictures";}', 'no', '1', '2592000', '0');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_persons_icon', 'Resize', 'a:3:{s:1:"w";s:2:"32";s:1:"h";s:2:"32";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_persons_thumb', 'Resize', 'a:3:{s:1:"w";s:2:"48";s:1:"h";s:2:"48";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_persons_avatar', 'Resize', 'a:3:{s:1:"w";s:2:"96";s:1:"h";s:2:"96";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_persons_picture', 'Resize', 'a:3:{s:1:"w";s:4:"1024";s:1:"h";s:4:"1024";s:13:"square_resize";s:1:"0";}', '0'),
+('bx_persons_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
+('bx_persons_cover_thumb', 'Resize', 'a:3:{s:1:"w";s:2:"48";s:1:"h";s:2:"48";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_persons_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
+
+-- FORMS
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_person', 'bx_persons', '_bx_persons_form_profile', '', 'a:1:{s:7:\"enctype\";s:19:\"multipart/form-data\";}', 'bx_persons_data', 'id', '', '', 'do_submit', '', 0, 1, 'BxPersonsFormEntry', 'modules/boonex/persons/classes/BxPersonsFormEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_person', 'bx_person_add', 'bx_persons', 0, '_bx_persons_form_profile_display_add'),
+('bx_person', 'bx_person_delete', 'bx_persons', 0, '_bx_persons_form_profile_display_delete'),
+('bx_person', 'bx_person_edit', 'bx_persons', 0, '_bx_persons_form_profile_display_edit'),
+('bx_person', 'bx_person_edit_cover', 'bx_persons', 0, '_bx_persons_form_profile_display_edit_cover'),
+('bx_person', 'bx_person_view', 'bx_persons', 1, '_bx_persons_form_profile_display_view'),
+('bx_person', 'bx_person_view_full', 'bx_persons', 1, '_bx_persons_form_profile_display_view_full');
+
+INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_person', 'bx_persons', 'allow_view_to', 3, '', 0, 'custom', '_bx_persons_form_profile_input_sys_allow_view_to', '_bx_persons_form_profile_input_allow_view_to', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_person', 'bx_persons', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_persons_form_profile_input_sys_delete_confirm', '_bx_persons_form_profile_input_delete_confirm', '_bx_persons_form_profile_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_persons_form_profile_input_delete_confirm_error', '', '', 1, 0),
+('bx_person', 'bx_persons', 'do_submit', '_bx_persons_form_profile_input_submit', '', 0, 'submit', '_bx_persons_form_profile_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_person', 'bx_persons', 'description', '', '', 0, 'textarea', '_bx_persons_form_profile_input_sys_desc', '_bx_persons_form_profile_input_desc', '', 0, 0, 0, '', '', '', '', '', '', 'XssMultiline', '', 1, 1),
+('bx_person', 'bx_persons', 'fullname', '', '', 0, 'text', '_bx_persons_form_profile_input_sys_fullname', '_bx_persons_form_profile_input_fullname', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_persons_form_profile_input_fullname_err', 'Xss', '', 1, 0),
+('bx_person', 'bx_persons', 'cover', 'a:1:{i:0;s:21:"bx_persons_cover_crop";}', 'a:1:{s:21:"bx_persons_cover_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_persons_form_profile_input_sys_cover', '_bx_persons_form_profile_input_cover', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_person', 'bx_persons', 'picture', 'a:1:{i:0;s:23:"bx_persons_picture_crop";}', 'a:1:{s:23:"bx_persons_picture_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_persons_form_profile_input_sys_picture', '_bx_persons_form_profile_input_picture', '', 0, 0, 0, '', '', '', '', '', '_bx_persons_form_profile_input_picture_err', '', '', 1, 0),
+('bx_person', 'bx_persons', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_person', 'bx_persons', 'birthday', 0, '', 0, 'datepicker', '_bx_persons_form_profile_input_sys_birthday', '_bx_persons_form_profile_input_birthday', '', 0, 0, 0, '', '', '', '', '', '', 'Date', '', 1, 0),
+('bx_person', 'bx_persons', 'gender', '', '#!Sex', 0, 'select', '_bx_persons_form_profile_input_sys_gender', '_bx_persons_form_profile_input_gender', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_person', 'bx_persons', 'profile_email', '', '', 0, 'text', '_bx_persons_form_profile_input_sys_profile_email', '_bx_persons_form_profile_input_profile_email', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_person', 'bx_persons', 'profile_status', '', '', 0, 'text', '_bx_persons_form_profile_input_sys_profile_status', '_bx_persons_form_profile_input_profile_status', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0);
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_person_add', 'picture', 2147483647, 1, 1),
+('bx_person_add', 'gender', 2147483647, 1, 2),
+('bx_person_add', 'birthday', 2147483647, 1, 3),
+('bx_person_add', 'fullname', 2147483647, 1, 4),
+('bx_person_add', 'description', 2147483647, 1, 5),
+('bx_person_add', 'location', 2147483647, 1, 6),
+('bx_person_add', 'allow_view_to', 2147483647, 1, 7),
+('bx_person_add', 'do_submit', 2147483647, 1, 8),
+
+('bx_person_delete', 'cover', 2147483647, 0, 0),
+('bx_person_delete', 'picture', 2147483647, 0, 0),
+('bx_person_delete', 'delete_confirm', 2147483647, 1, 0),
+('bx_person_delete', 'do_submit', 2147483647, 1, 1),
+('bx_person_delete', 'fullname', 2147483647, 0, 2),
+
+('bx_person_edit', 'picture', 2147483647, 1, 1),
+('bx_person_edit', 'gender', 2147483647, 1, 2),
+('bx_person_edit', 'birthday', 2147483647, 1, 3),
+('bx_person_edit', 'fullname', 2147483647, 1, 4),
+('bx_person_edit', 'description', 2147483647, 1, 5),
+('bx_person_edit', 'location', 2147483647, 1, 6),
+('bx_person_edit', 'allow_view_to', 2147483647, 1, 7),
+('bx_person_edit', 'do_submit', 2147483647, 1, 8),
+
+('bx_person_edit_cover', 'delete_confirm', 2147483647, 0, 1),
+('bx_person_edit_cover', 'fullname', 2147483647, 0, 2),
+('bx_person_edit_cover', 'picture', 2147483647, 0, 3),
+('bx_person_edit_cover', 'cover', 2147483647, 1, 7),
+('bx_person_edit_cover', 'do_submit', 2147483647, 1, 8),
+
+('bx_person_view', 'gender', 2147483647, 1, 1),
+('bx_person_view', 'birthday', 2147483647, 1, 2),
+('bx_person_view', 'fullname', 2147483647, 1, 3),
+('bx_person_view', 'profile_email', 192, 1, 4),
+('bx_person_view', 'profile_status', 192, 1, 5),
+
+('bx_person_view_full', 'gender', 2147483647, 1, 1),
+('bx_person_view_full', 'birthday', 2147483647, 1, 2),
+('bx_person_view_full', 'fullname', 2147483647, 1, 3),
+('bx_person_view_full', 'description', 2147483647, 1, 4),
+('bx_person_view_full', 'profile_email', 192, 1, 5),
+('bx_person_view_full', 'profile_status', 192, 1, 6);
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_persons', '_bx_persons', 'bx_persons', 'added', 'edited', 'deleted', '', ''),
+('bx_persons_cmts', '_bx_persons_cmts', 'bx_persons', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
+('bx_persons', 'bx_persons_administration', 'td`.`id', '', ''),
+('bx_persons', 'bx_persons_common', 'td`.`id', '', '');
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_persons', 'bx_persons', 'bx_persons', '_bx_persons_search_extended', 1, '', ''),
+('bx_persons_cmts', 'bx_persons_cmts', 'bx_persons', '_bx_persons_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+-- STUDIO PAGE & WIDGET
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_persons', '_bx_persons', '_bx_persons', 'bx_persons@modules/boonex/persons/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_persons', '{url_studio}module.php?name=bx_persons', '', 'bx_persons@modules/boonex/persons/|std-icon.svg', '_bx_persons', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));
+

+ 37 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/install/sql/uninstall.sql

@@ -0,0 +1,37 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_persons_data`,`bx_persons_pictures`, `bx_persons_pictures_resized`, `bx_persons_cmts`, `bx_persons_views_track`, `bx_persons_favorites_track`, `bx_persons_reports`, `bx_persons_reports_track`, `bx_persons_meta_keywords`, `bx_persons_meta_locations`;
+
+-- PROFILES
+DELETE FROM sys_profiles WHERE `type` = 'bx_persons';
+
+-- STORAGES & TRANSCODERS
+DELETE FROM `sys_objects_storage` WHERE `object` IN('bx_persons_pictures', 'bx_persons_pictures_resized');
+DELETE FROM `sys_storage_tokens` WHERE `object` IN('bx_persons_pictures', 'bx_persons_pictures_resized');
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_persons_icon', 'bx_persons_thumb', 'bx_persons_avatar', 'bx_persons_picture', 'bx_persons_cover', 'bx_persons_cover_thumb', 'bx_persons_gallery');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_persons_icon', 'bx_persons_thumb', 'bx_persons_avatar', 'bx_persons_picture', 'bx_persons_cover', 'bx_persons_cover_thumb', 'bx_persons_gallery');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_persons_icon', 'bx_persons_thumb', 'bx_persons_avatar', 'bx_persons_picture', 'bx_persons_cover', 'bx_persons_cover_thumb', 'bx_persons_gallery');
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_persons';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_persons';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_persons';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN('bx_person_add', 'bx_person_delete', 'bx_person_edit', 'bx_person_edit_cover', 'bx_person_view', 'bx_person_view_full');
+
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_persons', 'bx_persons_cmts');
+
+DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_persons');
+
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_persons';
+
+
+-- STUDIO PAGE & WIDGET
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_persons';
+

+ 1 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/template/unit_wo_info.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/unit_wo_info.html />

+ 1 - 0
modules/boonex/persons/updates/9.0.4_9.0.5/source/template/unit_wo_links.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/profile/template/unit_wo_links.html />

+ 119 - 0
modules/boonex/polls/updates/9.0.1_9.0.2/source/classes/BxPollsModule.php

@@ -0,0 +1,119 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Polls Polls
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Polls module
+ */
+class BxPollsModule extends BxBaseModTextModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+
+        $CNF = &$this->_oConfig->CNF;
+        $this->_aSearchableNamesExcept = array_merge($this->_aSearchableNamesExcept, array(
+             $CNF['FIELD_ANONYMOUS'],
+             $CNF['FIELD_HIDDEN_RESULTS']
+        ));
+    }
+
+    /**
+     * ACTION METHODS
+     */
+    public function actionGetBlock()
+    {
+        $iContentId = (int)bx_get('content_id');
+        $sBlock = bx_process_input(bx_get('block'));
+
+        $sMethod = 'serviceGetBlock' . bx_gen_method_name($sBlock);
+        if(!method_exists($this, $sMethod))
+            return echoJson(array());
+
+        $aBlock = $this->$sMethod($iContentId, true);
+        if(empty($aBlock) || !is_array($aBlock))
+            return echoJson(array());
+
+        return echoJson(array(
+        	'content' => $aBlock['content']
+        ));
+    }
+
+
+    /**
+     * SERVICE METHODS
+     */
+    public function serviceGetResultsSearchExtended($aParams)
+    {
+        $this->_oTemplate->addJs(array('entry.js'));
+        $this->_oTemplate->addCss(array('entry.css'));
+        return $this->_oTemplate->getJsCode('entry') . BxDolService::call('system', 'get_results', array($aParams), 'TemplSearchExtendedServices');
+    }
+
+    public function serviceGetBlockSubentries($iContentId = 0, $bForceDisplay = false)
+    {
+        if (!$iContentId)
+            $iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if (!$iContentId)
+            return false;
+
+        if(!$bForceDisplay && $this->_oDb->isPerformed($iContentId, bx_get_logged_profile_id()))
+            return $this->serviceGetBlockResults($iContentId);
+
+        return $this->_serviceTemplateFunc('entrySubentries', $iContentId);
+    }
+
+    public function serviceGetBlockResults($iContentId = 0)
+    {
+        return $this->_serviceTemplateFunc('entryResults', $iContentId);
+    }
+
+    /**
+     * PERMISSION METHODS
+     */
+    public function isAllowedVote($isPerformAction = false)
+    {
+        $aCheck = checkActionModule($this->_iProfileId, 'vote entry', $this->getName(), false);
+        if ($aCheck[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED)
+            return $aCheck[CHECK_ACTION_MESSAGE];
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+
+	/**
+     * INTERNAL METHODS
+     */
+    protected function _getImagesForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams = array())
+    {
+        return array();
+    }
+
+    protected function _getContentForTimelinePost($aEvent, $aContentInfo, $aBrowseParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $bDynamic = isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true;
+
+        $sInclude = '';
+        $sInclude .= $this->_oTemplate->addJs(array('entry.js'), $bDynamic);
+        $sInclude .= $this->_oTemplate->addCss(array('entry.css'), $bDynamic);
+
+        $aBlock = $this->_oTemplate->{$this->_oDb->isPerformed($aContentInfo[$CNF['FIELD_ID']], bx_get_logged_profile_id()) ? 'entryResults' : 'entrySubentries'}($aContentInfo, $bDynamic);
+
+        $aResult = parent::_getContentForTimelinePost($aEvent, $aContentInfo, $aBrowseParams);
+        $aResult['title'] = $this->_oConfig->getTitle($aContentInfo);
+        $aResult['text'] = '';
+        $aResult['raw'] = ($bDynamic ? $sInclude : '') . $this->_oTemplate->getJsCode('entry') . $aBlock['content'];
+
+        return $aResult;
+    }
+}
+
+/** @} */

+ 149 - 0
modules/boonex/polls/updates/9.0.1_9.0.2/source/classes/BxPollsSearchResult.php

@@ -0,0 +1,149 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Polls Polls
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxPollsSearchResult extends BxBaseModTextSearchResult
+{
+    protected $sUnitViewDefault = 'extended';
+
+    function __construct($sMode = '', $aParams = array())
+    {
+        parent::__construct($sMode, $aParams);
+
+        $this->aCurrent = array(
+            'name' => 'bx_polls',
+            'module_name' => 'bx_polls',
+            'object_metatags' => 'bx_polls',
+            'title' => _t('_bx_polls_page_title_browse'),
+            'table' => 'bx_polls_entries',
+            'ownFields' => array('id', 'text', 'thumb', 'author', 'anonymous', 'hidden_results', 'comments', 'added'),
+            'searchFields' => array(),
+            'restriction' => array(
+                'author' => array('value' => '', 'field' => 'author', 'operator' => '='),
+        		'featured' => array('value' => '', 'field' => 'featured', 'operator' => '<>'),
+        		'status' => array('value' => 'active', 'field' => 'status', 'operator' => '='),
+            ),
+            'paginate' => array('perPage' => getParam('bx_polls_per_page_browse'), 'start' => 0),
+            'sorting' => 'last',
+            'rss' => array(
+                'title' => '',
+                'link' => '',
+                'image' => '',
+                'profile' => 0,
+                'fields' => array (
+                    'Guid' => 'link',
+                    'Link' => 'link',
+                    'Title' => 'text',
+                    'DateTimeUTS' => 'added',
+                    'Desc' => '',
+                ),
+            ),
+            'ident' => 'id',
+        );
+
+        $this->sFilterName = 'bx_polls_filter';
+        $this->oModule = $this->getMain();
+        $this->aCurrent['searchFields'] = explode(',', getParam($this->oModule->_oConfig->CNF['PARAM_SEARCHABLE_FIELDS']));
+
+        $oProfileAuthor = null;
+
+        $CNF = &$this->oModule->_oConfig->CNF;
+
+        switch ($sMode) {
+            case 'author':
+                if(!$this->_updateCurrentForAuthor($sMode, $aParams, $oProfileAuthor)) {
+                    $this->isError = true;
+                    break;
+                }
+                break;
+
+            case 'favorite':
+                if(!$this->_updateCurrentForFavorite($sMode, $aParams, $oProfileAuthor)) {
+                    $this->isError = true;
+                    break;
+                }
+                break;
+
+            case 'public':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_polls_page_title_browse_recent');
+                $this->aCurrent['rss']['link'] = 'modules/?r=polls/rss/' . $sMode;
+                break;
+
+            case 'featured':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_polls_page_title_browse_featured');
+                $this->aCurrent['restriction']['featured']['value'] = '0';
+                $this->aCurrent['rss']['link'] = 'modules/?r=polls/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'featured';
+                break;
+
+            case 'popular':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_POPULAR']);
+                $this->aCurrent['title'] = _t('_bx_polls_page_title_browse_popular');
+                $this->aCurrent['rss']['link'] = 'modules/?r=polls/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'popular';
+                break;
+
+            case 'updated':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_UPDATED']);
+                $this->aCurrent['title'] = _t('_bx_polls_page_title_browse_updated');
+                $this->aCurrent['rss']['link'] = 'modules/?r=polls/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'updated';
+                break;
+
+            case '': // search results
+                $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
+                $this->aCurrent['title'] = _t('_bx_polls');
+                unset($this->aCurrent['paginate']['perPage'], $this->aCurrent['rss']);
+                break;
+
+            default:
+                $sMode = '';
+                $this->isError = true;
+        }
+
+        $this->processReplaceableMarkers($oProfileAuthor);
+
+        $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+    }
+
+    function addCustomParts ()
+    {
+        $this->oModule->_oTemplate->addJs(array('entry.js'));
+        $this->oModule->_oTemplate->addCss(array('entry.css'));
+
+        return $this->oModule->_oTemplate->getJsCode('entry');
+    }
+    
+    
+        
+    function getAlterOrder()
+    {
+        $aSql = array();
+        switch ($this->aCurrent['sorting']) {
+            case 'last':
+                $aSql['order'] = ' ORDER BY `bx_polls_entries`.`added` DESC';
+                break;
+            case 'featured':
+                $aSql['order'] = ' ORDER BY `bx_polls_entries`.`featured` DESC';
+                break;
+            case 'updated':
+                $aSql['order'] = ' ORDER BY `bx_polls_entries`.`changed` DESC';
+                break;
+            case 'popular':
+                $aSql['order'] = ' ORDER BY `bx_polls_entries`.`views` DESC';
+                break;
+        }
+        return $aSql;
+    }
+}
+
+/** @} */

+ 202 - 0
modules/boonex/polls/updates/9.0.1_9.0.2/source/classes/BxPollsTemplate.php

@@ -0,0 +1,202 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Polls Polls
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/*
+ * Module representation.
+ */
+class BxPollsTemplate extends BxBaseModTextTemplate
+{
+    /**
+     * Constructor
+     */
+    function __construct(&$oConfig, &$oDb)
+    {
+        $this->MODULE = 'bx_polls';
+        parent::__construct($oConfig, $oDb);
+    }
+
+    public function getJsCode($sType, $aParams = array(), $bWrap = true)
+    {
+        $aParams = array_merge(array(
+            'aHtmlIds' => $this->_oConfig->getHtmlIds()
+        ), $aParams);
+
+        return parent::getJsCode($sType, $aParams, $bWrap);
+    }
+
+    public function entrySubentries ($aData, $bDynamic = false)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $aSubentries = $this->_oDb->getSubentries(array('type' => 'entry_id', 'entry_id' => $aData[$CNF['FIELD_ID']]));
+        if(empty($aSubentries) || !is_array($aSubentries))
+            return '';
+
+        $aTmplVarsSubentries = array();
+        foreach($aSubentries as $aSubentry) {
+            $oVotes = BxDolVote::getObjectInstance($CNF['OBJECT_VOTES_SUBENTRIES'], $aSubentry['id']);
+
+            $aTmplVarsSubentries[] = array(
+                'subentry' => $oVotes->getElementBlock(array(
+                    'dynamic_mode' => $bDynamic
+                ))
+            );
+        }
+
+    	return array(
+            'content' => $this->parseHtmlByName('subentries.html', array(
+    			'html_id' => $this->_oConfig->getHtmlIds('content') . $aData[$CNF['FIELD_ID']],
+                'bx_repeat:subentries' => $aTmplVarsSubentries,
+    	        'bx_if:show_public' => array(
+    	            'condition' => (int)$aData[$CNF['FIELD_ANONYMOUS']] == 0,
+    	            'content' => array()
+    	        )
+            )),
+            'menu' => $this->_getGetBlockMenu($aData, 'subentries')
+        );
+    }
+
+    public function entryResults($aData, $bDynamic = false)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $bAnonymous = (int)$aData[$CNF['FIELD_ANONYMOUS']] == 1;
+
+        $aSubentries = $this->_oDb->getSubentries(array('type' => 'entry_id', 'entry_id' => $aData[$CNF['FIELD_ID']]));
+        if(empty($aSubentries) || !is_array($aSubentries))
+            return '';
+
+        $iTotal = 0;
+        foreach($aSubentries as $aSubentry)
+            $iTotal += $aSubentry['votes'];
+
+        $aTmplVarsSubentries = array();
+        foreach($aSubentries as $aSubentry) {
+            $oVotes = BxDolVote::getObjectInstance($CNF['OBJECT_VOTES_SUBENTRIES'], $aSubentry['id']);
+
+            $fPercent = $iTotal > 0 ? 100 * (float)$aSubentry['votes']/$iTotal : 0;
+            $aTmplVarsSubentries[] = array(
+                'title' => bx_process_output($aSubentry['title']),
+                'width' => (int)round($fPercent) . '%',
+                'votes' => $oVotes->getCounter(array('show_counter_empty' => true, 'show_counter_in_brackets' => false)),
+                'percent' => _t('_bx_polls_txt_subentry_vote_percent', $iTotal > 0 ? round($fPercent, 2) : 0),
+                'js_code' => $oVotes->getJsScript($bDynamic)
+            );
+        }
+
+        return array(
+            'content' => $this->parseHtmlByName('subentries_results.html', array(
+            	'html_id' => $this->_oConfig->getHtmlIds('content') . $aData[$CNF['FIELD_ID']],
+                'bx_repeat:subentries' => $aTmplVarsSubentries,
+            )),
+            'menu' => $this->_getGetBlockMenu($aData, 'results')
+        );
+    }
+
+    protected function getUnit ($aData, $aParams = array())
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+        $sJsObject = $this->_oConfig->getJsObject('entry');
+
+        $iContentId = $aData[$CNF['FIELD_ID']];
+        $bPerformed = $this->_oDb->isPerformed($iContentId, bx_get_logged_profile_id());
+
+        $oComments = BxDolCmts::getObjectInstance($CNF['OBJECT_COMMENTS'], $iContentId);
+
+        $bTmplVarsComments = $oComments && $oComments->isEnabled();
+        $aTmplVarsComments = array();
+        if($bTmplVarsComments)
+            $aTmplVarsComments = array(
+            	'entry_comments' => _t('_bx_polls_txt_entry_comment_counter', $aData[$CNF['FIELD_COMMENTS']]),
+                'entry_comments_url' => $oComments->getListUrl()
+            );
+
+        $bTmplVarsSwitcher = (int)$aData[$CNF['FIELD_HIDDEN_RESULTS']] == 0 || $bPerformed;
+        $aTmplVarsSwitcher = array();
+        if($bTmplVarsSwitcher)
+            $aTmplVarsSwitcher = array(
+                'js_object' => $sJsObject,
+                'id' => $iContentId,
+                'bx_if:hide_subentries' => array(
+                    'condition' => !$bPerformed,
+                    'content' => array()
+                ),
+                'bx_if:hide_results' => array(
+                    'condition' => $bPerformed,
+                    'content' => array()
+                ),
+            );
+
+        $aResult = parent::getUnit ($aData, $aParams);
+        $aResult = array_merge($aResult, array(
+            'bx_if:show_comments' => array(
+                'condition' => $bTmplVarsComments, 
+                'content' => $aTmplVarsComments
+            ),
+            'bx_if:show_switcher' => array(
+                'condition' => $bTmplVarsSwitcher, 
+                'content' => $aTmplVarsSwitcher
+            ),
+        )); 
+
+        return $aResult;
+    }
+
+    protected function getTitle($aData)
+    {
+        return $this->_oConfig->getTitle($aData);
+    }
+
+    protected function getSummary($aData, $sTitle = '', $sText = '', $sUrl = '')
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $aBlock = $this->{$this->_oDb->isPerformed($aData[$CNF['FIELD_ID']], bx_get_logged_profile_id()) ? 'entryResults' : 'entrySubentries'}($aData);
+
+        return $aBlock['content'];
+    }
+
+    protected function getUnitThumbAndGallery ($aData)
+    {
+        return array('', '');
+    }
+
+    protected function _getGetBlockMenu($aData, $sSelected = '')
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $sJsObject = $this->_oConfig->getJsObject('entry');
+        $iContentId = $aData[$CNF['FIELD_ID']];
+
+        $aBlocks = array(
+        	'subentries' => true, 
+        	'results' => (int)$aData[$CNF['FIELD_HIDDEN_RESULTS']] == 0 || $this->_oDb->isPerformed($iContentId, bx_get_logged_profile_id())
+        );
+
+        $aMenu = array();
+        foreach($aBlocks as $sBlock => $bActive)
+            if($bActive) {
+                $sId = $this->_oConfig->getHtmlIds('block_link_' . $sBlock);
+                $aMenu[] = array('id' => $sId, 'name' => $sId, 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeBlock(this, \'' . $sBlock . '\', ' . $iContentId . ')', 'target' => '_self', 'title' => _t('_bx_polls_menu_item_view_' . $sBlock));
+            }
+
+        if(count($aMenu) <= 1)
+            return '';
+
+        $oMenu = new BxTemplMenuInteractive(array('template' => 'menu_interactive_vertical.html', 'menu_id'=> $this->_oConfig->getHtmlIds('block_menu'), 'menu_items' => $aMenu));
+        if(!empty($sSelected))
+            $oMenu->setSelected('', $this->_oConfig->getHtmlIds('block_link_' . $sSelected));
+
+        return $oMenu;
+    }
+}
+
+/** @} */

+ 135 - 0
modules/boonex/polls/updates/9.0.1_9.0.2/source/install/config.php

@@ -0,0 +1,135 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Polls Polls
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_polls',
+    'title' => 'Polls',
+    'note' => 'Basic poll module.',
+    'version' => '9.0.2',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/polls/',
+    'home_uri' => 'polls',
+
+    'db_prefix' => 'bx_polls_',
+    'class_prefix' => 'BxPolls',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Polls',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry',
+    ),
+    
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu'
+    ),
+
+    /**
+     * Storages.
+     */
+    'storages' => array(
+    	'bx_polls_files'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+		'bx_polls_preview',
+        'bx_polls_gallery',
+        'bx_polls_cover'
+    ),
+
+	/**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_polls',
+    	'bx_polls_cmts',
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+    	'process_storages' => 1,
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+        'process_menu_triggers' => 1,
+        'process_page_triggers' => 1,
+    	'process_esearches' => 1,
+    	'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+    	'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Relations Section
+     */
+    'relations' => array(
+    	'bx_timeline',
+    	'bx_notifications'
+    ),
+
+);
+
+/** @} */

+ 220 - 0
modules/boonex/polls/updates/9.0.1_9.0.2/source/install/langs/en.xml

@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_polls"><![CDATA[Polls]]></string>
+	<string name="_bx_polls_cmts"><![CDATA[Polls' Comments]]></string>
+
+	<string name="_bx_polls_option_title_chars"><![CDATA[Number of characters in auto-cropped poll title]]></string>
+	<string name="_bx_polls_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_polls_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
+	<string name="_bx_polls_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+
+	<string name="_bx_polls_form_entry"><![CDATA[Polls]]></string>
+	<string name="_bx_polls_form_entry_display_add"><![CDATA[Add Poll]]></string>
+	<string name="_bx_polls_form_entry_display_edit"><![CDATA[Edit Poll]]></string>
+	<string name="_bx_polls_form_entry_display_delete"><![CDATA[Delete Poll]]></string>
+	<string name="_bx_polls_form_entry_display_view"><![CDATA[View Poll]]></string>
+	<string name="_bx_polls_form_entry_input_author"><![CDATA[Author]]></string>
+	<string name="_bx_polls_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_polls_form_entry_input_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_polls_form_entry_input_sys_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_polls_form_entry_input_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_polls_form_entry_input_sys_cat"><![CDATA[Category]]></string>
+	<string name="_bx_polls_form_entry_input_cat"><![CDATA[Category]]></string>
+    <string name="_bx_polls_form_entry_input_cat_err"><![CDATA[Please select category]]></string>
+	<string name="_bx_polls_form_entry_input_sys_text"><![CDATA[Question]]></string>
+	<string name="_bx_polls_form_entry_input_text"><![CDATA[Question]]></string>
+	<string name="_bx_polls_form_entry_input_text_err"><![CDATA[Question is essential. Please, fill in this field]]></string>
+	<string name="_bx_polls_form_entry_input_sys_subentries"><![CDATA[Answers]]></string>
+    <string name="_bx_polls_form_entry_input_subentries"><![CDATA[Answers]]></string>
+    <string name="_bx_polls_form_entry_input_subentries_inf"><![CDATA[Leave text box empty to remove an answer.]]></string>
+    <string name="_bx_polls_form_entry_input_subentries_add"><![CDATA[Add More]]></string>
+	<string name="_bx_polls_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_polls_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this poll]]></string>
+	<string name="_bx_polls_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+	<string name="_bx_polls_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the poll]]></string>
+	<string name="_bx_polls_form_entry_input_sys_pictures"><![CDATA[Pictures]]></string>
+	<string name="_bx_polls_form_entry_input_pictures"><![CDATA[Pictures]]></string>
+	<string name="_bx_polls_form_profile_input_sys_anonymous"><![CDATA[Anonymous]]></string>
+    <string name="_bx_polls_form_profile_input_anonymous"><![CDATA[Anonymous vote]]></string>
+    <string name="_bx_polls_form_profile_input_anonymous_info"><![CDATA[When Anonymous mode is enabled, a list of voters won't be available to anybody.]]></string>
+    <string name="_bx_polls_form_profile_input_sys_hidden_results"><![CDATA[Hidden Results]]></string>
+    <string name="_bx_polls_form_profile_input_hidden_results"><![CDATA[Hide results until voted]]></string>
+    <string name="_bx_polls_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_polls_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_polls_form_entry_input_picture_use_as_thumb"><![CDATA[Cover Image]]></string>
+    <string name="_bx_polls_form_entry_input_sys_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_polls_form_entry_input_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_polls_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_polls_form_entry_input_date_changed"><![CDATA[Updated]]></string>
+
+	<string name="_bx_polls_acl_action_create_entry"><![CDATA[Create Poll]]></string>
+	<string name="_bx_polls_acl_action_delete_entry"><![CDATA[Delete Poll]]></string>
+	<string name="_bx_polls_acl_action_view_entry"><![CDATA[View Poll]]></string>
+	<string name="_bx_polls_acl_action_vote_entry"><![CDATA[Vote Poll]]></string>
+	<string name="_bx_polls_acl_action_set_thumb"><![CDATA[Set Poll Thumbnail]]></string>
+	<string name="_bx_polls_acl_action_edit_any_entry"><![CDATA[Edit Any Poll]]></string>
+
+	<string name="_bx_polls_page_title_sys_create_entry"><![CDATA[New Poll]]></string>
+	<string name="_bx_polls_page_title_create_entry"><![CDATA[New Poll]]></string>
+	<string name="_bx_polls_page_block_title_create_entry"><![CDATA[New Poll]]></string>
+	<string name="_bx_polls_page_title_sys_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_polls_page_title_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_polls_page_block_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_polls_page_title_sys_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_polls_page_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_polls_page_block_title_delete_entry"><![CDATA[Delete]]></string>
+	<string name="_bx_polls_page_title_sys_view_entry"><![CDATA[View Poll]]></string>
+	<string name="_bx_polls_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_polls_page_block_title_entry_subentries"><![CDATA[Answers]]></string>
+	<string name="_bx_polls_page_block_title_entry_text"><![CDATA[Description]]></string>
+	<string name="_bx_polls_page_title_browse"><![CDATA[Polls]]></string>
+	<string name="_bx_polls_page_title_search_results"><![CDATA[Polls matching "{0}"]]></string>
+	<string name="_bx_polls_page_title_browse_by_author"><![CDATA[Polls of {display_name}]]></string>
+	<string name="_bx_polls_page_title_browse_featured"><![CDATA[Featured Polls]]></string>
+    <string name="_bx_polls_page_title_browse_recent"><![CDATA[Latest Polls]]></string>
+    <string name="_bx_polls_page_title_browse_popular"><![CDATA[Popular Polls]]></string>
+    <string name="_bx_polls_page_title_browse_updated"><![CDATA[Updated Polls]]></string>
+    <string name="_bx_polls_page_title_sys_home"><![CDATA[Polls Home]]></string>
+    <string name="_bx_polls_page_title_home"><![CDATA[Polls]]></string>
+    <string name="_bx_polls_page_block_title_featured_entries"><![CDATA[Featured Polls]]></string>
+    <string name="_bx_polls_page_block_title_recent_entries"><![CDATA[Latest Polls]]></string>
+    <string name="_bx_polls_page_block_title_recent_entries_view_full"><![CDATA[Latest Polls (Full View)]]></string>
+    <string name="_bx_polls_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+    <string name="_bx_polls_page_block_title_entry_author"><![CDATA[Author]]></string>
+    <string name="_bx_polls_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_polls_page_block_title_entry_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_polls_page_block_title_entry_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_polls_page_block_title_entry_location"><![CDATA[Location]]></string>
+    <string name="_bx_polls_page_block_title_entry_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_polls_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
+    <string name="_bx_polls_page_title_sys_entries_popular"><![CDATA[Popular Polls]]></string>
+    <string name="_bx_polls_page_title_entries_popular"><![CDATA[Popular Polls]]></string>
+    <string name="_bx_polls_page_title_sys_entries_updated"><![CDATA[Updated Polls]]></string>
+    <string name="_bx_polls_page_title_entries_updated"><![CDATA[Updated Polls]]></string>
+    <string name="_bx_polls_page_block_title_popular_entries"><![CDATA[Popular Polls]]></string>
+    <string name="_bx_polls_page_block_title_popular_entries_view_full"><![CDATA[Popular Polls (Full View)]]></string>
+    <string name="_bx_polls_page_block_title_updated_entries"><![CDATA[Updated Polls]]></string>
+    <string name="_bx_polls_page_title_sys_view_entry_comments"><![CDATA[Poll Comments]]></string>
+    <string name="_bx_polls_page_title_view_entry_comments"><![CDATA[Comments to {title}]]></string>
+    <string name="_bx_polls_page_title_sys_entries_of_author"><![CDATA[Polls of author]]></string>
+    <string name="_bx_polls_page_title_entries_of_author"><![CDATA[Polls by {display_name}]]></string>
+    <string name="_bx_polls_page_block_title_favorites_of_author"><![CDATA[Favorites by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_polls_page_block_title_sys_favorites_of_author"><![CDATA[Favorites of author]]></string>
+    <string name="_bx_polls_page_block_title_entries_of_author"><![CDATA[Polls by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_polls_page_block_title_sys_entries_of_author"><![CDATA[Polls of author]]></string>   
+    <string name="_bx_polls_page_block_title_entries_actions"><![CDATA[Polls actions]]></string>
+    <string name="_bx_polls_page_block_title_browse_cmts"><![CDATA[Polls' Comments]]></string>
+	<string name="_bx_polls_page_title_sys_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_polls_page_title_sys_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_polls_page_title_manage"><![CDATA[Manage]]></string>
+	<string name="_bx_polls_page_block_title_system_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_polls_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_polls_page_block_title_manage"><![CDATA[Manage]]></string>    
+	<string name="_bx_polls_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
+	<string name="_bx_polls_page_block_title_cats"><![CDATA[Polls Categories]]></string>
+	<string name="_bx_polls_page_block_title_entry_info"><![CDATA[Info]]></string>
+	<string name="_bx_polls_page_block_title_my_entries"><![CDATA[My Polls]]></string>
+	<string name="_bx_polls_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_polls_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_polls_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_polls_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_polls_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_polls_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+
+    <string name="_bx_polls_menu_set_title_view_entry"><![CDATA[Poll Actions]]></string>
+    <string name="_bx_polls_menu_title_view_entry"><![CDATA[Poll Actions]]></string>
+    <string name="_bx_polls_menu_title_submenu"><![CDATA[Polls Submenu]]></string>
+    <string name="_bx_polls_menu_set_title_submenu"><![CDATA[Polls Submenu]]></string>
+    <string name="_bx_polls_menu_item_title_system_create_entry"><![CDATA[New Poll]]></string>
+    <string name="_bx_polls_menu_item_title_create_entry"><![CDATA[New Poll]]></string>
+    <string name="_bx_polls_menu_item_title_system_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_polls_menu_item_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_polls_menu_item_title_system_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_polls_menu_item_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_polls_menu_item_title_system_view_entry"><![CDATA[View Poll]]></string>
+    <string name="_bx_polls_menu_item_title_system_entries_home"><![CDATA[Polls]]></string>
+    <string name="_bx_polls_menu_item_title_entries_home"><![CDATA[Polls]]></string>
+    <string name="_bx_polls_menu_item_title_system_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_polls_menu_item_title_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_polls_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_polls_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_polls_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_polls_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_polls_menu_item_title_system_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_polls_menu_item_title_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_polls_menu_title_view_entry_submenu"><![CDATA[View Poll Submenu]]></string>
+    <string name="_bx_polls_menu_set_title_view_entry_submenu"><![CDATA[View Poll Submenu]]></string>
+    <string name="_bx_polls_menu_item_title_view_entry_submenu_entry"><![CDATA[Poll]]></string>
+    <string name="_bx_polls_menu_item_title_view_entry_submenu_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_polls_menu_item_title_system_view_entry_comments"><![CDATA[Poll Comments]]></string>
+    <string name="_bx_polls_menu_item_title_system_view_entries_author"><![CDATA[Polls]]></string>
+    <string name="_bx_polls_menu_item_title_view_entries_author"><![CDATA[Polls]]></string>
+    <string name="_bx_polls_menu_title_entries_my"><![CDATA[My Polls Action Menu]]></string>
+    <string name="_bx_polls_menu_set_title_entries_my"><![CDATA[My Polls Menu]]></string>
+	<string name="_bx_polls_menu_item_title_system_manage_my_polls"><![CDATA[My polls]]></string>
+    <string name="_bx_polls_menu_item_title_manage_my_polls"><![CDATA[{addon} polls]]></string>
+    <string name="_bx_polls_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_polls_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_polls_menu_item_title_system_manage_account"><![CDATA[Manage account]]></string>
+    <string name="_bx_polls_menu_item_title_manage_account"><![CDATA[Manage account]]></string>
+	<string name="_bx_polls_menu_item_title_system_admt_polls"><![CDATA[Polls]]></string>
+	<string name="_bx_polls_menu_item_title_admt_polls"><![CDATA[Polls - {addon} hidden]]></string>
+	<string name="_bx_polls_menu_item_title_manage_my"><![CDATA[My Polls]]></string>
+	<string name="_bx_polls_menu_item_title_manage_all"><![CDATA[All Polls]]></string>
+	<string name="_bx_polls_menu_item_view_subentries"><![CDATA[View Poll]]></string>
+	<string name="_bx_polls_menu_item_view_results"><![CDATA[View Results]]></string>
+	
+
+	<string name="_bx_polls_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_polls_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_polls_grid_filter_item_title_adm_hidden"><![CDATA[Hidden]]></string>
+	<string name="_bx_polls_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_polls_grid_column_title_adm_title"><![CDATA[Title]]></string>
+    <string name="_bx_polls_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_polls_grid_column_title_adm_author"><![CDATA[Author]]></string>
+    <string name="_bx_polls_grid_action_title_adm_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_polls_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_polls_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_polls_grid_action_err_delete"><![CDATA[Cannot delete the selected poll(s).]]></string>
+    <string name="_bx_polls_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_polls_chart_growth"><![CDATA[Polls: Growth]]></string>
+    <string name="_bx_polls_chart_growth_speed"><![CDATA[Polls: Growth Speed]]></string>
+
+    <string name="_bx_polls_search_extended"><![CDATA[Polls Search]]></string>
+    <string name="_bx_polls_search_extended_cmts"><![CDATA[Polls Comments Search]]></string>
+
+    <string name="_bx_polls_pre_lists_cats"><![CDATA[Poll categories]]></string>
+    <string name="_bx_polls_cat_beauty_and_style"><![CDATA[Beauty & Style]]></string>
+    <string name="_bx_polls_cat_business_and_money"><![CDATA[Business & Money]]></string>
+    <string name="_bx_polls_cat_cars_and_transportation"><![CDATA[Cars & Transportation]]></string>
+    <string name="_bx_polls_cat_computers_and_internet"><![CDATA[Computers & Internet]]></string>
+    <string name="_bx_polls_cat_food_and_dining"><![CDATA[Food & Dining]]></string>
+    <string name="_bx_polls_cat_education"><![CDATA[Education]]></string>
+    <string name="_bx_polls_cat_electronics"><![CDATA[Electronics]]></string>
+    <string name="_bx_polls_cat_entertainment"><![CDATA[Entertainment]]></string>
+    <string name="_bx_polls_cat_family_and_relationships"><![CDATA[Family & Relationships]]></string>
+    <string name="_bx_polls_cat_games"><![CDATA[Games]]></string>
+    <string name="_bx_polls_cat_health_and_fitness"><![CDATA[Health & Fitness]]></string>
+    <string name="_bx_polls_cat_home_and_garden"><![CDATA[Home & Garden]]></string>
+    <string name="_bx_polls_cat_news_and_events"><![CDATA[News & Events]]></string>
+    <string name="_bx_polls_cat_pets"><![CDATA[Pets]]></string>
+    <string name="_bx_polls_cat_politics_and_government"><![CDATA[Politics & Government]]></string>
+    <string name="_bx_polls_cat_pregnancy_and_parenting"><![CDATA[Pregnancy & Parenting]]></string>
+    <string name="_bx_polls_cat_sports"><![CDATA[Sports]]></string>
+    <string name="_bx_polls_cat_misc"><![CDATA[Misc]]></string>
+    <string name="_bx_polls_cat_would_you_rather"><![CDATA[Would You Rather]]></string>
+    <string name="_bx_polls_cat_yes_or_no"><![CDATA[Yes or No]]></string>
+
+    <string name="_bx_polls_txt_all_entries_by"><![CDATA[<a href="{0}">All Polls by {1} ({2})</a>]]></string>
+    <string name="_bx_polls_txt_sample_single"><![CDATA[poll]]></string>
+    <string name="_bx_polls_txt_sample_single_with_article"><![CDATA[a poll]]></string>
+    <string name="_bx_polls_txt_sample_comment_single"><![CDATA[poll's comment]]></string>
+    <string name="_bx_polls_txt_sample_vote_single"><![CDATA[poll's vote]]></string>
+    <string name="_bx_polls_txt_entry_comment_counter"><![CDATA[{0} comments]]></string>
+    <string name="_bx_polls_txt_subentry_vote_do_by"><![CDATA[Voted for]]></string>
+    <string name="_bx_polls_txt_subentry_vote_counter"><![CDATA[{0} votes]]></string>
+    <string name="_bx_polls_txt_subentry_vote_percent"><![CDATA[({0}%)]]></string>
+    <string name="_bx_polls_msg_public_voting"><![CDATA[This voting is public, your choice will be displayed for others.]]></string>
+</resources>

+ 48 - 0
modules/boonex/polls/updates/9.0.1_9.0.2/source/install/sql/disable.sql

@@ -0,0 +1,48 @@
+
+-- SETTINGS
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_polls' LIMIT 1);
+SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
+DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
+DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
+DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
+
+-- PAGES
+DELETE FROM `sys_objects_page` WHERE `module` = 'bx_polls';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_polls' OR `object` IN('bx_polls_create_entry', 'bx_polls_edit_entry', 'bx_polls_delete_entry', 'bx_polls_view_entry', 'bx_polls_view_entry_comments', 'bx_polls_home', 'bx_polls_popular', 'bx_polls_updated', 'bx_polls_author', 'bx_polls_search', 'bx_polls_manage');
+
+-- MENU
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_polls';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_polls';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_polls' OR `set_name` IN('bx_polls_view', 'bx_polls_submenu', 'bx_polls_view_submenu', 'bx_polls_my');
+
+-- PRIVACY 
+DELETE FROM `sys_objects_privacy` WHERE `object` = 'bx_polls_allow_view_to';
+
+-- ACL
+DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_polls';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_polls';
+
+-- SEARCH
+DELETE FROM `sys_objects_search` WHERE `ObjectName` IN ('bx_polls', 'bx_polls_cmts');
+
+-- METATAGS
+DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_polls';
+
+-- CATEGORY
+DELETE FROM `sys_objects_category` WHERE `object` = 'bx_polls_cats';
+
+-- STATS
+DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_polls%';
+
+-- CHARTS
+DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_polls%';
+
+-- GRIDS
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_polls_administration', 'bx_polls_common');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_polls_administration', 'bx_polls_common');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_polls_administration', 'bx_polls_common');
+
+-- ALERTS
+SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_polls' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;

+ 383 - 0
modules/boonex/polls/updates/9.0.1_9.0.2/source/install/sql/enable.sql

@@ -0,0 +1,383 @@
+
+-- SETTINGS
+
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_polls', '_bx_polls', 'bx_polls@modules/boonex/polls/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_polls', '_bx_polls', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_polls_title_chars', '200', @iCategId, '_bx_polls_option_title_chars', 'digit', '', '', '', 1),
+('bx_polls_per_page_browse', '12', @iCategId, '_bx_polls_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_polls_rss_num', '10', @iCategId, '_bx_polls_option_rss_num', 'digit', '', '', '', 20),
+('bx_polls_searchable_fields', 'text', @iCategId, '_bx_polls_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_polls";s:6:"method";s:21:"get_searchable_fields";}', 30);
+
+
+-- PAGE: create entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_create_entry', '_bx_polls_page_title_sys_create_entry', '_bx_polls_page_title_create_entry', 'bx_polls', 5, 2147483647, 1, 'create-poll', 'page.php?i=create-poll', '', '', '', 0, 1, 0, 'BxPollsPageBrowse', 'modules/boonex/polls/classes/BxPollsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_polls_create_entry', 1, 'bx_polls', '_bx_polls_page_block_title_create_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_polls";s:6:"method";s:13:"entity_create";}', 0, 1, 1);
+
+
+-- PAGE: edit entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_edit_entry', '_bx_polls_page_title_sys_edit_entry', '_bx_polls_page_title_edit_entry', 'bx_polls', 5, 2147483647, 1, 'edit-poll', '', '', '', '', 0, 1, 0, 'BxPollsPageEntry', 'modules/boonex/polls/classes/BxPollsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_polls_edit_entry', 1, 'bx_polls', '_bx_polls_page_block_title_edit_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_polls";s:6:"method";s:11:"entity_edit";}', 0, 0, 0);
+
+
+-- PAGE: delete entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_delete_entry', '_bx_polls_page_title_sys_delete_entry', '_bx_polls_page_title_delete_entry', 'bx_polls', 5, 2147483647, 1, 'delete-poll', '', '', '', '', 0, 1, 0, 'BxPollsPageEntry', 'modules/boonex/polls/classes/BxPollsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_polls_delete_entry', 1, 'bx_polls', '_bx_polls_page_block_title_delete_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_polls";s:6:"method";s:13:"entity_delete";}', 0, 0, 0);
+
+
+-- PAGE: view entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_view_entry', '_bx_polls_page_title_sys_view_entry', '_bx_polls_page_title_view_entry', 'bx_polls', 10, 2147483647, 1, 'view-poll', '', '', '', '', 0, 1, 0, 'BxPollsPageEntry', 'modules/boonex/polls/classes/BxPollsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_polls_view_entry', 1, 'bx_polls', '', '_bx_polls_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 1),
+('bx_polls_view_entry', 1, 'bx_polls', '', '_bx_polls_page_block_title_entry_subentries', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:20:\"get_block_subentries\";}', 0, 0, 1, 2),
+('bx_polls_view_entry', 2, 'bx_polls', '', '_bx_polls_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:13:\"entity_author\";}', 0, 0, 1, 0),
+('bx_polls_view_entry', 3, 'bx_polls', '', '_bx_polls_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 1),
+('bx_polls_view_entry', 3, 'bx_polls', '', '_bx_polls_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:15:\"entity_location\";}', 0, 0, 0, 2),
+('bx_polls_view_entry', 4, 'bx_polls', '', '_bx_polls_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:18:\"entity_all_actions\";}', 0, 0, 1, 0),
+('bx_polls_view_entry', 4, 'bx_polls', '', '_bx_polls_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:14:\"entity_actions\";}', 0, 0, 0, 1),
+('bx_polls_view_entry', 4, 'bx_polls', '', '_bx_polls_page_block_title_entry_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 0, 2),
+('bx_polls_view_entry', 4, 'bx_polls', '', '_bx_polls_page_block_title_entry_attachments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:18:\"entity_attachments\";}', 0, 0, 0, 3),
+('bx_polls_view_entry', 4, 'bx_polls', '', '_bx_polls_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1, 4),
+('bx_polls_view_entry', 4, 'bx_polls', '', '_bx_polls_page_block_title_entry_location', 3, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:13:\"locations_map\";s:6:\"params\";a:2:{i:0;s:8:\"bx_polls\";i:1;s:4:\"{id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 5);
+
+
+-- PAGE: view entry comments
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_view_entry_comments', '_bx_polls_page_title_sys_view_entry_comments', '_bx_polls_page_title_view_entry_comments', 'bx_polls', 5, 2147483647, 1, 'view-poll-comments', '', '', '', '', 0, 1, 0, 'BxPollsPageEntry', 'modules/boonex/polls/classes/BxPollsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_polls_view_entry_comments', 1, 'bx_polls', '_bx_polls_page_block_title_entry_comments', '_bx_polls_page_block_title_entry_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1);
+
+
+-- PAGE: popular entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_popular', '_bx_polls_page_title_sys_entries_popular', '_bx_polls_page_title_entries_popular', 'bx_polls', 5, 2147483647, 1, 'polls-popular', 'page.php?i=polls-popular', '', '', '', 0, 1, 0, 'BxPollsPageBrowse', 'modules/boonex/polls/classes/BxPollsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_polls_popular', 1, 'bx_polls', '_bx_polls_page_block_title_popular_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_polls";s:6:"method";s:14:"browse_popular";s:6:"params";a:3:{s:9:"unit_view";s:8:"extended";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+
+-- PAGE: recently updated entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_updated', '_bx_polls_page_title_sys_entries_updated', '_bx_polls_page_title_entries_updated', 'bx_polls', 5, 2147483647, 1, 'polls-updated', 'page.php?i=polls-updated', '', '', '', 0, 1, 0, 'BxPollsPageBrowse', 'modules/boonex/polls/classes/BxPollsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_polls_updated', 1, 'bx_polls', '_bx_polls_page_block_title_updated_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_polls";s:6:"method";s:14:"browse_updated";s:6:"params";a:3:{s:9:"unit_view";s:8:"extended";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+
+-- PAGE: entries of author
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_author', 'polls-author', '_bx_polls_page_title_sys_entries_of_author', '_bx_polls_page_title_entries_of_author', 'bx_polls', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxPollsPageAuthor', 'modules/boonex/polls/classes/BxPollsPageAuthor.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_polls_author', 1, 'bx_polls', '', '_bx_polls_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:18:\"my_entries_actions\";}', 0, 0, 1, 1),
+('bx_polls_author', 1, 'bx_polls', '_bx_polls_page_block_title_sys_favorites_of_author', '_bx_polls_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:15:\"browse_favorite\";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 2),
+('bx_polls_author', 1, 'bx_polls', '_bx_polls_page_block_title_sys_entries_of_author', '_bx_polls_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:13:\"browse_author\";}', 0, 0, 1, 3);
+
+
+-- PAGE: module home
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_home', 'polls-home', '_bx_polls_page_title_sys_home', '_bx_polls_page_title_home', 'bx_polls', 2, 2147483647, 1, 'page.php?i=polls-home', '', '', '', 0, 1, 0, 'BxPollsPageBrowse', 'modules/boonex/polls/classes/BxPollsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('bx_polls_home', 1, 'bx_polls', '', '_bx_polls_page_block_title_featured_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_polls";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 0),
+('bx_polls_home', 1, 'bx_polls', '', '_bx_polls_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_polls";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 1),
+('bx_polls_home', 2, 'bx_polls', '', '_bx_polls_page_block_title_popular_keywords', 11, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:14:\"keywords_cloud\";s:6:\"params\";a:2:{i:0;s:8:\"bx_polls\";i:1;s:8:\"bx_polls\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 1, 1, 0),
+('bx_polls_home', 2, 'bx_polls', '', '_bx_polls_page_block_title_cats', 11, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:15:\"categories_list\";s:6:\"params\";a:2:{i:0;s:13:\"bx_polls_cats\";i:1;a:1:{s:10:\"show_empty\";b:1;}}s:5:\"class\";s:20:\"TemplServiceCategory\";}', 0, 1, 1, 1);
+
+-- PAGE: search for entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_search', '_bx_polls_page_title_sys_entries_search', '_bx_polls_page_title_entries_search', 'bx_polls', 5, 2147483647, 1, 'polls-search', 'page.php?i=polls-search', '', '', '', 0, 1, 0, 'BxPollsPageBrowse', 'modules/boonex/polls/classes/BxPollsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_polls_search', 1, 'bx_polls', '_bx_polls_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:8:"bx_polls";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_polls_search', 1, 'bx_polls', '_bx_polls_page_block_title_search_results', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_polls";s:6:"method";s:27:"get_results_search_extended";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:8:"bx_polls";s:10:"show_empty";b:1;}}}', 0, 1, 1, 2),
+('bx_polls_search', 1, 'bx_polls', '_bx_polls_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:13:"bx_polls_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_polls_search', 1, 'bx_polls', '_bx_polls_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:13:"bx_polls_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
+
+-- PAGE: module manage own
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_manage', '_bx_polls_page_title_sys_manage', '_bx_polls_page_title_manage', 'bx_polls', 5, 2147483647, 1, 'polls-manage', 'page.php?i=polls-manage', '', '', '', 0, 1, 0, 'BxPollsPageBrowse', 'modules/boonex/polls/classes/BxPollsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_polls_manage', 1, 'bx_polls', '_bx_polls_page_block_title_system_manage', '_bx_polls_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:12:\"manage_tools\";}}', 0, 1, 0);
+
+
+-- PAGE: module manage all
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_administration', '_bx_polls_page_title_sys_manage_administration', '_bx_polls_page_title_manage', 'bx_polls', 5, 192, 1, 'polls-administration', 'page.php?i=polls-administration', '', '', '', 0, 1, 0, 'BxPollsPageBrowse', 'modules/boonex/polls/classes/BxPollsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_polls_administration', 1, 'bx_polls', '_bx_polls_page_block_title_system_manage_administration', '_bx_polls_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:8:\"bx_polls\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
+
+
+-- PAGE: add block to homepage
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('sys_home', 1, 'bx_polls', '_bx_polls_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_polls";s:6:"method";s:13:"browse_public";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
+
+
+-- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
+SET @iPBCellProfile = 3;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_polls', '_bx_polls_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_polls";s:6:"method";s:13:"browse_author";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 0, 0);
+
+
+-- PAGE: service blocks
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('', 0, 'bx_polls', '_bx_polls_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_polls";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 1),
+('', 0, 'bx_polls', '_bx_polls_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_polls";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2);
+
+
+-- MENU: add to site menu
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_site', 'bx_polls', 'polls-home', '_bx_polls_menu_item_title_system_entries_home', '_bx_polls_menu_item_title_entries_home', 'page.php?i=polls-home', '', '', 'tasks col-green1', 'bx_polls_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+-- MENU: add to homepage menu
+SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_homepage', 'bx_polls', 'polls-home', '_bx_polls_menu_item_title_system_entries_home', '_bx_polls_menu_item_title_entries_home', 'page.php?i=polls-home', '', '', 'tasks col-green1', 'bx_polls_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+
+-- MENU: add to "add content" menu
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_add_content_links', 'bx_polls', 'create-poll', '_bx_polls_menu_item_title_system_create_entry', '_bx_polls_menu_item_title_create_entry', 'page.php?i=create-poll', '', '', 'tasks col-green1', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: actions menu for view entry 
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_view', '_bx_polls_menu_title_view_entry', 'bx_polls_view', 'bx_polls', 9, 0, 1, 'BxPollsMenuView', 'modules/boonex/polls/classes/BxPollsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_polls_view', 'bx_polls', '_bx_polls_menu_set_title_view_entry', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_polls_view', 'bx_polls', 'edit-poll', '_bx_polls_menu_item_title_system_edit_entry', '_bx_polls_menu_item_title_edit_entry', 'page.php?i=edit-poll&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 1),
+('bx_polls_view', 'bx_polls', 'delete-poll', '_bx_polls_menu_item_title_system_delete_entry', '_bx_polls_menu_item_title_delete_entry', 'page.php?i=delete-poll&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 2);
+
+-- MENU: actions menu for my entries
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_my', '_bx_polls_menu_title_entries_my', 'bx_polls_my', 'bx_polls', 9, 0, 1, 'BxPollsMenu', 'modules/boonex/polls/classes/BxPollsMenu.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_polls_my', 'bx_polls', '_bx_polls_menu_set_title_entries_my', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_polls_my', 'bx_polls', 'create-poll', '_bx_polls_menu_item_title_system_create_entry', '_bx_polls_menu_item_title_create_entry', 'page.php?i=create-poll', '', '', 'plus', '', 2147483647, 1, 0, 0);
+
+-- MENU: module sub-menu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_submenu', '_bx_polls_menu_title_submenu', 'bx_polls_submenu', 'bx_polls', 8, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_polls_submenu', 'bx_polls', '_bx_polls_menu_set_title_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_polls_submenu', 'bx_polls', 'polls-home', '_bx_polls_menu_item_title_system_entries_public', '_bx_polls_menu_item_title_entries_public', 'page.php?i=polls-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_polls_submenu', 'bx_polls', 'polls-popular', '_bx_polls_menu_item_title_system_entries_popular', '_bx_polls_menu_item_title_entries_popular', 'page.php?i=polls-popular', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_polls_submenu', 'bx_polls', 'polls-search', '_bx_polls_menu_item_title_system_entries_search', '_bx_polls_menu_item_title_entries_search', 'page.php?i=polls-search', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_polls_submenu', 'bx_polls', 'polls-manage', '_bx_polls_menu_item_title_system_entries_manage', '_bx_polls_menu_item_title_entries_manage', 'page.php?i=polls-manage', '', '', '', '', 2147483646, 1, 1, 4);
+
+-- MENU: sub-menu for view entry
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_view_submenu', '_bx_polls_menu_title_view_entry_submenu', 'bx_polls_view_submenu', 'bx_polls', 8, 0, 1, 'BxPollsMenuView', 'modules/boonex/polls/classes/BxPollsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_polls_view_submenu', 'bx_polls', '_bx_polls_menu_set_title_view_entry_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_polls_view_submenu', 'bx_polls', 'view-poll', '_bx_polls_menu_item_title_system_view_entry', '_bx_polls_menu_item_title_view_entry_submenu_entry', 'page.php?i=view-poll&id={content_id}', '', '', '', '', 2147483647, 0, 0, 1),
+('bx_polls_view_submenu', 'bx_polls', 'view-poll-comments', '_bx_polls_menu_item_title_system_view_entry_comments', '_bx_polls_menu_item_title_view_entry_submenu_comments', 'page.php?i=view-poll-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 2);
+
+-- MENU: profile stats
+SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_profile_stats', 'bx_polls', 'profile-stats-manage-polls', '_bx_polls_menu_item_title_system_manage_my_polls', '_bx_polls_menu_item_title_manage_my_polls', 'page.php?i=polls-manage', '', '_self', 'tasks col-green1', 'a:2:{s:6:"module";s:8:"bx_polls";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1);
+
+-- MENU: manage tools submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls_menu_manage_tools', '_bx_polls_menu_title_manage_tools', 'bx_polls_menu_manage_tools', 'bx_polls', 6, 0, 1, 'BxPollsMenuManageTools', 'modules/boonex/polls/classes/BxPollsMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_polls_menu_manage_tools', 'bx_polls', '_bx_polls_menu_set_title_manage_tools', 0);
+
+--INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+--('bx_polls_menu_manage_tools', 'bx_polls', 'delete-with-content', '_bx_polls_menu_item_title_system_delete_with_content', '_bx_polls_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'trash-o', '', 128, 1, 0, 0);
+
+-- MENU: dashboard manage tools
+SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_account_dashboard_manage_tools', 'bx_polls', 'polls-administration', '_bx_polls_menu_item_title_system_admt_polls', '_bx_polls_menu_item_title_admt_polls', 'page.php?i=polls-administration', '', '_self', '', 'a:2:{s:6:"module";s:8:"bx_polls";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+
+-- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('trigger_profile_view_submenu', 'bx_polls', 'polls-author', '_bx_polls_menu_item_title_system_view_entries_author', '_bx_polls_menu_item_title_view_entries_author', 'page.php?i=polls-author&profile_id={profile_id}', '', '', 'tasks col-green1', '', 2147483647, 1, 0, 0);
+
+
+-- PRIVACY 
+
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_polls_allow_view_to', 'bx_polls', 'view', '_bx_polls_form_entry_input_allow_view_to', '3', 'bx_polls_entries', 'id', 'author', '', '');
+
+
+-- ACL
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_polls', 'create entry', NULL, '_bx_polls_acl_action_create_entry', '', 1, 3);
+SET @iIdActionEntryCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_polls', 'delete entry', NULL, '_bx_polls_acl_action_delete_entry', '', 1, 3);
+SET @iIdActionEntryDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_polls', 'view entry', NULL, '_bx_polls_acl_action_view_entry', '', 1, 0);
+SET @iIdActionEntryView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_polls', 'vote entry', NULL, '_bx_polls_acl_action_vote_entry', '', 1, 0);
+SET @iIdActionEntryVote = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_polls', 'set thumb', NULL, '_bx_polls_acl_action_set_thumb', '', 1, 3);
+SET @iIdActionSetThumb = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_polls', 'edit any entry', NULL, '_bx_polls_acl_action_edit_any_entry', '', 1, 3);
+SET @iIdActionEntryEditAny = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- entry create
+(@iStandard, @iIdActionEntryCreate),
+(@iModerator, @iIdActionEntryCreate),
+(@iAdministrator, @iIdActionEntryCreate),
+(@iPremium, @iIdActionEntryCreate),
+
+-- entry delete
+(@iStandard, @iIdActionEntryDelete),
+(@iModerator, @iIdActionEntryDelete),
+(@iAdministrator, @iIdActionEntryDelete),
+(@iPremium, @iIdActionEntryDelete),
+
+-- entry view
+(@iUnauthenticated, @iIdActionEntryView),
+(@iAccount, @iIdActionEntryView),
+(@iStandard, @iIdActionEntryView),
+(@iUnconfirmed, @iIdActionEntryView),
+(@iPending, @iIdActionEntryView),
+(@iModerator, @iIdActionEntryView),
+(@iAdministrator, @iIdActionEntryView),
+(@iPremium, @iIdActionEntryView),
+
+-- entry vote
+(@iStandard, @iIdActionEntryVote),
+(@iModerator, @iIdActionEntryVote),
+(@iAdministrator, @iIdActionEntryVote),
+(@iPremium, @iIdActionEntryVote),
+
+-- set entry thumb
+(@iStandard, @iIdActionSetThumb),
+(@iModerator, @iIdActionSetThumb),
+(@iAdministrator, @iIdActionSetThumb),
+(@iPremium, @iIdActionSetThumb),
+
+-- edit any entry
+(@iModerator, @iIdActionEntryEditAny),
+(@iAdministrator, @iIdActionEntryEditAny);
+
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_polls', '_bx_polls', @iSearchOrder + 1, 'BxPollsSearchResult', 'modules/boonex/polls/classes/BxPollsSearchResult.php'),
+('bx_polls_cmts', '_bx_polls_cmts', @iSearchOrder + 2, 'BxPollsCmtsSearchResult', 'modules/boonex/polls/classes/BxPollsCmtsSearchResult.php');
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_polls', 'bx_polls_meta_keywords', 'bx_polls_meta_locations', '', '', '');
+
+-- CATEGORY
+INSERT INTO `sys_objects_category` (`object`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
+('bx_polls_cats', 'bx_polls', 'bx_polls', 'bx_polls_cats', 'bx_polls_entries', 'cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`id` = `bx_polls_entries`.`author`)', 'AND `sys_profiles`.`status` = ''active''', '', '');
+
+-- STATS
+SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
+INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
+('bx_polls', 'bx_polls', '_bx_polls', 'page.php?i=polls-home', 'tasks col-green1', 'SELECT COUNT(*) FROM `bx_polls_entries` WHERE 1 AND `status` = ''active'' AND `status_admin` = ''active''', @iMaxOrderStats + 1);
+
+-- CHARTS
+SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
+INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
+('bx_polls_growth', '_bx_polls_chart_growth', 'bx_polls_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_polls_growth_speed', '_bx_polls_chart_growth_speed', 'bx_polls_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
+
+-- GRIDS: moderation tools
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
+('bx_polls_administration', 'Sql', 'SELECT * FROM `bx_polls_entries` WHERE 1 ', 'bx_polls_entries', 'id', 'added', 'status_admin', '', 20, NULL, 'start', '', 'text', '', 'like', '', '', 192, 'BxPollsGridAdministration', 'modules/boonex/polls/classes/BxPollsGridAdministration.php'),
+('bx_polls_common', 'Sql', 'SELECT * FROM `bx_polls_entries` WHERE 1 ', 'bx_polls_entries', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'text', '', 'like', '', '', 2147483647, 'BxPollsGridCommon', 'modules/boonex/polls/classes/BxPollsGridCommon.php');
+
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_polls_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_polls_administration', 'switcher', '_bx_polls_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_polls_administration', 'text', '_bx_polls_grid_column_title_adm_title', '25%', 0, '25', '', 3),
+('bx_polls_administration', 'added', '_bx_polls_grid_column_title_adm_added', '20%', 1, '25', '', 4),
+('bx_polls_administration', 'author', '_bx_polls_grid_column_title_adm_author', '25%', 0, '25', '', 5),
+('bx_polls_administration', 'actions', '', '20%', 0, '', '', 6),
+('bx_polls_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_polls_common', 'switcher', '_bx_polls_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_polls_common', 'text', '_bx_polls_grid_column_title_adm_title', '40%', 0, '35', '', 3),
+('bx_polls_common', 'added', '_bx_polls_grid_column_title_adm_added', '30%', 1, '25', '', 4),
+('bx_polls_common', 'actions', '', '20%', 0, '', '', 5);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_polls_administration', 'bulk', 'delete', '_bx_polls_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_polls_administration', 'single', 'edit', '_bx_polls_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_polls_administration', 'single', 'delete', '_bx_polls_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_polls_administration', 'single', 'settings', '_bx_polls_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
+('bx_polls_common', 'bulk', 'delete', '_bx_polls_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_polls_common', 'single', 'edit', '_bx_polls_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_polls_common', 'single', 'delete', '_bx_polls_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_polls_common', 'single', 'settings', '_bx_polls_grid_action_title_adm_more_actions', 'cog', 1, 0, 3);
+
+-- ALERTS
+
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_polls', 'BxPollsAlertsResponse', 'modules/boonex/polls/classes/BxPollsAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('profile', 'delete', @iHandler);
+

+ 343 - 0
modules/boonex/polls/updates/9.0.1_9.0.2/source/install/sql/install.sql

@@ -0,0 +1,343 @@
+
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+-- TABLE: entries
+CREATE TABLE IF NOT EXISTS `bx_polls_entries` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL,
+  `added` int(11) NOT NULL,
+  `changed` int(11) NOT NULL,
+  `thumb` int(11) NOT NULL,
+  `text` text NOT NULL,
+  `cat` int(11) NOT NULL,
+  `views` int(11) NOT NULL default '0',
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `favorites` int(11) NOT NULL default '0',
+  `comments` int(11) NOT NULL default '0',
+  `reports` int(11) NOT NULL default '0',
+  `featured` int(11) NOT NULL default '0',
+  `allow_view_to` int(11) NOT NULL DEFAULT '3',
+  `anonymous` tinyint(4) NOT NULL DEFAULT '0',
+  `hidden_results` tinyint(4) NOT NULL DEFAULT '0',
+  `status` enum('active','hidden') NOT NULL DEFAULT 'active',
+  `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `search_fields` (`text`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_polls_subentries` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `entry_id` int(11) unsigned NOT NULL default '0',
+  `title` varchar(255) NOT NULL,
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `order` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `title` (`title`)
+);
+
+-- TABLE: storages & transcoders
+CREATE TABLE IF NOT EXISTS `bx_polls_files` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_polls_photos_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+-- TABLE: comments
+CREATE TABLE IF NOT EXISTS `bx_polls_cmts` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: votes
+CREATE TABLE IF NOT EXISTS `bx_polls_votes` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_polls_votes_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `value` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_polls_votes_subentries` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_polls_votes_subentries_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `value` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: views
+CREATE TABLE `bx_polls_views_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: metas
+CREATE TABLE `bx_polls_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE `bx_polls_meta_locations` (
+  `object_id` int(10) unsigned NOT NULL,
+  `lat` double NOT NULL,
+  `lng` double NOT NULL,
+  `country` varchar(2) NOT NULL,
+  `state` varchar(255) NOT NULL,
+  `city` varchar(255) NOT NULL,
+  `zip` varchar(255) NOT NULL,
+  `street` varchar(255) NOT NULL,
+  `street_number` varchar(255) NOT NULL,
+  PRIMARY KEY (`object_id`),
+  KEY `country_state_city` (`country`,`state`(8),`city`(8))
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_polls_reports` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_polls_reports_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: favorites
+CREATE TABLE `bx_polls_favorites_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`author_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+
+-- STORAGES & TRANSCODERS
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_polls_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_polls_files', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_polls_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_polls_photos_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
+('bx_polls_preview', 'bx_polls_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_polls_files";}', 'no', '1', '2592000', '0'),
+('bx_polls_gallery', 'bx_polls_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_polls_files";}', 'no', '1', '2592000', '0'),
+('bx_polls_cover', 'bx_polls_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_polls_files";}', 'no', '1', '2592000', '0');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_polls_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
+('bx_polls_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_polls_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0');
+
+
+-- FORMS
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_polls', 'bx_polls', '_bx_polls_form_entry', '', 'a:1:{s:7:\"enctype\";s:19:\"multipart/form-data\";}', 'bx_polls_entries', 'id', '', '', 'do_submit', '', 0, 1, 'BxPollsFormEntry', 'modules/boonex/polls/classes/BxPollsFormEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_polls', 'bx_polls_entry_add', 'bx_polls', 0, '_bx_polls_form_entry_display_add'),
+('bx_polls', 'bx_polls_entry_delete', 'bx_polls', 0, '_bx_polls_form_entry_display_delete'),
+('bx_polls', 'bx_polls_entry_edit', 'bx_polls', 0, '_bx_polls_form_entry_display_edit'),
+('bx_polls', 'bx_polls_entry_view', 'bx_polls', 1, '_bx_polls_form_entry_display_view');
+
+INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_polls', 'bx_polls', 'allow_view_to', '', '', 0, 'custom', '_bx_polls_form_entry_input_sys_allow_view_to', '_bx_polls_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_polls', 'bx_polls', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_polls_form_entry_input_sys_delete_confirm', '_bx_polls_form_entry_input_delete_confirm', '_bx_polls_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_polls_form_entry_input_delete_confirm_error', '', '', 1, 0),
+('bx_polls', 'bx_polls', 'do_publish', '_bx_polls_form_entry_input_do_publish', '', 0, 'submit', '_bx_polls_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_polls', 'bx_polls', 'do_submit', '_bx_polls_form_entry_input_do_submit', '', 0, 'submit', '_bx_polls_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_polls', 'bx_polls', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_polls', 'bx_polls', 'pictures', 'a:1:{i:0;s:9:"sys_html5";}', 'a:2:{s:10:"sys_simple";s:26:"_sys_uploader_simple_title";s:9:"sys_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_polls_form_entry_input_sys_pictures', '_bx_polls_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_polls', 'bx_polls', 'text', '', '', 0, 'textarea', '_bx_polls_form_entry_input_sys_text', '_bx_polls_form_entry_input_text', '', 1, 0, 3, '', '', '', 'Avail', '', '_bx_polls_form_entry_input_text_err', 'Xss', '', 1, 0),
+('bx_polls', 'bx_polls', 'subentries', '', '', 0, 'custom', '_bx_polls_form_entry_input_sys_subentries', '_bx_polls_form_entry_input_subentries', '_bx_polls_form_entry_input_subentries_inf', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_polls', 'bx_polls', 'cat', '', '#!bx_polls_cats', 0, 'select', '_bx_polls_form_entry_input_sys_cat', '_bx_polls_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_polls_form_entry_input_cat_err', 'Xss', '', 1, 0),
+('bx_polls', 'bx_polls', 'anonymous', 1, '', 1, 'switcher', '_bx_polls_form_profile_input_sys_anonymous', '_bx_polls_form_profile_input_anonymous', '_bx_polls_form_profile_input_anonymous_info', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_polls', 'bx_polls', 'hidden_results', 1, '', 0, 'switcher', '_bx_polls_form_profile_input_sys_hidden_results', '_bx_polls_form_profile_input_hidden_results', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_polls', 'bx_polls', 'added', '', '', 0, 'datetime', '_bx_polls_form_entry_input_sys_date_added', '_bx_polls_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_polls', 'bx_polls', 'changed', '', '', 0, 'datetime', '_bx_polls_form_entry_input_sys_date_changed', '_bx_polls_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_polls_entry_add', 'cat', 2147483647, 1, 1),
+('bx_polls_entry_add', 'text', 2147483647, 1, 2),
+('bx_polls_entry_add', 'subentries', 2147483647, 1, 3),
+('bx_polls_entry_add', 'pictures', 2147483647, 1, 4),
+('bx_polls_entry_add', 'allow_view_to', 2147483647, 1, 5),
+('bx_polls_entry_add', 'anonymous', 2147483647, 1, 6),
+('bx_polls_entry_add', 'hidden_results', 2147483647, 1, 7),
+('bx_polls_entry_add', 'location', 2147483647, 1, 8),
+('bx_polls_entry_add', 'do_publish', 2147483647, 1, 9),
+
+('bx_polls_entry_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_polls_entry_delete', 'do_submit', 2147483647, 1, 2),
+
+('bx_polls_entry_edit', 'cat', 2147483647, 1, 1),
+('bx_polls_entry_edit', 'text', 2147483647, 1, 2),
+('bx_polls_entry_edit', 'subentries', 2147483647, 1, 3),
+('bx_polls_entry_edit', 'pictures', 2147483647, 1, 4),
+('bx_polls_entry_edit', 'allow_view_to', 2147483647, 1, 5),
+('bx_polls_entry_edit', 'hidden_results', 2147483647, 1, 6),
+('bx_polls_entry_edit', 'location', 2147483647, 1, 7),
+('bx_polls_entry_edit', 'do_submit', 2147483647, 1, 8),
+
+('bx_polls_entry_view', 'cat', 2147483647, 1, 1),
+('bx_polls_entry_view', 'added', 2147483647, 1, 2),
+('bx_polls_entry_view', 'changed', 2147483647, 1, 3);
+
+
+-- PRE-VALUES
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
+('bx_polls_cats', '_bx_polls_pre_lists_cats', 'bx_polls', '0');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
+('bx_polls_cats', '', 0, '_sys_please_select', ''),
+('bx_polls_cats', '1', 1, '_bx_polls_cat_beauty_and_style', ''),
+('bx_polls_cats', '2', 2, '_bx_polls_cat_business_and_money', ''),
+('bx_polls_cats', '3', 3, '_bx_polls_cat_cars_and_transportation', ''),
+('bx_polls_cats', '4', 4, '_bx_polls_cat_computers_and_internet', ''),
+('bx_polls_cats', '5', 5, '_bx_polls_cat_food_and_dining', ''),
+('bx_polls_cats', '6', 6, '_bx_polls_cat_education', ''),
+('bx_polls_cats', '7', 7, '_bx_polls_cat_electronics', ''),
+('bx_polls_cats', '8', 8, '_bx_polls_cat_entertainment', ''),
+('bx_polls_cats', '9', 9, '_bx_polls_cat_family_and_relationships', ''),
+('bx_polls_cats', '10', 10, '_bx_polls_cat_games', ''),
+('bx_polls_cats', '11', 11, '_bx_polls_cat_health_and_fitness', ''),
+('bx_polls_cats', '12', 12, '_bx_polls_cat_home_and_garden', ''),
+('bx_polls_cats', '13', 13, '_bx_polls_cat_news_and_events', ''),
+('bx_polls_cats', '14', 14, '_bx_polls_cat_pets', ''),
+('bx_polls_cats', '15', 15, '_bx_polls_cat_politics_and_government', ''),
+('bx_polls_cats', '16', 16, '_bx_polls_cat_pregnancy_and_parenting', ''),
+('bx_polls_cats', '17', 17, '_bx_polls_cat_sports', ''),
+('bx_polls_cats', '18', 18, '_bx_polls_cat_misc', ''),
+('bx_polls_cats', '19', 19, '_bx_polls_cat_would_you_rather', ''),
+('bx_polls_cats', '20', 20, '_bx_polls_cat_yes_or_no', '');
+
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_polls', 'bx_polls', 'bx_polls_cmts', 1, 5000, 1000, 1, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-poll&id={object_id}', '', 'bx_polls_entries', 'id', 'author', 'text', 'comments', '', '');
+
+
+-- VOTES
+INSERT INTO `sys_objects_vote` (`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES 
+('bx_polls', 'bx_polls_votes', 'bx_polls_votes_track', '604800', '1', '1', '0', '1', 'bx_polls_entries', 'id', 'author', 'rate', 'votes', '', ''),
+('bx_polls_subentries', 'bx_polls_votes_subentries', 'bx_polls_votes_subentries_track', '604800', '1', '1', '0', '1', 'bx_polls_subentries', 'id', 'author', 'rate', 'votes', 'BxPollsVoteSubentries', 'modules/boonex/polls/classes/BxPollsVoteSubentries.php');
+
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_polls', 'bx_polls_reports', 'bx_polls_reports_track', '1', 'page.php?i=view-poll&id={object_id}', 'bx_polls_entries', 'id', 'author', 'reports', '', '');
+
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_polls', 'bx_polls_views_track', '86400', '1', 'bx_polls_entries', 'id', 'author', 'views', '', '');
+
+
+-- FAFORITES
+INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_polls', 'bx_polls_favorites_track', '1', '1', '1', 'page.php?i=view-poll&id={object_id}', 'bx_polls_entries', 'id', 'author', 'favorites', '', '');
+
+
+-- FEATURED
+INSERT INTO `sys_objects_feature` (`name`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES 
+('bx_polls', '1', '1', 'page.php?i=view-poll&id={object_id}', 'bx_polls_entries', 'id', 'author', 'featured', '', '');
+
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_polls', '_bx_polls', 'bx_polls', 'added', 'edited', 'deleted', '', ''),
+('bx_polls_cmts', '_bx_polls_cmts', 'bx_polls', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
+('bx_polls', 'bx_polls_administration', 'id', '', ''),
+('bx_polls', 'bx_polls_common', 'id', '', '');
+
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_polls', 'bx_polls', 'bx_polls', '_bx_polls_search_extended', 1, '', ''),
+('bx_polls_cmts', 'bx_polls_cmts', 'bx_polls', '_bx_polls_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+
+-- STUDIO: page & widget
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_polls', '_bx_polls', '_bx_polls', 'bx_polls@modules/boonex/polls/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_polls', '{url_studio}module.php?name=bx_polls', '', 'bx_polls@modules/boonex/polls/|std-icon.svg', '_bx_polls', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 64 - 0
modules/boonex/polls/updates/9.0.1_9.0.2/source/install/sql/uninstall.sql

@@ -0,0 +1,64 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_polls_entries`, `bx_polls_subentries`, `bx_polls_files`, `bx_polls_photos_resized`, `bx_polls_cmts`, `bx_polls_votes`, `bx_polls_votes_track`, `bx_polls_votes_subentries`, `bx_polls_votes_subentries_track`, `bx_polls_views_track`, `bx_polls_meta_keywords`, `bx_polls_meta_locations`, `bx_polls_reports`, `bx_polls_reports_track`, `bx_polls_favorites_track`;
+
+
+-- STORAGES & TRANSCODERS
+DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_polls_files' OR `object` = 'bx_polls_photos_resized';
+DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_polls_files' OR `object` = 'bx_polls_photos_resized';
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_polls_preview', 'bx_polls_gallery', 'bx_polls_cover');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_polls_preview', 'bx_polls_gallery', 'bx_polls_cover');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_polls_preview', 'bx_polls_gallery', 'bx_polls_cover');
+
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_polls';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_polls';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_polls';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN ('bx_polls_entry_add', 'bx_polls_entry_edit', 'bx_polls_entry_view', 'bx_polls_entry_delete');
+
+
+-- PRE-VALUES
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_polls';
+DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_polls_cats');
+
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_polls';
+
+
+-- VOTES
+DELETE FROM `sys_objects_vote` WHERE `Name` IN ('bx_polls', 'bx_polls_subentries');
+
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_polls';
+
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_polls';
+
+
+-- FAFORITES
+DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_polls';
+
+
+-- FEATURED
+DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_polls';
+
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_polls', 'bx_polls_cmts');
+
+DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_polls');
+
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_polls';
+
+
+-- STUDIO: page & widget
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_polls';

+ 12 - 0
modules/boonex/polls/updates/9.0.1_9.0.2/source/template/subentries_results.html

@@ -0,0 +1,12 @@
+<div id="__html_id__" class="bx-polls-content bx-polls-results bx-clearfix">
+    <bx_repeat:subentries>
+        <div class="bx-polls-result bx-def-margin-top-auto">
+            <div class="bx-polls-result-into">__title__</div>
+            <div class="bx-polls-result-graph bx-def-margin-thd-top">
+                <div class="bx-polls-rg-bar bx-def-round-corners" style="width:__width__">&nbsp;</div>
+                <div class="bx-polls-rg-text bx-def-padding-left bx-def-font-middle bx-def-font-grayed">__votes__&nbsp;__percent__</div>
+            </div>
+            __js_code__
+        </div>
+    </bx_repeat:subentries>
+</div>

+ 137 - 0
modules/boonex/posts/updates/9.0.4_9.0.5/source/classes/BxPostsSearchResult.php

@@ -0,0 +1,137 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Posts Posts
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxPostsSearchResult extends BxBaseModTextSearchResult
+{
+    function __construct($sMode = '', $aParams = array())
+    {
+        parent::__construct($sMode, $aParams);
+
+        $this->aCurrent = array(
+            'name' => 'bx_posts',
+            'module_name' => 'bx_posts',
+            'object_metatags' => 'bx_posts',
+            'title' => _t('_bx_posts_page_title_browse'),
+            'table' => 'bx_posts_posts',
+            'ownFields' => array('id', 'title', 'text', 'thumb', 'author', 'added'),
+            'searchFields' => array(),
+            'restriction' => array(
+                'author' => array('value' => '', 'field' => 'author', 'operator' => '='),
+        		'featured' => array('value' => '', 'field' => 'featured', 'operator' => '<>'),
+        		'status' => array('value' => 'active', 'field' => 'status', 'operator' => '='),
+            ),
+            'paginate' => array('perPage' => getParam('bx_posts_per_page_browse'), 'start' => 0),
+            'sorting' => 'last',
+            'rss' => array(
+                'title' => '',
+                'link' => '',
+                'image' => '',
+                'profile' => 0,
+                'fields' => array (
+                    'Guid' => 'link',
+                    'Link' => 'link',
+                    'Title' => 'title',
+                    'DateTimeUTS' => 'added',
+                    'Desc' => 'text',
+                ),
+            ),
+            'ident' => 'id',
+        );
+
+        $this->sFilterName = 'bx_posts_filter';
+        $this->oModule = $this->getMain();
+        $this->aCurrent['searchFields'] = explode(',', getParam($this->oModule->_oConfig->CNF['PARAM_SEARCHABLE_FIELDS']));
+
+        $oProfileAuthor = null;
+
+        $CNF = &$this->oModule->_oConfig->CNF;
+
+        switch ($sMode) {
+            case 'author':
+                if(!$this->_updateCurrentForAuthor($sMode, $aParams, $oProfileAuthor)) {
+                    $this->isError = true;
+                    break;
+                }
+                break;
+
+            case 'favorite':
+                if(!$this->_updateCurrentForFavorite($sMode, $aParams, $oProfileAuthor)) {
+                    $this->isError = true;
+                    break;
+                }
+                break;
+
+            case 'public':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_posts_page_title_browse_recent');
+                $this->aCurrent['rss']['link'] = 'modules/?r=posts/rss/' . $sMode;
+                break;
+
+            case 'featured':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_posts_page_title_browse_featured');
+                $this->aCurrent['restriction']['featured']['value'] = '0';
+                $this->aCurrent['rss']['link'] = 'modules/?r=posts/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'featured';
+                break;
+
+            case 'popular':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_POPULAR']);
+                $this->aCurrent['title'] = _t('_bx_posts_page_title_browse_popular');
+                $this->aCurrent['rss']['link'] = 'modules/?r=posts/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'popular';
+                break;
+
+            case 'updated':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_UPDATED']);
+                $this->aCurrent['title'] = _t('_bx_posts_page_title_browse_updated');
+                $this->aCurrent['rss']['link'] = 'modules/?r=posts/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'updated';
+                break;
+
+            case '': // search results
+                $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
+                $this->aCurrent['title'] = _t('_bx_posts');
+                unset($this->aCurrent['paginate']['perPage'], $this->aCurrent['rss']);
+                break;
+
+            default:
+                $sMode = '';
+                $this->isError = true;
+        }
+
+        $this->processReplaceableMarkers($oProfileAuthor);
+
+        $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+    }
+
+    function getAlterOrder()
+    {
+        $aSql = array();
+        switch ($this->aCurrent['sorting']) {
+            case 'last':
+                $aSql['order'] = ' ORDER BY `bx_posts_posts`.`added` DESC';
+                break;
+            case 'featured':
+                $aSql['order'] = ' ORDER BY `bx_posts_posts`.`featured` DESC';
+                break;
+            case 'updated':
+                $aSql['order'] = ' ORDER BY `bx_posts_posts`.`changed` DESC';
+                break;
+            case 'popular':
+                $aSql['order'] = ' ORDER BY `bx_posts_posts`.`views` DESC';
+                break;
+        }
+        return $aSql;
+    }
+}
+
+/** @} */

+ 28 - 0
modules/boonex/posts/updates/9.0.4_9.0.5/source/classes/BxPostsUploaderHTML5.php

@@ -0,0 +1,28 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Posts Posts
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxPostsUploaderHTML5 extends BxTemplUploaderHTML5
+{
+    protected $_oModule;
+
+    public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
+    {
+        parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
+        $this->_oModule = BxDolModule::getInstance('bx_posts');
+    }
+
+    protected function isAdmin ($iContentId = 0)
+    {
+        return $this->_oModule->_isModerator (false);
+    }
+}
+
+/** @} */

+ 28 - 0
modules/boonex/posts/updates/9.0.4_9.0.5/source/classes/BxPostsUploaderSimple.php

@@ -0,0 +1,28 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Posts Posts
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxPostsUploaderSimple extends BxTemplUploaderSimple
+{
+    protected $_oModule;
+
+    public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
+    {
+        parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
+        $this->_oModule = BxDolModule::getInstance('bx_posts');
+    }
+
+    protected function isAdmin ($iContentId = 0)
+    {
+        return $this->_oModule->_isModerator (false);
+    }
+}
+
+/** @} */

+ 135 - 0
modules/boonex/posts/updates/9.0.4_9.0.5/source/install/config.php

@@ -0,0 +1,135 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Posts Posts
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_posts',
+    'title' => 'Posts',
+    'note' => 'Basic blogging module.',
+    'version' => '9.0.5',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/posts/',
+    'home_uri' => 'posts',
+
+    'db_prefix' => 'bx_posts_',
+    'class_prefix' => 'BxPosts',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Posts',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry',
+    ),
+    
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu'
+    ),
+
+    /**
+     * Storages.
+     */
+    'storages' => array(
+    	'bx_posts_files'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+		'bx_posts_preview',
+        'bx_posts_gallery',
+        'bx_posts_cover'
+    ),
+
+    /**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_posts',
+    	'bx_posts_cmts'
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+        'process_storages' => 1,
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+        'process_menu_triggers' => 1,
+        'process_page_triggers' => 1,
+    	'process_esearches' => 1,
+        'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'update_relations' => 1,
+        'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+        'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Relations Section
+     */
+    'relations' => array(
+    	'bx_timeline',
+    	'bx_notifications'
+    ),
+
+);
+
+/** @} */

+ 220 - 0
modules/boonex/posts/updates/9.0.4_9.0.5/source/install/langs/en.xml

@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_posts"><![CDATA[Posts]]></string>
+	<string name="_bx_posts_cmts"><![CDATA[Posts' Comments]]></string>
+
+	<string name="_bx_posts_option_summary_chars"><![CDATA[Number of characters in auto-cropped post summary]]></string>
+	<string name="_bx_posts_option_plain_summary_chars"><![CDATA[Number of characters in plain post description when post hasn't thumb]]></string>
+	<string name="_bx_posts_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_posts_option_per_page_profile"><![CDATA[Number of items per page on profile/group page]]></string>
+	<string name="_bx_posts_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
+	<string name="_bx_posts_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+
+	<string name="_bx_posts_form_entry"><![CDATA[Posts]]></string>
+	<string name="_bx_posts_form_entry_display_add"><![CDATA[Add Post]]></string>
+	<string name="_bx_posts_form_entry_display_edit"><![CDATA[Edit Post]]></string>
+	<string name="_bx_posts_form_entry_display_delete"><![CDATA[Delete Post]]></string>
+	<string name="_bx_posts_form_entry_display_view"><![CDATA[View Post]]></string>
+	<string name="_bx_posts_form_entry_input_author"><![CDATA[Author]]></string>
+	<string name="_bx_posts_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_posts_form_entry_input_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_posts_form_entry_input_sys_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_posts_form_entry_input_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_posts_form_entry_input_sys_title"><![CDATA[Title]]></string>
+	<string name="_bx_posts_form_entry_input_title"><![CDATA[Title]]></string>
+	<string name="_bx_posts_form_entry_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+	<string name="_bx_posts_form_entry_input_sys_cat"><![CDATA[Category]]></string>
+	<string name="_bx_posts_form_entry_input_cat"><![CDATA[Category]]></string>
+    <string name="_bx_posts_form_entry_input_cat_err"><![CDATA[Please select category]]></string>
+	<string name="_bx_posts_form_entry_input_sys_text"><![CDATA[Text]]></string>
+	<string name="_bx_posts_form_entry_input_text"><![CDATA[Text]]></string>
+	<string name="_bx_posts_form_entry_input_text_err"><![CDATA[Text field can't be empty]]></string>
+	<string name="_bx_posts_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_posts_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this post]]></string>
+	<string name="_bx_posts_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+	<string name="_bx_posts_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the post]]></string>
+	<string name="_bx_posts_form_entry_input_sys_pictures"><![CDATA[Pictures]]></string>
+	<string name="_bx_posts_form_entry_input_pictures"><![CDATA[Pictures]]></string>
+    <string name="_bx_posts_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_posts_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_posts_form_entry_input_picture_use_as_thumb"><![CDATA[Cover Image]]></string>
+    <string name="_bx_posts_form_entry_input_sys_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_posts_form_entry_input_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_posts_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_posts_form_entry_input_date_changed"><![CDATA[Updated]]></string>
+
+	<string name="_bx_posts_acl_action_create_entry"><![CDATA[Create Post]]></string>
+	<string name="_bx_posts_acl_action_delete_entry"><![CDATA[Delete Post]]></string>
+	<string name="_bx_posts_acl_action_view_entry"><![CDATA[View Post]]></string>
+	<string name="_bx_posts_acl_action_set_thumb"><![CDATA[Set Post Thumbnail]]></string>
+	<string name="_bx_posts_acl_action_edit_any_entry"><![CDATA[Edit Any Post]]></string>
+
+	<string name="_bx_posts_page_title_sys_create_entry"><![CDATA[New Post]]></string>
+	<string name="_bx_posts_page_title_create_entry"><![CDATA[New Post]]></string>
+	<string name="_bx_posts_page_block_title_create_entry"><![CDATA[New Post]]></string>
+	<string name="_bx_posts_page_title_sys_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_posts_page_title_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_posts_page_block_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_posts_page_title_sys_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_posts_page_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_posts_page_block_title_delete_entry"><![CDATA[Delete]]></string>
+	<string name="_bx_posts_page_title_sys_view_entry"><![CDATA[View Post]]></string>
+	<string name="_bx_posts_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_posts_page_block_title_entry_text"><![CDATA[Post Text]]></string>
+	<string name="_bx_posts_page_title_browse"><![CDATA[Posts]]></string>
+	<string name="_bx_posts_page_title_search_results"><![CDATA[Posts matching "{0}"]]></string>
+	<string name="_bx_posts_page_title_browse_by_author"><![CDATA[Posts of {display_name}]]></string>
+	<string name="_bx_posts_page_title_browse_featured"><![CDATA[Featured Posts]]></string>
+    <string name="_bx_posts_page_title_browse_recent"><![CDATA[Latest Posts]]></string>
+    <string name="_bx_posts_page_title_browse_popular"><![CDATA[Popular Posts]]></string>
+    <string name="_bx_posts_page_title_browse_updated"><![CDATA[Updated Posts]]></string>
+    <string name="_bx_posts_page_title_sys_home"><![CDATA[Posts Home]]></string>
+    <string name="_bx_posts_page_title_home"><![CDATA[Posts]]></string>
+    <string name="_bx_posts_page_block_title_featured_entries_view_extended"><![CDATA[Featured Posts]]></string>
+    <string name="_bx_posts_page_block_title_recent_entries"><![CDATA[Latest Posts (Gallery View)]]></string>
+    <string name="_bx_posts_page_block_title_recent_entries_view_extended"><![CDATA[Latest Posts]]></string>
+    <string name="_bx_posts_page_block_title_recent_entries_view_full"><![CDATA[Latest Posts (Full View)]]></string>
+    <string name="_bx_posts_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+    <string name="_bx_posts_page_block_title_entry_author"><![CDATA[Author]]></string>
+    <string name="_bx_posts_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_posts_page_block_title_entry_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_posts_page_block_title_entry_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_posts_page_block_title_entry_location"><![CDATA[Location]]></string>
+    <string name="_bx_posts_page_block_title_entry_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_posts_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
+    <string name="_bx_posts_page_title_sys_entries_popular"><![CDATA[Popular Posts]]></string>
+    <string name="_bx_posts_page_title_entries_popular"><![CDATA[Popular Posts]]></string>
+    <string name="_bx_posts_page_title_sys_entries_updated"><![CDATA[Updated Posts]]></string>
+    <string name="_bx_posts_page_title_entries_updated"><![CDATA[Updated Posts]]></string>
+    <string name="_bx_posts_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_posts_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_posts_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_posts_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_posts_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_posts_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+    <string name="_bx_posts_page_block_title_popular_entries"><![CDATA[Popular Posts]]></string>
+    <string name="_bx_posts_page_block_title_popular_entries_view_extended"><![CDATA[Popular Posts (Extended View)]]></string>
+    <string name="_bx_posts_page_block_title_popular_entries_view_full"><![CDATA[Popular Posts (Full View)]]></string>
+    <string name="_bx_posts_page_block_title_updated_entries"><![CDATA[Updated Posts]]></string>
+    <string name="_bx_posts_page_title_sys_view_entry_comments"><![CDATA[Post Comments]]></string>
+    <string name="_bx_posts_page_title_view_entry_comments"><![CDATA[Comments to {title}]]></string>
+    <string name="_bx_posts_page_title_sys_entries_of_author"><![CDATA[Posts of author]]></string>
+    <string name="_bx_posts_page_title_entries_of_author"><![CDATA[Posts by {display_name}]]></string>
+    <string name="_bx_posts_page_block_title_favorites_of_author"><![CDATA[Favorites by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_posts_page_block_title_sys_favorites_of_author"><![CDATA[Favorites of author]]></string>
+    <string name="_bx_posts_page_block_title_entries_of_author"><![CDATA[Posts by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_posts_page_block_title_sys_entries_of_author"><![CDATA[Posts of author]]></string>   
+    <string name="_bx_posts_page_block_title_entries_actions"><![CDATA[Posts actions]]></string>
+    <string name="_bx_posts_page_block_title_browse_cmts"><![CDATA[Posts' Comments]]></string>
+	<string name="_bx_posts_page_title_sys_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_posts_page_title_sys_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_posts_page_title_manage"><![CDATA[Manage]]></string>
+	<string name="_bx_posts_page_block_title_system_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_posts_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_posts_page_block_title_manage"><![CDATA[Manage]]></string>    
+	<string name="_bx_posts_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
+	<string name="_bx_posts_page_block_title_cats"><![CDATA[Posts Categories]]></string>
+	<string name="_bx_posts_page_block_title_entry_info"><![CDATA[Info]]></string>
+	<string name="_bx_posts_page_block_title_my_entries"><![CDATA[My Posts]]></string>
+
+    <string name="_bx_posts_menu_set_title_view_entry"><![CDATA[Post Actions]]></string>
+    <string name="_bx_posts_menu_title_view_entry"><![CDATA[Post Actions]]></string>
+    <string name="_bx_posts_menu_title_submenu"><![CDATA[Posts Submenu]]></string>
+    <string name="_bx_posts_menu_set_title_submenu"><![CDATA[Posts Submenu]]></string>
+    <string name="_bx_posts_menu_item_title_system_create_entry"><![CDATA[New Post]]></string>
+    <string name="_bx_posts_menu_item_title_create_entry"><![CDATA[New Post]]></string>
+    <string name="_bx_posts_menu_item_title_system_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_posts_menu_item_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_posts_menu_item_title_system_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_posts_menu_item_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_posts_menu_item_title_system_view_entry"><![CDATA[View Post]]></string>
+    <string name="_bx_posts_menu_item_title_system_entries_home"><![CDATA[Posts]]></string>
+    <string name="_bx_posts_menu_item_title_entries_home"><![CDATA[Posts]]></string>
+    <string name="_bx_posts_menu_item_title_system_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_posts_menu_item_title_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_posts_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_posts_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_posts_menu_item_title_system_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_posts_menu_item_title_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_posts_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_posts_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_posts_menu_title_view_entry_submenu"><![CDATA[View Post Submenu]]></string>
+    <string name="_bx_posts_menu_set_title_view_entry_submenu"><![CDATA[View Post Submenu]]></string>
+    <string name="_bx_posts_menu_item_title_view_entry_submenu_entry"><![CDATA[Post]]></string>
+    <string name="_bx_posts_menu_item_title_view_entry_submenu_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_posts_menu_item_title_system_view_entry_comments"><![CDATA[Post Comments]]></string>
+    <string name="_bx_posts_menu_item_title_system_view_entries_author"><![CDATA[Posts]]></string>
+    <string name="_bx_posts_menu_item_title_view_entries_author"><![CDATA[Posts]]></string>
+    <string name="_bx_posts_menu_title_entries_my"><![CDATA[My Posts Action Menu]]></string>
+    <string name="_bx_posts_menu_set_title_entries_my"><![CDATA[My Posts Menu]]></string>
+	<string name="_bx_posts_menu_item_title_system_manage_my_posts"><![CDATA[My posts]]></string>
+    <string name="_bx_posts_menu_item_title_manage_my_posts"><![CDATA[{addon} posts]]></string>
+    <string name="_bx_posts_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_posts_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_posts_menu_item_title_system_manage_account"><![CDATA[Manage account]]></string>
+    <string name="_bx_posts_menu_item_title_manage_account"><![CDATA[Manage account]]></string>
+	<string name="_bx_posts_menu_item_title_system_admt_posts"><![CDATA[Posts]]></string>
+	<string name="_bx_posts_menu_item_title_admt_posts"><![CDATA[Posts - {addon} hidden]]></string>
+	<string name="_bx_posts_menu_item_title_manage_my"><![CDATA[My Posts]]></string>
+	<string name="_bx_posts_menu_item_title_manage_all"><![CDATA[All Posts]]></string>
+
+	<string name="_bx_posts_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_posts_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_posts_grid_filter_item_title_adm_hidden"><![CDATA[Hidden]]></string>
+	<string name="_bx_posts_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_posts_grid_column_title_adm_title"><![CDATA[Title]]></string>
+    <string name="_bx_posts_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_posts_grid_column_title_adm_author"><![CDATA[Author]]></string>
+    <string name="_bx_posts_grid_action_title_adm_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_posts_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_posts_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_posts_grid_action_err_delete"><![CDATA[Cannot delete the selected post(s).]]></string>
+    <string name="_bx_posts_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_posts_chart_growth"><![CDATA[Posts: Growth]]></string>
+    <string name="_bx_posts_chart_growth_speed"><![CDATA[Posts: Growth Speed]]></string>
+
+    <string name="_bx_posts_search_extended"><![CDATA[Posts Search]]></string>
+    <string name="_bx_posts_search_extended_cmts"><![CDATA[Posts Comments Search]]></string>
+
+    <string name="_bx_posts_pre_lists_cats"><![CDATA[Post categories]]></string>
+    <string name="_bx_posts_cat_Animals_Pets"><![CDATA[Animals & Pets]]></string>
+    <string name="_bx_posts_cat_Architecture"><![CDATA[Architecture]]></string>
+    <string name="_bx_posts_cat_Art"><![CDATA[Art]]></string>
+    <string name="_bx_posts_cat_Cars_Motorcycles"><![CDATA[Cars & Motorcycles]]></string>
+    <string name="_bx_posts_cat_Celebrities"><![CDATA[Celebrities]]></string>
+    <string name="_bx_posts_cat_Design"><![CDATA[Design]]></string>
+    <string name="_bx_posts_cat_DIY_Crafts"><![CDATA[DIY & Crafts]]></string>
+    <string name="_bx_posts_cat_Education"><![CDATA[Education]]></string>
+    <string name="_bx_posts_cat_Film_Music_Books"><![CDATA[Film, Music & Books]]></string>
+    <string name="_bx_posts_cat_Food_Drink"><![CDATA[Food & Drink]]></string>
+    <string name="_bx_posts_cat_Gardening"><![CDATA[Gardening]]></string>
+    <string name="_bx_posts_cat_Geek"><![CDATA[Geek]]></string>
+    <string name="_bx_posts_cat_Hair_Beauty"><![CDATA[Hair & Beauty]]></string>
+    <string name="_bx_posts_cat_Health_Fitness"><![CDATA[Health & Fitness]]></string>
+    <string name="_bx_posts_cat_History"><![CDATA[History]]></string>
+    <string name="_bx_posts_cat_Holidays_Events"><![CDATA[Holidays & Events]]></string>
+    <string name="_bx_posts_cat_Home_Decor"><![CDATA[Home Decor]]></string>
+    <string name="_bx_posts_cat_Humor"><![CDATA[Humor]]></string>
+    <string name="_bx_posts_cat_Illustrations_Posters"><![CDATA[Illustrations & Posters]]></string>
+    <string name="_bx_posts_cat_Kids_Parenting"><![CDATA[Kids & Parenting]]></string>
+    <string name="_bx_posts_cat_Mens_Fashion"><![CDATA[Men's Fashion]]></string>
+    <string name="_bx_posts_cat_Outdoors"><![CDATA[Outdoors]]></string>
+    <string name="_bx_posts_cat_Photography"><![CDATA[Photography]]></string>
+    <string name="_bx_posts_cat_Products"><![CDATA[Products]]></string>
+    <string name="_bx_posts_cat_Quotes"><![CDATA[Quotes]]></string>
+    <string name="_bx_posts_cat_Science_Nature"><![CDATA[Science & Nature]]></string>
+    <string name="_bx_posts_cat_Sports"><![CDATA[Sports]]></string>
+    <string name="_bx_posts_cat_Tattoos"><![CDATA[Tattoos]]></string>
+    <string name="_bx_posts_cat_Technology"><![CDATA[Technology]]></string>
+    <string name="_bx_posts_cat_Travel"><![CDATA[Travel]]></string>
+    <string name="_bx_posts_cat_Weddings"><![CDATA[Weddings]]></string>
+    <string name="_bx_posts_cat_Womens_Fashion"><![CDATA[Women's Fashion]]></string>
+
+    <string name="_bx_posts_txt_all_entries_by"><![CDATA[<a href="{0}">All Posts by {1} ({2})</a>]]></string>
+    <string name="_bx_posts_txt_sample_single"><![CDATA[post]]></string>
+    <string name="_bx_posts_txt_sample_single_with_article"><![CDATA[a post]]></string>
+    <string name="_bx_posts_txt_sample_comment_single"><![CDATA[post's comment]]></string>
+    <string name="_bx_posts_txt_sample_vote_single"><![CDATA[post's vote]]></string>
+</resources>

+ 51 - 0
modules/boonex/posts/updates/9.0.4_9.0.5/source/install/sql/disable.sql

@@ -0,0 +1,51 @@
+
+-- SETTINGS
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_posts' LIMIT 1);
+SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
+DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
+DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
+DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
+
+-- PAGES
+DELETE FROM `sys_objects_page` WHERE `module` = 'bx_posts';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_posts' OR `object` IN('bx_posts_create_entry', 'bx_posts_edit_entry', 'bx_posts_delete_entry', 'bx_posts_view_entry', 'bx_posts_view_entry_comments', 'bx_posts_home', 'bx_posts_popular', 'bx_posts_updated', 'bx_posts_author', 'bx_posts_search', 'bx_posts_manage');
+
+-- MENU
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_posts';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_posts';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_posts' OR `set_name` IN('bx_posts_view', 'bx_posts_submenu', 'bx_posts_view_submenu', 'bx_posts_my');
+
+-- PRIVACY 
+DELETE FROM `sys_objects_privacy` WHERE `object` = 'bx_posts_allow_view_to';
+
+-- ACL
+DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_posts';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_posts';
+
+-- SEARCH
+DELETE FROM `sys_objects_search` WHERE `ObjectName` IN ('bx_posts', 'bx_posts_cmts');
+
+-- METATAGS
+DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_posts';
+
+-- CATEGORY
+DELETE FROM `sys_objects_category` WHERE `object` = 'bx_posts_cats';
+
+-- STATS
+DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_posts%';
+
+-- CHARTS
+DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_posts%';
+
+-- GRIDS
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_posts_administration', 'bx_posts_common');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_posts_administration', 'bx_posts_common');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_posts_administration', 'bx_posts_common');
+
+-- UPLOADERS
+DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_posts_simple', 'bx_posts_html5');
+
+-- ALERTS
+SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_posts' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;

+ 400 - 0
modules/boonex/posts/updates/9.0.4_9.0.5/source/install/sql/enable.sql

@@ -0,0 +1,400 @@
+
+-- SETTINGS
+
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_posts', '_bx_posts', 'bx_posts@modules/boonex/posts/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_posts', '_bx_posts', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_posts_summary_chars', '700', @iCategId, '_bx_posts_option_summary_chars', 'digit', '', '', '', 1),
+('bx_posts_plain_summary_chars', '240', @iCategId, '_bx_posts_option_plain_summary_chars', 'digit', '', '', '', 2),
+('bx_posts_per_page_browse', '12', @iCategId, '_bx_posts_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_posts_per_page_profile', '3', @iCategId, '_bx_posts_option_per_page_profile', 'digit', '', '', '', 12),
+('bx_posts_rss_num', '10', @iCategId, '_bx_posts_option_rss_num', 'digit', '', '', '', 20),
+('bx_posts_searchable_fields', 'title,text', @iCategId, '_bx_posts_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:21:"get_searchable_fields";}', 30);
+
+-- PAGE: create entry
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_create_entry', '_bx_posts_page_title_sys_create_entry', '_bx_posts_page_title_create_entry', 'bx_posts', 5, 2147483647, 1, 'create-post', 'page.php?i=create-post', '', '', '', 0, 1, 0, 'BxPostsPageBrowse', 'modules/boonex/posts/classes/BxPostsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_posts_create_entry', 1, 'bx_posts', '_bx_posts_page_block_title_create_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:13:"entity_create";}', 0, 1, 1);
+
+
+-- PAGE: edit entry
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_edit_entry', '_bx_posts_page_title_sys_edit_entry', '_bx_posts_page_title_edit_entry', 'bx_posts', 5, 2147483647, 1, 'edit-post', '', '', '', '', 0, 1, 0, 'BxPostsPageEntry', 'modules/boonex/posts/classes/BxPostsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_posts_edit_entry', 1, 'bx_posts', '_bx_posts_page_block_title_edit_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:11:"entity_edit";}', 0, 0, 0);
+
+
+-- PAGE: delete entry
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_delete_entry', '_bx_posts_page_title_sys_delete_entry', '_bx_posts_page_title_delete_entry', 'bx_posts', 5, 2147483647, 1, 'delete-post', '', '', '', '', 0, 1, 0, 'BxPostsPageEntry', 'modules/boonex/posts/classes/BxPostsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_posts_delete_entry', 1, 'bx_posts', '_bx_posts_page_block_title_delete_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:13:"entity_delete";}', 0, 0, 0);
+
+
+-- PAGE: view entry
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_view_entry', '_bx_posts_page_title_sys_view_entry', '_bx_posts_page_title_view_entry', 'bx_posts', 10, 2147483647, 1, 'view-post', '', '', '', '', 0, 1, 0, 'BxPostsPageEntry', 'modules/boonex/posts/classes/BxPostsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_posts_view_entry', 1, 'bx_posts', '', '_bx_posts_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 0),
+('bx_posts_view_entry', 2, 'bx_posts', '', '_bx_posts_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:13:\"entity_author\";}', 0, 0, 1, 0),
+('bx_posts_view_entry', 3, 'bx_posts', '', '_bx_posts_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 1),
+('bx_posts_view_entry', 3, 'bx_posts', '', '_bx_posts_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:15:\"entity_location\";}', 0, 0, 0, 2),
+('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:18:\"entity_all_actions\";}', 0, 0, 1, 0),
+('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:14:\"entity_actions\";}', 0, 0, 0, 1),
+('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 0, 2),
+('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_attachments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:18:\"entity_attachments\";}', 0, 0, 0, 3),
+('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1, 4),
+('bx_posts_view_entry', 4, 'bx_posts', '', '_bx_posts_page_block_title_entry_location', 3, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:13:\"locations_map\";s:6:\"params\";a:2:{i:0;s:8:\"bx_posts\";i:1;s:4:\"{id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 5);
+
+
+-- PAGE: view entry comments
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_view_entry_comments', '_bx_posts_page_title_sys_view_entry_comments', '_bx_posts_page_title_view_entry_comments', 'bx_posts', 5, 2147483647, 1, 'view-post-comments', '', '', '', '', 0, 1, 0, 'BxPostsPageEntry', 'modules/boonex/posts/classes/BxPostsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_posts_view_entry_comments', 1, 'bx_posts', '_bx_posts_page_block_title_entry_comments', '_bx_posts_page_block_title_entry_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1);
+
+
+-- PAGE: popular entries
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_popular', '_bx_posts_page_title_sys_entries_popular', '_bx_posts_page_title_entries_popular', 'bx_posts', 5, 2147483647, 1, 'posts-popular', 'page.php?i=posts-popular', '', '', '', 0, 1, 0, 'BxPostsPageBrowse', 'modules/boonex/posts/classes/BxPostsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_posts_popular', 1, 'bx_posts', '_bx_posts_page_block_title_popular_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:14:"browse_popular";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+
+-- PAGE: recently updated entries
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_updated', '_bx_posts_page_title_sys_entries_updated', '_bx_posts_page_title_entries_updated', 'bx_posts', 5, 2147483647, 1, 'posts-updated', 'page.php?i=posts-updated', '', '', '', 0, 1, 0, 'BxPostsPageBrowse', 'modules/boonex/posts/classes/BxPostsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_posts_updated', 1, 'bx_posts', '_bx_posts_page_block_title_updated_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:14:"browse_updated";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+
+-- PAGE: entries of author
+
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_author', 'posts-author', '_bx_posts_page_title_sys_entries_of_author', '_bx_posts_page_title_entries_of_author', 'bx_posts', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxPostsPageAuthor', 'modules/boonex/posts/classes/BxPostsPageAuthor.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_posts_author', 1, 'bx_posts', '', '_bx_posts_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:18:\"my_entries_actions\";}', 0, 0, 1, 1),
+('bx_posts_author', 1, 'bx_posts', '_bx_posts_page_block_title_sys_favorites_of_author', '_bx_posts_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:15:\"browse_favorite\";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 2),
+('bx_posts_author', 1, 'bx_posts', '_bx_posts_page_block_title_sys_entries_of_author', '_bx_posts_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:13:\"browse_author\";}', 0, 0, 1, 3);
+
+-- PAGE: module home
+
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_home', 'posts-home', '_bx_posts_page_title_sys_home', '_bx_posts_page_title_home', 'bx_posts', 2, 2147483647, 1, 'page.php?i=posts-home', '', '', '', 0, 1, 0, 'BxPostsPageBrowse', 'modules/boonex/posts/classes/BxPostsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_posts_home', 1, 'bx_posts', '', '_bx_posts_page_block_title_featured_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 0),
+('bx_posts_home', 1, 'bx_posts', '', '_bx_posts_page_block_title_recent_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 1),
+('bx_posts_home', 2, 'bx_posts', '', '_bx_posts_page_block_title_popular_keywords', 11, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:14:\"keywords_cloud\";s:6:\"params\";a:2:{i:0;s:8:\"bx_posts\";i:1;s:8:\"bx_posts\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 1, 1, 0),
+('bx_posts_home', 2, 'bx_posts', '', '_bx_posts_page_block_title_cats', 11, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:15:\"categories_list\";s:6:\"params\";a:2:{i:0;s:13:\"bx_posts_cats\";i:1;a:1:{s:10:\"show_empty\";b:1;}}s:5:\"class\";s:20:\"TemplServiceCategory\";}', 0, 1, 1, 1);
+
+
+-- PAGE: search for entries
+
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_search', '_bx_posts_page_title_sys_entries_search', '_bx_posts_page_title_entries_search', 'bx_posts', 5, 2147483647, 1, 'posts-search', 'page.php?i=posts-search', '', '', '', 0, 1, 0, 'BxPostsPageBrowse', 'modules/boonex/posts/classes/BxPostsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_posts_search', 1, 'bx_posts', '_bx_posts_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:8:"bx_posts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_posts_search', 1, 'bx_posts', '_bx_posts_page_block_title_search_results', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:8:"bx_posts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 2),
+('bx_posts_search', 1, 'bx_posts', '_bx_posts_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:13:"bx_posts_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_posts_search', 1, 'bx_posts', '_bx_posts_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:13:"bx_posts_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
+
+
+-- PAGE: module manage own
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_manage', '_bx_posts_page_title_sys_manage', '_bx_posts_page_title_manage', 'bx_posts', 5, 2147483647, 1, 'posts-manage', 'page.php?i=posts-manage', '', '', '', 0, 1, 0, 'BxPostsPageBrowse', 'modules/boonex/posts/classes/BxPostsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_posts_manage', 1, 'bx_posts', '_bx_posts_page_block_title_system_manage', '_bx_posts_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:12:\"manage_tools\";}}', 0, 1, 0);
+
+-- PAGE: module manage all
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_administration', '_bx_posts_page_title_sys_manage_administration', '_bx_posts_page_title_manage', 'bx_posts', 5, 192, 1, 'posts-administration', 'page.php?i=posts-administration', '', '', '', 0, 1, 0, 'BxPostsPageBrowse', 'modules/boonex/posts/classes/BxPostsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_posts_administration', 1, 'bx_posts', '_bx_posts_page_block_title_system_manage_administration', '_bx_posts_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
+
+-- PAGE: add block to homepage
+
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('sys_home', 1, 'bx_posts', '_bx_posts_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:13:\"browse_public\";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
+
+-- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
+SET @iPBCellProfile = 3;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_posts', '_bx_posts_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:13:"browse_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:1:{s:8:"per_page";s:25:"bx_posts_per_page_profile";}}}', 0, 0, 0);
+
+-- PAGE: service blocks
+
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('', 0, 'bx_posts', '_bx_posts_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:13:\"browse_public\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:7:\"gallery\";s:13:\"empty_message\";b:1;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 1),
+
+('', 0, 'bx_posts', '_bx_posts_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2),
+('', 0, 'bx_posts', '_bx_posts_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 3),
+('', 0, 'bx_posts', '_bx_posts_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 4);
+
+-- MENU: add to site menu
+
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_site', 'bx_posts', 'posts-home', '_bx_posts_menu_item_title_system_entries_home', '_bx_posts_menu_item_title_entries_home', 'page.php?i=posts-home', '', '', 'file-text col-red3', 'bx_posts_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+-- MENU: add to homepage menu
+
+SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_homepage', 'bx_posts', 'posts-home', '_bx_posts_menu_item_title_system_entries_home', '_bx_posts_menu_item_title_entries_home', 'page.php?i=posts-home', '', '', 'file-text col-red3', 'bx_posts_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+
+-- MENU: add to "add content" menu
+
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_add_content_links', 'bx_posts', 'create-post', '_bx_posts_menu_item_title_system_create_entry', '_bx_posts_menu_item_title_create_entry', 'page.php?i=create-post', '', '', 'file-text col-red3', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+
+-- MENU: actions menu for view entry 
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_view', '_bx_posts_menu_title_view_entry', 'bx_posts_view', 'bx_posts', 9, 0, 1, 'BxPostsMenuView', 'modules/boonex/posts/classes/BxPostsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_posts_view', 'bx_posts', '_bx_posts_menu_set_title_view_entry', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_posts_view', 'bx_posts', 'edit-post', '_bx_posts_menu_item_title_system_edit_entry', '_bx_posts_menu_item_title_edit_entry', 'page.php?i=edit-post&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 1),
+('bx_posts_view', 'bx_posts', 'delete-post', '_bx_posts_menu_item_title_system_delete_entry', '_bx_posts_menu_item_title_delete_entry', 'page.php?i=delete-post&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 2);
+
+
+-- MENU: actions menu for my entries
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_my', '_bx_posts_menu_title_entries_my', 'bx_posts_my', 'bx_posts', 9, 0, 1, 'BxPostsMenu', 'modules/boonex/posts/classes/BxPostsMenu.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_posts_my', 'bx_posts', '_bx_posts_menu_set_title_entries_my', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_posts_my', 'bx_posts', 'create-post', '_bx_posts_menu_item_title_system_create_entry', '_bx_posts_menu_item_title_create_entry', 'page.php?i=create-post', '', '', 'plus', '', 2147483647, 1, 0, 0);
+
+
+-- MENU: module sub-menu
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_submenu', '_bx_posts_menu_title_submenu', 'bx_posts_submenu', 'bx_posts', 8, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_posts_submenu', 'bx_posts', '_bx_posts_menu_set_title_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_posts_submenu', 'bx_posts', 'posts-home', '_bx_posts_menu_item_title_system_entries_public', '_bx_posts_menu_item_title_entries_public', 'page.php?i=posts-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_posts_submenu', 'bx_posts', 'posts-popular', '_bx_posts_menu_item_title_system_entries_popular', '_bx_posts_menu_item_title_entries_popular', 'page.php?i=posts-popular', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_posts_submenu', 'bx_posts', 'posts-search', '_bx_posts_menu_item_title_system_entries_search', '_bx_posts_menu_item_title_entries_search', 'page.php?i=posts-search', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_posts_submenu', 'bx_posts', 'posts-manage', '_bx_posts_menu_item_title_system_entries_manage', '_bx_posts_menu_item_title_entries_manage', 'page.php?i=posts-manage', '', '', '', '', 2147483646, 1, 1, 4);
+
+-- MENU: sub-menu for view entry
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_view_submenu', '_bx_posts_menu_title_view_entry_submenu', 'bx_posts_view_submenu', 'bx_posts', 8, 0, 1, 'BxPostsMenuView', 'modules/boonex/posts/classes/BxPostsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_posts_view_submenu', 'bx_posts', '_bx_posts_menu_set_title_view_entry_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_posts_view_submenu', 'bx_posts', 'view-post', '_bx_posts_menu_item_title_system_view_entry', '_bx_posts_menu_item_title_view_entry_submenu_entry', 'page.php?i=view-post&id={content_id}', '', '', '', '', 2147483647, 0, 0, 1),
+('bx_posts_view_submenu', 'bx_posts', 'view-post-comments', '_bx_posts_menu_item_title_system_view_entry_comments', '_bx_posts_menu_item_title_view_entry_submenu_comments', 'page.php?i=view-post-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 2);
+
+-- MENU: profile stats
+SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_profile_stats', 'bx_posts', 'profile-stats-manage-posts', '_bx_posts_menu_item_title_system_manage_my_posts', '_bx_posts_menu_item_title_manage_my_posts', 'page.php?i=posts-manage', '', '_self', 'file-text col-red3', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1);
+
+-- MENU: manage tools submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts_menu_manage_tools', '_bx_posts_menu_title_manage_tools', 'bx_posts_menu_manage_tools', 'bx_posts', 6, 0, 1, 'BxPostsMenuManageTools', 'modules/boonex/posts/classes/BxPostsMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_posts_menu_manage_tools', 'bx_posts', '_bx_posts_menu_set_title_manage_tools', 0);
+
+--INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+--('bx_posts_menu_manage_tools', 'bx_posts', 'delete-with-content', '_bx_posts_menu_item_title_system_delete_with_content', '_bx_posts_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'trash-o', '', 128, 1, 0, 0);
+
+-- MENU: dashboard manage tools
+SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_account_dashboard_manage_tools', 'bx_posts', 'posts-administration', '_bx_posts_menu_item_title_system_admt_posts', '_bx_posts_menu_item_title_admt_posts', 'page.php?i=posts-administration', '', '_self', '', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+
+-- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('trigger_profile_view_submenu', 'bx_posts', 'posts-author', '_bx_posts_menu_item_title_system_view_entries_author', '_bx_posts_menu_item_title_view_entries_author', 'page.php?i=posts-author&profile_id={profile_id}', '', '', 'file-text col-red3', '', 2147483647, 1, 0, 0);
+
+
+-- PRIVACY 
+
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_posts_allow_view_to', 'bx_posts', 'view', '_bx_posts_form_entry_input_allow_view_to', '3', 'bx_posts_posts', 'id', 'author', '', '');
+
+
+-- ACL
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_posts', 'create entry', NULL, '_bx_posts_acl_action_create_entry', '', 1, 3);
+SET @iIdActionEntryCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_posts', 'delete entry', NULL, '_bx_posts_acl_action_delete_entry', '', 1, 3);
+SET @iIdActionEntryDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_posts', 'view entry', NULL, '_bx_posts_acl_action_view_entry', '', 1, 0);
+SET @iIdActionEntryView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_posts', 'set thumb', NULL, '_bx_posts_acl_action_set_thumb', '', 1, 3);
+SET @iIdActionSetThumb = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_posts', 'edit any entry', NULL, '_bx_posts_acl_action_edit_any_entry', '', 1, 3);
+SET @iIdActionEntryEditAny = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- entry create
+(@iStandard, @iIdActionEntryCreate),
+(@iModerator, @iIdActionEntryCreate),
+(@iAdministrator, @iIdActionEntryCreate),
+(@iPremium, @iIdActionEntryCreate),
+
+-- entry delete
+(@iStandard, @iIdActionEntryDelete),
+(@iModerator, @iIdActionEntryDelete),
+(@iAdministrator, @iIdActionEntryDelete),
+(@iPremium, @iIdActionEntryDelete),
+
+-- entry view
+(@iUnauthenticated, @iIdActionEntryView),
+(@iAccount, @iIdActionEntryView),
+(@iStandard, @iIdActionEntryView),
+(@iUnconfirmed, @iIdActionEntryView),
+(@iPending, @iIdActionEntryView),
+(@iModerator, @iIdActionEntryView),
+(@iAdministrator, @iIdActionEntryView),
+(@iPremium, @iIdActionEntryView),
+
+-- set entry thumb
+(@iStandard, @iIdActionSetThumb),
+(@iModerator, @iIdActionSetThumb),
+(@iAdministrator, @iIdActionSetThumb),
+(@iPremium, @iIdActionSetThumb),
+
+-- edit any entry
+(@iModerator, @iIdActionEntryEditAny),
+(@iAdministrator, @iIdActionEntryEditAny);
+
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_posts', '_bx_posts', @iSearchOrder + 1, 'BxPostsSearchResult', 'modules/boonex/posts/classes/BxPostsSearchResult.php'),
+('bx_posts_cmts', '_bx_posts_cmts', @iSearchOrder + 2, 'BxPostsCmtsSearchResult', 'modules/boonex/posts/classes/BxPostsCmtsSearchResult.php');
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_posts', 'bx_posts_meta_keywords', 'bx_posts_meta_locations', '', '', '');
+
+-- CATEGORY
+INSERT INTO `sys_objects_category` (`object`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
+('bx_posts_cats', 'bx_posts', 'bx_posts', 'bx_posts_cats', 'bx_posts_posts', 'cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`id` = `bx_posts_posts`.`author`)', 'AND `sys_profiles`.`status` = ''active''', '', '');
+
+-- STATS
+SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
+INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
+('bx_posts', 'bx_posts', '_bx_posts', 'page.php?i=posts-home', 'file-text col-red3', 'SELECT COUNT(*) FROM `bx_posts_posts` WHERE 1 AND `status` = ''active'' AND `status_admin` = ''active''', @iMaxOrderStats + 1);
+
+-- CHARTS
+SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
+INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
+('bx_posts_growth', '_bx_posts_chart_growth', 'bx_posts_posts', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_posts_growth_speed', '_bx_posts_chart_growth_speed', 'bx_posts_posts', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
+
+-- GRIDS: moderation tools
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
+('bx_posts_administration', 'Sql', 'SELECT * FROM `bx_posts_posts` WHERE 1 ', 'bx_posts_posts', 'id', 'added', 'status_admin', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 192, 'BxPostsGridAdministration', 'modules/boonex/posts/classes/BxPostsGridAdministration.php'),
+('bx_posts_common', 'Sql', 'SELECT * FROM `bx_posts_posts` WHERE 1 ', 'bx_posts_posts', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 2147483647, 'BxPostsGridCommon', 'modules/boonex/posts/classes/BxPostsGridCommon.php');
+
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_posts_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_posts_administration', 'switcher', '_bx_posts_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_posts_administration', 'title', '_bx_posts_grid_column_title_adm_title', '25%', 0, '25', '', 3),
+('bx_posts_administration', 'added', '_bx_posts_grid_column_title_adm_added', '20%', 1, '25', '', 4),
+('bx_posts_administration', 'author', '_bx_posts_grid_column_title_adm_author', '25%', 0, '25', '', 5),
+('bx_posts_administration', 'actions', '', '20%', 0, '', '', 6),
+('bx_posts_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_posts_common', 'switcher', '_bx_posts_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_posts_common', 'title', '_bx_posts_grid_column_title_adm_title', '40%', 0, '35', '', 3),
+('bx_posts_common', 'added', '_bx_posts_grid_column_title_adm_added', '30%', 1, '25', '', 4),
+('bx_posts_common', 'actions', '', '20%', 0, '', '', 5);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_posts_administration', 'bulk', 'delete', '_bx_posts_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_posts_administration', 'single', 'edit', '_bx_posts_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_posts_administration', 'single', 'delete', '_bx_posts_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_posts_administration', 'single', 'settings', '_bx_posts_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
+('bx_posts_common', 'bulk', 'delete', '_bx_posts_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_posts_common', 'single', 'edit', '_bx_posts_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_posts_common', 'single', 'delete', '_bx_posts_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_posts_common', 'single', 'settings', '_bx_posts_grid_action_title_adm_more_actions', 'cog', 1, 0, 3);
+
+-- UPLOADERS
+
+INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
+('bx_posts_simple', 1, 'BxPostsUploaderSimple', 'modules/boonex/posts/classes/BxPostsUploaderSimple.php'),
+('bx_posts_html5', 1, 'BxPostsUploaderHTML5', 'modules/boonex/posts/classes/BxPostsUploaderHTML5.php');
+
+-- ALERTS
+
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_posts', 'BxPostsAlertsResponse', 'modules/boonex/posts/classes/BxPostsAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('profile', 'delete', @iHandler);
+

+ 325 - 0
modules/boonex/posts/updates/9.0.4_9.0.5/source/install/sql/install.sql

@@ -0,0 +1,325 @@
+
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+-- TABLE: entries
+CREATE TABLE IF NOT EXISTS `bx_posts_posts` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL,
+  `added` int(11) NOT NULL,
+  `changed` int(11) NOT NULL,
+  `thumb` int(11) NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `cat` int(11) NOT NULL,
+  `text` text NOT NULL,
+  `views` int(11) NOT NULL default '0',
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `favorites` int(11) NOT NULL default '0',
+  `comments` int(11) NOT NULL default '0',
+  `reports` int(11) NOT NULL default '0',
+  `featured` int(11) NOT NULL default '0',
+  `allow_view_to` int(11) NOT NULL DEFAULT '3',
+  `status` enum('active','hidden') NOT NULL DEFAULT 'active',
+  `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `title_text` (`title`,`text`)
+);
+
+-- TABLE: storages & transcoders
+CREATE TABLE IF NOT EXISTS `bx_posts_files` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_posts_photos_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+-- TABLE: comments
+CREATE TABLE IF NOT EXISTS `bx_posts_cmts` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: votes
+CREATE TABLE IF NOT EXISTS `bx_posts_votes` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_posts_votes_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `value` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: views
+CREATE TABLE `bx_posts_views_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: metas
+CREATE TABLE `bx_posts_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE `bx_posts_meta_locations` (
+  `object_id` int(10) unsigned NOT NULL,
+  `lat` double NOT NULL,
+  `lng` double NOT NULL,
+  `country` varchar(2) NOT NULL,
+  `state` varchar(255) NOT NULL,
+  `city` varchar(255) NOT NULL,
+  `zip` varchar(255) NOT NULL,
+  `street` varchar(255) NOT NULL,
+  `street_number` varchar(255) NOT NULL,
+  PRIMARY KEY (`object_id`),
+  KEY `country_state_city` (`country`,`state`(8),`city`(8))
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_posts_reports` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_posts_reports_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: favorites
+CREATE TABLE `bx_posts_favorites_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`author_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+
+-- STORAGES & TRANSCODERS
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_posts_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_posts_files', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_posts_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_posts_photos_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
+('bx_posts_preview', 'bx_posts_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_posts_files";}', 'no', '1', '2592000', '0'),
+('bx_posts_gallery', 'bx_posts_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_posts_files";}', 'no', '1', '2592000', '0'),
+('bx_posts_cover', 'bx_posts_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_posts_files";}', 'no', '1', '2592000', '0');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_posts_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
+('bx_posts_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_posts_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0');
+
+-- FORMS
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_posts', 'bx_posts', '_bx_posts_form_entry', '', 'a:1:{s:7:\"enctype\";s:19:\"multipart/form-data\";}', 'bx_posts_posts', 'id', '', '', 'do_submit', '', 0, 1, 'BxPostsFormEntry', 'modules/boonex/posts/classes/BxPostsFormEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_posts', 'bx_posts_entry_add', 'bx_posts', 0, '_bx_posts_form_entry_display_add'),
+('bx_posts', 'bx_posts_entry_delete', 'bx_posts', 0, '_bx_posts_form_entry_display_delete'),
+('bx_posts', 'bx_posts_entry_edit', 'bx_posts', 0, '_bx_posts_form_entry_display_edit'),
+('bx_posts', 'bx_posts_entry_view', 'bx_posts', 1, '_bx_posts_form_entry_display_view');
+
+INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_posts', 'bx_posts', 'allow_view_to', '', '', 0, 'custom', '_bx_posts_form_entry_input_sys_allow_view_to', '_bx_posts_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_posts', 'bx_posts', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_posts_form_entry_input_sys_delete_confirm', '_bx_posts_form_entry_input_delete_confirm', '_bx_posts_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_posts_form_entry_input_delete_confirm_error', '', '', 1, 0),
+('bx_posts', 'bx_posts', 'do_publish', '_bx_posts_form_entry_input_do_publish', '', 0, 'submit', '_bx_posts_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_posts', 'bx_posts', 'do_submit', '_bx_posts_form_entry_input_do_submit', '', 0, 'submit', '_bx_posts_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_posts', 'bx_posts', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_posts', 'bx_posts', 'pictures', 'a:1:{i:0;s:14:"bx_posts_html5";}', 'a:2:{s:15:"bx_posts_simple";s:26:"_sys_uploader_simple_title";s:14:"bx_posts_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_posts_form_entry_input_sys_pictures', '_bx_posts_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_posts', 'bx_posts', 'text', '', '', 0, 'textarea', '_bx_posts_form_entry_input_sys_text', '_bx_posts_form_entry_input_text', '', 1, 0, 2, '', '', '', 'Avail', '', '_bx_posts_form_entry_input_text_err', 'XssHtml', '', 1, 0),
+('bx_posts', 'bx_posts', 'title', '', '', 0, 'text', '_bx_posts_form_entry_input_sys_title', '_bx_posts_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_posts_form_entry_input_title_err', 'Xss', '', 1, 0),
+('bx_posts', 'bx_posts', 'cat', '', '#!bx_posts_cats', 0, 'select', '_bx_posts_form_entry_input_sys_cat', '_bx_posts_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_posts_form_entry_input_cat_err', 'Xss', '', 1, 0),
+('bx_posts', 'bx_posts', 'added', '', '', 0, 'datetime', '_bx_posts_form_entry_input_sys_date_added', '_bx_posts_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_posts', 'bx_posts', 'changed', '', '', 0, 'datetime', '_bx_posts_form_entry_input_sys_date_changed', '_bx_posts_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_posts_entry_add', 'delete_confirm', 2147483647, 0, 1),
+('bx_posts_entry_add', 'title', 2147483647, 1, 2),
+('bx_posts_entry_add', 'cat', 2147483647, 1, 3),
+('bx_posts_entry_add', 'text', 2147483647, 1, 4),
+('bx_posts_entry_add', 'pictures', 2147483647, 1, 5),
+('bx_posts_entry_add', 'allow_view_to', 2147483647, 1, 6),
+('bx_posts_entry_add', 'location', 2147483647, 1, 7),
+('bx_posts_entry_add', 'do_submit', 2147483647, 0, 8),
+('bx_posts_entry_add', 'do_publish', 2147483647, 1, 9),
+('bx_posts_entry_delete', 'location', 2147483647, 0, 0),
+('bx_posts_entry_delete', 'cat', 2147483647, 0, 0),
+('bx_posts_entry_delete', 'pictures', 2147483647, 0, 0),
+('bx_posts_entry_delete', 'text', 2147483647, 0, 0),
+('bx_posts_entry_delete', 'do_publish', 2147483647, 0, 0),
+('bx_posts_entry_delete', 'title', 2147483647, 0, 0),
+('bx_posts_entry_delete', 'allow_view_to', 2147483647, 0, 0),
+('bx_posts_entry_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_posts_entry_delete', 'do_submit', 2147483647, 1, 2),
+('bx_posts_entry_edit', 'do_publish', 2147483647, 0, 1),
+('bx_posts_entry_edit', 'delete_confirm', 2147483647, 0, 2),
+('bx_posts_entry_edit', 'title', 2147483647, 1, 3),
+('bx_posts_entry_edit', 'cat', 2147483647, 1, 4),
+('bx_posts_entry_edit', 'text', 2147483647, 1, 5),
+('bx_posts_entry_edit', 'pictures', 2147483647, 1, 6),
+('bx_posts_entry_edit', 'allow_view_to', 2147483647, 1, 7),
+('bx_posts_entry_edit', 'location', 2147483647, 1, 8),
+('bx_posts_entry_edit', 'do_submit', 2147483647, 1, 9),
+('bx_posts_entry_view', 'location', 2147483647, 0, 0),
+('bx_posts_entry_view', 'pictures', 2147483647, 0, 0),
+('bx_posts_entry_view', 'delete_confirm', 2147483647, 0, 0),
+('bx_posts_entry_view', 'text', 2147483647, 0, 0),
+('bx_posts_entry_view', 'do_publish', 2147483647, 0, 0),
+('bx_posts_entry_view', 'title', 2147483647, 0, 0),
+('bx_posts_entry_view', 'do_submit', 2147483647, 0, 0),
+('bx_posts_entry_view', 'allow_view_to', 2147483647, 0, 0),
+('bx_posts_entry_view', 'cat', 2147483647, 1, 1),
+('bx_posts_entry_view', 'added', 2147483647, 1, 2),
+('bx_posts_entry_view', 'changed', 2147483647, 1, 3);
+
+-- PRE-VALUES
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
+('bx_posts_cats', '_bx_posts_pre_lists_cats', 'bx_posts', '0');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
+('bx_posts_cats', '', 0, '_sys_please_select', ''),
+('bx_posts_cats', '1', 1, '_bx_posts_cat_Animals_Pets', ''),
+('bx_posts_cats', '2', 2, '_bx_posts_cat_Architecture', ''),
+('bx_posts_cats', '3', 3, '_bx_posts_cat_Art', ''),
+('bx_posts_cats', '4', 4, '_bx_posts_cat_Cars_Motorcycles', ''),
+('bx_posts_cats', '5', 5, '_bx_posts_cat_Celebrities', ''),
+('bx_posts_cats', '6', 6, '_bx_posts_cat_Design', ''),
+('bx_posts_cats', '7', 7, '_bx_posts_cat_DIY_Crafts', ''),
+('bx_posts_cats', '8', 8, '_bx_posts_cat_Education', ''),
+('bx_posts_cats', '9', 9, '_bx_posts_cat_Film_Music_Books', ''),
+('bx_posts_cats', '10', 10, '_bx_posts_cat_Food_Drink', ''),
+('bx_posts_cats', '11', 11, '_bx_posts_cat_Gardening', ''),
+('bx_posts_cats', '12', 12, '_bx_posts_cat_Geek', ''),
+('bx_posts_cats', '13', 13, '_bx_posts_cat_Hair_Beauty', ''),
+('bx_posts_cats', '14', 14, '_bx_posts_cat_Health_Fitness', ''),
+('bx_posts_cats', '15', 15, '_bx_posts_cat_History', ''),
+('bx_posts_cats', '16', 16, '_bx_posts_cat_Holidays_Events', ''),
+('bx_posts_cats', '17', 17, '_bx_posts_cat_Home_Decor', ''),
+('bx_posts_cats', '18', 18, '_bx_posts_cat_Humor', ''),
+('bx_posts_cats', '19', 19, '_bx_posts_cat_Illustrations_Posters', ''),
+('bx_posts_cats', '20', 20, '_bx_posts_cat_Kids_Parenting', ''),
+('bx_posts_cats', '21', 21, '_bx_posts_cat_Mens_Fashion', ''),
+('bx_posts_cats', '22', 22, '_bx_posts_cat_Outdoors', ''),
+('bx_posts_cats', '23', 23, '_bx_posts_cat_Photography', ''),
+('bx_posts_cats', '24', 24, '_bx_posts_cat_Products', ''),
+('bx_posts_cats', '25', 25, '_bx_posts_cat_Quotes', ''),
+('bx_posts_cats', '26', 26, '_bx_posts_cat_Science_Nature', ''),
+('bx_posts_cats', '27', 27, '_bx_posts_cat_Sports', ''),
+('bx_posts_cats', '28', 28, '_bx_posts_cat_Tattoos', ''),
+('bx_posts_cats', '29', 29, '_bx_posts_cat_Technology', ''),
+('bx_posts_cats', '30', 30, '_bx_posts_cat_Travel', ''),
+('bx_posts_cats', '31', 31, '_bx_posts_cat_Weddings', ''),
+('bx_posts_cats', '32', 32, '_bx_posts_cat_Womens_Fashion', '');
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_posts', 'bx_posts', 'bx_posts_cmts', 1, 5000, 1000, 1, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-post&id={object_id}', '', 'bx_posts_posts', 'id', 'author', 'title', 'comments', '', '');
+
+-- VOTES
+INSERT INTO `sys_objects_vote` (`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES 
+('bx_posts', 'bx_posts_votes', 'bx_posts_votes_track', '604800', '1', '1', '0', '1', 'bx_posts_posts', 'id', 'author', 'rate', 'votes', '', '');
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_posts', 'bx_posts_reports', 'bx_posts_reports_track', '1', 'page.php?i=view-post&id={object_id}', 'bx_posts_posts', 'id', 'author', 'reports', '', '');
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_posts', 'bx_posts_views_track', '86400', '1', 'bx_posts_posts', 'id', 'author', 'views', '', '');
+
+-- FAFORITES
+INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_posts', 'bx_posts_favorites_track', '1', '1', '1', 'page.php?i=view-post&id={object_id}', 'bx_posts_posts', 'id', 'author', 'favorites', '', '');
+
+-- FEATURED
+INSERT INTO `sys_objects_feature` (`name`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES 
+('bx_posts', '1', '1', 'page.php?i=view-post&id={object_id}', 'bx_posts_posts', 'id', 'author', 'featured', '', '');
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_posts', '_bx_posts', 'bx_posts', 'added', 'edited', 'deleted', '', ''),
+('bx_posts_cmts', '_bx_posts_cmts', 'bx_posts', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
+('bx_posts', 'bx_posts_administration', 'id', '', ''),
+('bx_posts', 'bx_posts_common', 'id', '', '');
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_posts', 'bx_posts', 'bx_posts', '_bx_posts_search_extended', 1, '', ''),
+('bx_posts_cmts', 'bx_posts_cmts', 'bx_posts', '_bx_posts_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+-- STUDIO: page & widget
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_posts', '_bx_posts', '_bx_posts', 'bx_posts@modules/boonex/posts/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_posts', '{url_studio}module.php?name=bx_posts', '', 'bx_posts@modules/boonex/posts/|std-icon.svg', '_bx_posts', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));
+

+ 54 - 0
modules/boonex/posts/updates/9.0.4_9.0.5/source/install/sql/uninstall.sql

@@ -0,0 +1,54 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_posts_posts`, `bx_posts_files`, `bx_posts_photos_resized`, `bx_posts_cmts`, `bx_posts_votes`, `bx_posts_votes_track`, `bx_posts_views_track`, `bx_posts_meta_keywords`, `bx_posts_meta_locations`, `bx_posts_reports`, `bx_posts_reports_track`, `bx_posts_favorites_track`;
+
+-- STORAGES & TRANSCODERS
+DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_posts_files' OR `object` = 'bx_posts_photos_resized';
+DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_posts_files' OR `object` = 'bx_posts_photos_resized';
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_posts_preview', 'bx_posts_gallery', 'bx_posts_cover');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_posts_preview', 'bx_posts_gallery', 'bx_posts_cover');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_posts_preview', 'bx_posts_gallery', 'bx_posts_cover');
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_posts';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_posts';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_posts';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN ('bx_posts_entry_add', 'bx_posts_entry_edit', 'bx_posts_entry_view', 'bx_posts_entry_delete');
+
+-- PRE-VALUES
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_posts';
+
+DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_posts_cats');
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_posts';
+
+-- VOTES
+DELETE FROM `sys_objects_vote` WHERE `Name` = 'bx_posts';
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_posts';
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_posts';
+
+-- FAFORITES
+DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_posts';
+
+-- FEATURED
+DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_posts';
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_posts', 'bx_posts_cmts');
+
+DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_posts');
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_posts';
+
+-- STUDIO: page & widget
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_posts';
+

+ 51 - 0
modules/boonex/profiler/updates/9.0.4_9.0.5/install/config.php

@@ -0,0 +1,51 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'title' => 'Profiler',
+    'version_from' => '9.0.4',
+	'version_to' => '9.0.5',
+    'vendor' => 'BoonEx',
+
+	'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/profiler/updates/update_9.0.4_9.0.5/',
+	'home_uri' => 'profiler_update_904_905',
+
+	'module_dir' => 'boonex/profiler/',
+	'module_uri' => 'profiler',
+
+    'db_prefix' => 'bx_profiler_',
+    'class_prefix' => 'BxProfiler',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+		'execute_sql' => 0,
+        'update_files' => 1,
+        'update_languages' => 0,
+		'clear_db_cache' => 0,
+    ),
+
+	/**
+     * Category for language keys.
+     */
+    'language_category' => 'Boonex Profiler',
+
+	/**
+     * Files Section
+     */
+    'delete_files' => array(),
+);

+ 13 - 0
modules/boonex/profiler/updates/9.0.4_9.0.5/install/installer.php

@@ -0,0 +1,13 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+class BxProfilerUpdater extends BxDolStudioUpdater
+{
+    function __construct($aConfig)
+	{
+        parent::__construct($aConfig);
+    }
+}

+ 689 - 0
modules/boonex/profiler/updates/9.0.4_9.0.5/source/classes/BxProfiler.php

@@ -0,0 +1,689 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Profiler Profiler
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+define ('BX_PROFILER', true);
+define ('BX_PROFILER_DISPLAY', 1);
+
+require_once(BX_DIRECTORY_PATH_MODULES . 'boonex/profiler/install/config.php');
+$GLOBALS['bx_profiler_module'] = array (
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_profiler',
+    'title' => $aConfig['title'],
+    'vendor' => $aConfig['vendor'],
+    'path' => $aConfig['home_dir'],
+    'uri' => $aConfig['home_uri'],
+    'class_prefix' => $aConfig['class_prefix'],
+    'db_prefix' => $aConfig['db_prefix'],
+);
+
+bx_import('Template', $GLOBALS['bx_profiler_module']);
+bx_import('Config', $GLOBALS['bx_profiler_module']);
+
+class BxProfiler extends BxDol
+{
+    protected $oConfig, $oTemplate;
+
+    protected $aConf = array ();
+
+    protected $_iTimeStart = 0;
+
+    protected $_aQueries = array();
+    protected $_sQueryIndex = 0;
+
+    protected $_aModules = array();
+    protected $_aModulesNames = array();
+    protected $_aModulesLevel = 0;
+
+    protected $_aAlerts = array();
+    protected $_iAlertsLevel = 0;
+
+    protected $_aInjections = array();
+    protected $_sInjectionIndex = 0;
+
+    protected $_sLogDateFormat = "Y-m-d H:i:s";
+    protected $_sLogMaxArgLength = 64;
+    protected $_sLogFilename = 64;
+
+    function __construct($iTimeStart)
+    {
+        parent::__construct();
+
+        $this->oConfig = new BxProfilerConfig ($GLOBALS['bx_profiler_module']);
+        $this->oTemplate = new BxProfilerTemplate ($this->oConfig);
+        $this->oTemplateAdmin = BxDolStudioTemplate::getInstance();
+
+        if (getParam ('bx_profiler_long_sql_queries_log'))
+            $this->aConf['long_query'] = getParam ('bx_profiler_long_sql_queries_time');
+        if (getParam ('bx_profiler_long_module_query_log'))
+            $this->aConf['long_module'] = getParam ('bx_profiler_long_module_query_time');
+        if (getParam ('bx_profiler_long_page_log'))
+            $this->aConf['long_page'] = getParam ('bx_profiler_long_page_time');
+
+        $this->_iTimeStart = $iTimeStart;
+    }
+
+    // output profiler debug panel
+    function output ()
+    {
+        $iPageTIme = $this->_getCurrentDelay ();
+        if (isset($this->aConf['long_page']) && $iPageTIme > $this->aConf['long_page'])
+            $this->logPageOpen ($iPageTIme);
+
+        switch (getParam('bx_profiler_show_debug_panel')) {
+        case 'all':
+            break;
+        case 'admins':
+            if (!$GLOBALS['logged']['admin'])
+                return;
+            break;
+        case 'none':
+        default:
+            return;
+        }
+
+        $aCss = array (
+			'profiler.css',
+            BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'jush/|jush.css',
+        );
+        $aJs = array (
+            'jquery.tablesorter.min.js',
+            'profiler.js',
+            'jush/jush.js',
+        );
+
+        $sJsCss = '';
+        foreach ($aCss as $sCssPath)
+            $sJsCss .= $this->oTemplate->addCss($sCssPath, 1);
+        foreach ($aJs as $sJsPath)
+            $sJsCss .= $this->oTemplate->addJs($sJsPath, 1);
+
+        $sContentType = $this->_getHeaderContentType();
+        if ('text/html' == $sContentType) {
+            echo $sJsCss;
+            echo $this->_plankMain ();
+            echo $this->_plankMenus ();
+            echo $this->_plankTemplates ();
+            echo $this->_plankInjections ();
+            echo $this->_plankPagesBlocks ();
+            echo $this->_plankSql ();
+            echo $this->_plankModules ();
+            echo $this->_plankAlerts ();
+        }
+    }
+
+    function _logBegin ($s)
+    {
+        $sDate = date ($this->_sLogDateFormat);
+        return "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" . $sDate . " " . $s . "\n" .
+        (isset($_COOKIE['memberID']) ? "User ID: " . $_COOKIE['memberID']  . "\n" : '') .
+        "User role: " . ($GLOBALS['logged']['admin'] ? 'admin' : ($GLOBALS['logged']['member'] ? 'member' : 'guest')) . "\n";
+    }
+
+    function _logEnd ()
+    {
+        return "\n";
+    }
+
+    function _appendToLog ($s)
+    {
+        $f = fopen ( BX_DIRECTORY_PATH_ROOT . 'logs/bx_profiler.log', 'a');
+        if (!$f)
+            return;
+        fwrite($f, $s);
+        fclose($f);
+    }
+
+    function logSqlQuery ($iTime, $aSqlQuery, &$oStmt)
+    {
+        $s  = $this->_logBegin ('LONG SQL QUERY: ' . $aSqlQuery['time']);
+        $s .= "Rows: " . $aSqlQuery['rows'] . "\n";
+        $s .= "Affected: " . $aSqlQuery['affected'] . "\n";
+        $s .= "Query: " . $aSqlQuery['sql'] . "\n";
+        if (getParam('bx_profiler_long_sql_queries_debug'))
+            $s .= "Backtrace: \n" . $this->_debugBackTrace (3);
+        $s .= $this->_logEnd();
+        $this->_appendToLog ($s);
+    }
+
+    function logModuleQuery ($iTime, $aModuleQuery)
+    {
+        $s  = $this->_logBegin ('LONG MODULE QUERY: ' . $aModuleQuery['time']);
+        $s .= "Module name: " . $aModuleQuery['name'] . "\n";
+        $s .= "Query type: " . $aModuleQuery['type'] . "\n";
+        $s .= "Class/file: " . $aModuleQuery['class/file'] . "\n";
+        $s .= "Method: " . $aModuleQuery['method'] . "\n";
+        if (getParam('bx_profiler_long_module_query_debug'))
+            $s .= "Backtrace: \n" . $this->_debugBackTrace (3);
+        $s .= $this->_logEnd();
+        $this->_appendToLog ($s);
+    }
+
+    function logPageOpen ($iTime)
+    {
+        $s  = $this->_logBegin ('LONG PAGE OPEN: ' . $this->_formatTime($iTime, 5));
+        $s .= "Request method: " . $_SERVER['REQUEST_METHOD'] . "\n";
+        $s .= "Query string: " . $_SERVER['QUERY_STRING'] . "\n";
+        $s .= "Request URI: " . $_SERVER['REQUEST_URI'] . "\n";
+        $s .= "Script name: " . $_SERVER['SCRIPT_NAME'] . "\n";
+        $s .= "PHP self: " . $_SERVER['PHP_SELF'] . "\n";
+        if (getParam('bx_profiler_long_page_debug'))
+            $s .= "All server vars: \n" . print_r ($_SERVER, true);
+        $s .= $this->_logEnd();
+        $this->_appendToLog ($s);
+    }
+
+    function beginModule($sType, $sHash, &$aModule, $sClassFile, $sMethod = '' )
+    {
+        ++$this->_aModulesLevel;
+        $this->_aModulesNames[$aModule['title']] = isset($this->_aModulesNames[$aModule['title']]) ? $this->_aModulesNames[$aModule['title']] + 1 : 1;
+        $this->_aModules[$sHash] = array (
+            'name' => str_repeat("--", $this->_aModulesLevel-1) . $aModule['title'],
+            'type' => $sType,
+            'class/file' => $sClassFile,
+            'method' => $sMethod,
+            'begin' => microtime (),
+            'time' => -1,
+        );
+    }
+
+    function endModule($sType, $sHash)
+    {
+        --$this->_aModulesLevel;
+        $iTime = $this->_calcTime ($this->_aModules[$sHash]['begin']);
+        unset ($this->_aModules[$sHash]['begin']);
+        $this->_aModules[$sHash]['time'] = $this->_formatTime($iTime, 5);
+        $this->_aModules[$sHash]['raw_time'] = $iTime;
+        if (isset($this->aConf['long_module']) && $iTime > $this->aConf['long_module'])
+            $this->logModuleQuery ($iTime, $this->_aModules[$sHash]);
+    }
+
+    function beginAlert($sUnit, $sAction, $sHandler)
+    {
+        $sHash = md5($sUnit . $sAction . $sHandler . $this->_iAlertsLevel);
+        ++$this->_iAlertsLevel;
+        $this->_aAlerts[$sHash] = array (
+            'name' => str_repeat("--", $this->_iAlertsLevel-1) . $sHandler,
+            'unit' => $sUnit,
+            'action' => $sAction,
+            'handler' => $sHandler,
+            'begin' => microtime (),
+            'time' => -1,
+        );
+    }
+
+    function endAlert($sUnit, $sAction, $sHandler)
+    {
+        --$this->_iAlertsLevel;
+        $sHash = md5($sUnit . $sAction . $sHandler . $this->_iAlertsLevel);
+        $iTime = $this->_calcTime ($this->_aAlerts[$sHash]['begin']);
+        unset ($this->_aAlerts[$sHash]['begin']);
+        $this->_aAlerts[$sHash]['time'] = $this->_formatTime($iTime, 5);
+        $this->_aAlerts[$sHash]['raw_time'] = $iTime;
+    }
+
+    function beginInjection ($sId)
+    {
+        $this->_sInjectionIndex = $sId;
+        $this->_aInjections[$sId]['begin'] = microtime ();
+    }
+
+    function endInjection ($sId, $aInjection)
+    {
+        if (!isset($this->_aInjections[$sId]))
+            return;
+        $iTime = $this->_calcTime ($this->_aInjections[$sId]['begin']);
+        unset ($this->_aInjections[$sId]['begin']);
+        $this->_aInjections[$sId]['name'] = isset($aInjection['name']) ? $aInjection['name'] : 'no-name';
+        $this->_aInjections[$sId]['key'] = $aInjection['key'];
+        $this->_aInjections[$sId]['replace'] = $aInjection['replace'] ? 'yes' : 'no';
+        $this->_aInjections[$sId]['time'] = $this->_formatTime($iTime, 5);
+        $this->_aInjections[$sId]['raw_time'] = $iTime;
+    }
+
+    function beginPageBlock ($sName, $iBlockId)
+    {
+        $this->_sPageBlockIndex = $iBlockId;
+        $this->_aPagesBlocks[$this->_sPageBlockIndex]['name'] = $sName;
+        $this->_aPagesBlocks[$this->_sPageBlockIndex]['begin'] = microtime ();
+    }
+
+    function endPageBlock ($iBlockId, $isEmpty, $isCached)
+    {
+        if (!$this->_sPageBlockIndex)
+            return;
+        $iTime = $this->_calcTime ($this->_aPagesBlocks[$this->_sPageBlockIndex]['begin']);
+        unset ($this->_aPagesBlocks[$this->_sPageBlockIndex]['begin']);
+        $this->_aPagesBlocks[$this->_sPageBlockIndex]['cached'] = $isCached ? 'yes' : 'no';
+        $this->_aPagesBlocks[$this->_sPageBlockIndex]['empty'] = $isEmpty ? 'yes' : 'no';
+        $this->_aPagesBlocks[$this->_sPageBlockIndex]['time'] = $this->_formatTime($iTime, 5);
+        $this->_aPagesBlocks[$this->_sPageBlockIndex]['raw_time'] = $iTime;
+    }
+
+    function beginPage ($sName)
+    {
+        $this->_sPageIndex = md5 ($sName.time().rand());
+        $this->_aPages[$this->_sPageIndex]['name'] = $sName;
+        $this->_aPages[$this->_sPageIndex]['begin'] = microtime ();
+    }
+
+    function endPage (&$sContent)
+    {
+        if (!$this->_sPageIndex || !isset($this->_aPages[$this->_sPageIndex]['begin']))
+            return;
+        $iTime = $this->_calcTime ($this->_aPages[$this->_sPageIndex]['begin']);
+        unset ($this->_aPages[$this->_sPageIndex]['begin']);
+        $this->_aPages[$this->_sPageIndex]['time'] = $this->_formatTime($iTime, 5);
+        $this->_aPages[$this->_sPageIndex]['raw_time'] = $iTime;
+    }
+
+    function beginTemplate ($sName, $sRand)
+    {
+        $this->_aTemplateIndexes[$sName.$sRand] = 1;
+        $this->_aTemplates[$sName.$sRand]['name'] = $sName;
+        $this->_aTemplates[$sName.$sRand]['begin'] = microtime ();
+    }
+
+    function endTemplate ($sName, $sRand, &$sContent, $isCached)
+    {
+        if (!isset($this->_aTemplateIndexes[$sName.$sRand]))
+            return;
+        $iTime = $this->_calcTime ($this->_aTemplates[$sName.$sRand]['begin']);
+        unset ($this->_aTemplates[$sName.$sRand]['begin']);
+        $this->_aTemplates[$sName.$sRand]['cached'] = $isCached ? 'yes' : 'no';
+        $this->_aTemplates[$sName.$sRand]['time'] = $this->_formatTime($iTime, 5);
+        $this->_aTemplates[$sName.$sRand]['raw_time'] = $iTime;
+    }
+
+    function beginQuery ($sSql)
+    {
+        $this->_sQueryIndex = md5 ($sSql.time().rand());
+        $this->_aQueries[$this->_sQueryIndex]['sql'] = $sSql;
+        $this->_aQueries[$this->_sQueryIndex]['begin'] = microtime ();
+    }
+
+    function endQuery (&$oStmt)
+    {
+        if (!$this->_sQueryIndex)
+            return;
+        $iTime = $this->_calcTime ($this->_aQueries[$this->_sQueryIndex]['begin']);
+        unset ($this->_aQueries[$this->_sQueryIndex]['begin']);
+        $this->_aQueries[$this->_sQueryIndex]['time'] = $this->_formatTime($iTime, 5);
+        $this->_aQueries[$this->_sQueryIndex]['raw_time'] = $iTime;
+        $this->_aQueries[$this->_sQueryIndex]['rows'] = $oStmt ? BxDolDb::getInstance()->getNumRows($oStmt) : '';
+        $this->_aQueries[$this->_sQueryIndex]['affected'] = $oStmt ? BxDolDb::getInstance()->getAffectedRows($oStmt) : '';
+        if (isset($this->aConf['long_query']) && $iTime > $this->aConf['long_query'])
+            $this->logSqlQuery ($iTime, $this->_aQueries[$this->_sQueryIndex], $oStmt);
+    }
+
+    function beginMenu ($sName)
+    {
+        $this->_aMenus[$sName]['name'] = $sName;
+        $this->_aMenus[$sName]['begin'] = microtime ();
+    }
+
+    function endMenu ($sName)
+    {
+        if (!isset($this->_aMenus[$sName]))
+            return;
+        $iTime = $this->_calcTime ($this->_aMenus[$sName]['begin']);
+        unset ($this->_aMenus[$sName]['begin']);
+        $this->_aMenus[$sName]['time'] = $this->_formatTime($iTime, 5);
+        $this->_aMenus[$sName]['raw_time'] = $iTime;
+    }
+
+    function _getCurrentDelay ()
+    {
+        $i1 = explode(' ', microtime ());
+        $i2 = explode(' ', $this->_iTimeStart);
+        return ($i1[0]+$i1[1]) - ($i2[0]+$i2[1]);
+    }
+
+    function _plankMain ()
+    {
+        $sTime = $this->_formatTime($this->_getCurrentDelay ());
+        if (function_exists('memory_get_usage'))
+            $sMemory = $this->_formatBytes(memory_get_usage(true)) . ' of ' . ini_get('memory_limit') . ' allowed';
+
+        return $this->oTemplate->plank(
+            $this->oTemplate->nameValue('Time:', $sTime) .
+            (function_exists('memory_get_usage') ? $this->oTemplate->nameValue('Memory:', $sMemory) : '') .
+            $this->oTemplate->nameValue('PHP:', phpversion()) .
+            $this->oTemplate->nameValue('SAPI:', php_sapi_name()) .
+            $this->oTemplate->nameValue('OS:', php_uname('s r m'))
+        );
+    }
+
+    function _plankTemplates ()
+    {
+        if (empty($GLOBALS['bx_profiler']->_aPages) && empty($GLOBALS['bx_profiler']->_aTemplates))
+            return;
+
+        $sPages = '';
+        if (!empty($GLOBALS['bx_profiler']->_aPages)) {
+            $iTimePages = 0;
+            foreach ($GLOBALS['bx_profiler']->_aPages as $k => $r) {
+                if (!isset($r['raw_time']))
+                    continue;
+                $iTimePages += $r['raw_time'];
+                unset ($GLOBALS['bx_profiler']->_aPages[$k]['raw_time']);
+            }
+            $sPages = count($GLOBALS['bx_profiler']->_aPages) . ' (' . $this->_formatTime($iTimePages, 3) . ')';
+        }
+
+        $sTemplatesCached = '';
+        $sTemplatesNotCached = '';
+        if ($GLOBALS['bx_profiler']->_aTemplates) {
+            $iTimeTemplatesCached = 0;
+            $iTimeTemplatesNotCached = 0;
+            $sTemplatesCached = 0;
+            $sTemplatesNotCached = 0;
+            foreach ($GLOBALS['bx_profiler']->_aTemplates as $k => $r) {
+                if (!isset($r['raw_time']))
+                    continue;
+                if ('yes' == $r['cached']) {
+                    $iTimeTemplatesCached += $r['raw_time'];
+                    ++$sTemplatesCached;
+                } else {
+                    $iTimeTemplatesNotCached += $r['raw_time'];
+                    ++$sTemplatesNotCached;
+                }
+                unset ($GLOBALS['bx_profiler']->_aTemplates[$k]['raw_time']);
+            }
+            if ($sTemplatesCached)
+                $sTemplatesCached .= ' (' . $this->_formatTime($iTimeTemplatesCached, 3) . ')';
+            if ($sTemplatesNotCached)
+                $sTemplatesNotCached .= ' (' . $this->_formatTime($iTimeTemplatesNotCached, 3) . ')';
+        }
+
+        return $this->oTemplate->plank(
+            ($sPages ? $this->oTemplate->nameValue('Pages:', $sPages) : '') .
+            ($sTemplatesCached ? $this->oTemplate->nameValue('Templates Cached:', $sTemplatesCached) : '') .
+            ($sTemplatesNotCached ? $this->oTemplate->nameValue('Templates Not Cached:', $sTemplatesNotCached) : ''),
+            $this->oTemplate->table($GLOBALS['bx_profiler']->_aTemplates)
+        );
+    }
+
+    function _plankInjections ()
+    {
+        if (!$GLOBALS['bx_profiler']->_aInjections)
+            return;
+
+        $iTimeInjections = 0;
+        foreach ($GLOBALS['bx_profiler']->_aInjections as $k => $r) {
+            if (!isset($r['raw_time']))
+                continue;
+            $iTimeInjections += $r['raw_time'];
+            unset ($GLOBALS['bx_profiler']->_aInjections[$k]['raw_time']);
+        }
+
+        $sInjections = count($GLOBALS['bx_profiler']->_aInjections) . ' injection (' . $this->_formatTime($iTimeInjections, 3) . ')';
+
+        return $this->oTemplate->plank(
+            $this->oTemplate->nameValue('Injections:', $sInjections),
+            $this->oTemplate->table($GLOBALS['bx_profiler']->_aInjections)
+        );
+    }
+
+    function _plankPagesBlocks ()
+    {
+        if (empty($GLOBALS['bx_profiler']->_aPagesBlocks))
+            return;
+
+        $iTimeBlocks = 0;
+        $iTimeBlocksCached = 0;
+        $iTimeBlocksNotCached = 0;
+        $iTimeBlocksEmpty = 0;
+        $iTimeBlocksNotEmpty = 0;
+
+        $iCountBlocksCached = 0;
+        $iCountBlocksNotCached = 0;
+        $iCountBlocksEmpty = 0;
+        $iCountBlocksNotEmpty = 0;
+
+        foreach ($GLOBALS['bx_profiler']->_aPagesBlocks as $k => $r) {
+            if (!isset($r['raw_time']))
+                continue;
+            $iTimeBlocks += $r['raw_time'];
+            if ($r['cached'] == 'yes') {
+                $iTimeBlocksCached += $r['raw_time'];
+                ++$iCountBlocksCached;
+            } else {
+                $iTimeBlocksNotCached += $r['raw_time'];
+                ++$iCountBlocksNotCached;
+            }
+            if ($r['empty'] == 'yes') {
+                $iTimeBlocksEmpty += $r['raw_time'];
+                ++$iCountBlocksEmpty;
+            } else {
+                $iTimeBlocksNotEmpty += $r['raw_time'];
+                ++$iCountBlocksNotEmpty;
+            }
+            unset ($GLOBALS['bx_profiler']->_aPagesBlocks[$k]['raw_time']);
+        }
+
+        $sBlocks = count($GLOBALS['bx_profiler']->_aPagesBlocks) . ' (' . $this->_formatTime($iTimeBlocks, 3) . ')';
+        if ($iCountBlocksCached)
+            $sBlocksCached = $iCountBlocksCached . ' (' . $this->_formatTime($iTimeBlocksCached, 3) . ')';
+        if ($iCountBlocksNotCached)
+            $sBlocksNotCached = $iCountBlocksNotCached . ' (' . $this->_formatTime($iTimeBlocksNotCached, 3) . ')';
+        if ($iCountBlocksEmpty)
+            $sBlocksEmpty = $iCountBlocksEmpty . ' (' . $this->_formatTime($iTimeBlocksEmpty, 3) . ')';
+        if ($iCountBlocksNotEmpty)
+            $sBlocksNotEmpty = $iCountBlocksNotEmpty . ' (' . $this->_formatTime($iTimeBlocksNotEmpty, 3) . ')';
+
+        return $this->oTemplate->plank(
+            $this->oTemplate->nameValue('Pages Blocks:', $sBlocks) .
+            ($iCountBlocksCached ? $this->oTemplate->nameValue('Cached:', $sBlocksCached) : '') .
+            ($iCountBlocksNotCached ? $this->oTemplate->nameValue('Not Cached:', $sBlocksNotCached) : '') .
+            ($iCountBlocksEmpty ? $this->oTemplate->nameValue('Empty:', $sBlocksEmpty) : '') .
+            ($iCountBlocksNotEmpty ? $this->oTemplate->nameValue('Not Empty:', $sBlocksNotEmpty) : ''),
+            $this->oTemplate->table($GLOBALS['bx_profiler']->_aPagesBlocks)
+        );
+    }
+
+    function _plankMenus ()
+    {
+        if (empty($GLOBALS['bx_profiler']->_aMenus))
+            return;
+
+        $iTimeMenus = 0;
+        foreach ($GLOBALS['bx_profiler']->_aMenus as $k => $r) {
+            if (!isset($r['raw_time']))
+                continue;
+            $iTimeMenus += $r['raw_time'];
+            unset ($GLOBALS['bx_profiler']->_aMenus[$k]['raw_time']);
+        }
+
+        $sMenus = count($GLOBALS['bx_profiler']->_aMenus) . ' menus (' . $this->_formatTime($iTimeMenus, 3) . ')';
+
+        return $this->oTemplate->plank(
+            $this->oTemplate->nameValue('Menus:', $sMenus),
+            $this->oTemplate->table($GLOBALS['bx_profiler']->_aMenus)
+        );
+    }
+
+    function _plankSql ()
+    {
+        if (empty($GLOBALS['bx_profiler']->_aQueries))
+            return;
+
+        $iTimeQueries = 0;
+        foreach ($GLOBALS['bx_profiler']->_aQueries as $k => $r) {
+            if (!isset($r['raw_time']))
+                continue;
+            $iTimeQueries += $r['raw_time'];
+            unset ($GLOBALS['bx_profiler']->_aQueries[$k]['raw_time']);
+        }
+
+        $sQueries = count($GLOBALS['bx_profiler']->_aQueries) . ' queries (' . $this->_formatTime($iTimeQueries, 3) . ')';
+
+        return $this->oTemplate->plank(
+            $this->oTemplate->nameValue('SQL:', $sQueries),
+            $this->oTemplate->table($GLOBALS['bx_profiler']->_aQueries, 'sql')
+        );
+    }
+
+    function _plankModules ()
+    {
+        if (empty($GLOBALS['bx_profiler']->_aModules))
+            return;
+
+        $iTimeModules = 0;
+        foreach ($GLOBALS['bx_profiler']->_aModules as $k => $r) {
+            if (!isset($r['raw_time']))
+                continue;
+            $iTimeModules += $r['raw_time'];
+            unset ($GLOBALS['bx_profiler']->_aModules[$k]['raw_time']);
+        }
+
+        $sModules = count($GLOBALS['bx_profiler']->_aModulesNames) . ' modules loaded';
+        $sModulesQueries = count($GLOBALS['bx_profiler']->_aModules) . ' modules queries (' . $this->_formatTime($iTimeModules, 3) . ')';
+
+        return $this->oTemplate->plank(
+            $this->oTemplate->nameValue('Modules:', $sModules) .
+            $this->oTemplate->nameValue('Modules Queries:', $sModulesQueries),
+            $this->oTemplate->table($GLOBALS['bx_profiler']->_aModules)
+        );
+    }
+
+    function _plankAlerts ()
+    {
+        if (empty($GLOBALS['bx_profiler']->_aAlerts))
+            return;
+
+        $iTimeAlerts = 0;
+        foreach ($GLOBALS['bx_profiler']->_aAlerts as $k => $r) {
+            if (!isset($r['raw_time']))
+                continue;
+            $iTimeAlerts += $r['raw_time'];
+            unset ($GLOBALS['bx_profiler']->_aAlerts[$k]['raw_time']);
+        }
+
+        $sAlerts = count($GLOBALS['bx_profiler']->_aAlerts) . ' alerts responses (' . $this->_formatTime($iTimeAlerts, 3) . ')';
+
+        return $this->oTemplate->plank(
+            $this->oTemplate->nameValue('Alerts:', $sAlerts) .
+            $this->oTemplate->table($GLOBALS['bx_profiler']->_aAlerts)
+        );
+    }
+
+    function _formatTime ($i, $iPrecision = 3)
+    {
+        return round($i, $iPrecision) . ' sec';
+    }
+
+    function _formatBytes ($i)
+    {
+        if ($i > 1024*1024)
+            return round($i/1024/1024, 1) . 'M';
+        elseif ($i > 1024)
+            return round($i/1024, 1) . 'K';
+        else
+            return $i . 'B';
+    }
+
+    function _isProfilerDisabled()
+    {
+        if (isset($GLOBALS['bx_profiler_disable']) || isset($_GET['bx_profiler_disable']))
+            return true;
+        if (
+            preg_match('/gzip_loader\.php/', $_SERVER['PHP_SELF']) ||
+            preg_match('/get_rss_feed\.php/', $_SERVER['PHP_SELF']) ||
+            preg_match('/fields\.parse\.php/', $_SERVER['PHP_SELF']) ||
+            preg_match('/flash/', $_SERVER['PHP_SELF']) ||
+            preg_match('/forum/', $_SERVER['PHP_SELF'])
+        )
+            return true;
+        return false;
+    }
+
+    function _calcTime ($begin)
+    {
+        $i1 = explode(' ', microtime ());
+        $i2 = explode(' ', $begin);
+        return ($i1[0]+$i1[1]) - ($i2[0]+$i2[1]);
+    }
+
+    function _debugPrintArray ($mixed)
+    {
+        $sArgs .= 'Array(';
+        foreach ($mixed as $mixed2)
+            $sArgs .= (is_object($mixed2) ? $this->_debugPrintObject($mixed2) : $this->_debugPrintAny($mixed2)) . ',';
+        $sArgs = substr($sArgs, 0, -1);
+        $sArgs .= ')';
+        return $sArgs;
+    }
+
+    function _debugPrintObject ($mixed)
+    {
+        return get_class($mixed) . ' instance';
+    }
+
+    function _debugPrintAny ($mixed)
+    {
+        if (is_string)
+            return "'" . (strlen($mixed) > $this->_sLogMaxArgLength ? substr($mixed, 0, $this->_sLogMaxArgLength) . '...' : $mixed) . "'";
+        else
+            return $mixed;
+    }
+
+    function _debugBackTrace ($iShifts = 0)
+    {
+        $a = debug_backtrace();
+        while (--$iShifts > -1)
+            array_shift($a);
+
+        $s = '';
+        foreach ($a as $r) {
+
+            $sArgs = '';
+            foreach ($r['args'] as $mixed) {
+                switch (true) {
+                case is_array($mixed):
+                    $sArgs .= $this->_debugPrintArray($mixed);
+                    break;
+                case is_object($mixed):
+                    $sArgs .= $this->_debugPrintObject($mixed);
+                    break;
+                default:
+                    $sArgs .= $this->_debugPrintAny($mixed);
+                }
+                $sArgs .= ',';
+            }
+            $sArgs = substr($sArgs, 0, -1);
+
+            $s .= "--------------------------------------\n";
+            $s .= "{$r['line']} {$r['file']}\n";
+            $s .= "{$r['class']}{$r['type']}{$r['function']} ({$sArgs});\n";
+        }
+        return $s;
+    }
+
+    function _getHeaderContentType()
+    {
+        $aHeaders = headers_list();
+        foreach ($aHeaders as $s) {
+            $a = explode(':', $s);
+            if (isset($a[0]) && isset($a[1]) && 'content-type' == strtolower(trim($a[0]))) {
+                $aa = explode(';', $a[1]);
+                return strtolower(trim($aa[0]));
+            }
+        }
+
+        return false;
+    }
+}
+
+$GLOBALS['bx_profiler'] = new BxProfiler(BX_DOL_START);
+if (!$GLOBALS['bx_profiler']->_isProfilerDisabled())
+    register_shutdown_function (array ($GLOBALS['bx_profiler'], 'output'));
+
+/** @} */

+ 68 - 0
modules/boonex/profiler/updates/9.0.4_9.0.5/source/install/config.php

@@ -0,0 +1,68 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Profiler Profiler
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_profiler',
+    'title' => 'Profiler',
+    'note' => 'Measure different site timings.',
+    'version' => '9.0.5',
+    'vendor' => 'Boonex',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/profiler/',
+    'home_uri' => 'profiler',
+
+    'db_prefix' => 'bx_profiler_',
+    'class_prefix' => 'BxProfiler',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Boonex Profiler',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 51 - 0
modules/boonex/protean/updates/9.0.4_9.0.5/install/config.php

@@ -0,0 +1,51 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'title' => 'Protean',
+    'version_from' => '9.0.4',
+	'version_to' => '9.0.5',
+    'vendor' => 'BoonEx',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/protean/updates/update_9.0.4_9.0.5/',
+	'home_uri' => 'protean_update_904_905',
+
+	'module_dir' => 'boonex/protean/',
+	'module_uri' => 'protean',
+
+    'db_prefix' => 'bx_protean_',
+    'class_prefix' => 'BxProtean',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+		'execute_sql' => 0,
+        'update_files' => 1,
+        'update_languages' => 0,
+		'clear_db_cache' => 0,
+    ),
+
+	/**
+     * Category for language keys.
+     */
+    'language_category' => 'Boonex Protean Template',
+
+	/**
+     * Files Section
+     */
+    'delete_files' => array(),
+);

+ 26 - 0
modules/boonex/protean/updates/9.0.4_9.0.5/install/installer.php

@@ -0,0 +1,26 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+class BxProteanUpdater extends BxDolStudioUpdater
+{
+    function __construct($aConfig)
+	{
+        parent::__construct($aConfig);
+    }
+
+    public function update($aParams)
+    {
+        $aResult = parent::update($aParams);
+		if(!$aResult['result'])
+			return $aResult;
+
+        $oCacheUtilities = BxDolCacheUtilities::getInstance();
+        $oCacheUtilities->clear('css');
+        $oCacheUtilities->clear('template');
+
+        return $aResult;
+    }
+}

+ 770 - 0
modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/css/default.less

@@ -0,0 +1,770 @@
+@import '../../../../../../../template/css/default.less';
+
+/* viewport */
+@media (min-width:720px) and (max-width:1024px) {
+	html {
+	    font-size: @bx-viewport-font-tablet !important;
+	}
+}
+@media (max-width:720px) {
+	html {
+	    font-size: @bx-viewport-font-mobile !important;
+	}
+}
+
+/* height */
+.bx-header {
+	height: @bx-height-header !important;
+}
+.bx-menu-toolbar-padding {
+	padding-top: @bx-height-header !important;
+}
+
+/* content paddings */
+.bx-content-padding-header {
+	padding: @bx-content-padding-header;
+}
+.bx-content-padding-footer {
+	padding: @bx-content-padding-footer;
+}
+.bx-content-padding-block {
+	padding: @bx-content-padding-block;
+}
+
+#bx-logo {
+    margin-top:-@bx-content-padding-header;
+}
+
+/* shadow */
+.bx-shadow-header {
+	-webkit-box-shadow: @bx-shadow-header;
+	-moz-box-shadow: @bx-shadow-header;
+	box-shadow: @bx-shadow-header;
+}
+.bx-shadow-footer {
+	-webkit-box-shadow: @bx-shadow-footer;
+	-moz-box-shadow: @bx-shadow-footer;
+	box-shadow: @bx-shadow-footer;
+}
+.bx-shadow-block {
+	-webkit-box-shadow: @bx-shadow-block;
+	-moz-box-shadow: @bx-shadow-block;
+	box-shadow: @bx-shadow-block;
+}
+.bx-def-box {
+	-webkit-box-shadow: @bx-shadow-card;
+	-moz-box-shadow: @bx-shadow-card;
+	box-shadow: @bx-shadow-card;
+}
+.bx-popup-applied {
+	border-radius: @bx-border-radius-popup;
+	background-clip: padding-box;    
+
+	-webkit-box-shadow: @bx-shadow-popup;
+	-moz-box-shadow: @bx-shadow-popup;
+	box-shadow: @bx-shadow-popup;
+}
+.bx-popup-wrapper.bx-popup-slide-wrapper {
+	-webkit-box-shadow: @bx-shadow-menu-slide;
+	-moz-box-shadow: @bx-shadow-menu-slide;
+	box-shadow: @bx-shadow-menu-slide;
+}
+.bx-btn {
+	-webkit-box-shadow: @bx-shadow-button;
+	-moz-box-shadow: @bx-shadow-button;
+	box-shadow: @bx-shadow-button;
+}
+.bx-btn.bx-btn-small {
+	-webkit-box-shadow: @bx-shadow-button-small;
+	-moz-box-shadow: @bx-shadow-button-small;
+	box-shadow: @bx-shadow-button-small;
+}
+
+
+/* background images */
+.bx-def-image-bg-header,
+.bx-def-image-bg-footer,
+.bx-def-image-bg-page,
+.bx-def-image-bg-block,
+.bx-def-box,
+.bx-popup-color-bg,
+.bx-popup-wrapper.bx-popup-slide-wrapper,
+#bx-sliding-menu-sys_site.bx-sliding-menu-main,
+#bx-sliding-menu-sys_add_content.bx-sliding-menu-main,
+#bx-sliding-menu-account.bx-sliding-menu-main,
+.bx-menu-main-bar-wrapper {
+    background-position: center center;
+}
+.bx-def-image-bg-header {
+	background-image: @bx-image-bg-header;
+	background-repeat: @bx-image-bg-header-repeat;
+    background-size: @bx-image-bg-header-size;
+}
+.bx-def-image-bg-footer {
+	background-image: @bx-image-bg-footer;
+	background-repeat: @bx-image-bg-footer-repeat;
+    background-size: @bx-image-bg-footer-size;
+}
+.bx-def-image-bg-page {
+	background-image: @bx-image-bg-page;
+	background-repeat: @bx-image-bg-page-repeat;
+    background-size: @bx-image-bg-page-size;
+}
+.bx-def-image-bg-block {
+	background-image: @bx-image-bg-block;
+	background-repeat: @bx-image-bg-block-repeat;
+    background-size: @bx-image-bg-block-size;
+}
+.bx-def-box {
+	background-image: @bx-image-bg-box;
+	background-repeat: @bx-image-bg-box-repeat;
+    background-size: @bx-image-bg-box-size;
+}
+
+/* body */
+a {
+	color: @bx-color-link-body; 
+}
+a:hover {
+	color: @bx-color-link-body-hover; 
+}
+.sys-icon,
+.sys-icon-a {
+	color: @bx-color-icon-body; 
+}
+a:hover > .sys-icon,
+a:hover > .sys-icon-a {
+	color: @bx-color-icon-body-hover; 
+}
+.sys-icon-a i {
+	.background-color (@bx-color-icon-body) !important;
+	color: @bx-color-icon-body;
+}
+a:hover > .sys-icon-a i {
+	.background-color (@bx-color-icon-body-hover) !important;
+	color: @bx-color-icon-body-hover;
+}
+
+/* header */
+.bx-header.bx-def-color-bg-header {
+    .background-color (@bx-color-header);
+}
+.bx-header.bx-def-border-header {
+    border-bottom-width: @bx-border-width-header;
+    border-bottom-style: @bx-border-type;
+    border-bottom-color: @bx-color-border-header;
+}
+.bx-header a {
+	color: @bx-color-link-header; 
+}
+.bx-header a:hover {
+	color: @bx-color-link-header-hover;
+}
+.bx-header .sys-icon,
+.bx-header .sys-icon-a {
+	color: @bx-color-icon-header; 
+}
+.bx-header a:hover .sys-icon,
+.bx-header a:hover .sys-icon-a {
+	color: @bx-color-icon-header-hover; 
+} 
+.bx-header .sys-icon-a i {
+	.background-color (@bx-color-icon-header) !important;
+	color: @bx-color-icon-header;
+}
+.bx-header a:hover .sys-icon-a i {
+	.background-color (@bx-color-icon-header-hover) !important;
+	color: @bx-color-icon-header-hover;
+}
+
+/* footer */
+.bx-def-color-bg-footer {
+    .background-color (@bx-color-footer);    
+}
+.bx-def-border-footer {
+    border-top-width: @bx-border-width-footer;
+    border-top-style: @bx-border-type;
+    border-top-color: @bx-color-border-footer;
+}
+.bx-footer {
+	color: @bx-font-color-footer;
+}
+.bx-footer a {
+	color: @bx-color-link-footer; 
+}
+.bx-footer a:hover {
+	color: @bx-color-link-footer-hover; 
+}
+.bx-footer .sys-icon,
+.bx-footer .sys-icon-a {
+	color: @bx-color-icon-footer; 
+}
+.bx-footer a:hover .sys-icon,
+.bx-footer a:hover .sys-icon-a {
+	color: @bx-color-icon-footer-hover; 
+}
+.bx-footer .sys-icon-a i {
+	.background-color (@bx-color-icon-footer) !important;
+	color: @bx-color-icon-footer;
+}
+.bx-footer a:hover .sys-icon-a i {
+	.background-color (@bx-color-icon-footer-hover) !important;
+	color: @bx-color-icon-footer-hover;
+}
+
+/* fonts */
+.bx-def-font-inputs {
+	font-family: @bx-font-family-form-input;
+	font-size: @bx-font-size-form-input;
+	color: @bx-font-color-form-input;
+}
+
+h1,
+.bx-def-font-h1 {
+	font-weight: @bx-font-weight-h1;
+	color: @bx-font-color-default-h1;
+}
+h1.bx-def-font-grayed,
+h1 .bx-def-font-grayed,
+.bx-def-font-h1.bx-def-font-grayed,
+.bx-def-font-h1 .bx-def-font-grayed {
+	color: @bx-font-color-grayed-h1;
+}
+h1.bx-def-font-contrasted,
+h1.bx-def-font-contrasted:after,
+h1.bx-def-font-contrasted:before,
+h1 .bx-def-font-contrasted,
+h1 .bx-def-font-contrasted:after,
+h1 .bx-def-font-contrasted:before,
+.bx-def-font-h1.bx-def-font-contrasted,
+.bx-def-font-h1.bx-def-font-contrasted:after,
+.bx-def-font-h1.bx-def-font-contrasted:before,
+.bx-def-font-h1 .bx-def-font-contrasted,
+.bx-def-font-h1 .bx-def-font-contrasted:after,
+.bx-def-font-h1 .bx-def-font-contrasted:before {
+	color: @bx-font-color-contrasted-h1;
+}
+h1 a,
+.bx-def-font-h1 a,
+a.bx-def-font-h1 {
+	color: @bx-font-color-link-h1;
+}
+h1 a:hover,
+.bx-def-font-h1 a:hover,
+a.bx-def-font-h1:hover {
+	color: @bx-font-color-link-h1-hover;
+}
+
+h2,
+.bx-def-font-h2 {
+	font-weight: @bx-font-weight-h2;
+	color: @bx-font-color-default-h2;
+}
+h2.bx-def-font-grayed,
+h2 .bx-def-font-grayed,
+.bx-def-font-h2.bx-def-font-grayed,
+.bx-def-font-h2 .bx-def-font-grayed {
+	color: @bx-font-color-grayed-h2;
+}
+h2.bx-def-font-contrasted,
+h2.bx-def-font-contrasted:after,
+h2.bx-def-font-contrasted:before,
+h2 .bx-def-font-contrasted,
+h2 .bx-def-font-contrasted:after,
+h2 .bx-def-font-contrasted:before,
+.bx-def-font-h2.bx-def-font-contrasted,
+.bx-def-font-h2.bx-def-font-contrasted:after,
+.bx-def-font-h2.bx-def-font-contrasted:before,
+.bx-def-font-h2 .bx-def-font-contrasted,
+.bx-def-font-h2 .bx-def-font-contrasted:after,
+.bx-def-font-h2 .bx-def-font-contrasted:before {
+	color: @bx-font-color-contrasted-h2;
+}
+h2 a,
+.bx-def-font-h2 a,
+a.bx-def-font-h2 {
+	color: @bx-font-color-link-h2;
+}
+h2 a:hover,
+.bx-def-font-h2 a:hover,
+a.bx-def-font-h2:hover {
+	color: @bx-font-color-link-h2-hover;
+}
+
+h3,
+.bx-def-font-h3 {
+	font-weight: @bx-font-weight-h3;
+	color: @bx-font-color-default-h3;
+}
+h3.bx-def-font-grayed,
+h3 .bx-def-font-grayed,
+.bx-def-font-h3.bx-def-font-grayed,
+.bx-def-font-h3 .bx-def-font-grayed {
+	color: @bx-font-color-grayed-h3;
+}
+h3.bx-def-font-contrasted,
+h3.bx-def-font-contrasted:after,
+h3.bx-def-font-contrasted:before,
+h3 .bx-def-font-contrasted,
+h3 .bx-def-font-contrasted:after,
+h3 .bx-def-font-contrasted:before,
+.bx-def-font-h3.bx-def-font-contrasted,
+.bx-def-font-h3.bx-def-font-contrasted:after,
+.bx-def-font-h3.bx-def-font-contrasted:before,
+.bx-def-font-h3 .bx-def-font-contrasted,
+.bx-def-font-h3 .bx-def-font-contrasted:after,
+.bx-def-font-h3 .bx-def-font-contrasted:before {
+	color: @bx-font-color-contrasted-h3;
+}
+h3 a,
+.bx-def-font-h3 a,
+a.bx-def-font-h3 {
+	color: @bx-font-color-link-h3;
+}
+h3 a:hover,
+.bx-def-font-h3 a:hover,
+a.bx-def-font-h3:hover {
+	color: @bx-font-color-link-h3-hover;
+}
+
+/* cover */
+.bx-menu-toolbar-padding,
+.bx-menu-toolbar-padding .bx-cover-wrapper {
+    background-color: @bx-color-cover;
+}
+
+.bx-menu-toolbar-padding .bx-cover-wrapper {
+    border-width: @bx-border-width-cover;
+    border-style: @bx-border-type;
+    border-color: @bx-color-border-cover;
+
+	border-radius: @bx-border-radius-cover;
+	background-clip: padding-box;
+
+    -webkit-box-shadow: @bx-shadow-cover;
+    -moz-box-shadow: @bx-shadow-cover;
+    box-shadow: @bx-shadow-cover;
+}
+.bx-cover-wrapper .bx-cover {
+    min-height: @bx-height-cover;
+}
+.bx-cover-wrapper .bx-cover,
+.bx-cover-wrapper .bx-cover .bx-cover-actions .bx-menu-btns-hor {
+    text-align: @bx-text-align-cover;
+}
+.bx-cover-wrapper .bx-cover.bx-def-padding {
+    padding: @bx-content-padding-cover;
+}
+.bx-cover-wrapper .bx-cover .bx-cover-image img {
+    border-width: @bx-border-width-cover-icon;
+    border-style: @bx-border-type;
+    border-color: @bx-color-border-cover-icon;
+
+	border-radius: @bx-border-radius-cover-icon;
+	background-clip: padding-box;
+    
+    -webkit-box-shadow: @bx-shadow-cover-icon;
+    -moz-box-shadow: @bx-shadow-cover-icon;
+    box-shadow: @bx-shadow-cover-icon;
+}
+
+.bx-cover-wrapper .bx-cover .bx-cover-title {
+    text-shadow: @bx-shadow-text-cover;
+
+    font-family: @bx-font-family-cover;
+}
+.bx-cover-wrapper .bx-cover .bx-cover-title,
+.bx-cover-wrapper .bx-cover .bx-cover-title .bx-def-font-contrasted {
+    color: @bx-color-font-cover;
+}
+.bx-cover-wrapper .bx-cover .bx-cover-title,
+.bx-cover-wrapper .bx-cover .bx-cover-title.bx-def-font-h1 {
+    font-size: @bx-font-size-cover;
+    font-weight: @bx-font-weight-cover;
+}
+
+
+/* block */
+.bx-def-border-block {
+	border-width: @bx-border-width-block;
+	border-style: @bx-border-type;
+	border-color: @bx-color-border-block;
+
+	border-radius: @bx-border-radius-block;
+	background-clip: padding-box;    
+}
+.bx-db-header {
+	padding: @bx-title-padding-block;
+
+	border-width: @bx-border-width-block-title;
+	border-style: solid;
+	border-color: @bx-color-border-block-title;
+
+	border-radius: @bx-border-radius-block-title;
+	background-clip: padding-box;
+    
+	background-color: @bx-color-block-title;
+}
+.bx-db-header .bx-db-title {
+	font-family: @bx-font-family-block-title;
+	font-weight: @bx-font-weight-block-title;
+	color: @bx-color-font-block-title;
+}
+.bx-db-header .bx-db-title.bx-def-font-h2 {
+	font-size: @bx-font-size-block-title;
+}
+.bx-db-divider {
+	border-top:@bx-height-block-title-div @bx-border-type @bx-color-block-title-div;
+}
+
+
+/* box */
+.bx-def-box {
+	border-width: @bx-border-width-box;
+	border-style: @bx-border-type;
+	border-color: @bx-color-border-box;
+}
+.bx-def-box.bx-def-padding {
+	padding: @bx-content-padding-card;
+}
+.bx-def-box.bx-def-color-bg-box {
+	.background-color (@bx-color-box);
+}
+.bx-def-box.bx-def-round-corners {
+	border-radius: @bx-border-radius-box;
+	background-clip: padding-box;
+}
+
+/* popup */
+.bx-popup-border {
+	border-width: @bx-border-width-popup;
+	border-style: solid;
+	border-color: @bx-color-border-popup;
+
+	border-radius: @bx-border-radius-popup;
+	background-clip: padding-box;
+}
+.bx-popup-color-bg {
+	background-color: @bx-color-popup;
+
+	background-image: @bx-image-bg-popup;
+	background-repeat: @bx-image-bg-popup-repeat;
+    background-size: @bx-image-bg-popup-size;
+}
+.bx-popup-content-indent {
+	padding: @bx-content-padding-popup;
+}
+.bx-popup-header {
+	padding: @bx-title-padding-popup;
+}
+.bx-popup-header-color-bg {
+	background-color: @bx-color-popup-title;
+}
+.bx-popup-header h2 {
+	font-family: @bx-font-family-popup-title;
+	font-size: @bx-font-size-popup-title;
+}
+.bx-popup-header h2,
+.bx-popup-header.bx-def-font-contrasted h2 {
+	color: @bx-color-font-popup-title;
+}
+
+/* slide menu */
+.bx-popup-wrapper.bx-popup-slide-wrapper {
+	border-width: @bx-border-width-menu-slide;
+	border-style: solid;
+	border-color: @bx-color-border-menu-slide;
+
+	.background-color (@bx-color-menu-slide);
+
+	background-image: @bx-image-bg-menu-slide;
+	background-repeat: @bx-image-bg-menu-slide-repeat;
+    background-size: @bx-image-bg-menu-slide-size;
+}
+.bx-popup-wrapper.bx-popup-slide-wrapper.bx-def-padding {
+	padding: @bx-content-padding-menu-slide;
+}
+.bx-popup-wrapper.bx-popup-slide-wrapper li a {
+	text-shadow: @bx-shadow-font-menu-slide;
+
+	font-family: @bx-font-family-menu-slide;
+	font-size: @bx-font-size-menu-slide;
+	font-weight: @bx-font-weight-menu-slide;
+	color: @bx-font-color-menu-slide;
+}
+.bx-popup-wrapper.bx-popup-slide-wrapper li a:hover {
+	color: @bx-font-color-menu-slide-hover;
+}
+.bx-popup-wrapper.bx-popup-slide-wrapper li.bx-menu-tab-active a,
+.bx-popup-wrapper.bx-popup-slide-wrapper li.bx-menu-inter-act {
+	color: @bx-font-color-menu-slide-active;
+}
+
+/* main menu */
+#bx-sliding-menu-sys_site.bx-sliding-menu-main,
+#bx-sliding-menu-sys_add_content.bx-sliding-menu-main {
+	-webkit-box-shadow: @bx-shadow-menu-main;
+	-moz-box-shadow: @bx-shadow-menu-main;
+	box-shadow: @bx-shadow-menu-main;
+
+	border-width: @bx-border-width-menu-main;
+	border-style: solid;
+	border-color: @bx-color-border-menu-main;
+
+	background-color: @bx-color-menu-main;
+
+	background-image: @bx-image-bg-menu-main;
+	background-repeat: @bx-image-bg-menu-main-repeat;
+    background-size: @bx-image-bg-menu-main-size;
+}
+#bx-sliding-menu-sys_site.bx-sliding-menu-main .bx-sliding-menu-main-cnt,
+#bx-sliding-menu-sys_add_content.bx-sliding-menu-main .bx-sliding-menu-main-cnt {
+	padding: @bx-content-padding-menu-main;
+}
+#bx-sliding-menu-sys_site.bx-sliding-menu-main .bx-sliding-menu-main-cnt li a,
+#bx-sliding-menu-sys_add_content.bx-sliding-menu-main .bx-sliding-menu-main-cnt li a {
+	text-shadow: @bx-shadow-font-menu-main;
+
+	font-family: @bx-font-family-menu-main;
+	font-size: @bx-font-size-menu-main;
+	font-weight: @bx-font-weight-menu-main;
+	color: @bx-font-color-menu-main;
+}
+#bx-sliding-menu-sys_site.bx-sliding-menu-main .bx-sliding-menu-main-cnt li.bx-menu-tab-active a,
+#bx-sliding-menu-sys_add_content.bx-sliding-menu-main .bx-sliding-menu-main-cnt li.bx-menu-tab-active a {
+	color: @bx-font-color-menu-main-active;
+}
+#bx-sliding-menu-sys_site.bx-sliding-menu-main .bx-sliding-menu-main-cnt li a:hover,
+#bx-sliding-menu-sys_add_content.bx-sliding-menu-main .bx-sliding-menu-main-cnt li a:hover {
+	color: @bx-font-color-menu-main-hover;
+}
+
+/* account menu */
+#bx-sliding-menu-account.bx-sliding-menu-main {
+    -webkit-box-shadow: @bx-shadow-menu-account;
+    -moz-box-shadow: @bx-shadow-menu-account;
+    box-shadow: @bx-shadow-menu-account;
+
+    border-width: @bx-border-width-menu-account;
+    border-style: solid;
+    border-color: @bx-color-border-menu-account;
+
+    background-color: @bx-color-menu-account;
+
+    background-image: @bx-image-bg-menu-account;
+    background-repeat: @bx-image-bg-menu-account-repeat;
+    background-size: @bx-image-bg-menu-account-size;
+}
+#bx-sliding-menu-account.bx-sliding-menu-main .bx-sliding-menu-main-cnt {
+    padding: @bx-content-padding-menu-account;
+}
+#bx-sliding-menu-account.bx-sliding-menu-main .bx-menu-account-popup li a {
+    text-shadow: @bx-shadow-font-menu-account;
+
+    font-family: @bx-font-family-menu-account;
+    font-size: @bx-font-size-menu-account;
+    font-weight: @bx-font-weight-menu-account;
+    color: @bx-font-color-menu-account;
+}
+#bx-sliding-menu-account.bx-sliding-menu-main .bx-menu-account-popup li.bx-menu-tab-active a {
+    color: @bx-font-color-menu-account-active;
+}
+#bx-sliding-menu-account.bx-sliding-menu-main .bx-menu-account-popup li a:hover {
+    color: @bx-font-color-menu-account-hover;
+}
+
+/* page menu */
+.bx-menu-main-bar-wrapper {
+	-webkit-box-shadow: @bx-shadow-menu-page;
+	-moz-box-shadow: @bx-shadow-menu-page;
+	box-shadow: @bx-shadow-menu-page;
+
+	border-width: @bx-border-width-menu-page;
+	border-style: solid;
+	border-color: @bx-color-border-menu-page;
+
+	background-color: @bx-color-menu-page;
+
+	background-image: @bx-image-bg-menu-page;
+	background-repeat: @bx-image-bg-menu-page-repeat;
+    background-size: @bx-image-bg-menu-page-size;
+}
+.bx-menu-main-bar-wrapper .bx-menu-main-submenu {
+	padding: @bx-content-padding-menu-page;
+}
+.bx-menu-main-bar-wrapper .bx-menu-main-submenu li a {
+	text-shadow: @bx-shadow-font-menu-page;
+
+	font-family: @bx-font-family-menu-page;
+	font-size: @bx-font-size-menu-page;
+	font-weight: @bx-font-weight-menu-page;
+	color: @bx-font-color-menu-page;
+}
+.bx-menu-main-bar-wrapper .bx-menu-main-submenu li a:hover {
+	color: @bx-font-color-menu-page-hover;
+}
+.bx-menu-main-bar-wrapper .bx-menu-main-submenu li.bx-menu-tab-active a {
+	color: @bx-font-color-menu-page-active;
+}
+
+/* form */
+.bx-form-value .bx-form-input-slider,
+.bx-form-value .bx-form-input-doublerange,
+.bx-form-value .bx-form-input-select_multiple,
+.bx-form-value .bx-form-input-select,
+.bx-form-value .bx-form-input-radio_set,
+.bx-form-value .bx-form-input-checkbox_set,
+.bx-form-value .bx-form-input-number,
+.bx-form-value .bx-form-input-datepicker,
+.bx-form-value .bx-form-input-datetime,
+.bx-form-value .bx-form-input-textarea,
+.bx-form-value .bx-form-input-password,
+.bx-form-value .bx-form-input-text {
+	border-color: @bx-color-border-form-input;
+	border-width: @bx-border-width-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;
+}
+.bx-form-value .bx-form-input-slider,
+.bx-form-value .bx-form-input-doublerange,
+.bx-form-value .bx-form-input-select,
+.bx-form-value .bx-form-input-number,
+.bx-form-value .bx-form-input-datepicker,
+.bx-form-value .bx-form-input-datetime,
+.bx-form-value .bx-form-input-password,
+.bx-form-value .bx-form-input-text {
+	height: @bx-height-form-input;
+}
+.bx-form-value .bx-form-input-text.bx-form-input-autotoken b {
+    line-height: @bx-height-form-input;
+}
+.bx-form-value .bx-form-input-slider:focus,
+.bx-form-value .bx-form-input-doublerange:focus,
+.bx-form-value .bx-form-input-number:focus,
+.bx-form-value .bx-form-input-datepicker:focus,
+.bx-form-value .bx-form-input-datetime:focus,
+.bx-form-value .bx-form-input-textarea:focus,
+.bx-form-value .bx-form-input-password:focus,
+.bx-form-value .bx-form-input-text:focus {
+	border-color: @bx-color-border-form-input-active;
+	background-color: @bx-color-form-input-active;
+}
+.bx-form-value .bx-switcher-cont {
+	border-color: @bx-color-border-form-input;
+	border-width: @bx-border-width-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;
+}
+
+/* button large */
+.bx-btn,
+.bx-btn.bx-btn-primary {
+	.box-sizing(content-box);
+
+	height: @bx-height-button;
+	line-height: @bx-height-button;
+
+	.background-color (@bx-color-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;
+
+	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 {
+	height: @bx-height-button;
+	line-height: @bx-height-button;
+}
+.bx-btn-border {
+	border-width: @bx-border-width-button;
+	border-style: solid;
+	border-color: transparent;
+}
+.bx-btn:hover,
+.bx-btn:active,
+.bx-btn.bx-btn-primary:hover,
+.bx-btn.bx-btn-primary:active {
+	border-width: @bx-border-width-button;
+	border-style: solid;
+	border-color: @bx-color-border-button-hover;
+
+	.background-color (@bx-color-button-hover);
+
+	color: @bx-font-color-button-hover;
+}
+.bx-btn .sys-icon {
+	color: @bx-font-color-button;
+}
+.bx-btn:hover .sys-icon,
+.bx-btn:active .sys-icon,
+.bx-btn.bx-btn-primary:hover .sys-icon,
+.bx-btn.bx-btn-primary:active .sys-icon {
+	color: @bx-font-color-button-hover;
+}
+
+/* button small */
+.bx-btn.bx-btn-small {
+	.box-sizing(content-box);
+
+	height: @bx-height-button-small;
+	line-height: @bx-height-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-radius: @bx-border-radius-button-small;
+	background-clip: padding-box;
+
+	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;
+}
+.bx-btn-small-height {
+	height: @bx-height-button-small;
+	line-height: @bx-height-button-small;
+}
+.bx-btn-small-border {
+	border-width: @bx-border-width-button-small;
+	border-style: solid;
+	border-color: transparent;
+}
+.bx-btn.bx-btn-small:hover,
+.bx-btn.bx-btn-small:active {
+	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);
+
+	color: @bx-font-color-button-small-hover;
+}
+.bx-btn.bx-btn-small .sys-icon {
+	color: @bx-font-color-button-small;
+}
+.bx-btn.bx-btn-small:hover .sys-icon,
+.bx-btn.bx-btn-small:active .sys-icon {
+	color: @bx-font-color-button-small-hover;
+}

+ 3 - 0
modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/designbox_10.html

@@ -0,0 +1,3 @@
+<!-- Design Box 10 [start]: Content only + padding -->
+<div class="bx-db-content bx-content-padding-block bx-clearfix">__designbox_content__</div>
+<!-- Design Box 10 [ end ] -->

+ 7 - 0
modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/designbox_11.html

@@ -0,0 +1,7 @@
+<!-- Design Box 11 [start]: Content + title + background + padding -->
+<div class="bx-db-container bx-def-image-bg-block bx-def-color-bg-block bx-def-border-block bx-shadow-block">
+    <div class="bx-db-header"><div class="bx-db-title bx-def-font-h2">__title__</div>__caption_item__<div class="bx-clear"></div></div>
+    <div class="bx-db-divider bx-def-hr"></div>
+    <div class="bx-db-content bx-content-padding-block bx-clearfix">__designbox_content__</div>
+</div>
+<!-- Design Box 11 [ end ] -->

+ 7 - 0
modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/designbox_13.html

@@ -0,0 +1,7 @@
+<!-- Design Box 13 [start]: Content + background + padding -->
+<div class="bx-db-container bx-def-image-bg-block bx-def-color-bg-block bx-def-border-block bx-shadow-block">
+    <div class="bx-db-content bx-content-padding-block bx-clearfix">
+            __designbox_content__
+    </div>
+</div>
+<!-- Design Box 13 [ end ] -->

+ 7 - 0
modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/designbox_14.html

@@ -0,0 +1,7 @@
+<!-- Design Box 14 [start]: Content + title + padding -->
+<div class="bx-db-container bx-dbc-nobg bx-def-border-block bx-shadow-block">
+    <div class="bx-db-header"><div class="bx-db-title bx-def-font-h2">__title__</div>__caption_item__<div class="bx-clear"></div></div>
+    <div class="bx-db-divider bx-def-hr"></div>
+    <div class="bx-db-content bx-content-padding-block bx-clearfix">__designbox_content__</div>
+</div>
+<!-- Design Box 14 [ end ] -->

+ 451 - 0
modules/boonex/protean/updates/9.0.4_9.0.5/source/data/template/system/scripts/BxTemplConfig.php

@@ -0,0 +1,451 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaTemplate UNA Template Classes
+ * @{
+ */
+
+class BxTemplConfig extends BxBaseConfig
+{
+	protected $_isModule;
+	
+    function __construct()
+    {
+        parent::__construct();
+
+        $sName = 'bx_protean';
+        $this->_isModule = BxDolModuleQuery::getInstance()->isModuleByName($sName);
+
+
+        //--- Images
+        $oStorage = BxDolStorage::getObjectInstance('sys_images_custom');
+
+        $this->_aConfig['aLessConfig']['bx-image-bg-header'] = $this->_setBgUrl($sName . '_header_bg_image', $oStorage);
+        $this->_aConfig['aLessConfig']['bx-image-bg-header-repeat'] = $this->_setBgRepeat($sName . '_header_bg_image_repeat', 'no-repeat');
+        $this->_aConfig['aLessConfig']['bx-image-bg-header-size'] = $this->_setBgSize($sName . '_header_bg_image_size', 'cover');
+        $this->_aConfig['aLessConfig']['bx-image-bg-footer'] = $this->_setBgUrl($sName . '_footer_bg_image', $oStorage);
+        $this->_aConfig['aLessConfig']['bx-image-bg-footer-repeat'] = $this->_setBgRepeat($sName . '_footer_bg_image_repeat', 'no-repeat');
+        $this->_aConfig['aLessConfig']['bx-image-bg-footer-size'] = $this->_setBgSize($sName . '_footer_bg_image_size', 'cover');
+        $this->_aConfig['aLessConfig']['bx-image-bg-page'] = $this->_setBgUrl($sName . '_body_bg_image', $oStorage);
+        $this->_aConfig['aLessConfig']['bx-image-bg-page-repeat'] = $this->_setBgRepeat($sName . '_body_bg_image_repeat', 'no-repeat');
+        $this->_aConfig['aLessConfig']['bx-image-bg-page-size'] = $this->_setBgSize($sName . '_body_bg_image_size', 'cover');
+        $this->_aConfig['aLessConfig']['bx-image-bg-block'] = $this->_setBgUrl($sName . '_block_bg_image', $oStorage);
+        $this->_aConfig['aLessConfig']['bx-image-bg-block-repeat'] = $this->_setBgRepeat($sName . '_block_bg_image_repeat', 'no-repeat');
+        $this->_aConfig['aLessConfig']['bx-image-bg-block-size'] = $this->_setBgSize($sName . '_block_bg_image_size', 'cover');
+        $this->_aConfig['aLessConfig']['bx-image-bg-box'] = $this->_setBgUrl($sName . '_card_bg_image', $oStorage);
+        $this->_aConfig['aLessConfig']['bx-image-bg-box-repeat'] = $this->_setBgRepeat($sName . '_card_bg_image_repeat', 'no-repeat');
+        $this->_aConfig['aLessConfig']['bx-image-bg-box-size'] = $this->_setBgSize($sName . '_card_bg_image_size', 'cover');
+        $this->_aConfig['aLessConfig']['bx-image-bg-popup'] = $this->_setBgUrl($sName . '_popup_bg_image', $oStorage);
+        $this->_aConfig['aLessConfig']['bx-image-bg-popup-repeat'] = $this->_setBgRepeat($sName . '_popup_bg_image_repeat', 'no-repeat');
+        $this->_aConfig['aLessConfig']['bx-image-bg-popup-size'] = $this->_setBgSize($sName . '_popup_bg_image_size', 'cover');
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-main'] = $this->_setBgUrl($sName . '_menu_main_bg_image', $oStorage);
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-main-repeat'] = $this->_setBgRepeat($sName . '_menu_main_bg_image_repeat', 'no-repeat');
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-main-size'] = $this->_setBgSize($sName . '_menu_main_bg_image_size', 'cover');
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-account'] = $this->_setBgUrl($sName . '_menu_account_bg_image', $oStorage);
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-account-repeat'] = $this->_setBgRepeat($sName . '_menu_account_bg_image_repeat', 'no-repeat');
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-account-size'] = $this->_setBgSize($sName . '_menu_account_bg_image_size', 'cover');
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-page'] = $this->_setBgUrl($sName . '_menu_page_bg_image', $oStorage);
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-page-repeat'] = $this->_setBgRepeat($sName . '_menu_page_bg_image_repeat', 'no-repeat');
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-page-size'] = $this->_setBgSize($sName . '_menu_page_bg_image_size', 'cover');
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-slide'] = $this->_setBgUrl($sName . '_menu_slide_bg_image', $oStorage);
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-slide-repeat'] = $this->_setBgRepeat($sName . '_menu_slide_bg_image_repeat', 'no-repeat');
+        $this->_aConfig['aLessConfig']['bx-image-bg-menu-slide-size'] = $this->_setBgSize($sName . '_menu_slide_bg_image_size', 'cover');
+        
+
+        //--- Shadow
+        $this->_aConfig['aLessConfig']['bx-shadow-header'] = $this->_setShadow($sName . '_header_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-footer'] = $this->_setShadow($sName . '_footer_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-cover'] = $this->_setShadow($sName . '_cover_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-cover-icon'] = $this->_setShadow($sName . '_cover_icon_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-block'] = $this->_setShadow($sName . '_block_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-card'] = $this->_setShadow($sName . '_card_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-popup'] = $this->_setShadow($sName . '_popup_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-menu-main'] = $this->_setShadow($sName . '_menu_main_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-menu-account'] = $this->_setShadow($sName . '_menu_account_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-menu-page'] = $this->_setShadow($sName . '_menu_page_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-menu-slide'] = $this->_setShadow($sName . '_menu_slide_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-form-input'] = $this->_setShadow($sName . '_form_input_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-button'] = $this->_setShadow($sName . '_button_lg_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-button-small'] = $this->_setShadow($sName . '_button_sm_shadow');
+
+        $this->_aConfig['aLessConfig']['bx-shadow-text-cover'] = $this->_setShadowFont($sName . '_cover_text_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-font-menu-main'] = $this->_setShadowFont($sName . '_menu_main_font_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-font-menu-account'] = $this->_setShadowFont($sName . '_menu_account_font_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-font-menu-page'] = $this->_setShadowFont($sName . '_menu_page_font_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-font-menu-slide'] = $this->_setShadowFont($sName . '_menu_slide_font_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-font-button'] = $this->_setShadowFont($sName . '_button_lg_font_shadow');
+        $this->_aConfig['aLessConfig']['bx-shadow-font-button-small'] = $this->_setShadowFont($sName . '_button_sm_font_shadow');
+
+        //--- Height
+        $this->_aConfig['aLessConfig']['bx-height-header'] = $this->_setSize($sName . '_header_height', '3rem');
+        $this->_aConfig['aLessConfig']['bx-height-cover'] = $this->_setSize($sName . '_cover_height', '40vh');
+        $this->_aConfig['aLessConfig']['bx-height-block-title-div'] = $this->_setSize($sName . '_block_title_div_height', '1px');
+        $this->_aConfig['aLessConfig']['bx-height-form-input'] = $this->_setSize($sName . '_form_input_height', '2.2rem');
+		$this->_aConfig['aLessConfig']['bx-height-button'] = $this->_setSize($sName . '_button_lg_height', '2.25rem');
+		$this->_aConfig['aLessConfig']['bx-height-button-small'] = $this->_setSize($sName . '_button_sm_height', '1.5rem');
+		
+
+        //--- Title/Content Margins
+        $this->_aConfig['aLessConfig']['bx-content-padding-header'] = $this->_setMargin($sName . '_header_content_padding');
+        $this->_aConfig['aLessConfig']['bx-content-padding-footer'] = $this->_setMargin($sName . '_footer_content_padding');
+        $this->_aConfig['aLessConfig']['bx-content-padding-cover'] = $this->_setMargin($sName . '_cover_content_padding');
+        $this->_aConfig['aLessConfig']['bx-content-padding-block'] = $this->_setMargin($sName . '_block_content_padding');
+        $this->_aConfig['aLessConfig']['bx-content-padding-card'] = $this->_setMargin($sName . '_card_content_padding');
+        $this->_aConfig['aLessConfig']['bx-content-padding-popup'] = $this->_setMargin($sName . '_popup_content_padding');
+        $this->_aConfig['aLessConfig']['bx-content-padding-menu-main'] = $this->_setMargin($sName . '_menu_main_content_padding');
+        $this->_aConfig['aLessConfig']['bx-content-padding-menu-account'] = $this->_setMargin($sName . '_menu_account_content_padding');
+        $this->_aConfig['aLessConfig']['bx-content-padding-menu-page'] = $this->_setMargin($sName . '_menu_page_content_padding');
+        $this->_aConfig['aLessConfig']['bx-content-padding-menu-slide'] = $this->_setMargin($sName . '_menu_slide_content_padding');
+
+		$this->_aConfig['aLessConfig']['bx-title-padding-block'] = $this->_setMargin($sName . '_block_title_padding');
+		$this->_aConfig['aLessConfig']['bx-title-padding-popup'] = $this->_setMargin($sName . '_popup_title_padding');
+
+
+        //--- Colors
+		if($this->_isModule) {
+	        $this->_aConfig['aLessConfig']['bx-color-hl'] = $this->_setColorRgba($sName . '_general_item_bg_color_hover', 'rgba(196, 248, 156, 0.2)');
+			$this->_aConfig['aLessConfig']['bx-color-active'] = $this->_setColorRgba($sName . '_general_item_bg_color_active', 'rgba(196, 248, 156, 0.4)');
+		}
+
+        $this->_aConfig['aLessConfig']['bx-color-header'] = $this->_setColorRgba($sName . '_header_bg_color', 'rgba(59, 134, 134, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-footer'] = $this->_setColorRgba($sName . '_footer_bg_color', 'rgba(255, 255, 255, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-page'] = $this->_setColorRgb($sName . '_body_bg_color', 'rgb(255, 255, 255)');
+        $this->_aConfig['aLessConfig']['bx-color-cover'] = $this->_setColorRgba($sName . '_cover_bg_color', 'rgba(255, 255, 255, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-block'] = $this->_setColorRgba($sName . '_block_bg_color', 'rgba(255, 255, 255, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-block-title'] = $this->_setColorRgba($sName . '_block_title_bg_color', 'rgba(255, 255, 255, 1.0)');
+        $this->_aConfig['aLessConfig']['bx-color-block-title-div'] = $this->_setColorRgba($sName . '_block_title_div_bg_color', 'rgba(208, 208, 208, 1)');        
+        $this->_aConfig['aLessConfig']['bx-color-box'] = $this->_setColorRgba($sName . '_card_bg_color', 'rgba(242, 242, 242, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-popup'] = $this->_setColorRgba($sName . '_popup_bg_color', 'rgba(255, 255, 255, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-popup-title'] = $this->_setColorRgba($sName . '_popup_title_bg_color', 'rgba(40, 60, 80, 0.9)');
+        $this->_aConfig['aLessConfig']['bx-color-menu-main'] = $this->_setColorRgba($sName . '_menu_main_bg_color', 'rgba(255, 255, 255, 0.9)');
+        $this->_aConfig['aLessConfig']['bx-color-menu-account'] = $this->_setColorRgba($sName . '_menu_account_bg_color', 'rgba(255, 255, 255, 0.9)');
+        $this->_aConfig['aLessConfig']['bx-color-menu-page'] = $this->_setColorRgba($sName . '_menu_page_bg_color', 'rgba(242, 242, 242, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-menu-slide'] = $this->_setColorRgba($sName . '_menu_slide_bg_color', 'rgba(255, 255, 255, 0.9)');
+		$this->_aConfig['aLessConfig']['bx-color-form-input'] = $this->_setColorRgba($sName . '_form_input_bg_color', 'rgba(255, 255, 255, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-form-input-active'] = $this->_setColorRgba($sName . '_form_input_bg_color_active', 'rgba(255, 255, 255, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-button'] = $this->_setColorRgba($sName . '_button_lg_bg_color', 'rgba(108, 170, 138, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-button-hover'] = $this->_setColorRgba($sName . '_button_lg_bg_color_hover', 'rgba(58, 134, 134, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-button-small'] = $this->_setColorRgba($sName . '_button_sm_bg_color', 'rgba(108, 170, 138, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-button-small-hover'] = $this->_setColorRgba($sName . '_button_sm_bg_color_hover', 'rgba(58, 134, 134, 1)');
+
+		$this->_aConfig['aLessConfig']['bx-color-font-cover'] = $this->_setColorRgba($sName . '_cover_font_color', 'rgba(255, 255, 255, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-font-block-title'] = $this->_setColorRgba($sName . '_block_title_font_color', 'rgba(0, 0, 20, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-font-popup-title'] = $this->_setColorRgba($sName . '_popup_title_font_color', 'rgba(255, 255, 255, 1.0)');
+
+        $sDefColBorder = 'rgba(208, 208, 208, 1)';
+        $this->_aConfig['aLessConfig']['bx-color-border-header'] = $this->_setColorRgba($sName . '_header_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-footer'] = $this->_setColorRgba($sName . '_footer_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-cover'] = $this->_setColorRgba($sName . '_cover_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-cover-icon'] = $this->_setColorRgba($sName . '_cover_icon_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-block'] = $this->_setColorRgba($sName . '_block_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-block-title'] = $this->_setColorRgba($sName . '_block_title_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-box'] = $this->_setColorRgba($sName . '_card_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-popup'] = $this->_setColorRgba($sName . '_popup_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-menu-main'] = $this->_setColorRgba($sName . '_menu_main_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-menu-account'] = $this->_setColorRgba($sName . '_menu_account_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-menu-page'] = $this->_setColorRgba($sName . '_menu_page_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-menu-slide'] = $this->_setColorRgba($sName . '_menu_slide_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-form-input'] = $this->_setColorRgba($sName . '_form_input_border_color', 'rgba(121, 189, 154, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-border-form-input-active'] = $this->_setColorRgba($sName . '_form_input_border_color_active', 'rgba(108, 170, 138, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-border-button'] = $this->_setColorRgba($sName . '_button_lg_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-button-hover'] = $this->_setColorRgba($sName . '_button_lg_border_color_hover', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-button-small'] = $this->_setColorRgba($sName . '_button_sm_border_color', $sDefColBorder);
+        $this->_aConfig['aLessConfig']['bx-color-border-button-small-hover'] = $this->_setColorRgba($sName . '_button_sm_border_color_hover', $sDefColBorder);
+
+		$this->_aConfig['aLessConfig']['bx-color-icon-header'] = $this->_setColorRgba($sName . '_header_icon_color', 'rgba(255, 255, 255, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-icon-header-hover'] = $this->_setColorRgba($sName . '_header_icon_color_hover', 'rgba(255, 255, 255, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-icon-footer'] = $this->_setColorRgba($sName . '_footer_icon_color', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-icon-footer-hover'] = $this->_setColorRgba($sName . '_footer_icon_color_hover', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-icon-body'] = $this->_setColorRgba($sName . '_body_icon_color', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-icon-body-hover'] = $this->_setColorRgba($sName . '_body_icon_color_hover', 'rgba(62, 134, 133, 1)');
+
+		$this->_aConfig['aLessConfig']['bx-color-link-header'] = $this->_setColorRgba($sName . '_header_link_color', 'rgba(255, 255, 255, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-link-header-hover'] = $this->_setColorRgba($sName . '_header_link_color_hover', 'rgba(255, 255, 255, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-link-footer'] = $this->_setColorRgba($sName . '_footer_link_color', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-link-footer-hover'] = $this->_setColorRgba($sName . '_footer_link_color_hover', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-link-body'] = $this->_setColorRgba($sName . '_body_link_color', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-color-link-body-hover'] = $this->_setColorRgba($sName . '_body_link_color_hover', 'rgba(62, 134, 133, 1)');
+
+        //--- Borders
+        $this->_aConfig['aLessConfig']['bx-border-width-header'] = $this->_setSize($sName . '_header_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-footer'] = $this->_setSize($sName . '_footer_border_size', '1px');
+        $this->_aConfig['aLessConfig']['bx-border-width-cover'] = $this->_setSize($sName . '_cover_border_size', '0px');
+        $this->_aConfig['aLessConfig']['bx-border-width-cover-icon'] = $this->_setSize($sName . '_cover_icon_border_size', '1px');
+        $this->_aConfig['aLessConfig']['bx-border-width-block'] = $this->_setSize($sName . '_block_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-block-title'] = $this->_setSize($sName . '_block_title_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-box'] = $this->_setSize($sName . '_card_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-popup'] = $this->_setSize($sName . '_popup_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-menu-main'] = $this->_setSize($sName . '_menu_main_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-menu-account'] = $this->_setSize($sName . '_menu_account_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-menu-page'] = $this->_setSize($sName . '_menu_page_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-menu-slide'] = $this->_setSize($sName . '_menu_slide_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-form-input'] = $this->_setSize($sName . '_form_input_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-button'] = $this->_setSize($sName . '_button_lg_border_size');
+        $this->_aConfig['aLessConfig']['bx-border-width-button-small'] = $this->_setSize($sName . '_button_sm_border_size');
+
+        $this->_aConfig['aLessConfig']['bx-border-radius-block'] = $this->_setSize($sName . '_block_border_radius');
+        $this->_aConfig['aLessConfig']['bx-border-radius-cover'] = $this->_setSize($sName . '_cover_border_radius');
+        $this->_aConfig['aLessConfig']['bx-border-radius-cover-icon'] = $this->_setSize($sName . '_cover_icon_border_radius');
+        $this->_aConfig['aLessConfig']['bx-border-radius-block-title'] = $this->_setSize($sName . '_block_title_border_radius');
+        $this->_aConfig['aLessConfig']['bx-border-radius-box'] = $this->_setSize($sName . '_card_border_radius', '3px');
+        $this->_aConfig['aLessConfig']['bx-border-radius-popup'] = $this->_setSize($sName . '_popup_border_radius', '3px');
+        $this->_aConfig['aLessConfig']['bx-border-radius-button'] = $this->_setSize($sName . '_button_lg_border_radius');
+        $this->_aConfig['aLessConfig']['bx-border-radius-button-small'] = $this->_setSize($sName . '_button_sm_border_radius');
+
+        //--- Text
+        $this->_aConfig['aLessConfig']['bx-text-align-cover'] = $this->_setAlign($sName . '_cover_text_align');
+
+		//--- Default Fonts
+		if($this->_isModule) {
+	        $this->_aConfig['aLessConfig']['bx-font-family'] = $this->_setValue($sName . '_font_family', 'Helvetica, Arial, sans-serif');
+	        $this->_aConfig['aLessConfig']['bx-font-size-default'] = $this->_setSize($sName . '_font_size_default', '18px');
+	        $this->_aConfig['aLessConfig']['bx-font-size-small'] = $this->_setSize($sName . '_font_size_small', '14px');
+	        $this->_aConfig['aLessConfig']['bx-font-size-middle'] = $this->_setSize($sName . '_font_size_middle', '16px');
+	        $this->_aConfig['aLessConfig']['bx-font-size-large'] = $this->_setSize($sName . '_font_size_large', '22px');
+	        $this->_aConfig['aLessConfig']['bx-font-size-h1'] = $this->_setSize($sName . '_font_size_h1', '38px');
+	        $this->_aConfig['aLessConfig']['bx-font-size-h2'] = $this->_setSize($sName . '_font_size_h2', '24px');
+	        $this->_aConfig['aLessConfig']['bx-font-size-h3'] = $this->_setSize($sName . '_font_size_h3', '18px');
+
+	        $this->_aConfig['aLessConfig']['bx-font-color-default'] = $this->_setColorRgba($sName . '_font_color_default', 'rgba(51, 51, 51, 1)');
+	        $this->_aConfig['aLessConfig']['bx-font-color-grayed'] = $this->_setColorRgba($sName . '_font_color_grayed', 'rgba(153, 153, 153, 1)');
+	        $this->_aConfig['aLessConfig']['bx-font-color-contrasted'] = $this->_setColorRgba($sName . '_font_color_contrasted', 'rgba(255, 255, 255, 1)');
+		}
+
+		//--- Font Family
+		$this->_aConfig['aLessConfig']['bx-font-family-cover'] = $this->_setValue($sName . '_cover_font_family');
+		$this->_aConfig['aLessConfig']['bx-font-family-block-title'] = $this->_setValue($sName . '_block_title_font_family');
+		$this->_aConfig['aLessConfig']['bx-font-family-popup-title'] = $this->_setValue($sName . '_popup_title_font_family');
+		$this->_aConfig['aLessConfig']['bx-font-family-form-input'] = $this->_setValue($sName . '_form_input_font_family');
+		$this->_aConfig['aLessConfig']['bx-font-family-menu-main'] = $this->_setValue($sName . '_menu_main_font_family');
+		$this->_aConfig['aLessConfig']['bx-font-family-menu-account'] = $this->_setValue($sName . '_menu_account_font_family');
+		$this->_aConfig['aLessConfig']['bx-font-family-menu-page'] = $this->_setValue($sName . '_menu_page_font_family');
+		$this->_aConfig['aLessConfig']['bx-font-family-menu-slide'] = $this->_setValue($sName . '_menu_slide_font_family');
+		$this->_aConfig['aLessConfig']['bx-font-family-button'] = $this->_setValue($sName . '_button_lg_font_family');
+		$this->_aConfig['aLessConfig']['bx-font-family-button-small'] = $this->_setValue($sName . '_button_sm_font_family');
+
+		//--- Font Size
+		$this->_aConfig['aLessConfig']['bx-font-size-cover'] = $this->_setSize($sName . '_cover_font_size', '2.0rem');
+		$this->_aConfig['aLessConfig']['bx-font-size-block-title'] = $this->_setSize($sName . '_block_title_font_size', '1.5rem');
+		$this->_aConfig['aLessConfig']['bx-font-size-popup-title'] = $this->_setSize($sName . '_popup_title_font_size', '1.5rem');
+		$this->_aConfig['aLessConfig']['bx-font-size-form-input'] = $this->_setSize($sName . '_form_input_font_size', '1.125rem');
+		$this->_aConfig['aLessConfig']['bx-font-size-menu-main'] = $this->_setSize($sName . '_menu_main_font_size', '1.125rem');
+		$this->_aConfig['aLessConfig']['bx-font-size-menu-account'] = $this->_setSize($sName . '_menu_account_font_size', '1.125rem');
+		$this->_aConfig['aLessConfig']['bx-font-size-menu-page'] = $this->_setSize($sName . '_menu_page_font_size', '1.2rem');
+		$this->_aConfig['aLessConfig']['bx-font-size-menu-slide'] = $this->_setSize($sName . '_menu_slide_font_size', '1.0rem');
+		$this->_aConfig['aLessConfig']['bx-font-size-button'] = $this->_setSize($sName . '_button_lg_font_size', '1rem');
+		$this->_aConfig['aLessConfig']['bx-font-size-button-small'] = $this->_setSize($sName . '_button_sm_font_size', '0.9rem');
+
+		//--- Font Color
+		$sColFontDef = 'rgba(51, 51, 51, 1.0)';		//--- Default
+		$sColFontGrd = 'rgba(153, 153, 153, 1)';	//--- Grayed
+		$sColFontCnt = 'rgba(255, 255, 255, 1)';	//--- Contrasted
+		$sColFontLnk = 'rgba(62, 134, 133, 1)';		//--- Link
+		$sColFontLnkHov = 'rgba(62, 134, 133, 1)';	//--- Link on-hiver
+		$this->_aConfig['aLessConfig']['bx-font-color-footer'] = $this->_setColorRgba($sName . '_footer_font_color', $sColFontDef);
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-main'] = $this->_setColorRgba($sName . '_menu_main_font_color', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-main-hover'] = $this->_setColorRgba($sName . '_menu_main_font_color_hover', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-main-active'] = $this->_setColorRgba($sName . '_menu_main_font_color_active', 'rgba(0, 0, 0, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-account'] = $this->_setColorRgba($sName . '_menu_account_font_color', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-account-hover'] = $this->_setColorRgba($sName . '_menu_account_font_color_hover', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-account-active'] = $this->_setColorRgba($sName . '_menu_account_font_color_active', 'rgba(0, 0, 0, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-page'] = $this->_setColorRgba($sName . '_menu_page_font_color', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-page-hover'] = $this->_setColorRgba($sName . '_menu_page_font_color_hover', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-page-active'] = $this->_setColorRgba($sName . '_menu_page_font_color_active', 'rgba(0, 0, 0, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-slide'] = $this->_setColorRgba($sName . '_menu_slide_font_color', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-slide-hover'] = $this->_setColorRgba($sName . '_menu_slide_font_color_hover', 'rgba(62, 134, 133, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-menu-slide-active'] = $this->_setColorRgba($sName . '_menu_slide_font_color_active', 'rgba(0, 0, 0, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-button'] = $this->_setColorRgba($sName . '_button_lg_font_color', 'rgba(255, 255, 255, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-button-hover'] = $this->_setColorRgba($sName . '_button_lg_font_color_hover', 'rgba(255, 255, 255, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-button-small'] = $this->_setColorRgba($sName . '_button_sm_font_color', 'rgba(255, 255, 255, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-button-small-hover'] = $this->_setColorRgba($sName . '_button_sm_font_color_hover', 'rgba(255, 255, 255, 1)');
+		$this->_aConfig['aLessConfig']['bx-font-color-form-input'] = $this->_setColorRgba($sName . '_form_input_font_color', $sColFontDef);
+		$this->_aConfig['aLessConfig']['bx-font-color-default-h1'] = $this->_setColorRgba($sName . '_font_color_default_h1', $sColFontDef);
+        $this->_aConfig['aLessConfig']['bx-font-color-grayed-h1'] = $this->_setColorRgba($sName . '_font_color_grayed_h1', $sColFontGrd);
+        $this->_aConfig['aLessConfig']['bx-font-color-contrasted-h1'] = $this->_setColorRgba($sName . '_font_color_contrasted_h1', $sColFontCnt);
+        $this->_aConfig['aLessConfig']['bx-font-color-link-h1'] = $this->_setColorRgba($sName . '_font_color_link_h1', $sColFontLnk);
+        $this->_aConfig['aLessConfig']['bx-font-color-link-h1-hover'] = $this->_setColorRgba($sName . '_font_color_link_h1_hover', $sColFontLnkHov);
+        $this->_aConfig['aLessConfig']['bx-font-color-default-h2'] = $this->_setColorRgba($sName . '_font_color_default_h2', $sColFontDef);
+        $this->_aConfig['aLessConfig']['bx-font-color-grayed-h2'] = $this->_setColorRgba($sName . '_font_color_grayed_h2', $sColFontGrd);
+        $this->_aConfig['aLessConfig']['bx-font-color-contrasted-h2'] = $this->_setColorRgba($sName . '_font_color_contrasted_h2', $sColFontCnt);
+        $this->_aConfig['aLessConfig']['bx-font-color-link-h2'] = $this->_setColorRgba($sName . '_font_color_link_h2', $sColFontLnk);
+        $this->_aConfig['aLessConfig']['bx-font-color-link-h2-hover'] = $this->_setColorRgba($sName . '_font_color_link_h2_hover', $sColFontLnkHov);
+        $this->_aConfig['aLessConfig']['bx-font-color-default-h3'] = $this->_setColorRgba($sName . '_font_color_default_h3', $sColFontDef);
+        $this->_aConfig['aLessConfig']['bx-font-color-grayed-h3'] = $this->_setColorRgba($sName . '_font_color_grayed_h3', $sColFontGrd);
+        $this->_aConfig['aLessConfig']['bx-font-color-contrasted-h3'] = $this->_setColorRgba($sName . '_font_color_contrasted_h3', $sColFontCnt);
+        $this->_aConfig['aLessConfig']['bx-font-color-link-h3'] = $this->_setColorRgba($sName . '_font_color_link_h3', $sColFontLnk);
+        $this->_aConfig['aLessConfig']['bx-font-color-link-h3-hover'] = $this->_setColorRgba($sName . '_font_color_link_h3_hover', $sColFontLnkHov);
+
+		//--- Font Weight
+		$this->_aConfig['aLessConfig']['bx-font-weight-cover'] = $this->_setValue($sName . '_cover_font_weight', '700');
+		$this->_aConfig['aLessConfig']['bx-font-weight-block-title'] = $this->_setValue($sName . '_block_title_font_weight', '500');
+		$this->_aConfig['aLessConfig']['bx-font-weight-menu-main'] = $this->_setValue($sName . '_menu_main_font_weight', '400');
+		$this->_aConfig['aLessConfig']['bx-font-weight-menu-account'] = $this->_setValue($sName . '_menu_account_font_weight', '400');
+		$this->_aConfig['aLessConfig']['bx-font-weight-menu-page'] = $this->_setValue($sName . '_menu_page_font_weight', '400');
+		$this->_aConfig['aLessConfig']['bx-font-weight-menu-slide'] = $this->_setValue($sName . '_menu_slide_font_weight', '400');
+		$this->_aConfig['aLessConfig']['bx-font-weight-button'] = $this->_setValue($sName . '_button_lg_font_weight', '400');
+		$this->_aConfig['aLessConfig']['bx-font-weight-button-small'] = $this->_setValue($sName . '_button_sm_font_weight', '400');
+		$this->_aConfig['aLessConfig']['bx-font-weight-h1'] = $this->_setValue($sName . '_font_weight_h1', '700');
+		$this->_aConfig['aLessConfig']['bx-font-weight-h2'] = $this->_setValue($sName . '_font_weight_h2', '700');
+		$this->_aConfig['aLessConfig']['bx-font-weight-h3'] = $this->_setValue($sName . '_font_weight_h3', '500');
+
+		//--- Viewport 
+		$this->_aConfig['aLessConfig']['bx-viewport-font-tablet'] = $this->_setValue($sName . '_vpt_font_size_scale', '100%');
+		$this->_aConfig['aLessConfig']['bx-viewport-font-mobile'] = $this->_setValue($sName . '_vpm_font_size_scale', '85%');
+
+		if($this->_isModule)
+        	$this->setPageWidth('bx_protean_page_width');
+    }
+
+    protected function _setValue($sKey, $sDefault = '')
+    {
+    	$sValue = trim(getParam($sKey));
+    	if(!$this->_isModule || empty($sValue))
+			$sValue = $sDefault;
+
+    	return $sValue;
+    }
+
+	protected function _setSize($sKey, $sDefault = '')
+    {
+    	if(empty($sDefault))
+    		$sDefault = '0px';
+
+    	$sPattern = "/([0-9\.]+\s*((px)|(rem)|(vh))){1}/";
+
+    	$sValue = trim(getParam($sKey));
+    	if(!$this->_isModule || empty($sValue) || !preg_match($sPattern, $sValue))
+    		$sValue = $sDefault;
+
+    	return $sValue;
+    }
+
+    protected function _setMargin($sKey, $sDefault = '')
+    {
+    	if(empty($sDefault))
+    		$sDefault = '0px';
+
+    	$sPattern = "/([0-9\.]+\s*((px)|(rem))\s*){1,4}/";
+
+    	$sValue = trim(getParam($sKey));
+    	if(!$this->_isModule || empty($sValue) || ($sValue != 'inherit' && !preg_match($sPattern, $sValue)))
+    		$sValue = $sDefault;
+
+    	return $sValue;
+    }
+
+	protected function _setColorRgb($sKey, $sDefault = '')
+    {
+    	if(empty($sDefault))
+    		$sDefault = 'rgb(51, 51, 51)';
+
+    	$sPattern = "/rgb\s*\(\s*[0-9]{1,3}\s*,\s*[0-9]{1,3}\s*,\s*[0-9]{1,3}\s*\)/";
+
+    	$sValue = trim(getParam($sKey));
+    	if(!$this->_isModule || empty($sValue) || !preg_match($sPattern, $sValue))
+    		$sValue = $sDefault;
+
+    	return $sValue;
+    }
+
+    protected function _setColorRgba($sKey, $sDefault = '')
+    {
+    	if(empty($sDefault))
+    		$sDefault = 'rgba(51, 51, 51, 1.0)';
+
+    	$sPattern = "/rgba?\s*\(\s*([0-9]{1,3}\s*,?\s*){3}\s*([0-9\.]+)?\s*\)/";
+
+    	$sValue = trim(getParam($sKey));
+    	if(!$this->_isModule || empty($sValue) || !preg_match($sPattern, $sValue))
+    		$sValue = $sDefault;
+
+    	return $sValue;
+    }
+
+    protected function _setBgUrl($sKey, $oStorage = null)
+    {
+    	if(empty($oStorage))
+    		$oStorage = BxDolStorage::getObjectInstance('sys_images_custom');
+
+		$iImageId = (int)getParam($sKey);
+		if(empty($iImageId))
+			return "none";
+
+		$sImageUrl = $oStorage->getFileUrlById($iImageId);
+		if(empty($sImageUrl))
+			return "none";
+
+		return "url('" . $sImageUrl . "')";
+    }
+
+    protected function _setBgRepeat($sKey, $sDefault = '')
+    {
+		if(empty($sDefault))
+    		$sDefault = 'repeat';
+
+    	$sValue = trim(getParam($sKey));
+    	if(!$this->_isModule || empty($sValue) || !in_array($sValue, array('no-repeat', 'repeat', 'repeat-x', 'repeat-y')))
+    		$sValue = $sDefault;
+
+		return $sValue;
+    }
+
+    protected function _setBgSize($sKey, $sDefault = '')
+    {
+		if(empty($sDefault))
+    		$sDefault = 'auto';
+
+    	$sValue = trim(getParam($sKey));
+    	if(!$this->_isModule || empty($sValue) || !in_array($sValue, array('auto', 'cover', 'contain')))
+    		$sValue = $sDefault;
+
+		return $sValue;
+    }
+
+    protected function _setShadow($sKey, $sDefault = '')
+    {
+    	if(empty($sDefault))
+    		$sDefault = '0px 1px 3px 0px rgba(0, 0, 0, 0.25)';
+
+    	$sPattern = "/(-?[0-9]+\s*px\s*){4}\s*rgba\s*\(\s*([0-9]{1,3}\s*,\s*){3}\s*[0-9\.]+\s*\)/";
+
+    	$sValue = trim(getParam($sKey));
+    	if(!$this->_isModule || empty($sValue) || $sValue == 'none')
+    		$sValue = 'none';
+    	else if(!preg_match($sPattern, $sValue))
+    		$sValue = $sDefault;
+
+		return $sValue;
+    }
+
+    protected function _setShadowFont($sKey, $sDefault = '')
+    {
+    	if(empty($sDefault))
+    		$sDefault = '0px 1px 3px rgba(0, 0, 0, 0.25)';
+
+    	$sPattern = "/(-?[0-9]+\s*px\s*){3}\s*rgba\s*\(\s*([0-9]{1,3}\s*,\s*){3}\s*[0-9\.]+\s*\)/";
+
+    	$sValue = trim(getParam($sKey));
+    	if(!$this->_isModule || empty($sValue) || $sValue == 'none')
+    		$sValue = 'none';
+    	else if(!preg_match($sPattern, $sValue))
+    		$sValue = $sDefault;
+
+		return $sValue;
+    }
+    
+    protected function _setAlign($sKey, $sDefault = '')
+    {
+		if(empty($sDefault))
+    		$sDefault = 'left';
+
+    	$sValue = trim(getParam($sKey));
+    	if(!$this->_isModule || empty($sValue) || !in_array($sValue, array('left', 'center', 'right')))
+    		$sValue = $sDefault;
+
+		return $sValue;
+    }
+}
+
+/** @} */

+ 68 - 0
modules/boonex/protean/updates/9.0.4_9.0.5/source/install/config.php

@@ -0,0 +1,68 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Protean Protean template
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_TEMPLATE,
+    'name' => 'bx_protean',
+    'title' => 'Protean',
+    'note' => 'Design template',
+    'version' => '9.0.5',
+    'vendor' => 'Boonex',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/protean/',
+    'home_uri' => 'protean',
+
+    'db_prefix' => 'bx_protean_',
+    'class_prefix' => 'BxProtean',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Boonex Protean Template',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'clear_db_cache' => 1
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'clear_db_cache' => 1
+    ),
+    'enable' => array(
+        'execute_sql' => 1
+    ),
+    'disable' => array(
+        'execute_sql' => 1
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 222 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_albums/ru.xml

@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+	<string name="_bx_albums"><![CDATA[Альбомы]]></string>
+	<string name="_bx_albums_cmts"><![CDATA[Комментарии к альбомам]]></string>
+	<string name="_bx_albums_media"><![CDATA[Изображения]]></string>
+	<string name="_bx_albums_media_cmts"><![CDATA[Комментарии к изображениям]]></string>
+
+	<string name="_bx_albums_option_summary_chars"><![CDATA[Количество символов в автогенерируемой сводке к альбомам]]></string>
+	<string name="_bx_albums_option_plain_summary_chars"><![CDATA[Количество символов в описании альбома при отсутствующей картинке альбома]]></string>
+	<string name="_bx_albums_option_per_page_browse"><![CDATA[Количество элементов на странице]]></string>
+	<string name="_bx_albums_option_per_page_profile"><![CDATA[Количество элементов на странице профайла]]></string>
+	<string name="_bx_albums_option_rss_num"><![CDATA[Количество элементов в ленте RSS]]></string>
+	<string name="_bx_albums_option_searchable_fields"><![CDATA[Поля для поиска по ключевому слову]]></string>
+
+	<string name="_bx_albums_form_entry"><![CDATA[Альбомы]]></string>
+	<string name="_bx_albums_form_entry_display_add"><![CDATA[Добавить альбом]]></string>
+    <string name="_bx_albums_form_entry_display_edit"><![CDATA[Редактировать альбом]]></string>
+	<string name="_bx_albums_form_entry_display_add_images"><![CDATA[Добавить изображения в альбом]]></string>
+	<string name="_bx_albums_form_entry_display_delete"><![CDATA[Удалить альбом]]></string>
+	<string name="_bx_albums_form_entry_display_view"><![CDATA[Просмотреть альбом]]></string>
+	<string name="_bx_albums_form_entry_input_author"><![CDATA[Автор]]></string>
+	<string name="_bx_albums_form_entry_input_sys_do_submit"><![CDATA[Выполнить]]></string>
+	<string name="_bx_albums_form_entry_input_do_submit"><![CDATA[Выполнить]]></string>
+	<string name="_bx_albums_form_entry_input_sys_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_albums_form_entry_input_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_albums_form_entry_input_title_err"><![CDATA[Необходим заголовок. Пожалуйста, заполните это поле.]]></string>
+	<string name="_bx_albums_form_entry_input_sys_text"><![CDATA[Описание альбома]]></string>
+	<string name="_bx_albums_form_entry_input_text"><![CDATA[Описание альбома]]></string>
+	<string name="_bx_albums_form_entry_input_sys_delete_confirm"><![CDATA[Удалить подтверждение]]></string>
+	<string name="_bx_albums_form_entry_input_delete_confirm"><![CDATA[Я уверен, что хочу удалить этот альбом]]></string>
+	<string name="_bx_albums_form_entry_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено]]></string>
+	<string name="_bx_albums_form_entry_input_delete_confirm_error"><![CDATA[Отметьте флажок, если действительно хотите удалить этот альбом]]></string>
+	<string name="_bx_albums_form_entry_input_sys_pictures"><![CDATA[Картинки]]></string>
+	<string name="_bx_albums_form_entry_input_pictures"><![CDATA[Картинки]]></string>
+    <string name="_bx_albums_form_entry_input_sys_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_albums_form_entry_input_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_albums_form_entry_file_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_albums_form_entry_input_sys_date_added"><![CDATA[Создано]]></string>
+	<string name="_bx_albums_form_entry_input_date_added"><![CDATA[Создано]]></string>
+	<string name="_bx_albums_form_entry_input_sys_date_changed"><![CDATA[Обновлено]]></string>
+	<string name="_bx_albums_form_entry_input_date_changed"><![CDATA[Обновлено]]></string>
+
+	<string name="_bx_albums_acl_action_create_entry"><![CDATA[Создать альбом]]></string>
+	<string name="_bx_albums_acl_action_delete_entry"><![CDATA[Удалить альбом]]></string>
+	<string name="_bx_albums_acl_action_view_entry"><![CDATA[Просмотреть альбом]]></string>
+	<string name="_bx_albums_acl_action_set_thumb"><![CDATA[Задать обложку альбома]]></string>
+	<string name="_bx_albums_acl_action_edit_any_entry"><![CDATA[Редактировать любой альбом]]></string>
+
+	<string name="_bx_albums_page_title_sys_create_entry"><![CDATA[Новый альбом]]></string>
+	<string name="_bx_albums_page_title_create_entry"><![CDATA[Новый альбом]]></string>
+	<string name="_bx_albums_page_block_title_create_entry"><![CDATA[Новый альбом]]></string>
+	<string name="_bx_albums_page_title_sys_edit_entry"><![CDATA[Редактировать альбом]]></string>
+    <string name="_bx_albums_page_title_edit_entry"><![CDATA[Редактировать альбом]]></string>
+	<string name="_bx_albums_page_title_sys_add_images"><![CDATA[Добавить/Изменить изображения]]></string>
+    <string name="_bx_albums_page_title_add_images"><![CDATA[Добавить/Изменить изображения]]></string>
+    <string name="_bx_albums_page_block_title_add_images"><![CDATA[Добавить/Изменить изображения]]></string>
+    <string name="_bx_albums_page_block_title_edit_entry"><![CDATA[Редактировать альбом]]></string>
+    <string name="_bx_albums_page_title_sys_delete_entry"><![CDATA[Удалить альбом]]></string>
+    <string name="_bx_albums_page_title_delete_entry"><![CDATA[Удалить альбом]]></string>
+    <string name="_bx_albums_page_block_title_delete_entry"><![CDATA[Удалить альбом]]></string>
+	<string name="_bx_albums_page_title_sys_view_entry"><![CDATA[Просмотреть альбом]]></string>
+	<string name="_bx_albums_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_albums_page_title_sys_view_media"><![CDATA[Просмотреть изображение]]></string>
+	<string name="_bx_albums_page_title_view_media"><![CDATA[{title}]]></string>
+	<string name="_bx_albums_page_block_title_entry_view_media"><![CDATA[Просмотреть изображение]]></string>
+	<string name="_bx_albums_page_block_title_entry_view_media_exif"><![CDATA[EXIF]]></string>
+	<string name="_bx_albums_page_block_title_entry_attachments"><![CDATA[Прикрепления]]></string>
+	<string name="_bx_albums_page_block_title_entry_text"><![CDATA[Описание альбома]]></string>
+	<string name="_bx_albums_page_title_browse"><![CDATA[Альбомы]]></string>
+	<string name="_bx_albums_page_title_search_results"><![CDATA[Альбомы, соответствующие "{0}"]]></string>
+	<string name="_bx_albums_page_title_browse_by_author"><![CDATA[Альбомы автора {display_name}]]></string>
+	<string name="_bx_albums_page_title_browse_featured"><![CDATA[Продвинутые альбомы]]></string>
+	<string name="_bx_albums_page_title_browse_featured_media"><![CDATA[Продвинутые изображения]]></string>
+    <string name="_bx_albums_page_title_browse_recent"><![CDATA[Новые альбомы]]></string>
+    <string name="_bx_albums_page_title_browse_popular"><![CDATA[Популярные альбомы]]></string>
+    <string name="_bx_albums_page_title_browse_popular_media"><![CDATA[Популярные изображения]]></string>
+    <string name="_bx_albums_page_title_browse_recent_media"><![CDATA[Недавние изображения]]></string>
+    <string name="_bx_albums_page_title_browse_media_in_album"><![CDATA[Изображения]]></string>
+    <string name="_bx_albums_page_title_browse_updated"><![CDATA[Обновлённые альбомы]]></string>
+    <string name="_bx_albums_page_title_sys_home"><![CDATA[Альбомы - Главная]]></string>
+    <string name="_bx_albums_page_title_home"><![CDATA[Альбомы]]></string>
+    <string name="_bx_albums_page_block_title_featured_entries_view_extended"><![CDATA[Продвинутые альбомы]]></string>
+    <string name="_bx_albums_page_block_title_featured_entries_view_gallery_media"><![CDATA[Продвинутые изображения]]></string>
+    <string name="_bx_albums_page_block_title_recent_entries"><![CDATA[Новые альбомы]]></string>
+    <string name="_bx_albums_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_albums_page_block_title_entry_author"><![CDATA[Автор]]></string>
+	<string name="_bx_albums_page_block_title_entry_info"><![CDATA[Информация]]></string>
+    <string name="_bx_albums_page_block_title_entry_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_albums_page_block_title_entry_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_albums_page_block_title_entry_comments_link"><![CDATA[Комментарии к <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_albums_page_block_title_entry_location"><![CDATA[Расположение]]></string>
+    <string name="_bx_albums_page_title_sys_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_albums_page_title_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_albums_page_title_sys_entries_popular_media"><![CDATA[Популярные изображения]]></string>
+    <string name="_bx_albums_page_title_entries_popular_media"><![CDATA[Популярные изображения]]></string>
+    <string name="_bx_albums_page_block_title_popular_entries"><![CDATA[Популярные]]></string>
+    <string name="_bx_albums_page_block_title_popular_media"><![CDATA[Популярные изображения]]></string>
+    <string name="_bx_albums_page_block_title_recent_media"><![CDATA[Последние изображения]]></string>
+    <string name="_bx_albums_page_block_title_updated_entries"><![CDATA[Обновлённые альбомы]]></string>
+    <string name="_bx_albums_page_title_sys_view_entry_comments"><![CDATA[Комментарии к альбому]]></string>
+    <string name="_bx_albums_page_title_view_entry_comments"><![CDATA[Комментарии к {title}]]></string>
+    <string name="_bx_albums_page_title_sys_entries_of_author"><![CDATA[Альбомы автора]]></string>
+    <string name="_bx_albums_page_title_entries_of_author"><![CDATA[{display_name} - Альбомы]]></string>
+    <string name="_bx_albums_page_block_title_favorites_of_author"><![CDATA[<a href="{profile_link}">{display_name}</a> - Избранные альбомы]]></string>   
+    <string name="_bx_albums_page_block_title_sys_favorites_of_author"><![CDATA[Избранные альбомы автора]]></string>
+    <string name="_bx_albums_page_block_title_favorites_of_author_media"><![CDATA[<a href="{profile_link}">{display_name}</a> - Избранные изображения]]></string>   
+    <string name="_bx_albums_page_block_title_sys_favorites_of_author_media"><![CDATA[Избранные изображения автора]]></string>
+    <string name="_bx_albums_page_block_title_entries_of_author"><![CDATA[<a href="{profile_link}">{display_name}</a> - Альбомы]]></string>
+    <string name="_bx_albums_page_block_title_sys_entries_of_author"><![CDATA[Альбомы автора]]></string>
+    <string name="_bx_albums_page_block_title_entries_actions"><![CDATA[Альбомы - Действия]]></string>
+    <string name="_bx_albums_page_block_title_browse_cmts"><![CDATA[Комментарии к альбому]]></string>
+    <string name="_bx_albums_page_block_title_browse_cmts_media"><![CDATA[Комментарии к изображениям]]></string>
+	<string name="_bx_albums_page_title_sys_manage"><![CDATA[Управление своими альбомами]]></string>
+	<string name="_bx_albums_page_title_sys_manage_administration"><![CDATA[Управление всеми альбомами]]></string>
+	<string name="_bx_albums_page_title_manage"><![CDATA[Управление]]></string>
+	<string name="_bx_albums_page_block_title_system_manage"><![CDATA[Управление своими альбомами]]></string>
+	<string name="_bx_albums_page_block_title_system_manage_administration"><![CDATA[Управление всеми альбомами]]></string>
+	<string name="_bx_albums_page_block_title_manage"><![CDATA[Управление]]></string>
+	<string name="_bx_albums_page_block_title_popular_keywords_albums"><![CDATA[Популярные хэштеги альбомов]]></string>
+	<string name="_bx_albums_page_block_title_popular_keywords_media"><![CDATA[Популярные хэштеги изображений]]></string>
+    <string name="_bx_albums_page_block_title_popular_keywords_media_camera"><![CDATA[Популярные фотокамеры]]></string>
+    <string name="_bx_albums_page_block_title_my_entries"><![CDATA[Мой альбомы]]></string>
+    <string name="_bx_albums_page_title_sys_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_albums_page_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_albums_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_albums_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
+    <string name="_bx_albums_page_block_title_search_form_media"><![CDATA[Форма поиска изображений]]></string>
+    <string name="_bx_albums_page_block_title_search_results_media"><![CDATA[Результаты поиска изображений]]></string>
+    <string name="_bx_albums_page_block_title_search_form_cmts"><![CDATA[Форма поиска комментариев]]></string>
+    <string name="_bx_albums_page_block_title_search_results_cmts"><![CDATA[Результаты поиска комментариев]]></string>
+    <string name="_bx_albums_page_block_title_search_form_media_cmts"><![CDATA[Форма поиска комментариев к изображеним]]></string>
+    <string name="_bx_albums_page_block_title_search_results_media_cmts"><![CDATA[Результаты поиска комментариев к изображеним]]></string>
+
+    <string name="_bx_albums_menu_set_title_view_entry"><![CDATA[Действия для альбома]]></string>
+    <string name="_bx_albums_menu_title_view_entry"><![CDATA[Действия для альбома]]></string>
+    <string name="_bx_albums_menu_set_title_view_media"><![CDATA[Действия для изображения]]></string>
+    <string name="_bx_albums_menu_title_view_media"><![CDATA[Действия для изображения]]></string>
+    <string name="_bx_albums_menu_title_submenu"><![CDATA[Альбомы - Подменю]]></string>
+    <string name="_bx_albums_menu_set_title_submenu"><![CDATA[Альбомы - Подменю]]></string>
+    <string name="_bx_albums_menu_item_title_system_create_entry"><![CDATA[Новый альбом]]></string>
+    <string name="_bx_albums_menu_item_title_create_entry"><![CDATA[Новый альбом]]></string>
+    <string name="_bx_albums_menu_item_title_system_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_albums_menu_item_title_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_albums_menu_item_title_system_edit_album"><![CDATA[Редактировать альбом]]></string>
+    <string name="_bx_albums_menu_item_title_edit_album"><![CDATA[Редактировать альбом]]></string>
+    <string name="_bx_albums_menu_item_title_system_add_images"><![CDATA[Добавить/Изменить изображения]]></string>
+    <string name="_bx_albums_menu_item_title_add_images"><![CDATA[Добавить/Изменить изображения]]></string>
+    <string name="_bx_albums_menu_item_title_system_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_albums_menu_item_title_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_albums_menu_item_title_system_view_entry"><![CDATA[Просмотреть альбом]]></string>
+    <string name="_bx_albums_menu_item_title_system_entries_home"><![CDATA[Альбомы]]></string>
+    <string name="_bx_albums_menu_item_title_entries_home"><![CDATA[Альбомы]]></string>
+    <string name="_bx_albums_menu_item_title_system_entries_recent"><![CDATA[Новые]]></string>
+    <string name="_bx_albums_menu_item_title_entries_recent"><![CDATA[Новые]]></string>
+    <string name="_bx_albums_menu_item_title_system_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_albums_menu_item_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_albums_menu_item_title_system_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_albums_menu_item_title_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_albums_menu_item_title_system_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_albums_menu_item_title_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_albums_menu_item_title_system_entries_popular_media"><![CDATA[Популярные изображения]]></string>
+    <string name="_bx_albums_menu_item_title_entries_popular_media"><![CDATA[Популярные изображения]]></string>
+    <string name="_bx_albums_menu_title_view_entry_submenu"><![CDATA[Просмотреть подменю альбомов]]></string>
+    <string name="_bx_albums_menu_set_title_view_entry_submenu"><![CDATA[Просмотреть подменю альбомов]]></string>
+    <string name="_bx_albums_menu_item_title_view_entry_submenu_entry"><![CDATA[Альбом]]></string>
+    <string name="_bx_albums_menu_item_title_view_entry_submenu_comments"><![CDATA[Комментарии к альбому]]></string>
+    <string name="_bx_albums_menu_item_title_system_view_entry_comments"><![CDATA[Комментарии к альбому]]></string>
+    <string name="_bx_albums_menu_item_title_system_view_entries_author"><![CDATA[Альбомы]]></string>
+    <string name="_bx_albums_menu_item_title_view_entries_author"><![CDATA[Альбомы]]></string>
+    <string name="_bx_albums_menu_title_entries_my"><![CDATA[Мои Альбомы - Меню действий]]></string>
+    <string name="_bx_albums_menu_set_title_entries_my"><![CDATA[Мои альбомы - Меню]]></string>
+	<string name="_bx_albums_menu_item_title_system_manage_my_albums"><![CDATA[Мои альбомы]]></string>
+    <string name="_bx_albums_menu_item_title_manage_my_albums"><![CDATA[{addon} альбомы]]></string>
+    <string name="_bx_albums_menu_set_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_albums_menu_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+	<string name="_bx_albums_menu_item_title_system_admt_albums"><![CDATA[Альбомы]]></string>
+	<string name="_bx_albums_menu_item_title_admt_albums"><![CDATA[Альбомы - {addon} спрятан]]></string>
+	<string name="_bx_albums_menu_item_title_manage_my"><![CDATA[Мои альбомы]]></string>
+	<string name="_bx_albums_menu_item_title_manage_all"><![CDATA[Все альбомы]]></string>
+
+	<string name="_bx_albums_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+	<string name="_bx_albums_grid_filter_item_title_adm_active"><![CDATA[Активный]]></string>
+	<string name="_bx_albums_grid_filter_item_title_adm_hidden"><![CDATA[Спрятанный]]></string>
+	<string name="_bx_albums_grid_column_title_adm_active"><![CDATA[Активный]]></string>
+    <string name="_bx_albums_grid_column_title_adm_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_albums_grid_column_title_adm_added"><![CDATA[Добавлен]]></string>
+    <string name="_bx_albums_grid_column_title_adm_author"><![CDATA[Автор]]></string>
+    <string name="_bx_albums_grid_action_title_adm_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_albums_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_albums_grid_action_title_adm_more_actions"><![CDATA[Больше действий]]></string>
+    <string name="_bx_albums_grid_action_err_delete"><![CDATA[Невозможно удалить выбранный(ные) альбом(ы).]]></string>
+    <string name="_bx_albums_grid_txt_account_manager"><![CDATA[Перенаправить в управление аккаунтом.]]></string>
+
+    <string name="_bx_albums_chart_growth"><![CDATA[Альбомы: Развитие]]></string>
+    <string name="_bx_albums_chart_growth_speed"><![CDATA[Альбомы: Скорость развития]]></string>
+    <string name="_bx_albums_chart_growth_media"><![CDATA[Изображения: Развитие]]></string>
+    <string name="_bx_albums_chart_growth_speed_media"><![CDATA[Изображения: Скорость развития]]></string>
+
+    <string name="_bx_albums_search_extended"><![CDATA[Поиск альбомов]]></string>
+    <string name="_bx_albums_search_extended_media"><![CDATA[Поиск изображений]]></string>
+    <string name="_bx_albums_search_extended_cmts"><![CDATA[Поиск комментариев к альбомам]]></string>
+    <string name="_bx_albums_search_extended_media_cmts"><![CDATA[Поиск комментариев к изображениям]]></string>
+
+    <string name="_bx_albums_txt_all_entries_by"><![CDATA[<a href="{0}">Все альбомы от {1} ({2})</a>]]></string>
+    <string name="_bx_albums_txt_sample_single"><![CDATA[альбом]]></string>
+    <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_media_single"><![CDATA[изображение]]></string>
+    <string name="_bx_albums_txt_media_comment_single"><![CDATA[комментарий к изображению]]></string>
+    <string name="_bx_albums_txt_media_vote_single"><![CDATA[голос за изображение]]></string>
+	<string name="_bx_albums_txt_media_title_alt"><![CDATA[медиа-файлы автора {0}]]></string>
+	<string name="_bx_albums_txt_media_album_link"><![CDATA[<a href="{0}">{1}</a> альбом от <a href="{2}">{3}</a>]]></string>
+	<string name="_bx_albums_txt_media_album_camera"><![CDATA[Камера]]></string>
+	<string name="_bx_albums_txt_media_album_focal_length"><![CDATA[Фокусное расстояние]]></string>
+	<string name="_bx_albums_txt_media_album_focal_length_value"><![CDATA[{0} мм]]></string>
+	<string name="_bx_albums_txt_media_album_aperture"><![CDATA[Диафрагма]]></string>
+	<string name="_bx_albums_txt_media_album_shutter_speed"><![CDATA[Выдержка]]></string>
+	<string name="_bx_albums_txt_media_album_shutter_speed_value"><![CDATA[{0} сек]]></string>
+	<string name="_bx_albums_txt_media_album_iso"><![CDATA[Чувствительность (ISO)]]></string>
+</resources>

+ 38 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_chat_plus/ru.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+	<string name="_sys_module_chat_plus"><![CDATA[RocketChat]]></string>
+	<string name="_bx_chat_plus"><![CDATA[RocketChat]]></string>
+	<string name="_bx_chat_plus_chat"><![CDATA[Чат]]></string>
+
+	<string name="_bx_chat_plus_setting"><![CDATA[Настройки чата]]></string>
+    <string name="_bx_chat_plus_adm_stg_cpt_type"><![CDATA[RocketChat]]></string>
+    <string name="_bx_chat_plus_adm_stg_cpt_category_general"><![CDATA[Общие]]></string>
+    <string name="_bx_chat_plus_option_url"><![CDATA[Чат URL]]></string>
+    <string name="_bx_chat_plus_option_helpdesk"><![CDATA[Включить чат поддержки сайта]]></string>
+    <string name="_bx_chat_plus_option_helpdesk_guest_only"><![CDATA[Показывать чат поддержки сайта только для гостей]]></string>
+
+    <string name="_bx_chat_plus_menu_item_title_entries_home"><![CDATA[Чат]]></string>
+    <string name="_bx_chat_plus_menu_item_title_system_entries_home"><![CDATA[RocketChat]]></string>
+
+    <string name="_bx_chat_plus_page_title_chat"><![CDATA[Чат]]></string>
+    <string name="_bx_chat_plus_page_title_sys_chat"><![CDATA[RocketChat]]></string>
+    <string name="_bx_chat_plus_page_block_title_chat"><![CDATA[Чат]]></string>
+
+	<string name="_bx_chat_plus_not_configured"><![CDATA[Чат не сконфигурирован]]></string>
+	<string name="_bx_chat_plus_open_in_separate_window"><![CDATA[Полно-экранный режим]]></string>
+	<string name="_bx_chat_plus_information"><![CDATA[Информация]]></string>
+	<string name="_bx_chat_plus_information_block"><![CDATA[Чат сервер должен быть сконфигурирован, чтобы этот модуль заработал. <br />
+
+Нужно ввести URL чата в настройках этого модуля. <br />
+
+Затем OAuth модуль должен быть сконфигурирован. <a href="{0}modules/?r=oauth2/administration/">Сгенерируйте пару Ключ & Секрет</a> в модуле OAuth2 сервер указав адрес чата и произвольный заголовок. <br />
+
+После того как пара Ключ & Секрет сгенерированы, нужно указать их в чате: <br />
+Администрирование &gt; OAuth &gt; UNA.
+
+<hr />
+
+Чтобы заработала "Служба поддержки" нужно включить эту функцию настройках этого модуля и в чате: Администрирование &gt; Livechat.
+Вставлять специальный JavaScript код не нужно - это делается автоматически.]]></string>
+
+</resources>

+ 47 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_contact/ru.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+	<string name="_bx_contact"><![CDATA[Контакты]]></string>
+
+	<string name="_bx_contact_form_contact"><![CDATA[Контакты]]></string>
+	<string name="_bx_contact_form_contact_display_send"><![CDATA[Послать]]></string>
+	<string name="_bx_contact_form_contact_input_sys_name"><![CDATA[Ваше имя]]></string>
+	<string name="_bx_contact_form_contact_input_name"><![CDATA[Ваше имя]]></string>
+	<string name="_bx_contact_form_contact_input_name_err"><![CDATA[Вы должны указать здесь своё имя.]]></string>
+	<string name="_bx_contact_form_contact_input_sys_email"><![CDATA[Ваш имейл]]></string>
+	<string name="_bx_contact_form_contact_input_email"><![CDATA[Ваш имейл]]></string>
+	<string name="_bx_contact_form_contact_input_email_err"><![CDATA[Вы должны указать здесь правильный имейл.]]></string>
+	<string name="_bx_contact_form_contact_input_sys_subject"><![CDATA[Тема сообщения]]></string>
+	<string name="_bx_contact_form_contact_input_subject"><![CDATA[Тема сообщения]]></string>
+	<string name="_bx_contact_form_contact_input_subject_err"><![CDATA[Вы должны указать здесь тему сообщения.]]></string>
+	<string name="_bx_contact_form_contact_input_sys_body"><![CDATA[Текст сообщения]]></string>
+	<string name="_bx_contact_form_contact_input_body"><![CDATA[Текст сообщения]]></string>
+	<string name="_bx_contact_form_contact_input_body_err"><![CDATA[Вы должны указать здесь текст сообщения.]]></string>
+	<string name="_bx_contact_form_contact_input_sys_captcha"><![CDATA[CAPTCHA]]></string>
+	<string name="_bx_contact_form_contact_input_captcha"><![CDATA[Секретная картинка]]></string>
+	<string name="_bx_contact_form_contact_input_captcha_err"><![CDATA[Проверка секретной картинки не удалась. Пожалуйста, попытайтесь снова.]]></string>
+	<string name="_bx_contact_form_contact_input_sys_do_submit"><![CDATA[Отправить]]></string>
+	<string name="_bx_contact_form_contact_input_do_submit"><![CDATA[Отправить]]></string>
+
+	<string name="_bx_contact_page_title_sys_contact"><![CDATA[Написать нам]]></string>
+	<string name="_bx_contact_page_title_contact"><![CDATA[Написать нам]]></string>
+	<string name="_bx_contact_page_block_title_form"><![CDATA[Написать нам]]></string>
+
+    <string name="_bx_contact_menu_item_title_system_contact"><![CDATA[Связь]]></string>
+    <string name="_bx_contact_menu_item_title_contact"><![CDATA[Связь]]></string>
+
+    <string name="_bx_contact_option_email"><![CDATA[Имейл для получения сообщений (если пусто, будет использован имейл сайта)]]></string>
+    <string name="_bx_contact_option_add_reply_to"><![CDATA[Добавить ел. адрес отправителя в 'Reply-To' (ответить на адрес) заголовок письма]]></string>
+
+	<string name="_bx_contact_acl_action_contact"><![CDATA[Контакты]]></string>
+
+	<string name="_bx_contact_et_contact_form_message"><![CDATA[Сообщение формы для контактов.]]></string>
+	<string name="_bx_contact_et_contact_form_message_subject"><![CDATA[Сообщение формы для контактов.]]></string>
+	<string name="_bx_contact_et_contact_form_message_body"><![CDATA[{email_header}
+<p><b>Дорогой Administrator</b>,</p>
+<p>Вам написал пользователь <u>{SenderName}</u> с имейл-адресом <u>{SenderEmail}</u></p>
+<hr />
+<p><b>{MessageSubject}</b></p>
+<p>{MessageBody}</p>
+{email_footer}]]></string>
+</resources>

+ 135 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_convos/ru.xml

@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+	<string name="_bx_cnv"><![CDATA[Переписка]]></string>
+	<string name="_bx_convos"><![CDATA[Переписка]]></string>
+
+	<string name="_bx_cnv_option_preview_messages_num"><![CDATA[Количество сообщений для предпросмотра]]></string>
+
+	<string name="_bx_cnv_form_entry"><![CDATA[Переписка]]></string>
+    <string name="_bx_cnv_form_entry_display_add"><![CDATA[Новая переписка]]></string>
+    <string name="_bx_cnv_form_entry_display_edit"><![CDATA[Редактирование сообщения]]></string>
+	<string name="_bx_cnv_form_entry_display_delete"><![CDATA[Удалить переписку]]></string>
+	<string name="_bx_cnv_form_entry_display_view"><![CDATA[Просмотреть переписку]]></string>
+	<string name="_bx_cnv_form_entry_input_sys_do_submit"><![CDATA[Отправить]]></string>
+	<string name="_bx_cnv_form_entry_input_do_submit"><![CDATA[Отправить]]></string>
+	<string name="_bx_cnv_form_entry_input_sys_text"><![CDATA[Текст]]></string>
+	<string name="_bx_cnv_form_entry_input_text"><![CDATA[Текст]]></string>
+	<string name="_bx_cnv_form_entry_input_text_err"><![CDATA[Поле для текста не может быть пустым]]></string>
+	<string name="_bx_cnv_form_entry_input_sys_delete_confirm"><![CDATA[Удалить подтверждение]]></string>
+	<string name="_bx_cnv_form_entry_input_delete_confirm"><![CDATA[Я уверен, что хочу удалить эту переписку]]></string>
+	<string name="_bx_cnv_form_entry_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено]]></string>
+	<string name="_bx_cnv_form_entry_input_delete_confirm_error"><![CDATA[Пожалуйста, отметьте флажок, если действительно хотите удалить переписку]]></string>
+	<string name="_bx_cnv_form_entry_input_sys_attachments"><![CDATA[Прикрепления]]></string>
+	<string name="_bx_cnv_form_entry_input_attachments"><![CDATA[Прикрепления]]></string>
+    <string name="_bx_cnv_form_entry_input_recipients"><![CDATA[Получатели]]></string>
+    <string name="_bx_cnv_form_entry_input_sys_recipients"><![CDATA[Получатели]]></string>
+    <string name="_bx_cnv_form_entry_input_recipients_err"><![CDATA[Необходимо указать хотя бы одного получателя]]></string>
+    <string name="_bx_cnv_form_entry_input_sys_submit_text"><![CDATA[Статус черновика]]></string>
+    <string name="_bx_cnv_form_entry_input_sys_submit_block"><![CDATA[Блок отправки сообщения]]></string>
+    <string name="_bx_cnv_form_entry_input_sys_draft_id"><![CDATA[ID черновика]]></string>
+    <string name="_bx_cnv_form_entry_input_sys_allow_edit"><![CDATA[Редактирование главного сообщения участниками]]></string>
+    <string name="_bx_cnv_form_entry_input_allow_edit"><![CDATA[Редактирование главного сообщения участниками]]></string>
+    
+	<string name="_bx_cnv_acl_action_create_entry"><![CDATA[Новое сообщение]]></string>
+	<string name="_bx_cnv_acl_action_delete_entry"><![CDATA[Удалить сообщение]]></string>
+	<string name="_bx_cnv_acl_action_view_entry"><![CDATA[Просмотреть сообщение]]></string>
+
+	<string name="_bx_cnv_page_title_sys_create_entry"><![CDATA[Новое сообщение]]></string>
+	<string name="_bx_cnv_page_title_create_entry"><![CDATA[Новое сообщение]]></string>
+	<string name="_bx_cnv_page_block_title_create_entry"><![CDATA[Новое сообщение]]></string>
+	<string name="_bx_cnv_page_title_sys_view_entry"><![CDATA[Просмотреть сообщение]]></string>
+	<string name="_bx_cnv_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_cnv_page_block_title_entry_attachments"><![CDATA[Прикрепления]]></string>
+	<string name="_bx_cnv_page_block_title_entry_text"><![CDATA[Текст]]></string>
+    <string name="_bx_cnv_page_block_title_entry_author"><![CDATA[Автор]]></string>
+    <string name="_bx_cnv_page_block_title_entry_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_cnv_page_block_title_entry_breadcrumb"><![CDATA["Хлебные крошки"]]></string>
+    <string name="_bx_cnv_page_block_title_entry_comments"><![CDATA[Ответов ({0})]]></string>
+    <string name="_bx_cnv_page_block_title_entry_collaborators"><![CDATA[Адресаты]]></string>
+    <string name="_bx_cnv_page_title_sys_folder"><![CDATA[Сообщений в папке]]></string>
+    <string name="_bx_cnv_page_title_folder"><![CDATA[Папка: {folder}]]></string>
+    <string name="_bx_cnv_page_block_title_folder"><![CDATA[Папка: {folder}]]></string>
+    <string name="_bx_cnv_page_block_title_convos"><![CDATA[Сообщения]]></string>
+    <string name="_bx_cnv_page_title_sys_edit_entry"><![CDATA[Редактирование сообщения]]></string>
+    <string name="_bx_cnv_page_title_edit_entry"><![CDATA[Редактирование сообщения]]></string>
+    <string name="_bx_cnv_page_block_title_edit_entry"><![CDATA[Редактирование сообщения]]></string>
+
+    <string name="_bx_cnv_menu_set_title_view_entry"><![CDATA[Сообщение - Действия]]></string>
+    <string name="_bx_cnv_menu_title_view_entry"><![CDATA[Сообщение - Действия]]></string>
+    <string name="_bx_cnv_menu_title_submenu"><![CDATA[Переписка - Подменю]]></string>
+    <string name="_bx_cnv_menu_set_title_submenu"><![CDATA[Переписка - Подменю]]></string>
+    <string name="_bx_cnv_menu_title_folders_more"><![CDATA[Переписка - Папки]]></string>
+    <string name="_bx_cnv_menu_set_title_submenu"><![CDATA[Переписка - Папки]]></string>
+    <string name="_bx_cnv_menu_set_title_folders_more"><![CDATA[Папки - Дополнительно]]></string>
+    <string name="_bx_cnv_menu_item_title_system_message"><![CDATA[Сообщение]]></string>
+    <string name="_bx_cnv_menu_item_title_message"><![CDATA[Сообщение]]></string>
+    <string name="_bx_cnv_menu_item_title_system_message_group"><![CDATA[Групповое сообщение]]></string>
+    <string name="_bx_cnv_menu_item_title_message_group"><![CDATA[Групповое сообщение]]></string>
+    <string name="_bx_cnv_menu_item_title_system_mark_unread_entry"><![CDATA[Отметить как непрочитанное]]></string>
+    <string name="_bx_cnv_menu_item_title_mark_unread_entry"><![CDATA[Отметить как непрочитанное]]></string>
+
+    <string name="_bx_cnv_menu_item_title_system_delete_entry"><![CDATA[Удалить переписку]]></string>
+    <string name="_bx_cnv_menu_item_title_delete_entry"><![CDATA[Удалить переписку]]></string>
+    <string name="_bx_cnv_menu_item_title_system_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_cnv_menu_item_title_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_cnv_menu_item_title_system_folder_inbox"><![CDATA[Входящие]]></string>
+    <string name="_bx_cnv_menu_item_title_folder_inbox"><![CDATA[Входящие]]></string>
+    <string name="_bx_cnv_menu_item_title_system_folder_drafts"><![CDATA[Черновики]]></string>
+    <string name="_bx_cnv_menu_item_title_folder_drafts"><![CDATA[Черновики]]></string>
+    <string name="_bx_cnv_menu_item_title_system_folder_spam"><![CDATA[Спам]]></string>
+    <string name="_bx_cnv_menu_item_title_folder_spam"><![CDATA[Спам]]></string>
+    <string name="_bx_cnv_menu_item_title_system_folder_trash"><![CDATA[Корзина]]></string>
+    <string name="_bx_cnv_menu_item_title_folder_trash"><![CDATA[Корзина]]></string>
+    <string name="_bx_cnv_menu_item_title_system_folder_more"><![CDATA[Дополнительно]]></string>
+    <string name="_bx_cnv_menu_item_title_folder_more"><![CDATA[Дополнительно]]></string>
+    <string name="_bx_cnv_menu_item_title_system_convos"><![CDATA[Переписка]]></string>
+    <string name="_bx_cnv_menu_item_title_convos"><![CDATA[Переписка]]></string>
+    <string name="_bx_cnv_menu_item_title_system_unread_messages"><![CDATA[Количество непрочитанных сообщений]]></string>
+    <string name="_bx_cnv_menu_item_title_unread_messages"><![CDATA[{addon} непрочитанных сообщений]]></string>
+    
+    <string name="_bx_cnv_txt_sample_single"><![CDATA[переписка]]></string>
+
+    <string name="_bx_cnv_folder_inbox"><![CDATA[Входящие]]></string>
+    <string name="_bx_cnv_folder_drafts"><![CDATA[Черновики]]></string>
+    <string name="_bx_cnv_folder_spam"><![CDATA[Спам]]></string>
+    <string name="_bx_cnv_folder_trash"><![CDATA[Корзина]]></string>
+
+    <string name="_bx_cnv_field_comments"><![CDATA[#]]></string>
+    <string name="_bx_cnv_field_preview"><![CDATA[Предпросмотр]]></string>
+    <string name="_bx_cnv_field_collaborators"><![CDATA[Адресаты]]></string>
+
+    <string name="_bx_cnv_grid_action_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_cnv_grid_action_compose"><![CDATA[Новое сообщение]]></string>
+
+    <string name="_bx_cnv_collaborator_info"><![CDATA[{0} ({1})]]></string>
+    <string name="_bx_cnv_collaborator_author"><![CDATA[автор]]></string>
+    <string name="_bx_cnv_collaborator_last_replier"><![CDATA[последний ответивший]]></string>
+    <string name="_bx_cnv_more"><![CDATA[{0} ещё]]></string>
+
+    <string name="_bx_cnv_author_desc"><![CDATA[{0} (изменено {1})]]></string>
+    <string name="_bx_cnv_x_date_by_x_replier"><![CDATA[{0} {1}]]></string>
+
+    <string name="_bx_cnv_read_by_all"><![CDATA[Прочитано всеми]]></string>
+    <string name="_bx_cnv_see_all"><![CDATA[Просмотреть всю переписку...]]></string>
+    <string name="_bx_cnv_you_are_last_replier"><![CDATA[Вы - последний ответивший]]></string>
+
+    <string name="_bx_cnv_draft_saving_error"><![CDATA[Ошибка сохранения черновика!]]></string>
+    <string name="_bx_cnv_draft_saved_success"><![CDATA[Черновик сохранён.]]></string>
+
+    <string name="_bx_cnv_email_new_message"><![CDATA[Новое сообщение]]></string>
+    <string name="_bx_cnv_email_new_message_subject"><![CDATA[Новое сообщение от {SenderDisplayName}]]></string>
+    <string name="_bx_cnv_email_new_message_body"><![CDATA[{email_header}
+<p>Новое сообщение от <a href="{SenderUrl}">{SenderDisplayName}</a>:</p>
+<hr />
+<p>{Message}</p>
+{email_footer}]]></string>
+
+    <string name="_bx_cnv_email_new_reply"><![CDATA[Новый ответ]]></string>
+    <string name="_bx_cnv_email_new_reply_subject"><![CDATA[Новый ответ от {SenderDisplayName}]]></string>
+    <string name="_bx_cnv_email_new_reply_body"><![CDATA[{email_header}
+<p>Новый ответ от <a href="{SenderUrl}">{SenderDisplayName}</a>:</p>
+<hr />
+<p>{Message}</p>
+{email_footer}]]></string>
+</resources>

+ 296 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_decorous/ru.xml

@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+	<string name="_bx_decorous_wgt_cpt"><![CDATA[Decorous]]></string>
+
+	<string name="_bx_decorous_stg_cpt_type"><![CDATA[Decorous]]></string>
+	<string name="_bx_decorous_stg_cpt_category_system"><![CDATA[Общие]]></string>
+	<string name="_bx_decorous_stg_cpt_option_switcher_name"><![CDATA[Название в переключателе тем]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_general"><![CDATA[Общие]]></string>
+	<string name="_bx_decorous_stg_cpt_option_general_item_bg_color_hover"><![CDATA[Цвет фона пункта при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_general_item_bg_color_active"><![CDATA[Цвет фона активного пункта]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_header"><![CDATA[Заголовок]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_height"><![CDATA[Высота]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_content_padding"><![CDATA[Контентные отступы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_bg_image"><![CDATA[Изображение фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_site_logo"><![CDATA[Эмблема]]></string>
+	<string name="_bx_decorous_stg_cpt_option_site_logo_alt"><![CDATA[Эмблема ALT]]></string>
+	<string name="_bx_decorous_stg_cpt_option_site_logo_width"><![CDATA[Ширина эмблемы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_site_logo_height"><![CDATA[Высота эмблемы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_border_color"><![CDATA[Цвет границы заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_border_size"><![CDATA[Размер границы заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_shadow"><![CDATA[Тень]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_icon_color"><![CDATA[Цвет иконок]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_icon_color_hover"><![CDATA[Цвет иконок при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_link_color"><![CDATA[Цвет линок]]></string>
+	<string name="_bx_decorous_stg_cpt_option_header_link_color_hover"><![CDATA[Цвет линок при наведении курсора]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_footer"><![CDATA[Основание]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_bg_image"><![CDATA[Изображение фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_content_padding"><![CDATA[Контентные отступы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_border_color"><![CDATA[Цвет границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_border_size"><![CDATA[Размер границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_shadow"><![CDATA[Тень]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_font_color"><![CDATA[Цвет шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_icon_color"><![CDATA[Цвет иконок]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_icon_color_hover"><![CDATA[Цвет иконок при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_link_color"><![CDATA[Цвет линок]]></string>
+	<string name="_bx_decorous_stg_cpt_option_footer_link_color_hover"><![CDATA[Цвет линок при наведении курсора]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_body"><![CDATA[Тело]]></string>
+	<string name="_bx_decorous_stg_cpt_option_body_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_body_bg_image"><![CDATA[Изображение фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_body_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_body_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_page_width"><![CDATA[Ширина страницы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_body_icon_color"><![CDATA[Цвет иконок]]></string>
+	<string name="_bx_decorous_stg_cpt_option_body_icon_color_hover"><![CDATA[Цвет иконок при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_body_link_color"><![CDATA[Цвет линок]]></string>
+	<string name="_bx_decorous_stg_cpt_option_body_link_color_hover"><![CDATA[Цвет линок при наведении курсора]]></string>
+	
+    <string name="_bx_decorous_stg_cpt_category_styles_cover"><![CDATA[Обложка]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_height"><![CDATA[Высота обложки]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_bg_color"><![CDATA[Цвет фона]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_content_padding"><![CDATA[Контентные отступы]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_border_color"><![CDATA[Цвет границы]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_border_size"><![CDATA[Размер границы]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_border_radius"><![CDATA[Радиус углов]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_shadow"><![CDATA[Тень]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_icon_border_color"><![CDATA[Цвет границы иконки]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_icon_border_size"><![CDATA[Размер границы иконки]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_icon_border_radius"><![CDATA[Радиус углов иконки]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_icon_shadow"><![CDATA[Тень иконки]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_text_align"><![CDATA[Выравнивание текста]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_text_shadow"><![CDATA[Тень текста]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_font_family"><![CDATA[Шрифт]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_font_size"><![CDATA[Размер шрифта]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_font_color"><![CDATA[Цвет шрифта]]></string>
+    <string name="_bx_decorous_stg_cpt_option_cover_font_weight"><![CDATA[Плотность шрифта]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_block"><![CDATA[Блоки]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_bg_image"><![CDATA[Изображение фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_content_padding"><![CDATA[Контентные отступы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_border_color"><![CDATA[Цвет границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_border_size"><![CDATA[Размер границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_border_radius"><![CDATA[Радиус углов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_shadow"><![CDATA[Тень]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_bg_color"><![CDATA[Цвет фона заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_padding"><![CDATA[Отступы заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_border_color"><![CDATA[Цвет границы заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_border_size"><![CDATA[Размер границы заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_border_radius"><![CDATA[Радиус углов заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_font_family"><![CDATA[Шрифт заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_font_size"><![CDATA[Размер шрифта заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_font_color"><![CDATA[Цвет шрифта заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_font_weight"><![CDATA[Плотность шрифта заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_div_height"><![CDATA[Высота разделителя заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_block_title_div_bg_color"><![CDATA[Цвет разделителя заголовка]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_card"><![CDATA[Карточки]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_bg_image"><![CDATA[Изображение фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_content_padding"><![CDATA[Контентные отступы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_border_color"><![CDATA[Цвет границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_border_size"><![CDATA[Размер границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_border_radius"><![CDATA[Радиус углов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_shadow"><![CDATA[Тень]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_popup"><![CDATA[Всплывающие окна]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_bg_image"><![CDATA[Изображение фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_content_padding"><![CDATA[Контентные отступы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_border_color"><![CDATA[Цвет границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_border_size"><![CDATA[Размер границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_border_radius"><![CDATA[Радиус углов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_shadow"><![CDATA[Тень]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_title_bg_color"><![CDATA[Цвет фона заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_title_padding"><![CDATA[Отступы заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_title_font_family"><![CDATA[Шрифт заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_title_font_size"><![CDATA[Размер шрифта заголовка]]></string>
+	<string name="_bx_decorous_stg_cpt_option_popup_title_font_color"><![CDATA[Цвет шрифта заголовка]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_menu_main"><![CDATA[Главное меню]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_bg_image"><![CDATA[Изображение фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_content_padding"><![CDATA[Контентные отступы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_border_color"><![CDATA[Цвет границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_border_size"><![CDATA[Размер границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_shadow"><![CDATA[Тень]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_font_family"><![CDATA[Набор шрифтов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_font_size"><![CDATA[Размер шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_font_color"><![CDATA[Цвет шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_font_color_hover"><![CDATA[Цвет шрифта при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_font_color_active"><![CDATA[Цвет шрифта активного пункта меню]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_font_shadow"><![CDATA[Тень шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_main_font_weight"><![CDATA[Насыщенность шрифта]]></string>
+
+    <string name="_bx_decorous_stg_cpt_category_styles_menu_account"><![CDATA[Аккаунт меню]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_bg_color"><![CDATA[Цвет фона]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_bg_image"><![CDATA[Изображение фона]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_content_padding"><![CDATA[Контентные отступы]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_border_color"><![CDATA[Цвет границы]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_border_size"><![CDATA[Размер границы]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_shadow"><![CDATA[Тень]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_font_family"><![CDATA[Набор шрифтов]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_font_size"><![CDATA[Размер шрифта]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_font_color"><![CDATA[Цвет шрифта]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_font_color_hover"><![CDATA[Цвет шрифта при наведении курсора]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_font_color_active"><![CDATA[Цвет шрифта активного пункта меню]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_font_shadow"><![CDATA[Тень шрифта]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_account_font_weight"><![CDATA[Насыщенность шрифта]]></string>
+
+    <string name="_bx_decorous_stg_cpt_category_styles_menu_add"><![CDATA[Меню 'Добавить']]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_bg_color"><![CDATA[Цвет фона]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_bg_image"><![CDATA[Изображение фона]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_content_padding"><![CDATA[Контентные отступы]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_border_color"><![CDATA[Цвет границы]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_border_size"><![CDATA[Размер границы]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_shadow"><![CDATA[Тень]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_font_family"><![CDATA[Набор шрифтов]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_font_size"><![CDATA[Размер шрифта]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_font_color"><![CDATA[Цвет шрифта]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_font_color_hover"><![CDATA[Цвет шрифта при наведении курсора]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_font_color_active"><![CDATA[Цвет шрифта активного пункта меню]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_font_shadow"><![CDATA[Тень шрифта]]></string>
+    <string name="_bx_decorous_stg_cpt_option_menu_add_font_weight"><![CDATA[Насыщенность шрифта]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_menu_page"><![CDATA[Страничное меню]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_bg_image"><![CDATA[Изображение фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_content_padding"><![CDATA[Контентные отступы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_border_color"><![CDATA[Цвет границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_border_size"><![CDATA[Размер границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_shadow"><![CDATA[Тень]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_font_family"><![CDATA[Набор шрифтов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_font_size"><![CDATA[Размер шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_font_color"><![CDATA[Цвет шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_font_color_hover"><![CDATA[Цвет шрифта при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_font_color_active"><![CDATA[Цвет шрифта активного пункта меню]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_font_shadow"><![CDATA[Тень шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_page_font_weight"><![CDATA[Насыщенность шрифта]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_menu_slide"><![CDATA[Ниспадающее меню]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_bg_image"><![CDATA[Изображение фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_bg_image_size"><![CDATA[Размер изображения фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_content_padding"><![CDATA[Контентные отступы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_border_color"><![CDATA[Цвет границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_border_size"><![CDATA[Размер границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_shadow"><![CDATA[Тень]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_font_family"><![CDATA[Набор шрифтов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_font_size"><![CDATA[Размер шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_font_color"><![CDATA[Цвет шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_font_color_hover"><![CDATA[Цвет шрифта при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_font_color_active"><![CDATA[Цвет шрифта активного пункта меню]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_font_shadow"><![CDATA[Тень шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_menu_slide_font_weight"><![CDATA[Насыщенность шрифта]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_form"><![CDATA[Формы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_form_input_height"><![CDATA[Высота поля]]></string>
+	<string name="_bx_decorous_stg_cpt_option_form_input_bg_color"><![CDATA[Цвет фона поля]]></string>
+	<string name="_bx_decorous_stg_cpt_option_form_input_bg_color_active"><![CDATA[Цвет фона активного поля]]></string>
+	<string name="_bx_decorous_stg_cpt_option_form_input_border_color"><![CDATA[Цвет границы поля]]></string>
+	<string name="_bx_decorous_stg_cpt_option_form_input_border_color_active"><![CDATA[Цвет границы активного поля]]></string>
+	<string name="_bx_decorous_stg_cpt_option_form_input_border_size"><![CDATA[Размер границы поля]]></string>
+	<string name="_bx_decorous_stg_cpt_option_form_input_shadow"><![CDATA[Тень поля]]></string>
+	<string name="_bx_decorous_stg_cpt_option_form_input_font_family"><![CDATA[Набор шрифтов поля]]></string>
+	<string name="_bx_decorous_stg_cpt_option_form_input_font_size"><![CDATA[Размер шрифта поля]]></string>
+	<string name="_bx_decorous_stg_cpt_option_form_input_font_color"><![CDATA[Цвет шрифта поля]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_large_button"><![CDATA[Большие кнопки]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_height"><![CDATA[Высота]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_bg_color_hover"><![CDATA[Цвет фона при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_border_color"><![CDATA[Цвет границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_border_color_hover"><![CDATA[Цвет грфницы при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_border_size"><![CDATA[Размер границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_border_radius"><![CDATA[Радиус углов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_shadow"><![CDATA[Тень]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_font_family"><![CDATA[Набор шрифтов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_font_size"><![CDATA[Размер шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_font_color"><![CDATA[Цвет шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_font_color_hover"><![CDATA[Цвет шрифта при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_font_shadow"><![CDATA[Тень шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_lg_font_weight"><![CDATA[Насыщенность шрифта]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_small_button"><![CDATA[Маленькие кнопки]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_height"><![CDATA[Высота]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_bg_color_hover"><![CDATA[Цвет фона при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_border_color"><![CDATA[Цвет границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_border_color_hover"><![CDATA[Цвет грфницы при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_border_size"><![CDATA[Размер границы]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_border_radius"><![CDATA[Радиус углов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_shadow"><![CDATA[Тень]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_font_family"><![CDATA[Набор шрифтов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_font_size"><![CDATA[Размер шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_font_color"><![CDATA[Цвет шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_font_color_hover"><![CDATA[Цвет шрифта при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_font_shadow"><![CDATA[Тень шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_button_sm_font_weight"><![CDATA[Насыщенность шрифта]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_font"><![CDATA[Шрифты]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_family"><![CDATA[Набор шрифтов]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_size_default"><![CDATA[Размер стандартный шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_default"><![CDATA[Стандартный цвет шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_grayed"><![CDATA[Серый цвет шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_contrasted"><![CDATA[Контрастный цвет шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_size_small"><![CDATA[Размер маленького шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_size_middle"><![CDATA[Размер среднего шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_size_large"><![CDATA[Размер большого шрифта]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_size_h1"><![CDATA[Размер шрифта тэга H1]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_weight_h1"><![CDATA[Плотность шрифта тэга H1]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_default_h1"><![CDATA[Стандартный цвет шрифта тэга H1]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_grayed_h1"><![CDATA[Серый цвет шрифта тэга H1]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_contrasted_h1"><![CDATA[Контрастный цвет шрифта тэга H1]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_link_h1"><![CDATA[Цвет линок в тэге H1]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_link_h1_hover"><![CDATA[Цвет линок в тэге H1 при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_size_h2"><![CDATA[Размер шрифта тэга H2]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_weight_h2"><![CDATA[Плотность шрифта тэга H2]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_default_h2"><![CDATA[Стандартный цвет шрифта тэга H2]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_grayed_h2"><![CDATA[Серый цвет шрифта тэга H2]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_contrasted_h2"><![CDATA[Контрастный цвет шрифта тэга H2]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_link_h2"><![CDATA[Цвет линок в тэге H2]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_link_h2_hover"><![CDATA[Цвет линок в тэге H2 при наведении курсора]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_size_h3"><![CDATA[Размер шрифта тэга H3]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_weight_h3"><![CDATA[Плотность шрифта тэга H3]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_default_h3"><![CDATA[Стандартный цвет шрифта тэга H3]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_grayed_h3"><![CDATA[Серый цвет шрифта тэга H3]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_contrasted_h3"><![CDATA[Контрастный цвет шрифта тэга H3]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_link_h3"><![CDATA[Цвет линок в тэге H3]]></string>
+	<string name="_bx_decorous_stg_cpt_option_font_color_link_h3_hover"><![CDATA[Цвет линок в тэге H3 при наведении курсора]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_styles_custom"><![CDATA[Пользовательские стили]]></string>
+	<string name="_bx_decorous_stg_cpt_option_styles_custom"><![CDATA[]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_viewport_tablet"><![CDATA[Просмотр на планшете]]></string>
+	<string name="_bx_decorous_stg_cpt_option_vpt_font_size_scale"><![CDATA[Масштаб размера шрифта]]></string>
+
+	<string name="_bx_decorous_stg_cpt_category_viewport_mobile"><![CDATA[Просмотр на телефоне]]></string>
+	<string name="_bx_decorous_stg_cpt_option_vpm_font_size_scale"><![CDATA[Масштаб размера шрифта]]></string>
+
+	<string name="_bx_decorous_lmi_cpt_styles"><![CDATA[Стили]]></string>
+</resources>

+ 463 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_developer/ru.xml

@@ -0,0 +1,463 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+    <string name="_bx_developer"><![CDATA[Разработчик]]></string>
+
+    <string name="_bx_dev_adm_wgt_cpt"><![CDATA[Разработчик]]></string>
+    <string name="_bx_dev_adm_page_cpt"><![CDATA[Разработчик]]></string>
+    
+    <!-- Forms Builder -->
+    <string name="_bx_dev_frm_txt_forms_gl_title"><![CDATA[Системное имя]]></string>
+    <string name="_bx_dev_frm_txt_forms_gl_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_txt_forms_gl_displays"><![CDATA[Виды]]></string>
+    <string name="_bx_dev_frm_btn_forms_gl_export"><![CDATA[Экспортировать форму]]></string>
+    <string name="_bx_dev_frm_txt_displays_gl_title"><![CDATA[Системное имя]]></string>
+    <string name="_bx_dev_frm_txt_displays_gl_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_txt_displays_gl_form"><![CDATA[Форма]]></string>
+    <string name="_bx_dev_frm_txt_displays_gl_fields"><![CDATA[Поля]]></string>
+    <string name="_bx_dev_frm_txt_fields_gl_type"><![CDATA[Тип]]></string>
+    <string name="_bx_dev_frm_txt_fields_gl_caption_system"><![CDATA[Системное имя]]></string>
+    <string name="_bx_dev_frm_txt_fields_gl_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_txt_fields_gl_visible"><![CDATA[Видимо для]]></string>
+    <string name="_bx_dev_frm_txt_pre_lists_gl_title"><![CDATA[Системное имя]]></string>
+    <string name="_bx_dev_frm_txt_pre_lists_gl_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_txt_pre_lists_gl_values"><![CDATA[Значения]]></string>
+    <string name="_bx_dev_frm_txt_pre_lists_gl_use_for_sets"><![CDATA[Использовать для наборов]]></string>
+    <string name="_bx_dev_frm_txt_pre_values_gl_lkey"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_gl_title"><![CDATA[Системное имя]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_gl_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_gl_fields"><![CDATA[Поля]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_fields_gl_type"><![CDATA[Тип]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_fields_gl_caption"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_fields_gl_search_type"><![CDATA[Тип (поиск)]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_fields_gl_search_operator"><![CDATA[Условие]]></string>
+    <string name="_bx_dev_frm_btn_forms_gl_create"><![CDATA[Добавить новую форму]]></string>
+    <string name="_bx_dev_frm_btn_displays_gl_create"><![CDATA[Добавить новый вид]]></string>
+    <string name="_bx_dev_frm_btn_fields_create"><![CDATA[Добавить новое поле]]></string>
+    <string name="_bx_dev_frm_btn_pre_lists_create"><![CDATA[Добавить новый список]]></string>
+    <string name="_bx_dev_frm_btn_pre_values_create"><![CDATA[Добавить новую запись]]></string>
+    <string name="_bx_dev_frm_btn_search_forms_create"><![CDATA[Добавить новую форму]]></string>
+    <string name="_bx_dev_frm_btn_search_forms_edit"><![CDATA[Редактировать форму поиска]]></string>
+    <string name="_bx_dev_frm_btn_search_forms_fields_edit"><![CDATA[Редактировать поле формы поиска]]></string>
+    <string name="_bx_dev_frm_btn_search_forms_fields_reset"><![CDATA[Сбросить]]></string>
+    <string name="_bx_dev_frm_txt_select_module"><![CDATA[Выбрать модуль...]]></string>
+    <string name="_bx_dev_frm_txt_select_object"><![CDATA[Выбрать объект...]]></string>
+    <string name="_bx_dev_frm_txt_select_object_content_info"><![CDATA[Выбрать информационный объект...]]></string>
+    <string name="_bx_dev_frm_txt_forms_create_popup"><![CDATA[Добавить новую форму]]></string>
+    <string name="_bx_dev_frm_txt_forms_edit_popup"><![CDATA[Редактировать форму "{0}"]]></string>
+    <string name="_bx_dev_frm_txt_forms_export_popup"><![CDATA[Экспортировать форму "{0}"]]></string>
+    <string name="_bx_dev_frm_err_forms_create"><![CDATA[Невозможно добавить форму]]></string>
+    <string name="_bx_dev_frm_err_forms_edit"><![CDATA[Невозможно обновить форму]]></string>
+    <string name="_bx_dev_frm_txt_forms_form"><![CDATA[Построитель форм - Форма]]></string>
+    <string name="_bx_dev_frm_txt_forms_display_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_txt_forms_display_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_id"><![CDATA[ID]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_object"><![CDATA[Название]]></string>
+    <string name="_bx_dev_frm_txt_forms_object"><![CDATA[Название]]></string>
+    <string name="_bx_dev_frm_err_forms_object"><![CDATA[Здесь нужно ввести уникальное значение]]></string>    
+    <string name="_bx_dev_frm_txt_sys_forms_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_txt_forms_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_err_forms_module"><![CDATA[Нужно выбрать модуль]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_txt_forms_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_err_forms_title"><![CDATA[Здесь нужно задать значение]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_action"><![CDATA[Действие]]></string>
+    <string name="_bx_dev_frm_txt_forms_action"><![CDATA[Действие]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_form_attrs"><![CDATA[Атрибуты формы]]></string>
+    <string name="_bx_dev_frm_txt_forms_form_attrs"><![CDATA[Атрибуты формы]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_submit_name"><![CDATA[Задать название]]></string>
+    <string name="_bx_dev_frm_txt_forms_submit_name"><![CDATA[Задать название]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_table"><![CDATA[Таблица]]></string>
+    <string name="_bx_dev_frm_txt_forms_table"><![CDATA[Таблица]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_key"><![CDATA[Ключевое поле]]></string>
+    <string name="_bx_dev_frm_txt_forms_key"><![CDATA[Ключевое поле]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_uri"><![CDATA[Поле для URI]]></string>
+    <string name="_bx_dev_frm_txt_forms_uri"><![CDATA[Поле для URI]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_uri_title"><![CDATA[Поле для источника URI]]></string>
+    <string name="_bx_dev_frm_txt_forms_uri_title"><![CDATA[Поле для источника URI]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_params"><![CDATA[Параметры]]></string>
+    <string name="_bx_dev_frm_txt_forms_params"><![CDATA[Параметры]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_deletable"><![CDATA[Можно удалять]]></string>
+    <string name="_bx_dev_frm_txt_forms_deletable"><![CDATA[Можно удалять]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_override_class_name"><![CDATA[Название класса]]></string>
+    <string name="_bx_dev_frm_txt_forms_override_class_name"><![CDATA[Название класса]]></string>
+    <string name="_bx_dev_frm_txt_sys_forms_override_class_file"><![CDATA[Файл класса]]></string>
+    <string name="_bx_dev_frm_txt_forms_override_class_file"><![CDATA[Файл класса]]></string>
+    <string name="_bx_dev_frm_txt_forms_export_insert"><![CDATA[Добавление в базу данных]]></string>
+    <string name="_bx_dev_frm_txt_forms_export_delete"><![CDATA[Удаление из базы данных]]></string>
+    <string name="_bx_dev_frm_btn_sys_forms_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_btn_forms_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_btn_forms_save"><![CDATA[Сохранить]]></string>
+    <string name="_bx_dev_frm_btn_sys_forms_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_btn_forms_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_btn_forms_done"><![CDATA[Выполнено]]></string>
+    <string name="_bx_dev_frm_txt_displays_create_popup"><![CDATA[Добавить новый вид]]></string>
+    <string name="_bx_dev_frm_txt_displays_edit_popup"><![CDATA[Редактировать вид "{0}"]]></string>
+    <string name="_bx_dev_frm_err_displays_create"><![CDATA[Невозможно добавить вид]]></string>
+    <string name="_bx_dev_frm_err_displays_edit"><![CDATA[Невозможно изменить вид]]></string>
+    <string name="_bx_dev_frm_txt_displays_diplay"><![CDATA[Построитель форм - Вид]]></string>
+    <string name="_bx_dev_frm_txt_displays_display_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_txt_displays_display_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_dev_frm_txt_sys_displays_id"><![CDATA[ID]]></string>
+    <string name="_bx_dev_frm_txt_sys_displays_display_name"><![CDATA[Название]]></string>
+    <string name="_bx_dev_frm_txt_displays_display_name"><![CDATA[Название]]></string>
+    <string name="_bx_dev_frm_err_displays_display_name"><![CDATA[Здесь нужно ввести уникальное значение (из имеющихся в форме)]]></string>
+    <string name="_bx_dev_frm_txt_sys_displays_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_txt_displays_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_err_displays_module"><![CDATA[Нужно выбрать модуль]]></string>
+    <string name="_bx_dev_frm_txt_sys_displays_object"><![CDATA[Название формы]]></string>
+    <string name="_bx_dev_frm_txt_displays_object"><![CDATA[Название формы]]></string>
+    <string name="_bx_dev_frm_err_displays_object"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_frm_txt_sys_displays_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_txt_displays_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_err_displays_title"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_frm_txt_sys_displays_view_mode"><![CDATA[Режим просмотра]]></string>
+    <string name="_bx_dev_frm_txt_displays_view_mode"><![CDATA[Режим просмотра]]></string>
+    <string name="_bx_dev_frm_btn_sys_displays_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_btn_displays_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_btn_displays_save"><![CDATA[Сохранить]]></string>
+    <string name="_bx_dev_frm_btn_sys_displays_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_btn_displays_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_txt_field_title_editable"><![CDATA[Редактируемое]]></string>
+    <string name="_bx_dev_frm_txt_field_info_editable"><![CDATA[Сделать поле Редактируемым в Редакторе Форм в Студии]]></string>
+    <string name="_bx_dev_frm_txt_field_title_deletable"><![CDATA[Удаляемое]]></string>
+    <string name="_bx_dev_frm_txt_field_info_deletable"><![CDATA[Сделать поле Удаляемым в Редакторе Форм в Студии]]></string>
+    <string name="_bx_dev_frm_txt_prelists_create_popup"><![CDATA[Добавить список данных]]></string>
+    <string name="_bx_dev_frm_err_prelists_create"><![CDATA[Невозможно добавить список данных]]></string>
+    <string name="_bx_dev_frm_txt_prelists_edit_popup"><![CDATA[Редактировать список данных "{0}"]]></string>
+    <string name="_bx_dev_frm_err_prelists_edit"><![CDATA[Невозможно обновить список данных]]></string>
+    <string name="_bx_dev_frm_txt_prelists_export_popup"><![CDATA[Экспортировать список данных "{0}"]]></string>
+    <string name="_bx_dev_frm_txt_prelists_prelist"><![CDATA[Построитель форм - Список данных]]></string>
+    <string name="_bx_dev_frm_txt_prelists_display_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_txt_prelists_display_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_dev_frm_txt_sys_prelists_id"><![CDATA[id]]></string>
+    <string name="_bx_dev_frm_txt_sys_prelists_key"><![CDATA[Ключ]]></string>
+    <string name="_bx_dev_frm_txt_prelists_key"><![CDATA[Ключ]]></string>
+    <string name="_bx_dev_frm_err_prelists_key"><![CDATA[Здесь нужно ввести уникальное значение]]></string>
+    <string name="_bx_dev_frm_txt_sys_prelists_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_txt_prelists_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_err_prelists_module"><![CDATA[Нужно выбрать модуль]]></string>
+    <string name="_bx_dev_frm_txt_sys_prelists_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_txt_prelists_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_err_prelists_title"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_frm_txt_sys_prelists_use_for_sets"><![CDATA[Использовать для наборов]]></string>
+    <string name="_bx_dev_frm_txt_prelists_use_for_sets"><![CDATA[Использовать для наборов]]></string>
+    <string name="_bx_dev_frm_btn_sys_prelists_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_btn_prelists_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_btn_prelists_save"><![CDATA[Сохранить]]></string>
+    <string name="_bx_dev_frm_btn_sys_prelists_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_btn_prelists_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_btn_prelists_done"><![CDATA[Выполнено]]></string>
+    <string name="_bx_dev_frm_txt_prelists_export_insert"><![CDATA[Добавление в базу данных]]></string>
+    <string name="_bx_dev_frm_txt_prelists_export_delete"><![CDATA[Удаление из базы данных]]></string>
+    <string name="_bx_dev_frm_txt_prevalues_create_popup"><![CDATA[Добавить значение данных]]></string>
+    <string name="_bx_dev_frm_err_prevalues_create"><![CDATA[Невозможно добавить значение данных]]></string>
+    <string name="_bx_dev_frm_txt_prevalues_edit_popup"><![CDATA[Редактировать значение данных "{0}"]]></string>
+    <string name="_bx_dev_frm_err_prevalues_edit"><![CDATA[Невозможно обновить значение данных]]></string>
+    <string name="_bx_dev_frm_txt_prevalues_prevalue"><![CDATA[Построитель форм - Значение данных]]></string>
+    <string name="_bx_dev_frm_txt_prevalues_display_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_txt_prevalues_display_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_dev_frm_txt_sys_prevalues_id"><![CDATA[ID]]></string>
+    <string name="_bx_dev_frm_txt_sys_prevalues_key"><![CDATA[Список]]></string>
+    <string name="_bx_dev_frm_txt_prevalues_key"><![CDATA[Список]]></string>
+    <string name="_bx_dev_frm_txt_prevalues_key_select"><![CDATA[Выбрать список...]]></string>
+    <string name="_bx_dev_frm_err_prevalues_key"><![CDATA[Нужно выбрать список]]></string>
+    <string name="_bx_dev_frm_txt_sys_prevalues_value"><![CDATA[Значение]]></string>
+    <string name="_bx_dev_frm_txt_prevalues_value"><![CDATA[Значение]]></string>
+    <string name="_bx_dev_frm_err_prevalues_value"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_frm_txt_sys_prevalues_lkey"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_txt_prevalues_lkey"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_err_prevalues_lkey"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_frm_txt_sys_prevalues_lkey2"><![CDATA[Дополнительный заголовок]]></string>
+    <string name="_bx_dev_frm_txt_prevalues_lkey2"><![CDATA[Дополнительный заголовок]]></string>
+    <string name="_bx_dev_frm_btn_sys_prevalues_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_btn_prevalues_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_btn_sys_prevalues_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_btn_prevalues_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_err_prevalues_create_forbidden"><![CDATA[Этот список уже используется. Невозможно добавить в него нечисловое значение или значений меньше 1 или больше {0}.]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_create_popup"><![CDATA[Добавить новую форму поиска]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_edit_popup"><![CDATA[Редактировать форму поиска "{0}"]]></string>
+    <string name="_bx_dev_frm_err_search_forms_create"><![CDATA[Невозможно добавить форму поиска]]></string>
+    <string name="_bx_dev_frm_err_search_forms_edit"><![CDATA[Невозможно обновить форму поиска]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_form"><![CDATA[Построитель форм - Форма поиска]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_display_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_display_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_forms_id"><![CDATA[ID]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_forms_object"><![CDATA[Название]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_object"><![CDATA[Название]]></string>
+    <string name="_bx_dev_frm_err_forms_object"><![CDATA[Здесь нужно ввести уникальное значение]]></string>    
+    <string name="_bx_dev_frm_txt_sys_search_forms_object_content_info"><![CDATA[Информационный объект]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_object_content_info"><![CDATA[Информационный объект]]></string>
+    <string name="_bx_dev_frm_err_forms_object_content_info"><![CDATA[Здесь нужно выбрать значение из списка]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_forms_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_frm_err_forms_module"><![CDATA[Нужно выбрать модуль]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_forms_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_err_forms_title"><![CDATA[Здесь нужно задать значение]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_forms_class_name"><![CDATA[Название класса]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_class_name"><![CDATA[Название класса]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_forms_class_file"><![CDATA[Файл класса]]></string>
+    <string name="_bx_dev_frm_txt_search_forms_class_file"><![CDATA[Файл класса]]></string>
+    <string name="_bx_dev_frm_btn_sys_search_forms_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_btn_search_forms_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_frm_btn_search_forms_save"><![CDATA[Сохранить]]></string>
+    <string name="_bx_dev_frm_btn_sys_search_forms_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_btn_search_forms_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_edit_popup"><![CDATA[Редактировать поле поиска "{0}"]]></string>
+    <string name="_bx_dev_frm_err_search_fields_edit"><![CDATA[Невозможно обновить поле поиска]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_form"><![CDATA[Построитель форм - Поле поиска]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_display_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_fields_id"><![CDATA[ID]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_fields_object"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_object"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_fields_name"><![CDATA[Название]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_name"><![CDATA[Название]]></string>
+    <string name="_bx_dev_frm_err_search_fields_name"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_fields_type"><![CDATA[Тип]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_type"><![CDATA[Тип]]></string>
+    <string name="_bx_dev_frm_err_search_fields_type"><![CDATA[Здесь нужно выбрать значение из списка]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_fields_caption"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_caption"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_frm_err_search_fields_caption"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_fields_values"><![CDATA[Значения]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_values"><![CDATA[Значения]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_fields_search_type"><![CDATA[Тип (поиск)]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_search_type"><![CDATA[Тип (поиск)]]></string>
+    <string name="_bx_dev_frm_err_search_fields_search_type"><![CDATA[Здесь нужно выбрать значение из списка]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_fields_search_value"><![CDATA[Значение по умолчанию]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_search_value"><![CDATA[Значение по умолчанию]]></string>
+    <string name="_bx_dev_frm_txt_sys_search_fields_search_operator"><![CDATA[Условие]]></string>
+    <string name="_bx_dev_frm_txt_search_fields_search_operator"><![CDATA[Условие]]></string>
+    <string name="_bx_dev_frm_err_search_fields_search_operator"><![CDATA[Здесь нужно выбрать значение из списка]]></string>
+    <string name="_bx_dev_frm_btn_search_fields_save"><![CDATA[Сохранить]]></string>
+    <string name="_bx_dev_frm_btn_sys_search_fields_save"><![CDATA[Сохранить]]></string>
+    <string name="_bx_dev_frm_btn_search_fields_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_frm_btn_sys_search_fields_cancel"><![CDATA[Отменить]]></string>
+
+    <!-- Navigation Builder -->
+    <string name="_bx_dev_nav_txt_menus_gl_title"><![CDATA[Системное имя]]></string>
+    <string name="_bx_dev_nav_txt_menus_gl_set_title"><![CDATA[Набор]]></string>
+    <string name="_bx_dev_nav_txt_menus_gl_items"><![CDATA[Элементы]]></string>
+    <string name="_bx_dev_nav_txt_menus_gl_template_title"><![CDATA[Стиль]]></string>
+    <string name="_bx_dev_nav_txt_menus_gl_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_nav_txt_sets_gl_title"><![CDATA[Системное имя]]></string>
+    <string name="_bx_dev_nav_txt_sets_gl_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_nav_txt_sets_gl_items"><![CDATA[Элементы]]></string>
+    <string name="_bx_dev_nav_txt_items_gl_icon"><![CDATA[Иконка]]></string>
+    <string name="_bx_dev_nav_txt_items_gl_title_system"><![CDATA[Системное имя]]></string>
+    <string name="_bx_dev_nav_txt_items_gl_link"><![CDATA[URL]]></string>
+    <string name="_bx_dev_nav_txt_items_gl_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_nav_txt_items_gl_visible"><![CDATA[Видимо для]]></string>
+    <string name="_bx_dev_nav_btn_menus_gl_create"><![CDATA[Добавить новое меню]]></string>
+    <string name="_bx_dev_nav_btn_menus_gl_export"><![CDATA[Экспортировать меню]]></string>
+    <string name="_bx_dev_nav_btn_sets_gl_create"><![CDATA[Добавить новый набор]]></string>
+    <string name="_bx_dev_nav_btn_items_gl_create"><![CDATA[Добавить новый элемент]]></string>
+    <string name="_bx_dev_nav_btn_items_gl_import"><![CDATA[Импортировать элементы]]></string>
+    <string name="_bx_dev_nav_btn_items_gl_visible"><![CDATA[Видимо для]]></string>
+    <string name="_bx_dev_nav_txt_select_module"><![CDATA[Выбрать модуль...]]></string>
+    <string name="_bx_dev_nav_txt_menus_create_popup"><![CDATA[Добавить новое меню]]></string>
+    <string name="_bx_dev_nav_err_menus_create"><![CDATA[Невозможно добавить меню]]></string>
+    <string name="_bx_dev_nav_txt_menus_edit_popup"><![CDATA[Редактировать меню "{0}"]]></string>
+    <string name="_bx_dev_nav_err_menus_edit"><![CDATA[Невозможно обновить меню]]></string>
+    <string name="_bx_dev_nav_txt_menus_export_popup"><![CDATA[Экспортировать меню "{0}"]]></string>
+    <string name="_bx_dev_nav_txt_menus_menu"><![CDATA[Построитель навигации - Меню]]></string>
+    <string name="_bx_dev_nav_txt_menus_display_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_nav_txt_menus_display_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_dev_nav_txt_sys_menus_id"><![CDATA[ID]]></string>
+    <string name="_bx_dev_nav_txt_sys_menus_object"><![CDATA[Название]]></string>
+    <string name="_bx_dev_nav_txt_menus_object"><![CDATA[Название]]></string>
+    <string name="_bx_dev_nav_err_menus_object"><![CDATA[Здесь нужно ввести уникальное значение]]></string>
+    <string name="_bx_dev_nav_txt_sys_menus_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_nav_txt_menus_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_nav_err_menus_module"><![CDATA[Нужно выбрать модуль]]></string>
+    <string name="_bx_dev_nav_txt_sys_menus_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_nav_txt_menus_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_nav_err_menus_title"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_nav_txt_sys_menus_set_name"><![CDATA[Набор]]></string>
+    <string name="_bx_dev_nav_txt_menus_set_name"><![CDATA[Набор]]></string>
+    <string name="_bx_dev_nav_txt_menus_set_name_select"><![CDATA[Выбрать набор...]]></string>
+    <string name="_bx_dev_nav_err_menus_set_name"><![CDATA[Нужно выбрать набор]]></string>
+    <string name="_bx_dev_nav_txt_sys_menus_template_id"><![CDATA[Стиль]]></string>
+    <string name="_bx_dev_nav_txt_menus_template_id"><![CDATA[Стиль]]></string>
+    <string name="_bx_dev_nav_txt_menus_template_id_select"><![CDATA[Выбрать стиль...]]></string>
+    <string name="_bx_dev_nav_err_menus_template_id"><![CDATA[Нужно выбрать стиль]]></string>
+    <string name="_bx_dev_nav_txt_sys_menus_deletable"><![CDATA[Можно удалять]]></string>
+    <string name="_bx_dev_nav_txt_menus_deletable"><![CDATA[Можно удалять]]></string>
+    <string name="_bx_dev_nav_txt_sys_menus_override_class_name"><![CDATA[Имя класса]]></string>
+    <string name="_bx_dev_nav_txt_menus_override_class_name"><![CDATA[Имя класса]]></string>
+    <string name="_bx_dev_nav_txt_sys_menus_override_class_file"><![CDATA[Файл класса]]></string>
+    <string name="_bx_dev_nav_txt_menus_override_class_file"><![CDATA[Файл класса]]></string>
+    <string name="_bx_dev_nav_txt_menus_export_insert"><![CDATA[Добавление в базу данных]]></string>
+    <string name="_bx_dev_nav_txt_menus_export_delete"><![CDATA[Удаление из базы данных]]></string>
+    <string name="_bx_dev_nav_btn_sys_menus_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_nav_btn_menus_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_nav_btn_menus_save"><![CDATA[Сохранить]]></string>
+    <string name="_bx_dev_nav_btn_sys_menus_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_nav_btn_menus_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_nav_btn_menus_done"><![CDATA[Выполнено]]></string>
+    <string name="_bx_dev_nav_txt_sets_create_popup"><![CDATA[Добавить новый набор]]></string>
+    <string name="_bx_dev_nav_err_sets_create"><![CDATA[Невозможно добавить набор]]></string>
+    <string name="_bx_dev_nav_txt_sets_edit_popup"><![CDATA[Редактировать набор "{0}"]]></string>
+    <string name="_bx_dev_nav_err_sets_edit"><![CDATA[Невозможно обновить набор]]></string>
+    <string name="_bx_dev_nav_txt_sets_set"><![CDATA[Построитель навигации - Наборы]]></string>
+    <string name="_bx_dev_nav_txt_sets_display_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_nav_txt_sets_display_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_dev_nav_txt_sys_sets_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_nav_txt_sets_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_nav_err_sets_module"><![CDATA[Нужно выбрать модуль]]></string>
+    <string name="_bx_dev_nav_txt_sys_sets_set_name"><![CDATA[Набор]]></string>
+    <string name="_bx_dev_nav_txt_sets_set_name"><![CDATA[Набор]]></string>
+    <string name="_bx_dev_nav_err_sets_set_name"><![CDATA[Нужно ввести название набора]]></string>
+    <string name="_bx_dev_nav_txt_sys_sets_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_nav_txt_sets_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_nav_err_sets_title"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_nav_txt_sys_sets_deletable"><![CDATA[Можно удалять]]></string>
+    <string name="_bx_dev_nav_txt_sets_deletable"><![CDATA[Можно удалять]]></string>
+    <string name="_bx_dev_nav_btn_sys_sets_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_nav_btn_sets_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_nav_btn_sys_sets_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_nav_btn_sets_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_nav_txt_items_create_popup"><![CDATA[Добавить новый элемент]]></string>
+    <string name="_bx_dev_nav_err_items_create"><![CDATA[Невозможно добавить элемент]]></string>
+    <string name="_bx_dev_nav_txt_items_edit_popup"><![CDATA[Редактировать элемент "{0}"]]></string>
+    <string name="_bx_dev_nav_err_items_edit"><![CDATA[Невозможно обновить элемент]]></string>
+    <string name="_bx_dev_nav_txt_items_item"><![CDATA[Построитель навигации - Элементы]]></string>
+    <string name="_bx_dev_nav_txt_items_display_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_nav_txt_items_display_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_id"><![CDATA[ID]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_nav_txt_items_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_nav_err_items_module"><![CDATA[Нужно выбрать модуль]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_set_name"><![CDATA[Набор]]></string>
+    <string name="_bx_dev_nav_txt_items_set_name"><![CDATA[Набор]]></string>
+    <string name="_bx_dev_nav_err_items_set_name"><![CDATA[Нужно выбрать набор]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_name"><![CDATA[Название]]></string>
+    <string name="_bx_dev_nav_txt_items_name"><![CDATA[Название]]></string>
+    <string name="_bx_dev_nav_err_items_name"><![CDATA[Здесь нужно ввести уникальное значение]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_title_system"><![CDATA[Системный заголовок]]></string>
+    <string name="_bx_dev_nav_txt_items_title_system"><![CDATA[Системный заголовок]]></string>
+    <string name="_bx_dev_nav_err_items_title_system"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_nav_txt_items_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_link"><![CDATA[Ссылка]]></string>
+    <string name="_bx_dev_nav_txt_items_link"><![CDATA[Ссылка]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_onclick"><![CDATA[OnClick]]></string>
+    <string name="_bx_dev_nav_txt_items_onclick"><![CDATA[OnClick]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_target"><![CDATA[Target]]></string>
+    <string name="_bx_dev_nav_txt_items_target"><![CDATA[Target]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_icon"><![CDATA[Иконка]]></string>
+    <string name="_bx_dev_nav_txt_items_icon"><![CDATA[Иконка]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_submenu_object"><![CDATA[Объект подменю]]></string>
+    <string name="_bx_dev_nav_txt_items_submenu_object"><![CDATA[Объект подменю]]></string>
+    <string name="_bx_dev_nav_txt_sys_items_copyable"><![CDATA[Можно копировать]]></string>
+    <string name="_bx_dev_nav_txt_items_copyable"><![CDATA[Можно копировать]]></string>
+    <string name="_bx_dev_nav_btn_sys_items_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_nav_btn_items_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_nav_btn_items_save"><![CDATA[Сохранить]]></string>
+    <string name="_bx_dev_nav_btn_sys_items_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_nav_btn_items_cancel"><![CDATA[Отменить]]></string>
+
+    <!-- Page Builder -->
+    <string name="_bx_dev_bp_txt_select_module"><![CDATA[Выбрать модуль...]]></string>
+    <string name="_bx_dev_bp_txt_page_create_popup"><![CDATA[Добавить новую страницу]]></string>
+    <string name="_bx_dev_bp_err_page_create"><![CDATA[Невозможно добавить страницу]]></string>
+    <string name="_bx_dev_bp_txt_page_form"><![CDATA[Страница в Построителе страниц]]></string>
+    <string name="_bx_dev_bp_txt_page_display_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_bp_txt_sys_page_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_bp_txt_page_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_bp_err_page_module"><![CDATA[Нужно выбрать модуль]]></string>
+    <string name="_bx_dev_bp_txt_sys_page_object"><![CDATA[Название]]></string>
+    <string name="_bx_dev_bp_txt_page_object"><![CDATA[Название]]></string>
+    <string name="_bx_dev_bp_err_page_object"><![CDATA[Здесь нужно ввести уникальное значение]]></string>
+    <string name="_bx_dev_bp_txt_sys_page_title_system"><![CDATA[Системный заголовок]]></string>
+    <string name="_bx_dev_bp_txt_page_title_system"><![CDATA[Системный заголовок]]></string>
+    <string name="_bx_dev_bp_err_page_title_system"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_bp_txt_sys_page_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_bp_txt_page_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_bp_err_page_title"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_bp_txt_sys_page_uri"><![CDATA[URI]]></string>
+    <string name="_bx_dev_bp_txt_page_uri"><![CDATA[URI]]></string>
+    <string name="_bx_dev_bp_txt_sys_page_url"><![CDATA[URL]]></string>
+    <string name="_bx_dev_bp_txt_page_url"><![CDATA[URL]]></string>
+    <string name="_bx_dev_bp_txt_sys_page_layout_id"><![CDATA[Дизайн]]></string>
+    <string name="_bx_dev_bp_txt_page_layout_id"><![CDATA[Дизайн]]></string>
+    <string name="_bx_dev_bp_txt_page_layout_id_select"><![CDATA[Выбрать дизайн...]]></string>
+    <string name="_bx_dev_bp_err_page_layout_id"><![CDATA[Нужно выбрать дизайн]]></string>
+    <string name="_bx_dev_bp_txt_page_cache_editable"><![CDATA[Можно редактировать]]></string>
+    <string name="_bx_dev_bp_txt_sys_page_deletable"><![CDATA[Можно удалять]]></string>
+    <string name="_bx_dev_bp_txt_page_deletable"><![CDATA[Можно удалять]]></string>
+    <string name="_bx_dev_bp_txt_sys_page_override_class_name"><![CDATA[Название класса]]></string>
+    <string name="_bx_dev_bp_txt_page_override_class_name"><![CDATA[Название класса]]></string>
+    <string name="_bx_dev_bp_txt_sys_page_override_class_file"><![CDATA[Файл класса]]></string>
+    <string name="_bx_dev_bp_txt_page_override_class_file"><![CDATA[Файл класса]]></string>
+    <string name="_bx_dev_bp_btn_sys_page_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_bp_btn_page_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_bp_btn_sys_page_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_bp_btn_page_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_bp_btn_page_done"><![CDATA[Выполнено]]></string>
+    <string name="_bx_dev_bp_btn_page_export"><![CDATA[Экспортировать страницу]]></string>
+    <string name="_bx_dev_bp_txt_page_export_popup"><![CDATA[Экспортировать страницу "{0}"]]></string>
+    <string name="_bx_dev_bp_txt_page_export_insert"><![CDATA[Добавление в базу данных]]></string>
+    <string name="_bx_dev_bp_txt_page_export_delete"><![CDATA[Удаление из базы данных]]></string>
+    <string name="_bx_dev_bp_txt_block_edit_popup"><![CDATA[Редактировать блок "{0}"]]></string>
+    <string name="_bx_dev_bp_err_block_edit"><![CDATA[Невозможно обновить страницу]]></string>
+    <string name="_bx_dev_bp_err_block_not_found"><![CDATA[Блок не найден]]></string>
+    <string name="_bx_dev_bp_err_block_delete"><![CDATA[Невозможно удалить блок]]></string>
+    <string name="_bx_dev_bp_txt_block_form"><![CDATA[Блок в Построителе страниц]]></string>
+    <string name="_bx_dev_bp_txt_block_display_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_dev_bp_txt_sys_block_id"><![CDATA[ID]]></string>
+    <string name="_bx_dev_bp_txt_sys_block_object"><![CDATA[Название]]></string>
+    <string name="_bx_dev_bp_txt_block_object"><![CDATA[Название]]></string>
+    <string name="_bx_dev_bp_err_block_object"><![CDATA[Здесь нужно ввести уникальное значение]]></string>
+    <string name="_bx_dev_bp_txt_sys_block_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_bp_txt_block_module"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_bp_err_block_module"><![CDATA[Нужно выбрать модуль]]></string>
+	<string name="_bx_dev_bp_txt_sys_block_title_system"><![CDATA[Системный заголовок]]></string>
+    <string name="_bx_dev_bp_txt_block_title_system"><![CDATA[Системный заголовок]]></string>
+    <string name="_bx_dev_bp_err_block_title_system"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_bp_txt_sys_block_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_bp_txt_block_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_dev_bp_err_block_title"><![CDATA[Здесь нужно ввести значение]]></string>
+    <string name="_bx_dev_bp_txt_sys_block_designbox_id"><![CDATA[Дизайн]]></string>
+    <string name="_bx_dev_bp_txt_block_designbox_id"><![CDATA[Дизайн]]></string>
+    <string name="_bx_dev_bp_err_block_designbox_id"><![CDATA[Нужно выбрать дизайн]]></string>
+    <string name="_bx_dev_bp_txt_sys_block_visible_for"><![CDATA[Видимо для]]></string>
+    <string name="_bx_dev_bp_txt_block_visible_for"><![CDATA[Видимо для]]></string>
+    <string name="_bx_dev_bp_txt_block_visible_for_all"><![CDATA[Всех]]></string>
+    <string name="_bx_dev_bp_txt_block_visible_for_selected"><![CDATA[Выбранных уровней]]></string>
+    <string name="_bx_dev_bp_txt_sys_block_visible_for_levels"><![CDATA[Выбранных уровней]]></string>
+    <string name="_bx_dev_bp_txt_block_visible_for_levels"><![CDATA[Выбрать уровни]]></string>
+    <string name="_bx_dev_bp_txt_block_content_service"><![CDATA[Код]]></string>
+    <string name="_bx_dev_bp_txt_block_content_lang"><![CDATA[Содержимое]]></string>
+    <string name="_bx_dev_bp_dsc_block_content_lang"><![CDATA[Введите языковой ключ]]></string>
+    <string name="_bx_dev_bp_txt_sys_block_deletable"><![CDATA[Можно удалять]]></string>
+    <string name="_bx_dev_bp_txt_block_deletable"><![CDATA[Можно удалять]]></string>
+    <string name="_bx_dev_bp_txt_sys_block_copyable"><![CDATA[Можно копировать]]></string>
+    <string name="_bx_dev_bp_txt_block_copyable"><![CDATA[Можно копировать]]></string>
+    <string name="_bx_dev_bp_txt_sys_block_active"><![CDATA[Активно]]></string>
+    <string name="_bx_dev_bp_txt_block_active"><![CDATA[Активно]]></string>
+    <string name="_bx_dev_bp_btn_sys_block_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_bp_btn_block_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_dev_bp_btn_block_save"><![CDATA[Сохранить]]></string>
+    <string name="_bx_dev_bp_btn_sys_block_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_bp_btn_block_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_dev_bp_btn_sys_block_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_dev_bp_btn_block_delete"><![CDATA[Удалить]]></string>
+
+	<!-- Polyglot -->
+    <string name="_bx_dev_pgt_txt_manage_gl_title"><![CDATA[Модуль]]></string>
+    <string name="_bx_dev_pgt_btn_manage_gl_recompile"><![CDATA[Перекомпилировать всё]]></string>
+    <string name="_bx_dev_pgt_btn_manage_gl_restore"><![CDATA[Восстановить всё]]></string>
+    <string name="_bx_dev_pgt_txt_manage_recompile_title_sing"><![CDATA[Перекомпилировать %s язык для модуля %s.]]></string>
+    <string name="_bx_dev_pgt_txt_manage_restore_title_sing"><![CDATA[Восстановить %s язык для модуля %s.]]></string>
+    <string name="_bx_dev_pgt_txt_manage_recompile_title_plur"><![CDATA[Перекомпилировать %s язык для всех модулей.]]></string>
+    <string name="_bx_dev_pgt_txt_manage_restore_title_plur"><![CDATA[Восстановить %s язык для всех модулей.]]></string>
+    <string name="_bx_dev_pgt_txt_manage_modules_all"><![CDATA[Все]]></string>
+
+	<!-- Hash -->
+	<string name="_bx_dev_hash_msg_reset_hash_system"><![CDATA[Системный хэш успешно сброшен.]]></string>
+	<string name="_bx_dev_hash_err_reset_hash_system"><![CDATA[Невозможно сбросить системный хэш.]]></string>
+	<string name="_bx_dev_hash_msg_reset_hash_modules"><![CDATA[Хэш успешно сброшен для следующих модулей:]]></string>
+	<string name="_bx_dev_hash_txt_reset_hash_module"><![CDATA[Модуль]]></string>
+	<string name="_bx_dev_hash_txt_reset_hash_files"><![CDATA[Файлов хэшировано]]></string>
+</resources>

+ 28 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_dolcon/ru.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+	<string name="_sys_module_dolcon"><![CDATA[Dolphin-соединение]]></string>
+	<string name="_bx_dolcon"><![CDATA[Dolphin-соединение]]></string>
+	<string name="_bx_dolcon_settings"><![CDATA[Dolphin-соединение]]></string>
+	<string name="_bx_dolcon_information_block"><![CDATA[
+Этот модуль может использоваться для захода на сайт используя Dolphin сайт (главный сайт). <br />
+Для этого нужно зайти на главный сайт, установить модуль "OAuth2 Server", добавить новый клиентский сайт, указав любой заголовок и следующий URL: <br />
+<strong>{0}</strong><br />
+Затем нужно ввести полученные ключ и секретный код в настройках этого модуля.]]></string>
+	<string name="_bx_dolcon_profile_error_api_keys"><![CDATA[Пожалуйста, настройте модуль в административной панели (невозможно определить ключи)]]></string>
+	<string name="_bx_dolcon_chart"><![CDATA[Dolphin профили]]></string>
+	<string name="_bx_dolcon_auth_title"><![CDATA[Dolphin-соединение]]></string>
+
+    <string name="_bx_dolcon_adm_stg_cpt_type"><![CDATA[Dolphin-соединение]]></string>
+    <string name="_bx_dolcon_option_app_id"><![CDATA[Dolphin App Key]]></string>
+    <string name="_bx_dolcon_option_app_secret"><![CDATA[Dolphin App Secret]]></string>
+    <string name="_bx_dolcon_option_app_url"><![CDATA[URL Dolphin сайта]]></string>
+    <string name="_bx_dolcon_option_auto_friends"><![CDATA[Автоматически делать друзьями тех, что уже друг на Dolphin сайте]]></string>
+    <string name="_bx_dolcon_option_rewrite"><![CDATA[Использовать преобразованные ссылки на Dolphin сайте]]></string>
+
+	<string name="_bx_dolcon_et_password_generated"><![CDATA[Dolphin-соединение: временный пароль]]></string>
+	<string name="_bx_dolcon_et_password_generated_subject"><![CDATA[Временный пароль]]></string>
+	<string name="_bx_dolcon_et_password_generated_body"><![CDATA[{email_header}
+<p>Временный пароль - <b>{password}</b></p>
+<p>Его нужно изменить, после первого захода на сайт.</p>
+{email_footer}]]></string>
+</resources>

+ 405 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_events/ru.xml

@@ -0,0 +1,405 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+	<string name="_bx_events"><![CDATA[События]]></string>
+	<string name="_bx_events_cmts"><![CDATA[События - Комментарии]]></string>
+
+	<string name="_bx_events_option_num_connections_quick"><![CDATA[Число элементов в блоке друзей]]></string>
+    <string name="_bx_events_option_per_page_browse"><![CDATA[Число элементов на странице]]></string>
+	<string name="_bx_events_option_num_rss"><![CDATA[Число элементов в ленте RSS]]></string>
+    <string name="_bx_events_option_time_format"><![CDATA[Формат времени]]></string>
+    <string name="_bx_events_option_short_date_format"><![CDATA[Короткий формат даты]]></string>
+    <string name="_bx_events_option_searchable_fields"><![CDATA[Поля для поиска]]></string>
+
+	<string name="_bx_events_form_profile"><![CDATA[События]]></string>
+	<string name="_bx_events_form_profile_display_add"><![CDATA[Добавление события]]></string>
+	<string name="_bx_events_form_profile_display_edit"><![CDATA[Редактирование события]]></string>
+	<string name="_bx_events_form_profile_display_edit_cover"><![CDATA[Редактирование обложки]]></string>
+	<string name="_bx_events_form_profile_display_delete"><![CDATA[Удаление события]]></string>
+	<string name="_bx_events_form_profile_display_view"><![CDATA[Просмотр события]]></string>
+    <string name="_bx_events_form_profile_display_view_full"><![CDATA[Полный просмотр события]]></string>
+    <string name="_bx_events_form_profile_display_invite"><![CDATA[Приглашение на событие]]></string>
+    <string name="_bx_events_form_profile_input_author"><![CDATA[Автор]]></string>
+	<string name="_bx_events_form_profile_input_sys_do_submit"><![CDATA[Выполнить]]></string>
+    <string name="_bx_events_form_profile_input_sys_join_confirm"><![CDATA[Подтверждение регистрации]]></string>
+    <string name="_bx_events_form_profile_input_join_confirm"><![CDATA[Подтверждение регистрации]]></string>
+    <string name="_bx_events_form_profile_input_sys_allow_view_to"><![CDATA[Конфиденциальность]]></string>
+    <string name="_bx_events_form_profile_input_allow_view_to"><![CDATA[Конфиденциальность]]></string>
+    <string name="_bx_events_form_profile_input_allow_view_to_desc"><![CDATA[Закрытое - все могут найти событие и видеть кто в нём состоит, только участники могут видеть сообщения. Секретное - только участники могут найти событие и видеть сообщения.]]></string>
+    <string name="_bx_events_form_profile_input_sys_initial_members"><![CDATA[Пригласить участников]]></string>
+    <string name="_bx_events_form_profile_input_initial_members"><![CDATA[Пригласить участников]]></string>
+    <string name="_bx_events_form_profile_input_sys_event_name"><![CDATA[Название события]]></string>
+    <string name="_bx_events_form_profile_input_event_name"><![CDATA[Название события]]></string>
+    <string name="_bx_events_form_profile_input_event_name_err"><![CDATA[Эта информация необходима. Пожалуйста, заполните это поле.]]></string>
+    <string name="_bx_events_form_profile_input_sys_event_desc"><![CDATA[Описание]]></string>
+    <string name="_bx_events_form_profile_input_event_desc"><![CDATA[Описание]]></string>
+    <string name="_bx_events_form_profile_input_sys_event_cat"><![CDATA[Категория]]></string>
+	<string name="_bx_events_form_profile_input_event_cat"><![CDATA[Категория]]></string>
+    <string name="_bx_events_form_profile_input_event_cat_err"><![CDATA[Поле категории обязатаельное]]></string>
+	<string name="_bx_events_form_profile_input_sys_picture"><![CDATA[Картинка события]]></string>
+	<string name="_bx_events_form_profile_input_picture"><![CDATA[Загрузить новую картинку события]]></string>
+	<string name="_bx_events_form_profile_input_picture_err"><![CDATA[Картинка события обязательна]]></string>
+	<string name="_bx_events_form_profile_input_sys_cover"><![CDATA[Картинка обложки]]></string>
+	<string name="_bx_events_form_profile_input_cover"><![CDATA[Загрузить новую картинку обложки]]></string>
+	<string name="_bx_events_form_profile_input_sys_delete_confirm"><![CDATA[Подтверждение на удаление]]></string>
+	<string name="_bx_events_form_profile_input_delete_confirm"><![CDATA[Я уверен, что хочу удалить эту группу]]></string>
+	<string name="_bx_events_form_profile_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено.]]></string>
+	<string name="_bx_events_form_profile_input_delete_confirm_error"><![CDATA[Пожалуйста, отметьте этот флажок, если действительно хотите удалить группу.]]></string>
+    <string name="_bx_events_form_profile_input_sys_reoccurring"><![CDATA[Повторяющееся событие]]></string>
+    <string name="_bx_events_form_profile_input_reoccurring"><![CDATA[Повторяющееся событие]]></string>
+    <string name="_bx_events_form_profile_input_reoccurring_add_interval"><![CDATA[Добавить повторяющийся интервал]]></string>
+    <string name="_bx_events_form_profile_input_sys_date_start"><![CDATA[Начало]]></string>
+    <string name="_bx_events_form_profile_input_date_start"><![CDATA[Начало]]></string>
+    <string name="_bx_events_form_profile_input_date_start_err"><![CDATA[Дата начала обязательна.]]></string>
+    <string name="_bx_events_form_profile_input_sys_date_end"><![CDATA[Конец]]></string>
+    <string name="_bx_events_form_profile_input_date_end"><![CDATA[Конец]]></string>
+    <string name="_bx_events_form_profile_input_date_end_err"><![CDATA[Дата конца обязательна.]]></string>
+    <string name="_bx_events_form_profile_input_sys_timezone"><![CDATA[Часовой пояс]]></string>
+    <string name="_bx_events_form_profile_input_timezone"><![CDATA[Часовой пояс]]></string>
+    <string name="_bx_events_form_profile_input_sys_time"><![CDATA[Время]]></string>
+    <string name="_bx_events_form_profile_input_time"><![CDATA[Время]]></string>
+    <string name="_bx_events_form_profile_input_sys_reminder"><![CDATA[Напоминание]]></string>
+    <string name="_bx_events_form_profile_input_reminder"><![CDATA[Напоминание]]></string>
+    
+    <string name="_bx_events_form_input_repeat_year"><![CDATA[Повторять: год]]></string>
+    <string name="_bx_events_form_input_repeat_month"><![CDATA[Повторять: месяц]]></string>
+    <string name="_bx_events_form_input_repeat_week_of_month"><![CDATA[Повторять: неделя в месяце]]></string>
+    <string name="_bx_events_form_input_repeat_day_of_month"><![CDATA[Повторять: число месяца]]></string>
+    <string name="_bx_events_form_input_repeat_day_of_week"><![CDATA[Повторять: день недели]]></string>
+    <string name="_bx_events_form_input_stop_repeating"><![CDATA[Отстановить повтор]]></string>
+
+	<string name="_bx_events_acl_action_create_profile"><![CDATA[Создать событие]]></string>
+	<string name="_bx_events_acl_action_delete_profile"><![CDATA[Удалить событие]]></string>
+	<string name="_bx_events_acl_action_view_profile"><![CDATA[Просмотреть событие]]></string>
+	<string name="_bx_events_acl_action_edit_any_profile"><![CDATA[Редактировать любое событие]]></string>
+
+	<string name="_bx_events_page_title_sys_joined_entries"><![CDATA[Участие в событиях]]></string>
+	<string name="_bx_events_page_title_joined_entries"><![CDATA[Участие в событиях]]></string>
+	<string name="_bx_events_page_title_sys_create_profile"><![CDATA[Создать событие]]></string>
+	<string name="_bx_events_page_title_create_profile"><![CDATA[Создать событие]]></string>
+	<string name="_bx_events_page_title_sys_edit_profile"><![CDATA[Редактировать событие]]></string>
+	<string name="_bx_events_page_title_edit_profile"><![CDATA[Редактировать событие]]></string>
+	<string name="_bx_events_page_title_sys_edit_profile_cover"><![CDATA[Редактировать обложку события]]></string>
+	<string name="_bx_events_page_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+	<string name="_bx_events_page_title_sys_delete_profile"><![CDATA[Удалить событие]]></string>
+	<string name="_bx_events_page_title_delete_profile"><![CDATA[Удалить событие]]></string>
+	<string name="_bx_events_page_title_sys_view_profile_closed"><![CDATA[Просмотр закрытого события]]></string>
+	<string name="_bx_events_page_title_sys_view_profile"><![CDATA[Просмотр события]]></string>
+	<string name="_bx_events_page_title_view_profile"><![CDATA[{display_name}]]></string>
+	<string name="_bx_events_page_title_browse"><![CDATA[События]]></string>
+	<string name="_bx_events_page_title_browse_by_author"><![CDATA[События {display_name}]]></string>
+	<string name="_bx_events_page_title_browse_featured"><![CDATA[Продвинутые события]]></string>
+	<string name="_bx_events_page_title_browse_top"><![CDATA[Лучшие события]]></string>
+	<string name="_bx_events_page_title_browse_recent"><![CDATA[Новые события]]></string>
+	<string name="_bx_events_page_title_browse_connections"><![CDATA[{0} связей]]></string>
+	<string name="_bx_events_page_title_browse_connections_mutual"><![CDATA[{0} и {1} обоюдных связей]]></string>
+	<string name="_bx_events_page_title_sys_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_events_page_title_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_events_page_title_sys_group_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_events_page_title_group_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_events_page_title_sys_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_events_page_title_profile_comments"><![CDATA[Комментарии]]></string>
+	<string name="_bx_events_page_title_sys_profile_info"><![CDATA[Инфо события]]></string>
+	<string name="_bx_events_page_title_profile_info"><![CDATA[Информация о событии "{display_name}"]]></string>
+	<string name="_bx_events_page_title_sys_recent"><![CDATA[Новые события]]></string>
+	<string name="_bx_events_page_title_recent"><![CDATA[Новые события]]></string>
+	<string name="_bx_events_page_title_sys_manage"><![CDATA[Управление своими событиями]]></string>
+	<string name="_bx_events_page_title_sys_manage_administration"><![CDATA[Управление всеми событиями]]></string>
+	<string name="_bx_events_page_title_manage"><![CDATA[Управление]]></string>
+	<string name="_bx_events_page_title_sys_top"><![CDATA[Популярные события]]></string>
+    <string name="_bx_events_page_title_top"><![CDATA[Популярные события]]></string>
+	<string name="_bx_events_page_title_sys_calendar"><![CDATA[Календарь событий]]></string>
+    <string name="_bx_events_page_title_calendar"><![CDATA[Календарь событий]]></string>
+    <string name="_bx_events_page_title_sys_invite_to_group"><![CDATA[Приглашение на событие]]></string>
+    <string name="_bx_events_page_title_invite_to_group"><![CDATA[Приглашение на событие]]></string>
+    <string name="_bx_events_page_title_sys_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_events_page_title_entries_search"><![CDATA[Поиск]]></string>
+
+	<string name="_bx_events_page_block_title_favorites_of_author"><![CDATA[Избранные события]]></string>   
+    <string name="_bx_events_page_block_title_sys_favorites_of_author"><![CDATA[Избранные события]]></string>
+	<string name="_bx_events_page_block_title_sys_joined_entries"><![CDATA[Участие в событиях]]></string>
+	<string name="_bx_events_page_block_title_joined_entries"><![CDATA[Участие в событиях]]></string>
+	<string name="_bx_events_page_block_title_create_profile"><![CDATA[Создать событие]]></string>
+	<string name="_bx_events_page_block_title_edit_profile"><![CDATA[Редактировать событие]]></string>
+	<string name="_bx_events_page_block_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+	<string name="_bx_events_page_block_title_delete_profile"><![CDATA[Удалить событие]]></string>
+	<string name="_bx_events_page_block_title_profile_info_link"><![CDATA["<a href="{profile_link}">{display_name}</a>" - инфо]]></string>
+	<string name="_bx_events_page_block_title_profile_info"><![CDATA[Инфо]]></string>
+	<string name="_bx_events_page_block_title_system_profile_info"><![CDATA[Инфо]]></string>
+	<string name="_bx_events_page_block_title_profile_description"><![CDATA[Описание]]></string>
+	<string name="_bx_events_page_block_title_profile_friends_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - друзья]]></string>
+	<string name="_bx_events_page_block_title_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_events_page_block_title_system_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_events_page_block_title_admins"><![CDATA[Администраторы]]></string>
+	<string name="_bx_events_page_block_title_fans_link"><![CDATA[Участники группы: <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_events_page_block_title_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_events_page_block_title_system_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_events_page_block_title_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_events_page_block_title_profile_comments_link"><![CDATA[Комментарии к <a href="{entry_link}">{title}</a>]]></string>
+	<string name="_bx_events_page_block_title_profile_actions"><![CDATA[Действия]]></string>
+	<string name="_bx_events_page_block_title_featured_profiles"><![CDATA[Продвинутые события]]></string>
+	<string name="_bx_events_page_block_title_latest_profiles"><![CDATA[Новые события]]></string>
+	<string name="_bx_events_page_block_title_system_manage"><![CDATA[Управление своими событиями]]></string>
+	<string name="_bx_events_page_block_title_system_manage_administration"><![CDATA[Управление всеми событиями]]></string>
+	<string name="_bx_events_page_block_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_events_page_block_title_top_profiles"><![CDATA[Популярные события]]></string>
+    <string name="_bx_events_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_events_page_block_title_categories"><![CDATA[Категории событий]]></string>
+    <string name="_bx_events_page_block_title_calendar"><![CDATA[Календарь событий]]></string>
+    <string name="_bx_events_page_block_title_profile_calendar"><![CDATA[Календарь событий]]></string>
+    <string name="_bx_events_page_block_title_entry_location"><![CDATA[Местоположение]]></string>
+    <string name="_bx_events_page_block_title_categories"><![CDATA[Категории событий]]></string>
+    <string name="_bx_events_page_block_title_invite_to_group"><![CDATA[Приглашение на событие]]></string>
+    <string name="_bx_events_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_events_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
+    <string name="_bx_events_page_block_title_search_form_cmts"><![CDATA[Форма поиска комментариев]]></string>
+    <string name="_bx_events_page_block_title_search_results_cmts"><![CDATA[Результаты поиска комментариев]]></string>
+
+    <string name="_bx_events_menu_title_submenu"><![CDATA[Под-меню событий]]></string>
+    <string name="_bx_events_menu_set_title_submenu"><![CDATA[Под-меню событий]]></string>
+    <string name="_bx_events_menu_set_title_view_profile_actions"><![CDATA[Событие - Действия]]></string>
+    <string name="_bx_events_menu_title_view_profile_actions"><![CDATA[Событие - Действия]]></string>
+    <string name="_bx_events_menu_set_title_view_profile_actions_more"><![CDATA[Событие - Дополнительные действия]]></string>
+    <string name="_bx_events_menu_title_view_profile_actions_more"><![CDATA[Событие - Дополнительные действия]]></string>
+    <string name="_bx_events_menu_set_title_view_profile_submenu"><![CDATA[Подменю просмотра события]]></string>
+    <string name="_bx_events_menu_title_view_profile_submenu"><![CDATA[Подменю просмотра события]]></string>
+    <string name="_bx_events_menu_title_view_profile_submenu_cover"><![CDATA[Подменю события на обложке]]></string>
+	<string name="_bx_events_menu_set_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_events_menu_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_events_menu_item_title_system_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_events_menu_item_title_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_events_menu_item_title_system_delete_with_content"><![CDATA[Удалить вместе с содержимым]]></string>
+    <string name="_bx_events_menu_item_title_delete_with_content"><![CDATA[Удалить вместе с содержимым]]></string>
+    <string name="_bx_events_menu_item_title_system_edit_cover"><![CDATA[Редактировать обложку]]></string>
+    <string name="_bx_events_menu_item_title_edit_cover"><![CDATA[Редактировать обложку]]></string>
+    <string name="_bx_events_menu_item_title_system_edit_profile"><![CDATA[Редактировать событие]]></string>
+    <string name="_bx_events_menu_item_title_edit_profile"><![CDATA[Редактировать событие]]></string>
+    <string name="_bx_events_menu_item_title_system_delete_profile"><![CDATA[Удалить событие]]></string>
+    <string name="_bx_events_menu_item_title_delete_profile"><![CDATA[Удалить событие]]></string>
+    <string name="_bx_events_menu_item_title_system_delete_account"><![CDATA[Удалить аккаунт]]></string>
+    <string name="_bx_events_menu_item_title_delete_account"><![CDATA[Удалить аккаунт]]></string>
+    <string name="_bx_events_menu_item_title_system_profile_type"><![CDATA[Событие]]></string>
+    <string name="_bx_events_menu_item_title_profile_type"><![CDATA[Событие]]></string>
+    <string name="_bx_events_menu_item_title_system_create_profile"><![CDATA[Создать событие]]></string>
+    <string name="_bx_events_menu_item_title_create_profile"><![CDATA[Создать событие]]></string>
+    <string name="_bx_events_menu_item_title_system_view_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_events_menu_item_title_view_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_events_menu_item_title_system_view_joined_groups"><![CDATA[События]]></string>
+    <string name="_bx_events_menu_item_title_view_joined_groups"><![CDATA[События]]></string>
+    <string name="_bx_events_menu_item_title_system_view_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_events_menu_item_title_view_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_events_menu_item_title_system_view_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_events_menu_item_title_view_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_events_menu_item_title_system_view_profile_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_events_menu_item_title_view_profile_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_events_menu_item_title_system_view_profile_view"><![CDATA[Событие]]></string>
+    <string name="_bx_events_menu_item_title_view_profile_view"><![CDATA[Событие]]></string>
+    <string name="_bx_events_menu_item_title_system_invite"><![CDATA[Пригласить]]></string>
+    <string name="_bx_events_menu_item_title_invite"><![CDATA[Пригласить]]></string>
+
+    <string name="_bx_events_menu_item_title_system_befriend"><![CDATA[Добавить друга]]></string>
+    <string name="_bx_events_menu_item_title_befriend"><![CDATA[Добавить друга]]></string>
+    <string name="_bx_events_menu_item_title_befriend_sent"><![CDATA[Добавить друга (запрошено)]]></string>
+    <string name="_bx_events_menu_item_title_befriend_confirm"><![CDATA[Принять запрос о дружбе]]></string>
+    <string name="_bx_events_menu_item_title_system_unfriend"><![CDATA[Перестать дружить]]></string>
+    <string name="_bx_events_menu_item_title_unfriend"><![CDATA[Перестать дружить]]></string>
+    <string name="_bx_events_menu_item_title_unfriend_cancel_request"><![CDATA[Отменить запрос о дружбе]]></string>
+    <string name="_bx_events_menu_item_title_unfriend_reject_request"><![CDATA[Отвергнуть запрос о дружбе]]></string>
+
+    <string name="_bx_events_menu_item_title_system_become_fan"><![CDATA[Присоединиться]]></string>
+    <string name="_bx_events_menu_item_title_become_fan"><![CDATA[Присоединиться]]></string>
+    <string name="_bx_events_menu_item_title_become_fan_sent"><![CDATA[Присоединение запрошено]]></string>
+    <string name="_bx_events_menu_item_title_become_fan_confirm"><![CDATA[Одобрить присоединение]]></string>
+    <string name="_bx_events_menu_item_title_system_leave_group"><![CDATA[Покинуть событие]]></string>
+    <string name="_bx_events_menu_item_title_leave_group"><![CDATA[Покинуть событие]]></string>
+    <string name="_bx_events_menu_item_title_leave_group_cancel_request"><![CDATA[Отменить присоединение]]></string>
+    <string name="_bx_events_menu_item_title_leave_group_reject_request"><![CDATA[Отвергнуть присоединение]]></string>
+
+    <string name="_bx_events_menu_item_title_system_subscribe"><![CDATA[Получать уведомления]]></string>
+    <string name="_bx_events_menu_item_title_subscribe"><![CDATA[Получать уведомления]]></string>
+    <string name="_bx_events_menu_item_title_system_unsubscribe"><![CDATA[Отключить уведомления]]></string>
+    <string name="_bx_events_menu_item_title_unsubscribe"><![CDATA[Отключить уведомления]]></string>
+    <string name="_bx_events_menu_item_title_system_more_actions"><![CDATA[Дополнительные действия]]></string>
+    <string name="_bx_events_menu_item_title_more_actions"><![CDATA[]]></string>
+    <string name="_bx_events_menu_item_title_system_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_events_menu_item_title_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_events_menu_item_title_system_friend_requests"><![CDATA[Число запросов дружбы]]></string>
+    <string name="_bx_events_menu_item_title_friend_requests"><![CDATA[{addon} запросов дружбы]]></string>
+    <string name="_bx_events_menu_item_title_system_manage_my_groups"><![CDATA[Мои события]]></string>
+    <string name="_bx_events_menu_item_title_manage_my_groups"><![CDATA[{addon} событий]]></string>
+    <string name="_bx_events_menu_item_title_system_entries_recent"><![CDATA[Новые]]></string>
+    <string name="_bx_events_menu_item_title_entries_recent"><![CDATA[Новые]]></string>
+    <string name="_bx_events_menu_item_title_system_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_events_menu_item_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_events_menu_item_title_system_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_events_menu_item_title_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_events_menu_item_title_system_entries_home"><![CDATA[События]]></string>
+    <string name="_bx_events_menu_item_title_entries_home"><![CDATA[События]]></string>
+    <string name="_bx_events_menu_item_title_system_admt_groups"><![CDATA[События]]></string>
+	<string name="_bx_events_menu_item_title_admt_groups"><![CDATA[События - {addon} неодобрено]]></string>
+	<string name="_bx_events_menu_item_title_manage_my"><![CDATA[Мой события]]></string>
+	<string name="_bx_events_menu_item_title_manage_all"><![CDATA[Все события]]></string>
+	<string name="_bx_events_menu_item_title_system_entries_top"><![CDATA[Популярные]]></string>
+    <string name="_bx_events_menu_item_title_entries_top"><![CDATA[Популярные]]></string>
+	<string name="_bx_events_menu_item_title_system_calendar"><![CDATA[Календарь]]></string>
+    <string name="_bx_events_menu_item_title_calendar"><![CDATA[Календарь]]></string>
+
+	<string name="_bx_events_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+	<string name="_bx_events_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
+	<string name="_bx_events_grid_filter_item_title_adm_pending"><![CDATA[В ожидании]]></string>
+	<string name="_bx_events_grid_filter_item_title_adm_suspended"><![CDATA[Заблокированные]]></string>
+	<string name="_bx_events_grid_column_title_adm_active"><![CDATA[Активные]]></string>
+    <string name="_bx_events_grid_column_title_adm_name"><![CDATA[Название]]></string>
+    <string name="_bx_events_grid_column_title_adm_added"><![CDATA[Создание]]></string>
+    <string name="_bx_events_grid_column_title_adm_account"><![CDATA[Аккаунт]]></string>
+    <string name="_bx_events_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_events_grid_action_title_adm_delete_with_content"><![CDATA[Удалить вместе с содержимым]]></string>
+    <string name="_bx_events_grid_action_title_adm_more_actions"><![CDATA[Дополнительные действия]]></string>
+	<string name="_bx_events_grid_action_err_delete"><![CDATA[Невозможно удалить выбранные события.]]></string>
+	<string name="_bx_events_grid_txt_account_manager"><![CDATA[Перенаправить в управление аккаунтом.]]></string>
+
+    <string name="_bx_events_chart_growth"><![CDATA[События: Развитие]]></string>
+    <string name="_bx_events_chart_growth_speed"><![CDATA[События: Скорость развития]]></string>
+
+    <string name="_bx_events_search_extended"><![CDATA[Поиск событий]]></string>
+    <string name="_bx_events_search_extended_cmts"><![CDATA[Поиск комментариев к событиям]]></string>
+
+    <string name="_bx_events_txt_account_pending"><![CDATA[Это событие ожидает одобрения. Пожалуйста, дождитесь ее активации.]]></string>
+    <string name="_bx_events_txt_account_suspended"><![CDATA[Это событие заблокировано.]]></string>
+    <string name="_bx_events_txt_N_fans"><![CDATA[{0} участников]]></string>
+    <string name="_bx_events_txt_sample_single"><![CDATA[событие]]></string>
+    <string name="_bx_events_txt_sample_single_with_article"><![CDATA[событие]]></string>
+    <string name="_bx_events_txt_sample_comment_single"><![CDATA[комментарий к событию]]></string>
+    <string name="_bx_events_txt_sample_vote_single"><![CDATA[голос за событие]]></string>
+    <string name="_bx_events_txt_to_admins"><![CDATA[В админы]]></string>
+    <string name="_bx_events_txt_from_admins"><![CDATA[Из админов]]></string>
+    <string name="_bx_events_txt_private_group"><![CDATA[Приватная группа]]></string>
+    <string name="_bx_events_txt_from_time_to_time"><![CDATA[{0} - {1}]]></string>
+
+	<string name="_bx_events_alert_action_fan_added"><![CDATA[присоединение нового участника]]></string>
+    <string name="_bx_events_txt_ntfs_fan_added"><![CDATA[У <a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> события новый участник - <a href="{subentry_url}">{subentry_sample}</a>]]></string>
+    <string name="_bx_events_alert_action_join_request"><![CDATA[запрос на присоединение к событию]]></string>
+    <string name="_bx_events_txt_ntfs_join_request"><![CDATA[У <a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> события новый запрос на присоединение от <a href="{subentry_url}">{subentry_sample}</a>]]></string>
+    <string name="_bx_events_txt_ntfs_timeline_post_common"><![CDATA[В <a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> событии новая публикация от <a href="{subentry_url}">{subentry_sample}</a>]]></string>
+
+    <string name="_bx_events_privacy_group_closed"><![CDATA[Закрытое событие]]></string>
+    <string name="_bx_events_privacy_group_secret"><![CDATA[Секретное событие]]></string>
+
+    <string name="_bx_events_pre_lists_reminder"><![CDATA[Напоминание о событии]]></string>
+    <string name="_bx_events_reminder_none"><![CDATA[Выключено]]></string>
+    <string name="_bx_events_reminder_1h"><![CDATA[За 1 час]]></string>
+    <string name="_bx_events_reminder_2h"><![CDATA[За 2 часа]]></string>
+    <string name="_bx_events_reminder_3h"><![CDATA[За 3 часа]]></string>
+    <string name="_bx_events_reminder_6h"><![CDATA[За 6 часов]]></string>
+    <string name="_bx_events_reminder_12h"><![CDATA[За 12 часов]]></string>
+    <string name="_bx_events_reminder_24h"><![CDATA[За 24 часа]]></string>
+    
+    <string name="_bx_events_pre_lists_cats"><![CDATA[Категории событий]]></string>
+    <string name="_bx_events_cat_Conference"><![CDATA[Конференция]]></string>
+    <string name="_bx_events_cat_Festival"><![CDATA[Фестиваль]]></string>
+    <string name="_bx_events_cat_Fundraiser"><![CDATA[Сбор средств]]></string>
+    <string name="_bx_events_cat_Lecture"><![CDATA[Лекция]]></string>
+    <string name="_bx_events_cat_Market"><![CDATA[Рынок]]></string>
+    <string name="_bx_events_cat_Meal"><![CDATA[Еда]]></string>
+    <string name="_bx_events_cat_Social_Mixer"><![CDATA[Знакомства]]></string>
+    <string name="_bx_events_cat_Tour"><![CDATA[Тур]]></string>
+    <string name="_bx_events_cat_Volunteering"><![CDATA[Добровольная работа]]></string>
+    <string name="_bx_events_cat_Workshop"><![CDATA[Умелые ручки]]></string>
+    <string name="_bx_events_cat_Other"><![CDATA[Другое]]></string>
+
+    <string name="_bx_events_pre_lists_repeat_year"><![CDATA[Повторять: год]]></string>
+    <string name="_bx_events_cat_repeat_year_every_year"><![CDATA[Каждый год]]></string>
+    <string name="_bx_events_cat_repeat_year_every_2_years"><![CDATA[Каждые 2 года]]></string>
+    <string name="_bx_events_cat_repeat_year_every_3_years"><![CDATA[Каждые 3 года]]></string>
+    <string name="_bx_events_cat_repeat_year_every_4_years"><![CDATA[Каждые 4 года]]></string>
+
+    <string name="_bx_events_pre_lists_repeat_month"><![CDATA[Повторять: месяц]]></string>
+    <string name="_bx_events_cat_repeat_month_every_month"><![CDATA[Каждый месяц]]></string>
+    <string name="_bx_events_cat_repeat_month_jan"><![CDATA[Каждый январь]]></string>
+    <string name="_bx_events_cat_repeat_month_feb"><![CDATA[Каждый февраль]]></string>
+    <string name="_bx_events_cat_repeat_month_mar"><![CDATA[Каждый март]]></string>
+    <string name="_bx_events_cat_repeat_month_apr"><![CDATA[Каждый апрель]]></string>
+    <string name="_bx_events_cat_repeat_month_may"><![CDATA[Каждый май]]></string>
+    <string name="_bx_events_cat_repeat_month_jun"><![CDATA[Каждый июнь]]></string>
+    <string name="_bx_events_cat_repeat_month_jul"><![CDATA[Каждый июль]]></string>
+    <string name="_bx_events_cat_repeat_month_aug"><![CDATA[Каждый август]]></string>
+    <string name="_bx_events_cat_repeat_month_sep"><![CDATA[Каждый сентябрь]]></string>
+    <string name="_bx_events_cat_repeat_month_oct"><![CDATA[Каждый октябрь]]></string>
+    <string name="_bx_events_cat_repeat_month_nov"><![CDATA[Каждый ноябрь]]></string>
+    <string name="_bx_events_cat_repeat_month_dec"><![CDATA[Каждый декабрь]]></string>
+
+    <string name="_bx_events_pre_lists_repeat_week_of_month"><![CDATA[Повторять: неделя в месяце]]></string>
+    <string name="_bx_events_cat_repeat_week_of_month_every_week"><![CDATA[Каждую неделю]]></string>
+    <string name="_bx_events_cat_repeat_week_of_month_first_week_of_month"><![CDATA[Каждую 1-ю неделю месяца]]></string>
+    <string name="_bx_events_cat_repeat_week_of_month_second_week_of_month"><![CDATA[Каждую 2-ю неделю месяца]]></string>
+    <string name="_bx_events_cat_repeat_week_of_month_third_week_of_month"><![CDATA[Каждую 3-ю неделю месяца]]></string>
+    <string name="_bx_events_cat_repeat_week_of_month_fourth_week_of_month"><![CDATA[Каждую 4-ю неделю месяца]]></string>
+    <string name="_bx_events_cat_repeat_week_of_month_fifth_week_of_month"><![CDATA[Каждую 5-ю неделю месяца]]></string>
+    <string name="_bx_events_cat_repeat_week_of_month_sixth_week_of_month"><![CDATA[Каждую 6-ю неделю месяца]]></string>
+
+    <string name="_bx_events_pre_lists_repeat_day_of_month"><![CDATA[Повторять: число месяца]]></string>
+    <string name="_bx_events_cat_repeat_day_of_month_every_day"><![CDATA[Каждый день]]></string>
+
+    <string name="_bx_events_pre_lists_repeat_day_of_week"><![CDATA[Повторять: день недели]]></string>
+    <string name="_bx_events_cat_repeat_day_of_week_every_day"><![CDATA[Каждый день недели]]></string>
+    <string name="_bx_events_cat_repeat_day_of_week_mon"><![CDATA[Каждый понедельник]]></string>
+    <string name="_bx_events_cat_repeat_day_of_week_tue"><![CDATA[Каждый вторник]]></string>
+    <string name="_bx_events_cat_repeat_day_of_week_wed"><![CDATA[Каждую среду]]></string>
+    <string name="_bx_events_cat_repeat_day_of_week_thu"><![CDATA[Каждый четверг]]></string>
+    <string name="_bx_events_cat_repeat_day_of_week_fri"><![CDATA[Каждую пятницу]]></string>
+    <string name="_bx_events_cat_repeat_day_of_week_sat"><![CDATA[Каждую субботу]]></string>
+    <string name="_bx_events_cat_repeat_day_of_week_sun"><![CDATA[Каждое воскресенье]]></string>
+
+    <string name="_bx_events_email_join_request"><![CDATA[Запрос на присоединение к событию]]></string>
+    <string name="_bx_events_email_join_request_subject"><![CDATA[Запрос на присоединение к событию]]></string>
+    <string name="_bx_events_email_join_request_body"><![CDATA[{email_header}
+<p>Получен запрос на присоединение к событию <a href="{EntryUrl}">{EntryTitle}</a> от <a href="{NewMemberUrl}">{NewMemberDisplayName}</a></p>
+{email_footer}]]></string>
+
+    <string name="_bx_events_email_join_reject"><![CDATA[Отклонение запроса на присоединение к событию]]></string>
+    <string name="_bx_events_email_join_reject_subject"><![CDATA[Ваш запрос на присоединение к событию был отклонен]]></string>
+    <string name="_bx_events_email_join_reject_body"><![CDATA[{email_header}
+<p>Ваш запрос на присоединение к событию <a href="{EntryUrl}">{EntryTitle}</a> был отклонен администратором события.</p>
+{email_footer}]]></string>
+
+    <string name="_bx_events_email_join_confirm"><![CDATA[Одобрение запроса на присоединение к событию]]></string>
+    <string name="_bx_events_email_join_confirm_subject"><![CDATA[Ваш запрос на присоединение к событию был одобрен]]></string>
+    <string name="_bx_events_email_join_confirm_body"><![CDATA[{email_header}
+<p>Ваш запрос на присоединение к событию <a href="{EntryUrl}">{EntryTitle}</a> был одобрен.</p>
+{email_footer}]]></string>
+
+    <string name="_bx_events_email_fan_remove"><![CDATA[Удаление из события]]></string>
+    <string name="_bx_events_email_fan_remove_subject"><![CDATA[Вы были удалены из события]]></string>
+    <string name="_bx_events_email_fan_remove_body"><![CDATA[{email_header}
+<p>Ваш профиль был удален из события <a href="{EntryUrl}">{EntryTitle}</a> администратором события.</p>
+{email_footer}]]></string>
+
+    <string name="_bx_events_email_fan_become_admin"><![CDATA[Получение статуса администратора события]]></string>
+    <string name="_bx_events_email_fan_become_admin_subject"><![CDATA[Вы стали администратором события]]></string>
+    <string name="_bx_events_email_fan_become_admin_body"><![CDATA[{email_header}
+<p>Вы получили статус администратора события <a href="{EntryUrl}">{EntryTitle}</a>.</p>
+{email_footer}]]></string>
+
+    <string name="_bx_events_email_admin_become_fan"><![CDATA[Лишение статуса администратора события]]></string>
+    <string name="_bx_events_email_admin_become_fan_subject"><![CDATA[Вы были лишены статуса администратора события]]></string>
+    <string name="_bx_events_email_admin_become_fan_body"><![CDATA[{email_header}
+<p>Вы были лишены статуса администратора события <a href="{EntryUrl}">{EntryTitle}</a>.</p>
+{email_footer}]]></string>
+
+    <string name="_bx_events_email_invitation"><![CDATA[Приглашение на событие]]></string>
+    <string name="_bx_events_email_invitation_subject"><![CDATA[Приглашение на событие "{EntryTitle}"]]></string>
+    <string name="_bx_events_email_invitation_body"><![CDATA[{email_header}
+<p><a href="{InviterUrl}">{InviterDisplayName}</a> пригласил Вас на событие <a href="{EntryUrl}">{EntryTitle}</a>.</p>
+{email_footer}]]></string>
+
+    <string name="_bx_events_email_reminder"><![CDATA[Напоминание о предстроящем событии]]></string>
+    <string name="_bx_events_email_reminder_subject"><![CDATA[Событие "{EntryTitle}" - {EntryBeginShort}]]></string>
+    <string name="_bx_events_email_reminder_body"><![CDATA[{email_header}
+<p class="vevent">
+    Напоминание о событии <a href="{EntryUrl}" class="summary">{EntryTitle}</a>:<br />
+    Дата: <abbr class="dtstart" title="{EntryBeginUTC}">{EntryBegin}</a><br />
+    Место: <span class="location">{EntryLocation}</span> 
+</p>
+{email_footer}]]></string>
+
+</resources>

+ 207 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_files/ru.xml

@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+	<string name="_bx_files"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_cmts"><![CDATA[Комментарии к файлам]]></string>
+
+	<string name="_bx_files_option_summary_chars"><![CDATA[Количество символов в автоматическом описании к файлу]]></string>
+	<string name="_bx_files_option_per_page_browse"><![CDATA[Количество файлов на странице]]></string>
+    <string name="_bx_files_option_per_page_profile"><![CDATA[Количество файлов на странице профайла]]></string>
+	<string name="_bx_files_option_rss_num"><![CDATA[Количество файлов в RSS]]></string>
+	<string name="_bx_files_option_searchable_fields"><![CDATA[Поля для поиска по ключевому слову]]></string>
+
+	<string name="_bx_files_form_upload"><![CDATA[Загрузка файлов]]></string>
+	<string name="_bx_files_form_entry"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_form_entry_display_add"><![CDATA[Добавление файлов]]></string>
+	<string name="_bx_files_form_entry_display_edit"><![CDATA[Редактирование файла]]></string>
+	<string name="_bx_files_form_entry_display_delete"><![CDATA[Удаление файла]]></string>
+	<string name="_bx_files_form_entry_display_view"><![CDATA[Просмотр файла]]></string>
+	<string name="_bx_files_form_entry_input_author"><![CDATA[Автор]]></string>
+	<string name="_bx_files_form_entry_input_sys_do_submit"><![CDATA[Отправить]]></string>
+	<string name="_bx_files_form_entry_input_do_submit"><![CDATA[Отправить]]></string>
+	<string name="_bx_files_form_entry_input_sys_do_publish"><![CDATA[Опубликовать]]></string>
+	<string name="_bx_files_form_entry_input_do_publish"><![CDATA[Опубликовать]]></string>
+	<string name="_bx_files_form_entry_input_sys_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_files_form_entry_input_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_files_form_entry_input_title_err"><![CDATA[Нужно указать заголовок]]></string>
+	<string name="_bx_files_form_entry_input_sys_cat"><![CDATA[Категория]]></string>
+	<string name="_bx_files_form_entry_input_cat"><![CDATA[Категория]]></string>
+    <string name="_bx_files_form_entry_input_cat_err"><![CDATA[Нужно указать категорию]]></string>
+	<string name="_bx_files_form_entry_input_sys_desc"><![CDATA[Описание]]></string>
+    <string name="_bx_files_form_entry_input_desc"><![CDATA[Описание]]></string>
+	<string name="_bx_files_form_entry_input_sys_data"><![CDATA[Данные в файле]]></string>
+	<string name="_bx_files_form_entry_input_data"><![CDATA[Данные в файле]]></string>
+	<string name="_bx_files_form_entry_input_sys_delete_confirm"><![CDATA[Подтверждение удаления]]></string>
+	<string name="_bx_files_form_entry_input_delete_confirm"><![CDATA[Я уверен, что хочу удалить этот файл]]></string>
+	<string name="_bx_files_form_entry_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено]]></string>
+	<string name="_bx_files_form_entry_input_delete_confirm_error"><![CDATA[Нужно подтвердить удаление файла]]></string>
+	<string name="_bx_files_form_entry_input_sys_attachment"><![CDATA[Файл]]></string>
+    <string name="_bx_files_form_entry_input_attachment"><![CDATA[Файл]]></string>
+	<string name="_bx_files_form_entry_input_sys_attachments"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_form_entry_input_attachments"><![CDATA[Файлы]]></string>    
+    <string name="_bx_files_form_entry_input_sys_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_files_form_entry_input_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_files_form_entry_input_picture_use_as_thumb"><![CDATA[Обложка]]></string>
+    <string name="_bx_files_form_entry_input_sys_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_files_form_entry_input_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_files_form_entry_input_sys_date_changed"><![CDATA[Обновлено]]></string>
+    <string name="_bx_files_form_entry_input_date_changed"><![CDATA[Обновлено]]></string>
+
+	<string name="_bx_files_acl_action_create_entry"><![CDATA[Добавление файлов]]></string>
+	<string name="_bx_files_acl_action_delete_entry"><![CDATA[Удаление файлов]]></string>
+	<string name="_bx_files_acl_action_view_entry"><![CDATA[Просмотр файлов]]></string>
+	<string name="_bx_files_acl_action_edit_any_entry"><![CDATA[Редактировать любой файл]]></string>
+
+	<string name="_bx_files_page_title_sys_create_entry"><![CDATA[Загрузка файлов]]></string>
+	<string name="_bx_files_page_title_create_entry"><![CDATA[Загрузка файлов]]></string>
+	<string name="_bx_files_page_block_title_create_entry"><![CDATA[Загрузка файлов]]></string>
+	<string name="_bx_files_page_title_sys_edit_entry"><![CDATA[Редактирование]]></string>
+	<string name="_bx_files_page_title_edit_entry"><![CDATA[Редактирование]]></string>
+	<string name="_bx_files_page_block_title_edit_entry"><![CDATA[Редактирование]]></string>
+    <string name="_bx_files_page_title_sys_delete_entry"><![CDATA[Удаление]]></string>
+    <string name="_bx_files_page_title_delete_entry"><![CDATA[Удаление]]></string>
+    <string name="_bx_files_page_block_title_delete_entry"><![CDATA[Удаление]]></string>
+	<string name="_bx_files_page_title_sys_view_entry"><![CDATA[Просмотр файла]]></string>
+	<string name="_bx_files_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_files_page_block_title_entry_text"><![CDATA[Описание файла]]></string>
+	<string name="_bx_files_page_title_browse"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_page_title_search_results"><![CDATA[Поиск по "{0}"]]></string>
+	<string name="_bx_files_page_title_browse_by_author"><![CDATA[{display_name} - файлы]]></string>
+	<string name="_bx_files_page_title_browse_featured"><![CDATA[Продвинутые файлы]]></string>
+    <string name="_bx_files_page_title_browse_recent"><![CDATA[Последние файлы]]></string>
+    <string name="_bx_files_page_title_browse_popular"><![CDATA[Популярные файлы]]></string>
+    <string name="_bx_files_page_title_browse_updated"><![CDATA[Обновлённые файлы]]></string>
+    <string name="_bx_files_page_title_sys_home"><![CDATA[Главная страница]]></string>
+    <string name="_bx_files_page_title_home"><![CDATA[Файлы]]></string>
+    <string name="_bx_files_page_block_title_featured_entries_view_extended"><![CDATA[Продвинутые файлы]]></string>
+    <string name="_bx_files_page_block_title_recent_entries"><![CDATA[Последние файлы (галерея)]]></string>
+    <string name="_bx_files_page_block_title_recent_entries_view_extended"><![CDATA[Последние файлы]]></string>
+    <string name="_bx_files_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_files_page_block_title_entry_author"><![CDATA[Автор]]></string>
+    <string name="_bx_files_page_block_title_entry_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_files_page_block_title_entry_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_files_page_block_title_entry_comments_link"><![CDATA[Комментарии к <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_files_page_block_title_entry_location"><![CDATA[Местоположение]]></string>
+    <string name="_bx_files_page_block_title_entry_attachments"><![CDATA[Присоединенные файлы]]></string>
+    <string name="_bx_files_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
+    <string name="_bx_files_page_title_sys_entries_popular"><![CDATA[Популярные файлы]]></string>
+    <string name="_bx_files_page_title_entries_popular"><![CDATA[Популярные файлы]]></string>
+    <string name="_bx_files_page_title_sys_entries_updated"><![CDATA[Обновлённые файлы]]></string>
+    <string name="_bx_files_page_title_entries_updated"><![CDATA[Обновлённые файлы]]></string>
+    <string name="_bx_files_page_block_title_popular_entries"><![CDATA[Популярные файлы]]></string>
+    <string name="_bx_files_page_block_title_popular_entries_view_extended"><![CDATA[Популярные файлы (расширенный вид)]]></string>
+    <string name="_bx_files_page_block_title_updated_entries"><![CDATA[Обновлённые файлы]]></string>
+    <string name="_bx_files_page_title_sys_view_entry_comments"><![CDATA[Комментарии к файлу]]></string>
+    <string name="_bx_files_page_title_view_entry_comments"><![CDATA[Комментарии к {title}]]></string>
+    <string name="_bx_files_page_title_sys_entries_of_author"><![CDATA[Файлы от одного автора]]></string>
+    <string name="_bx_files_page_title_entries_of_author"><![CDATA[{display_name} - файлы]]></string>
+    <string name="_bx_files_page_block_title_favorites_of_author"><![CDATA[<a href="{profile_link}">{display_name}</a> - избранные файлы]]></string>
+    <string name="_bx_files_page_block_title_sys_favorites_of_author"><![CDATA[Избранные файлы от одного автора]]></string>
+    <string name="_bx_files_page_block_title_entries_of_author"><![CDATA[<a href="{profile_link}">{display_name}</a> - файлы]]></string>
+    <string name="_bx_files_page_block_title_sys_entries_of_author"><![CDATA[Файлы от одного автора]]></string>   
+    <string name="_bx_files_page_block_title_entries_actions"><![CDATA[Действия с файлом]]></string>
+    <string name="_bx_files_page_block_title_browse_cmts"><![CDATA[Комментарии к файлам]]></string>
+	<string name="_bx_files_page_title_sys_manage"><![CDATA[Управление своими файлами]]></string>
+	<string name="_bx_files_page_title_sys_manage_administration"><![CDATA[Управление всеми файлами]]></string>
+	<string name="_bx_files_page_title_manage"><![CDATA[Управление]]></string>
+	<string name="_bx_files_page_block_title_system_manage"><![CDATA[Управление своими файлами]]></string>
+	<string name="_bx_files_page_block_title_system_manage_administration"><![CDATA[Управление всеми файлами]]></string>
+	<string name="_bx_files_page_block_title_manage"><![CDATA[Управление]]></string>
+	<string name="_bx_files_page_block_title_popular_keywords"><![CDATA[Популярные хэш-теги]]></string>
+	<string name="_bx_files_page_block_title_cats"><![CDATA[Категории файлов]]></string>
+	<string name="_bx_files_page_block_title_entry_info"><![CDATA[Информация]]></string>
+	<string name="_bx_files_page_block_title_my_entries"><![CDATA[Мои файлы]]></string>
+	<string name="_bx_files_page_block_title_entry_file_preview"><![CDATA[Предварительный просмотр файла]]></string>
+	<string name="_bx_files_page_block_title_group_entries"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_page_title_sys_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_files_page_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_files_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_files_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
+    <string name="_bx_files_page_block_title_search_form_cmts"><![CDATA[Форма поиска комментариев]]></string>
+    <string name="_bx_files_page_block_title_search_results_cmts"><![CDATA[Результаты поиска комментариев]]></string>
+
+    <string name="_bx_files_menu_set_title_view_entry"><![CDATA[Действия с файлом]]></string>
+    <string name="_bx_files_menu_title_view_entry"><![CDATA[Действия с файлом]]></string>
+    <string name="_bx_files_menu_title_submenu"><![CDATA[Под-меню файлов]]></string>
+    <string name="_bx_files_menu_set_title_submenu"><![CDATA[Под-меню файлов]]></string>
+    <string name="_bx_files_menu_item_title_system_create_entry"><![CDATA[Загрузить файлы]]></string>
+    <string name="_bx_files_menu_item_title_create_entry"><![CDATA[Загрузить файлы]]></string>
+    <string name="_bx_files_menu_item_title_system_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_files_menu_item_title_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_files_menu_item_title_system_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_files_menu_item_title_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_files_menu_item_title_system_view_entry"><![CDATA[Просмотр файла]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_home"><![CDATA[Файлы]]></string>
+    <string name="_bx_files_menu_item_title_entries_home"><![CDATA[Файлы]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_public"><![CDATA[Последние]]></string>
+    <string name="_bx_files_menu_item_title_entries_public"><![CDATA[Последние]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_files_menu_item_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_files_menu_item_title_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_files_menu_item_title_system_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_files_menu_item_title_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_files_menu_title_view_entry_submenu"><![CDATA[Подменю просмотра файла]]></string>
+    <string name="_bx_files_menu_set_title_view_entry_submenu"><![CDATA[Подменю просмотра файла]]></string>
+    <string name="_bx_files_menu_item_title_view_entry_submenu_entry"><![CDATA[Файл]]></string>
+    <string name="_bx_files_menu_item_title_view_entry_submenu_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_files_menu_item_title_system_view_entry_comments"><![CDATA[Комментарии к файлу]]></string>
+    <string name="_bx_files_menu_item_title_system_view_entries_author"><![CDATA[Файлы]]></string>
+    <string name="_bx_files_menu_item_title_view_entries_author"><![CDATA[Файлы]]></string>
+    <string name="_bx_files_menu_title_entries_my"><![CDATA[Меню для своих файлов]]></string>
+    <string name="_bx_files_menu_set_title_entries_my"><![CDATA[Меню для своих файлов]]></string>
+	<string name="_bx_files_menu_item_title_system_manage_my_files"><![CDATA[Мои файлы]]></string>
+    <string name="_bx_files_menu_item_title_manage_my_files"><![CDATA[{addon} файлов]]></string>
+    <string name="_bx_files_menu_set_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_files_menu_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_files_menu_item_title_system_manage_account"><![CDATA[Управление учетной записью]]></string>
+    <string name="_bx_files_menu_item_title_manage_account"><![CDATA[Управление учетной записью]]></string>
+	<string name="_bx_files_menu_item_title_system_admt_files"><![CDATA[Файлы]]></string>
+	<string name="_bx_files_menu_item_title_admt_files"><![CDATA[Файлы - {addon} спрятанных]]></string>
+	<string name="_bx_files_menu_item_title_manage_my"><![CDATA[Мой файлы]]></string>
+	<string name="_bx_files_menu_item_title_manage_all"><![CDATA[Все файлы]]></string>
+	<string name="_bx_files_menu_item_title_system_download_file"><![CDATA[Скачать]]></string>
+	<string name="_bx_files_menu_item_title_download_file"><![CDATA[Скачать]]></string>
+
+	<string name="_bx_files_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+	<string name="_bx_files_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
+	<string name="_bx_files_grid_filter_item_title_adm_hidden"><![CDATA[Спрятанные]]></string>
+	<string name="_bx_files_grid_column_title_adm_active"><![CDATA[Активный]]></string>
+    <string name="_bx_files_grid_column_title_adm_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_files_grid_column_title_adm_added"><![CDATA[Добавлено]]></string>
+    <string name="_bx_files_grid_column_title_adm_author"><![CDATA[Автор]]></string>
+    <string name="_bx_files_grid_action_title_adm_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_files_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_files_grid_action_title_adm_more_actions"><![CDATA[Больше действий]]></string>
+    <string name="_bx_files_grid_action_err_delete"><![CDATA[Ошибка удаления выбранных файлов]]></string>
+    <string name="_bx_files_grid_txt_account_manager"><![CDATA[Перейти к управлению учетной записи]]></string>
+
+    <string name="_bx_files_chart_growth"><![CDATA[Файлы: Развитие]]></string>
+    <string name="_bx_files_chart_growth_speed"><![CDATA[Файлы: Скорость развития]]></string>
+
+    <string name="_bx_files_search_extended"><![CDATA[Поиск публикаций]]></string>
+    <string name="_bx_files_search_extended_cmts"><![CDATA[Поиск комментариев к публикациям]]></string>
+
+    <string name="_bx_files_pre_lists_cats"><![CDATA[Категории файлов]]></string>
+    <string name="_bx_files_cat_documentation"><![CDATA[Документация]]></string>
+    <string name="_bx_files_cat_presentation"><![CDATA[Презентация]]></string>
+    <string name="_bx_files_cat_report"><![CDATA[Отчет]]></string>
+    <string name="_bx_files_cat_proposal"><![CDATA[План]]></string>
+    <string name="_bx_files_cat_list"><![CDATA[Список]]></string>
+    <string name="_bx_files_cat_record"><![CDATA[Аудио запись]]></string>
+    <string name="_bx_files_cat_screencast"><![CDATA[Видео запись]]></string>
+    <string name="_bx_files_cat_screenshot"><![CDATA[Снимок экрана]]></string>
+    <string name="_bx_files_cat_sketch"><![CDATA[Набросок]]></string>
+    <string name="_bx_files_cat_archive"><![CDATA[Архив]]></string>
+    <string name="_bx_files_cat_backup"><![CDATA[Резервная копия]]></string>
+
+    <string name="_bx_files_txt_all_entries_by"><![CDATA[<a href="{0}">Все файлы от пользователя {1} ({2})</a>]]></string>
+    <string name="_bx_files_txt_preview_not_available"><![CDATA[Предварительный просмотр недоступен]]></string>
+    <string name="_bx_files_txt_sample_single"><![CDATA[файл]]></string>
+    <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_privacy_public"><![CDATA[Для всех]]></string>
+    <string name="_bx_files_privacy_participants"><![CDATA[Для участников]]></string>
+</resources>

+ 268 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_forum/ru.xml

@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+	<string name="_bx_forum"><![CDATA[Обсуждения]]></string>
+	<string name="_bx_forum_cmts"><![CDATA[Обсуждения - Комментарии]]></string>
+
+	<string name="_bx_forum_option_summary_chars"><![CDATA[Количество символов в автогенерируемой сводке к обсуждению]]></string>
+	<string name="_bx_forum_option_plain_summary_chars"><![CDATA[Количество символов в описании обсуждения при отсутствующей картинке обсуждения]]></string>
+	<string name="_bx_forum_option_per_page_browse"><![CDATA[Количество элементов на странице]]></string>
+	<string name="_bx_forum_option_per_page_index"><![CDATA[Количество элементов на главной странице сайта]]></string>
+	<string name="_bx_forum_option_per_page_profile"><![CDATA[Количество элементов на странице профиля]]></string>
+	<string name="_bx_forum_option_rss_num"><![CDATA[Количество элементов в ленте RSS]]></string>
+	<string name="_bx_forum_option_searchable_fields"><![CDATA[Поля для поиска по ключевому слову]]></string>
+	<string name="_bx_forum_option_autosubscribe_created"><![CDATA[Автоподписка на новые обсуждения]]></string>
+	<string name="_bx_forum_option_autosubscribe_replied"><![CDATA[Автоподписка на отвеченные обсуждения]]></string>
+
+	<string name="_bx_forum_form_entry"><![CDATA[Форум]]></string>
+	<string name="_bx_forum_form_entry_display_add"><![CDATA[Создание обсуждения]]></string>
+	<string name="_bx_forum_form_entry_display_delete"><![CDATA[Удаление обсуждения]]></string>
+	<string name="_bx_forum_form_entry_display_edit"><![CDATA[Редактирование обсуждения]]></string>
+	<string name="_bx_forum_form_entry_display_view"><![CDATA[Просмотр обсуждения]]></string>
+	<string name="_bx_forum_form_entry_input_author"><![CDATA[Автор]]></string>
+	<string name="_bx_forum_form_entry_input_sys_do_submit"><![CDATA[Выполнить]]></string>
+	<string name="_bx_forum_form_entry_input_do_submit"><![CDATA[Выполнить]]></string>
+	<string name="_bx_forum_form_entry_input_sys_text"><![CDATA[Текст]]></string>
+	<string name="_bx_forum_form_entry_input_text"><![CDATA[Текст]]></string>
+	<string name="_bx_forum_form_entry_input_text_err"><![CDATA[Поле для текста не может быть пустым]]></string>
+	<string name="_bx_forum_form_entry_input_sys_delete_confirm"><![CDATA[Удалить подтверждение]]></string>
+	<string name="_bx_forum_form_entry_input_delete_confirm"><![CDATA[Я уверен, что хочу удалить это обсуждение]]></string>
+	<string name="_bx_forum_form_entry_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено]]></string>
+	<string name="_bx_forum_form_entry_input_delete_confirm_error"><![CDATA[Пожалуйста, отметьте флажок, если действительно хотите удалить обсуждение]]></string>
+	<string name="_bx_forum_form_entry_input_sys_attachments"><![CDATA[Прикрепления]]></string>
+	<string name="_bx_forum_form_entry_input_attachments"><![CDATA[Прикрепления]]></string>
+	<string name="_bx_forum_form_entry_input_sys_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_forum_form_entry_input_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_forum_form_entry_input_sys_title"><![CDATA[Тема]]></string>
+    <string name="_bx_forum_form_entry_input_title"><![CDATA[Тема]]></string>
+    <string name="_bx_forum_form_entry_input_title_err"><![CDATA[Необходимо указать тему]]></string>
+    <string name="_bx_forum_form_entry_input_sys_cat"><![CDATA[Категория]]></string>
+	<string name="_bx_forum_form_entry_input_cat"><![CDATA[Категория]]></string>
+	<string name="_bx_forum_form_entry_input_cat_err"><![CDATA[Нужно обязательно выбрать категорию]]></string>
+	<string name="_bx_forum_form_search"><![CDATA[Поиск]]></string>
+	<string name="_bx_forum_form_search_display_full"><![CDATA[Полный поиск]]></string>
+	<string name="_bx_forum_form_search_input_sys_author"><![CDATA[Автор]]></string>
+	<string name="_bx_forum_form_search_input_author"><![CDATA[Автор]]></string>
+	<string name="_bx_forum_form_search_input_sys_category"><![CDATA[Категория]]></string>
+	<string name="_bx_forum_form_search_input_category"><![CDATA[Категория]]></string>
+	<string name="_bx_forum_form_search_input_sys_keyword"><![CDATA[Ключевое слово]]></string>
+	<string name="_bx_forum_form_search_input_keyword"><![CDATA[Ключевое слово]]></string>
+	<string name="_bx_forum_form_search_input_do_submit"><![CDATA[Искать]]></string>
+	<string name="_bx_forum_form_search_input_sys_do_submit"><![CDATA[Искать]]></string>
+
+	<string name="_bx_forum_acl_action_create_entry"><![CDATA[Создавать новое обсуждение]]></string>
+	<string name="_bx_forum_acl_action_delete_entry"><![CDATA[Удалить обсуждение]]></string>
+	<string name="_bx_forum_acl_action_view_entry"><![CDATA[Просмотреть обсуждение]]></string>
+	<string name="_bx_forum_acl_action_edit_any_entry"><![CDATA[Редактировать любое обсуждение]]></string>
+	<string name="_bx_forum_acl_action_stick_any_entry"><![CDATA[Закреплять любое обсуждение]]></string>
+	<string name="_bx_forum_acl_action_lock_any_entry"><![CDATA[Блокировать любое обсуждение]]></string>
+	<string name="_bx_forum_acl_action_hide_any_entry"><![CDATA[Скрывать любое обсуждение]]></string>
+
+	<string name="_bx_forum_page_title_sys_create_entry"><![CDATA[Новое обсуждение]]></string>
+	<string name="_bx_forum_page_title_create_entry"><![CDATA[Новое обсуждение]]></string>
+	<string name="_bx_forum_page_block_title_create_entry"><![CDATA[Новое обсуждение]]></string>
+	<string name="_bx_forum_page_title_sys_edit_entry"><![CDATA[Редактировать обсуждение]]></string>
+	<string name="_bx_forum_page_title_edit_entry"><![CDATA[Редактировать обсуждение]]></string>
+	<string name="_bx_forum_page_block_title_edit_entry"><![CDATA[Редактировать обсуждение]]></string>
+    <string name="_bx_forum_page_title_sys_delete_entry"><![CDATA[Удалить обсуждение]]></string>
+    <string name="_bx_forum_page_title_delete_entry"><![CDATA[Удалить обсуждение]]></string>
+    <string name="_bx_forum_page_block_title_delete_entry"><![CDATA[Удалить обсуждение]]></string>
+	<string name="_bx_forum_page_title_sys_view_entry"><![CDATA[Просмотреть обсуждение]]></string>
+	<string name="_bx_forum_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_forum_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
+	<string name="_bx_forum_page_block_title_entry_attachments"><![CDATA[Прикрепления]]></string>
+	<string name="_bx_forum_page_block_title_entry_text"><![CDATA[Текст]]></string>
+    <string name="_bx_forum_page_block_title_entry_author"><![CDATA[Автор]]></string>
+    <string name="_bx_forum_page_block_title_entry_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_forum_page_block_title_entry_breadcrumb"><![CDATA["Хлебные крошки"]]></string>
+    <string name="_bx_forum_page_block_title_entry_comments"><![CDATA[Ответов ({0})]]></string>
+    <string name="_bx_forum_page_block_title_entry_participants"><![CDATA[Участники]]></string>
+    <string name="_bx_forum_page_title_browse"><![CDATA[Обсуждения]]></string>
+	<string name="_bx_forum_page_title_search_results"><![CDATA[Обсуждения, соответствующие "{0}"]]></string>
+	<string name="_bx_forum_page_title_browse_by_author"><![CDATA[Обсуждения {display_name}]]></string>
+	<string name="_bx_forum_page_title_browse_featured"><![CDATA[Продвинутые обсуждения]]></string>
+	<string name="_bx_forum_page_title_browse_by_category"><![CDATA[Обсуждения в {category_name}]]></string>
+	<string name="_bx_forum_page_title_browse_new"><![CDATA[Новые обсуждения]]></string>
+    <string name="_bx_forum_page_title_browse_latest"><![CDATA[Недавние обсуждения]]></string>
+    <string name="_bx_forum_page_title_browse_top"><![CDATA[ТОП обсуждений]]></string>
+    <string name="_bx_forum_page_title_browse_popular"><![CDATA[Популарные обсуждения]]></string>
+    <string name="_bx_forum_page_title_browse_updated"><![CDATA[Обновлённые обсуждения]]></string>
+    <string name="_bx_forum_page_title_sys_home"><![CDATA[Обсуждения - Домой]]></string>
+    <string name="_bx_forum_page_title_home"><![CDATA[Обсуждения]]></string>
+    <string name="_bx_forum_page_block_title_featured_entries"><![CDATA[Продвинутые обсуждения]]></string>
+    <string name="_bx_forum_page_title_sys_entries_new"><![CDATA[Новые обсуждения]]></string>
+    <string name="_bx_forum_page_title_entries_new"><![CDATA[Новые обсуждения]]></string>
+    <string name="_bx_forum_page_title_sys_entries_top"><![CDATA[ТОП обсуждения]]></string>
+    <string name="_bx_forum_page_title_entries_top"><![CDATA[ТОП обсуждения]]></string>
+    <string name="_bx_forum_page_title_sys_entries_popular"><![CDATA[Популярные обсуждения]]></string>
+    <string name="_bx_forum_page_title_entries_popular"><![CDATA[Популярные обсуждения]]></string>
+    <string name="_bx_forum_page_title_sys_entries_updated"><![CDATA[Обновленные обсуждения]]></string>
+    <string name="_bx_forum_page_title_entries_updated"><![CDATA[Обновленные обсуждения]]></string>
+    <string name="_bx_forum_page_block_title_new_entries"><![CDATA[Новые обсуждения]]></string>
+    <string name="_bx_forum_page_block_title_new_entries_view_extended"><![CDATA[Новые обсуждения (Расширенный просмотр)]]></string>
+    <string name="_bx_forum_page_block_title_new_entries_view_full"><![CDATA[Новые  обсуждения (Полный просмотр)]]></string>
+    <string name="_bx_forum_page_block_title_latest_entries"><![CDATA[Обсуждения с последними сообщениями]]></string>
+    <string name="_bx_forum_page_block_title_latest_entries_view_extended"><![CDATA[Обсуждения с последними сообщениями (Расширенный просмотр)]]></string>
+    <string name="_bx_forum_page_block_title_latest_entries_view_full"><![CDATA[Обсуждения с последними сообщениями (Полный просмотр)]]></string>
+    <string name="_bx_forum_page_block_title_top_entries"><![CDATA[ТОП обсуждений]]></string>
+    <string name="_bx_forum_page_block_title_top_entries_view_extended"><![CDATA[ТОП обсуждений (Расширенный просмотр)]]></string>
+    <string name="_bx_forum_page_block_title_top_entries_view_full"><![CDATA[ТОП обсуждений (Полный просмотр)]]></string>
+    <string name="_bx_forum_page_block_title_popular_entries"><![CDATA[Популярные обсуждения]]></string>
+    <string name="_bx_forum_page_block_title_popular_entries_view_extended"><![CDATA[Популярные обсуждения (Расширенный просмотр)]]></string>
+    <string name="_bx_forum_page_block_title_popular_entries_view_full"><![CDATA[Популярные обсуждения (Полный просмотр)]]></string>
+    <string name="_bx_forum_page_block_title_updated_entries"><![CDATA[Обновленные обсуждения]]></string>
+    <string name="_bx_forum_page_title_sys_entries_categories"><![CDATA[Категории обсуждений]]></string>
+    <string name="_bx_forum_page_title_entries_categories"><![CDATA[Категории обсуждений]]></string>
+    <string name="_bx_forum_page_block_title_entries_categories"><![CDATA[Категории обсуждений]]></string>
+    <string name="_bx_forum_page_title_sys_entries_by_category"><![CDATA[Обсуждения в категории]]></string>
+    <string name="_bx_forum_page_title_entries_by_category"><![CDATA[Обсуждения в {category_name}]]></string>
+    <string name="_bx_forum_page_block_title_sys_entries_by_category"><![CDATA[Обсуждения в категории]]></string>
+    <string name="_bx_forum_page_block_title_entries_by_category"><![CDATA[{category_name}]]></string>
+    <string name="_bx_forum_page_title_sys_entries_by_keyword"><![CDATA[Обсуждения по хэштегу]]></string>
+    <string name="_bx_forum_page_title_entries_by_keyword"><![CDATA[Обсуждения по хэштегу: {keyword_name}]]></string>
+    <string name="_bx_forum_page_block_title_sys_entries_by_keyword"><![CDATA[Обсуждения по хэштегу]]></string>
+    <string name="_bx_forum_page_block_title_entries_by_keyword"><![CDATA[Обсуждения по хэштегу: {keyword_name}]]></string>
+    <string name="_bx_forum_page_title_sys_entries_of_author"><![CDATA[Обсуждения автора]]></string>
+    <string name="_bx_forum_page_title_entries_of_author"><![CDATA[{display_name} - Обсуждения]]></string>
+    <string name="_bx_forum_page_block_title_favorites_of_author"><![CDATA[<a href="{profile_link}">{display_name}</a> - Избранное]]></string>   
+    <string name="_bx_forum_page_block_title_sys_favorites_of_author"><![CDATA[Избранное автора]]></string>
+    <string name="_bx_forum_page_block_title_entries_of_author"><![CDATA[<a href="{profile_link}">{display_name}</a> - Обсуждения]]></string>   
+    <string name="_bx_forum_page_block_title_sys_entries_of_author"><![CDATA[Обсуждения автора]]></string>
+    <string name="_bx_forum_page_block_title_entries_actions"><![CDATA[Обсуждения - Действия]]></string>
+    <string name="_bx_forum_page_block_title_browse_cmts"><![CDATA[Форум - Комментарии]]></string>
+    <string name="_bx_forum_page_title_sys_manage"><![CDATA[Управление собственными обсуждениями]]></string>
+	<string name="_bx_forum_page_title_sys_manage_administration"><![CDATA[Управление всеми обсуждениями]]></string>
+	<string name="_bx_forum_page_title_manage"><![CDATA[Управление]]></string>
+	<string name="_bx_forum_page_block_title_system_manage"><![CDATA[Управление собственными обсуждениями]]></string>
+	<string name="_bx_forum_page_block_title_system_manage_administration"><![CDATA[Управление всеми обсуждениями]]></string>
+	<string name="_bx_forum_page_block_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_forum_page_block_title_popular_keywords"><![CDATA[Популярные хэштеги]]></string>
+    <string name="_bx_forum_page_block_title_cats"><![CDATA[Категории обсуждений]]></string>
+    <string name="_bx_forum_page_block_title_my_entries"><![CDATA[Мои обсуждения]]></string>
+	<string name="_bx_forum_page_title_sys_entries_search"><![CDATA[Поиск]]></string>
+	<string name="_bx_forum_page_title_entries_search"><![CDATA[Поиск]]></string>
+	<string name="_bx_forum_page_block_title_entries_search_form"><![CDATA[Поиск]]></string>
+	<string name="_bx_forum_page_block_title_entries_search_results"><![CDATA[Результаты поиска]]></string>
+	<string name="_bx_forum_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_forum_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
+    <string name="_bx_forum_page_block_title_search_form_cmts"><![CDATA[Форма поиска комментариев]]></string>
+    <string name="_bx_forum_page_block_title_search_results_cmts"><![CDATA[Результаты поиска комментариев]]></string>
+
+	<string name="_bx_forum_menu_title_submenu"><![CDATA[Форум - Подменю]]></string>
+    <string name="_bx_forum_menu_set_title_submenu"><![CDATA[Форум - Подменю]]></string>
+    <string name="_bx_forum_menu_item_title_system_create_entry"><![CDATA[Новое обсуждение]]></string>
+    <string name="_bx_forum_menu_item_title_create_entry"><![CDATA[Новое обсуждение]]></string>
+    <string name="_bx_forum_menu_item_title_system_edit_entry"><![CDATA[Редактировать обсуждение]]></string>
+    <string name="_bx_forum_menu_item_title_edit_entry"><![CDATA[Редактировать обсуждение]]></string>
+    <string name="_bx_forum_menu_item_title_system_delete_entry"><![CDATA[Удалить обсуждение]]></string>
+    <string name="_bx_forum_menu_item_title_delete_entry"><![CDATA[Удалить обсуждение]]></string>
+	<string name="_bx_forum_menu_item_title_system_stick_entry"><![CDATA[Закрепить]]></string>
+    <string name="_bx_forum_menu_item_title_stick_entry"><![CDATA[Закрепить]]></string>
+    <string name="_bx_forum_menu_item_title_system_unstick_entry"><![CDATA[Открепить]]></string>
+    <string name="_bx_forum_menu_item_title_unstick_entry"><![CDATA[Открепить]]></string>
+    <string name="_bx_forum_menu_item_title_system_lock_entry"><![CDATA[Заблокировать]]></string>
+    <string name="_bx_forum_menu_item_title_lock_entry"><![CDATA[Заблокировать]]></string>
+    <string name="_bx_forum_menu_item_title_system_unlock_entry"><![CDATA[Разблокировать]]></string>
+    <string name="_bx_forum_menu_item_title_unlock_entry"><![CDATA[Разблокировать]]></string>
+    <string name="_bx_forum_menu_item_title_system_hide_entry"><![CDATA[Скрыть]]></string>
+    <string name="_bx_forum_menu_item_title_hide_entry"><![CDATA[Скрыть]]></string>
+    <string name="_bx_forum_menu_item_title_system_unhide_entry"><![CDATA[Показать]]></string>
+    <string name="_bx_forum_menu_item_title_system_subscribe"><![CDATA[Подписаться]]></string>
+    <string name="_bx_forum_menu_item_title_subscribe"><![CDATA[Подписаться]]></string>
+    <string name="_bx_forum_menu_item_title_system_unsubscribe"><![CDATA[Отписаться]]></string>
+    <string name="_bx_forum_menu_item_title_unsubscribe"><![CDATA[Отписаться]]></string>
+    <string name="_bx_forum_menu_item_title_system_more"><![CDATA[Дополнительные действия]]></string>
+    <string name="_bx_forum_menu_item_title_more"><![CDATA[]]></string>
+    <string name="_bx_forum_menu_item_title_unhide_entry"><![CDATA[Показать]]></string>
+    <string name="_bx_forum_menu_item_title_system_entries_home"><![CDATA[Обсуждения]]></string>
+    <string name="_bx_forum_menu_item_title_entries_home"><![CDATA[Обсуждения]]></string>
+    <string name="_bx_forum_menu_item_title_system_entries_public"><![CDATA[Недавние]]></string>
+    <string name="_bx_forum_menu_item_title_entries_public"><![CDATA[Недавние]]></string>
+    <string name="_bx_forum_menu_item_title_system_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_forum_menu_item_title_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_forum_menu_item_title_system_entries_new"><![CDATA[Новые]]></string>
+    <string name="_bx_forum_menu_item_title_entries_new"><![CDATA[Новые]]></string>
+    <string name="_bx_forum_menu_item_title_system_entries_top"><![CDATA[ТОП]]></string>
+    <string name="_bx_forum_menu_item_title_entries_top"><![CDATA[ТОП]]></string>
+    <string name="_bx_forum_menu_item_title_system_entries_categories"><![CDATA[Категории]]></string>
+    <string name="_bx_forum_menu_item_title_entries_categories"><![CDATA[Категории]]></string>
+	<string name="_bx_forum_menu_item_title_system_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_forum_menu_item_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_forum_menu_set_title_view_entry"><![CDATA[Действия для тем]]></string>
+    <string name="_bx_forum_menu_title_view_entry"><![CDATA[Действия для тем]]></string>
+    <string name="_bx_forum_menu_set_title_view_more"><![CDATA[Обсуждения - Дополнительные действия]]></string>
+    <string name="_bx_forum_menu_title_view_more"><![CDATA[Обсуждения - Дополнительные действия]]></string>
+    <string name="_bx_forum_menu_item_title_system_view_entries_author"><![CDATA[Обсуждения]]></string>
+    <string name="_bx_forum_menu_item_title_view_entries_author"><![CDATA[Обсуждения]]></string>
+    <string name="_bx_forum_menu_title_entries_my"><![CDATA[Мои Обсуждения - Меню действий]]></string>
+    <string name="_bx_forum_menu_set_title_entries_my"><![CDATA[Мои Обсуждения - Меню]]></string>
+    <string name="_bx_forum_menu_set_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_forum_menu_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_forum_menu_item_title_system_manage_account"><![CDATA[Управление аккаунтом]]></string>
+    <string name="_bx_forum_menu_item_title_manage_account"><![CDATA[Управление аккаунтом]]></string>
+	<string name="_bx_forum_menu_item_title_system_admt_discussions"><![CDATA[Обсуждения]]></string>
+	<string name="_bx_forum_menu_item_title_admt_discussions"><![CDATA[Обсуждения - {addon} спрятано]]></string>
+	<string name="_bx_forum_menu_item_title_manage_my"><![CDATA[Мои обсуждения]]></string>
+	<string name="_bx_forum_menu_item_title_manage_all"><![CDATA[Все обсуждения]]></string>
+    <string name="_bx_forum_menu_item_title_system_discussions"><![CDATA[Количество дискуссий]]></string>
+    <string name="_bx_forum_menu_item_title_discussions"><![CDATA[{addon} дискуссий]]></string>
+    <string name="_bx_forum_lmi_cpt_categories"><![CDATA[Категории]]></string>
+
+	<string name="_bx_forum_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+	<string name="_bx_forum_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
+	<string name="_bx_forum_grid_filter_item_title_adm_hidden"><![CDATA[Спрятанные]]></string>
+	<string name="_bx_forum_grid_column_title_adm_active"><![CDATA[Активные]]></string>
+    <string name="_bx_forum_grid_column_title_adm_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_forum_grid_column_title_adm_added"><![CDATA[Добавленные]]></string>
+    <string name="_bx_forum_grid_column_title_adm_author"><![CDATA[Автор]]></string>
+    <string name="_bx_forum_grid_column_title_title"><![CDATA[Категория]]></string>
+    <string name="_bx_forum_grid_column_title_visible_for_levels"><![CDATA[Видимо для]]></string>
+    <string name="_bx_forum_grid_action_title_adm_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_forum_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_forum_grid_action_title_adm_more_actions"><![CDATA[Дополнительные действия]]></string>
+    <string name="_bx_forum_grid_action_title_add"><![CDATA[Новое сообщение]]></string>
+    <string name="_bx_forum_grid_action_title_show_to"><![CDATA[Показать]]></string>
+    <string name="_bx_forum_grid_action_err_delete"><![CDATA[Невозможно удалить выбранное(ные) обсуждение(ния).]]></string>
+    <string name="_bx_forum_grid_txt_account_manager"><![CDATA[Перенаправить в Управление аккаунтом.]]></string>
+	<string name="_bx_forum_grid_txt_manage_visibility"><![CDATA[Управление настройками видимости.]]></string>
+	<string name="_bx_forum_grid_show_to_popup"><![CDATA[Категория видна:]]></string>
+    <string name="_bx_forum_grid_txt_visible_for"><![CDATA[Видимо для]]></string>
+    <string name="_bx_forum_grid_txt_visible_for_all"><![CDATA[Всех]]></string>
+	<string name="_bx_forum_grid_txt_visible_for_levels"><![CDATA[Выбрать уровни]]></string>
+	<string name="_bx_forum_grid_txt_visible_for_selected"><![CDATA[Выбранные уровни]]></string>
+	<string name="_bx_forum_grid_inf_visible_for_levels"><![CDATA[Выбрать членства, которым разрешено просматривать данную категорию.]]></string>
+	<string name="_bx_forum_grid_err_show_to"><![CDATA[Невозможно обновить категорию.]]></string>
+	<string name="_bx_forum_grid_btn_save"><![CDATA[Сохранить]]></string>
+	<string name="_bx_forum_grid_btn_cancel"><![CDATA[Отменить]]></string>
+
+    <string name="_bx_forum_pre_lists_cats"><![CDATA[Категории обсуждений]]></string>
+    <string name="_bx_forum_cat_General"><![CDATA[Общие]]></string>
+
+    <string name="_bx_forum_chart_growth"><![CDATA[Обсуждения: Развитие]]></string>
+    <string name="_bx_forum_chart_growth_speed"><![CDATA[Обсуждения: Скорость развития]]></string>
+
+    <string name="_bx_forum_search_extended"><![CDATA[Поиск обсуждений]]></string>
+    <string name="_bx_forum_search_extended_cmts"><![CDATA[Поиск комментариев к обсуждениям]]></string>
+
+    <string name="_bx_forum_err_not_found"><![CDATA[Обсуждение не найдено.]]></string>
+    <string name="_bx_forum_more"><![CDATA[{0} ещё]]></string>
+    <string name="_bx_forum_participant_info"><![CDATA[{0} ({1})]]></string>
+    <string name="_bx_forum_participant_author"><![CDATA[автор]]></string>
+    <string name="_bx_forum_participant_last_replier"><![CDATA[последний ответивший]]></string>
+    <string name="_bx_forum_txt_entry_locked"><![CDATA[Заблокированное обсуждение]]></string>
+	<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_single"><![CDATA[обсуждение]]></string>
+	<string name="_bx_forum_txt_sample_single_with_article"><![CDATA[обсуждение]]></string>
+    <string name="_bx_forum_x_date_by_x_replier"><![CDATA[{0} {1}]]></string>
+    <string name="_bx_forum_you_are_last_replier"><![CDATA[Вы - последний ответивший]]></string>
+
+    <string name="_bx_forum_email_new_reply"><![CDATA[Новый ответ]]></string>
+    <string name="_bx_forum_email_new_reply_subject"><![CDATA[Новый ответ от {SenderDisplayName}]]></string>
+    <string name="_bx_forum_email_new_reply_body"><![CDATA[{email_header}
+<p>Новый ответ от <a href="{SenderUrl}">{SenderDisplayName}</a>:</p>
+<hr />
+<p>{Message}</p>
+{email_footer}]]></string>
+</resources>

+ 27 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_googlecon/ru.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+	<string name="_sys_module_googlecon"><![CDATA[Google-соединение]]></string>
+	<string name="_bx_googlecon"><![CDATA[Google-соединение]]></string>
+	<string name="_bx_googlecon_settings"><![CDATA[Google-соединение]]></string>
+	<string name="_bx_googlecon_information_block"><![CDATA[
+        <p>Этот модуль может использоваться для входа на сайт используя Google профиль.</p>
+        <p>Чтобы он заработал, следуйте следующим инструкциям - <a target="_blank" href="https://developers.google.com/identity/sign-in/web/devconsole-project">как создать Google проект</a>, следуя инструкциям укажите слудующие детали:<br />
+            <ul>
+                <li>Redirect URL: <strong>{0}</strong></li>
+            </ul>
+            Затем нужно ввести полученную пару Client ID & Secret в настройках этого модуля.
+        </p>]]></string>
+	<string name="_bx_googlecon_profile_error_api_keys"><![CDATA[Нужно настроить модуль - указать Google Client ID & Secret]]></string>
+	<string name="_bx_googlecon_auth_title"><![CDATA[Google-соединение]]></string>
+
+    <string name="_bx_googlecon_adm_stg_cpt_type"><![CDATA[Google-соединение]]></string>
+    <string name="_bx_googlecon_option_app_id"><![CDATA[Client ID]]></string>
+    <string name="_bx_googlecon_option_app_secret"><![CDATA[Client Secret]]></string>
+
+	<string name="_bx_googlecon_et_password_generated"><![CDATA[Google-соединение: временный пароль]]></string>
+	<string name="_bx_googlecon_et_password_generated_subject"><![CDATA[Временный пароль]]></string>
+	<string name="_bx_googlecon_et_password_generated_body"><![CDATA[{email_header}
+<p>Временный пароль - <b>{password}</b></p>
+<p>Его нужно изменить, после первого захода на сайт.</p>
+{email_footer}]]></string>
+</resources>

+ 301 - 0
modules/boonex/russian/updates/9.0.6_9.0.7/source/data/langs/bx_groups/ru.xml

@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+	<string name="_bx_groups"><![CDATA[Группы]]></string>
+	<string name="_bx_groups_cmts"><![CDATA[Группы - Комментарии]]></string>
+
+	<string name="_bx_groups_option_num_connections_quick"><![CDATA[Число элементов в блоке друзей]]></string>
+	<string name="_bx_groups_option_per_page_browse"><![CDATA[Число элементов на странице]]></string>
+    <string name="_bx_groups_option_num_rss"><![CDATA[Число элементов в ленте RSS]]></string>
+    <string name="_bx_groups_option_searchable_fields"><![CDATA[Поля для поиска]]></string>
+
+	<string name="_bx_groups_form_profile"><![CDATA[Группы]]></string>
+	<string name="_bx_groups_form_profile_display_add"><![CDATA[Добавление группы]]></string>
+	<string name="_bx_groups_form_profile_display_edit"><![CDATA[Редактирование группы]]></string>
+	<string name="_bx_groups_form_profile_display_edit_cover"><![CDATA[Редактирование обложки]]></string>
+	<string name="_bx_groups_form_profile_display_delete"><![CDATA[Удаление группы]]></string>
+	<string name="_bx_groups_form_profile_display_view"><![CDATA[Просмотр группы]]></string>
+    <string name="_bx_groups_form_profile_display_view_full"><![CDATA[Полный просмотр группы]]></string>
+    <string name="_bx_groups_form_profile_display_invite"><![CDATA[Приглашение в группу]]></string>
+    <string name="_bx_groups_form_entry_input_author"><![CDATA[Автор]]></string>
+	<string name="_bx_groups_form_profile_input_sys_do_submit"><![CDATA[Выполнить]]></string>
+    <string name="_bx_groups_form_profile_input_sys_join_confirm"><![CDATA[Подтверждение регистрации]]></string>
+    <string name="_bx_groups_form_profile_input_join_confirm"><![CDATA[Подтверждение регистрации]]></string>
+    <string name="_bx_groups_form_profile_input_sys_allow_view_to"><![CDATA[Конфиденциальность]]></string>
+    <string name="_bx_groups_form_profile_input_allow_view_to"><![CDATA[Конфиденциальность]]></string>
+    <string name="_bx_groups_form_profile_input_sys_initial_members"><![CDATA[Пригласить участников]]></string>
+    <string name="_bx_groups_form_profile_input_initial_members"><![CDATA[Пригласить участников]]></string>
+    <string name="_bx_groups_form_profile_input_initial_members_desc"><![CDATA[]]></string>
+    <string name="_bx_groups_form_profile_input_sys_group_name"><![CDATA[Название группы]]></string>
+    <string name="_bx_groups_form_profile_input_group_name"><![CDATA[Название группы]]></string>
+    <string name="_bx_groups_form_profile_input_group_name_err"><![CDATA[Эта информация необходима. Пожалуйста, заполните это поле.]]></string>
+    <string name="_bx_groups_form_profile_input_sys_group_desc"><![CDATA[Описание]]></string>
+    <string name="_bx_groups_form_profile_input_group_desc"><![CDATA[Описание]]></string>
+    <string name="_bx_groups_form_profile_input_sys_group_cat"><![CDATA[Категория]]></string>
+	<string name="_bx_groups_form_profile_input_group_cat"><![CDATA[Категория]]></string>
+    <string name="_bx_groups_form_profile_input_group_cat_err"><![CDATA[Поле категории необходимо]]></string>
+	<string name="_bx_groups_form_profile_input_sys_picture"><![CDATA[Картинка группы]]></string>
+	<string name="_bx_groups_form_profile_input_picture"><![CDATA[Загрузить новую картинку группы]]></string>
+	<string name="_bx_groups_form_profile_input_picture_err"><![CDATA[Необходима картинка группы.]]></string>
+	<string name="_bx_groups_form_profile_input_sys_cover"><![CDATA[Картинка обложки]]></string>
+	<string name="_bx_groups_form_profile_input_cover"><![CDATA[Загрузить новую картинку обложки]]></string>
+	<string name="_bx_groups_form_profile_input_sys_delete_confirm"><![CDATA[Подтверждение на удаление]]></string>
+	<string name="_bx_groups_form_profile_input_delete_confirm"><![CDATA[Я уверен, что хочу удалить эту группу]]></string>
+	<string name="_bx_groups_form_profile_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено.]]></string>
+	<string name="_bx_groups_form_profile_input_delete_confirm_error"><![CDATA[Пожалуйста, отметьте этот флажок, если действительно хотите удалить группу.]]></string>
+
+	<string name="_bx_groups_acl_action_create_profile"><![CDATA[Создать группу]]></string>
+	<string name="_bx_groups_acl_action_delete_profile"><![CDATA[Удалить группу]]></string>
+	<string name="_bx_groups_acl_action_view_profile"><![CDATA[Просмотреть группу]]></string>
+	<string name="_bx_groups_acl_action_edit_any_profile"><![CDATA[Редактировать любую группу]]></string>
+
+	<string name="_bx_groups_page_title_sys_joined_entries"><![CDATA[Участие в группах]]></string>
+	<string name="_bx_groups_page_title_joined_entries"><![CDATA[Участие в группах]]></string>
+	<string name="_bx_groups_page_title_sys_create_profile"><![CDATA[Создать группу]]></string>
+	<string name="_bx_groups_page_title_create_profile"><![CDATA[Создать группу]]></string>
+	<string name="_bx_groups_page_title_sys_edit_profile"><![CDATA[Редактировать группу]]></string>
+	<string name="_bx_groups_page_title_edit_profile"><![CDATA[Редактировать группу]]></string>
+	<string name="_bx_groups_page_title_sys_edit_profile_cover"><![CDATA[Редактировать обложку группы]]></string>
+	<string name="_bx_groups_page_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+	<string name="_bx_groups_page_title_sys_delete_profile"><![CDATA[Удалить группу]]></string>
+	<string name="_bx_groups_page_title_delete_profile"><![CDATA[Удалить группу]]></string>
+	<string name="_bx_groups_page_title_sys_view_profile_closed"><![CDATA[Просмотр закрытой группы]]></string>
+	<string name="_bx_groups_page_title_sys_view_profile"><![CDATA[Просмотр группы]]></string>
+	<string name="_bx_groups_page_title_view_profile"><![CDATA[{display_name}]]></string>
+	<string name="_bx_groups_page_title_browse"><![CDATA[Группы]]></string>
+	<string name="_bx_groups_page_title_browse_by_author"><![CDATA[Группы {display_name}]]></string>
+	<string name="_bx_groups_page_title_browse_featured"><![CDATA[Продвинутые группы]]></string>
+    <string name="_bx_groups_page_title_browse_top"><![CDATA[Популярные группы]]></string>
+	<string name="_bx_groups_page_title_browse_recent"><![CDATA[Новые группы]]></string>
+	<string name="_bx_groups_page_title_browse_connections"><![CDATA[{0} связей]]></string>
+	<string name="_bx_groups_page_title_browse_connections_mutual"><![CDATA[{0} и {1} обоюдных связей]]></string>
+	<string name="_bx_groups_page_title_sys_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_groups_page_title_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_groups_page_title_sys_group_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_groups_page_title_group_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_groups_page_title_sys_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_groups_page_title_profile_comments"><![CDATA[Комментарии]]></string>
+	<string name="_bx_groups_page_title_sys_profile_info"><![CDATA[Инфо группы]]></string>
+	<string name="_bx_groups_page_title_profile_info"><![CDATA[Инфо о {display_name}]]></string>
+	<string name="_bx_groups_page_title_sys_recent"><![CDATA[Новые группы]]></string>
+	<string name="_bx_groups_page_title_recent"><![CDATA[Новые группы]]></string>
+	<string name="_bx_groups_page_title_sys_manage"><![CDATA[Управление собственными группами]]></string>
+	<string name="_bx_groups_page_title_sys_manage_administration"><![CDATA[Управление всеми группами]]></string>
+	<string name="_bx_groups_page_title_manage"><![CDATA[Управление]]></string>
+	<string name="_bx_groups_page_title_sys_top"><![CDATA[Популярные группы]]></string>
+    <string name="_bx_groups_page_title_top"><![CDATA[Популярные группы]]></string>
+    <string name="_bx_groups_page_title_sys_invite_to_group"><![CDATA[Пригласить участников в группу]]></string>
+    <string name="_bx_groups_page_title_invite_to_group"><![CDATA[Пригласить участников в группу]]></string>
+    <string name="_bx_groups_page_title_sys_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_groups_page_title_entries_search"><![CDATA[Поиск]]></string>
+
+	<string name="_bx_groups_page_block_title_favorites_of_author"><![CDATA[Избранные группы]]></string>   
+    <string name="_bx_groups_page_block_title_sys_favorites_of_author"><![CDATA[Избранные группы]]></string>
+	<string name="_bx_groups_page_block_title_sys_joined_entries"><![CDATA[Участие в группах]]></string>
+	<string name="_bx_groups_page_block_title_joined_entries"><![CDATA[Участие в группах]]></string>
+	<string name="_bx_groups_page_block_title_create_profile"><![CDATA[Создать группу]]></string>
+	<string name="_bx_groups_page_block_title_edit_profile"><![CDATA[Редактировать группу]]></string>
+	<string name="_bx_groups_page_block_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+	<string name="_bx_groups_page_block_title_delete_profile"><![CDATA[Удалить группу]]></string>
+	<string name="_bx_groups_page_block_title_profile_info_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Инфо]]></string>
+	<string name="_bx_groups_page_block_title_profile_info"><![CDATA[Инфо]]></string>
+	<string name="_bx_groups_page_block_title_system_profile_info"><![CDATA[Инфо]]></string>
+	<string name="_bx_groups_page_block_title_profile_description"><![CDATA[Описание]]></string>
+	<string name="_bx_groups_page_block_title_profile_friends_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Друзья]]></string>
+	<string name="_bx_groups_page_block_title_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_groups_page_block_title_system_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_groups_page_block_title_admins"><![CDATA[Администраторы]]></string>
+	<string name="_bx_groups_page_block_title_fans_link"><![CDATA[Участники группы: <a href="{profile_link}">{display_name}</a>]]></string>
+	<string name="_bx_groups_page_block_title_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_groups_page_block_title_system_fans"><![CDATA[Участники]]></string>
+	<string name="_bx_groups_page_block_title_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_groups_page_block_title_profile_comments_link"><![CDATA[Комментарии к <a href="{entry_link}">{title}</a>]]></string>
+	<string name="_bx_groups_page_block_title_profile_actions"><![CDATA[Действия]]></string>
+	<string name="_bx_groups_page_block_title_featured_profiles"><![CDATA[Продвинутые группы]]></string>
+	<string name="_bx_groups_page_block_title_latest_profiles"><![CDATA[Новые группы]]></string>
+	<string name="_bx_groups_page_block_title_system_manage"><![CDATA[Управление собственными группами]]></string>
+	<string name="_bx_groups_page_block_title_system_manage_administration"><![CDATA[Управление всеми группами]]></string>
+	<string name="_bx_groups_page_block_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_groups_page_block_title_top_profiles"><![CDATA[Популярные группы]]></string>
+    <string name="_bx_groups_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_groups_page_block_title_categories"><![CDATA[Категории групп]]></string>
+    <string name="_bx_groups_page_block_title_invite_to_group"><![CDATA[Пригласить участников в группу]]></string>
+    <string name="_bx_groups_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_groups_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
+    <string name="_bx_groups_page_block_title_search_form_cmts"><![CDATA[Форма поиска комментариев]]></string>
+    <string name="_bx_groups_page_block_title_search_results_cmts"><![CDATA[Результаты поиска комментариев]]></string>
+
+    <string name="_bx_groups_menu_title_submenu"><![CDATA[Группы - Подменю]]></string>
+    <string name="_bx_groups_menu_set_title_submenu"><![CDATA[Группы - Подменю]]></string>
+    <string name="_bx_groups_menu_set_title_view_profile_actions"><![CDATA[Группа - Действия]]></string>
+    <string name="_bx_groups_menu_title_view_profile_actions"><![CDATA[Группа - Действия]]></string>
+    <string name="_bx_groups_menu_set_title_view_profile_actions_more"><![CDATA[Группа - Дополнительные действия]]></string>
+    <string name="_bx_groups_menu_title_view_profile_actions_more"><![CDATA[Группа - Дополнительные действия]]></string>
+    <string name="_bx_groups_menu_set_title_view_profile_submenu"><![CDATA[Подменю просмотра группы]]></string>
+    <string name="_bx_groups_menu_title_view_profile_submenu"><![CDATA[Подменю просмотра группы]]></string>
+    <string name="_bx_groups_menu_title_view_profile_submenu_cover"><![CDATA[Подменю группы на обложке]]></string>
+	<string name="_bx_groups_menu_set_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_groups_menu_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_groups_menu_item_title_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete_with_content"><![CDATA[Удалить вместе с содержимым]]></string>
+    <string name="_bx_groups_menu_item_title_delete_with_content"><![CDATA[Удалить вместе с содержимым]]></string>
+    <string name="_bx_groups_menu_item_title_system_edit_cover"><![CDATA[Редактировать обложку]]></string>
+    <string name="_bx_groups_menu_item_title_edit_cover"><![CDATA[Редактировать обложку]]></string>
+    <string name="_bx_groups_menu_item_title_system_edit_profile"><![CDATA[Редактировать группу]]></string>
+    <string name="_bx_groups_menu_item_title_edit_profile"><![CDATA[Редактировать группу]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete_profile"><![CDATA[Удалить группу]]></string>
+    <string name="_bx_groups_menu_item_title_delete_profile"><![CDATA[Удалить группу]]></string>
+    <string name="_bx_groups_menu_item_title_system_delete_account"><![CDATA[Удалить аккаунт]]></string>
+    <string name="_bx_groups_menu_item_title_delete_account"><![CDATA[Удалить аккаунт]]></string>
+    <string name="_bx_groups_menu_item_title_system_profile_type"><![CDATA[Группа]]></string>
+    <string name="_bx_groups_menu_item_title_profile_type"><![CDATA[Группа]]></string>
+    <string name="_bx_groups_menu_item_title_system_create_profile"><![CDATA[Создать группу]]></string>
+    <string name="_bx_groups_menu_item_title_create_profile"><![CDATA[Создать группу]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_menu_item_title_view_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_joined_groups"><![CDATA[Группы]]></string>
+    <string name="_bx_groups_menu_item_title_view_joined_groups"><![CDATA[Группы]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_groups_menu_item_title_view_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_groups_menu_item_title_view_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_profile_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_groups_menu_item_title_view_profile_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_profile_view"><![CDATA[Группа]]></string>
+    <string name="_bx_groups_menu_item_title_view_profile_view"><![CDATA[Группа]]></string>
+    <string name="_bx_groups_menu_item_title_system_invite"><![CDATA[Пригласить]]></string>
+    <string name="_bx_groups_menu_item_title_invite"><![CDATA[Пригласить]]></string>
+    
+    <string name="_bx_groups_menu_item_title_system_befriend"><![CDATA[Добавить друга]]></string>
+    <string name="_bx_groups_menu_item_title_befriend"><![CDATA[Добавить друга]]></string>
+    <string name="_bx_groups_menu_item_title_befriend_sent"><![CDATA[Добавить друга (запрошено)]]></string>
+    <string name="_bx_groups_menu_item_title_befriend_confirm"><![CDATA[Принять запрос о дружбе]]></string>
+    <string name="_bx_groups_menu_item_title_system_unfriend"><![CDATA[Перестать дружить]]></string>
+    <string name="_bx_groups_menu_item_title_unfriend"><![CDATA[Перестать дружить]]></string>
+    <string name="_bx_groups_menu_item_title_unfriend_cancel_request"><![CDATA[Отменить запрос о дружбе]]></string>
+    <string name="_bx_groups_menu_item_title_unfriend_reject_request"><![CDATA[Отвергнуть запрос о дружбе]]></string>
+
+    <string name="_bx_groups_menu_item_title_system_become_fan"><![CDATA[Присоединиться]]></string>
+    <string name="_bx_groups_menu_item_title_become_fan"><![CDATA[Присоединиться]]></string>
+    <string name="_bx_groups_menu_item_title_become_fan_sent"><![CDATA[Присоединение запрошено]]></string>
+    <string name="_bx_groups_menu_item_title_become_fan_confirm"><![CDATA[Одобрить присоединение]]></string>
+    <string name="_bx_groups_menu_item_title_system_leave_group"><![CDATA[Покинуть группу]]></string>
+    <string name="_bx_groups_menu_item_title_leave_group"><![CDATA[Покинуть группу]]></string>
+    <string name="_bx_groups_menu_item_title_leave_group_cancel_request"><![CDATA[Отменить присоединение]]></string>
+    <string name="_bx_groups_menu_item_title_leave_group_reject_request"><![CDATA[Отвергнуть присоединение]]></string>
+
+    <string name="_bx_groups_menu_item_title_system_subscribe"><![CDATA[Получать уведомления]]></string>
+    <string name="_bx_groups_menu_item_title_subscribe"><![CDATA[Получать уведомления]]></string>
+    <string name="_bx_groups_menu_item_title_system_unsubscribe"><![CDATA[Отключить уведомления]]></string>
+    <string name="_bx_groups_menu_item_title_unsubscribe"><![CDATA[Отключить уведомления]]></string>
+    <string name="_bx_groups_menu_item_title_system_more_actions"><![CDATA[Дополнительные действия]]></string>
+    <string name="_bx_groups_menu_item_title_more_actions"><![CDATA[]]></string>
+    <string name="_bx_groups_menu_item_title_system_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_menu_item_title_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_menu_item_title_system_friend_requests"><![CDATA[Число запросов дружбы]]></string>
+    <string name="_bx_groups_menu_item_title_friend_requests"><![CDATA[{addon} запросов дружбы]]></string>
+    <string name="_bx_groups_menu_item_title_system_manage_my_groups"><![CDATA[Мои группы]]></string>
+    <string name="_bx_groups_menu_item_title_manage_my_groups"><![CDATA[{addon} групп]]></string>
+    <string name="_bx_groups_menu_item_title_system_entries_recent"><![CDATA[Новые]]></string>
+    <string name="_bx_groups_menu_item_title_entries_recent"><![CDATA[Новые]]></string>
+    <string name="_bx_groups_menu_item_title_system_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_groups_menu_item_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_groups_menu_item_title_system_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_groups_menu_item_title_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_groups_menu_item_title_system_entries_home"><![CDATA[Группы]]></string>
+    <string name="_bx_groups_menu_item_title_entries_home"><![CDATA[Группы]]></string>
+    <string name="_bx_groups_menu_item_title_system_admt_groups"><![CDATA[Группы]]></string>
+	<string name="_bx_groups_menu_item_title_admt_groups"><![CDATA[Группы - {addon} неодобрено]]></string>
+	<string name="_bx_groups_menu_item_title_manage_my"><![CDATA[Мои группы]]></string>
+	<string name="_bx_groups_menu_item_title_manage_all"><![CDATA[Все группы]]></string>
+	<string name="_bx_groups_menu_item_title_system_entries_top"><![CDATA[Популярные]]></string>
+	<string name="_bx_groups_menu_item_title_entries_top"><![CDATA[Популярные]]></string>
+
+	<string name="_bx_groups_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+	<string name="_bx_groups_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
+	<string name="_bx_groups_grid_filter_item_title_adm_pending"><![CDATA[В ожидании]]></string>
+	<string name="_bx_groups_grid_filter_item_title_adm_suspended"><![CDATA[Заблокированные]]></string>
+	<string name="_bx_groups_grid_column_title_adm_active"><![CDATA[Активные]]></string>
+    <string name="_bx_groups_grid_column_title_adm_name"><![CDATA[Название]]></string>
+    <string name="_bx_groups_grid_column_title_adm_added"><![CDATA[Создание]]></string>
+    <string name="_bx_groups_grid_column_title_adm_account"><![CDATA[Аккаунт]]></string>
+    <string name="_bx_groups_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_groups_grid_action_title_adm_delete_with_content"><![CDATA[Удалить вместе с содержимым]]></string>
+    <string name="_bx_groups_grid_action_title_adm_more_actions"><![CDATA[Дополнительные действия]]></string>
+	<string name="_bx_groups_grid_action_err_delete"><![CDATA[Невозможно удалить выбранную(ные) группу(ы).]]></string>
+	<string name="_bx_groups_grid_txt_account_manager"><![CDATA[Перенаправить в управление аккаунтом.]]></string>
+
+    <string name="_bx_groups_chart_growth"><![CDATA[Группы: Развитие]]></string>
+    <string name="_bx_groups_chart_growth_speed"><![CDATA[Группы: Скорость развития]]></string>
+
+    <string name="_bx_groups_search_extended"><![CDATA[Поиск групп]]></string>
+    <string name="_bx_groups_search_extended_cmts"><![CDATA[Поиск комментариев к группам]]></string>
+
+    <string name="_bx_groups_txt_account_pending"><![CDATA[Эта группа ожидает одобрения. Пожалуйста, дождитесь ее активации.]]></string>
+    <string name="_bx_groups_txt_account_suspended"><![CDATA[Эта группа заблокирована.]]></string>
+    <string name="_bx_groups_txt_N_fans"><![CDATA[{0} участников]]></string>
+    <string name="_bx_groups_txt_sample_single"><![CDATA[группа]]></string>
+    <string name="_bx_groups_txt_sample_single_with_article"><![CDATA[группа]]></string>
+    <string name="_bx_groups_txt_sample_comment_single"><![CDATA[комментарий к группе]]></string>
+    <string name="_bx_groups_txt_sample_vote_single"><![CDATA[голос за группу]]></string>
+    <string name="_bx_groups_txt_to_admins"><![CDATA[В админы]]></string>
+    <string name="_bx_groups_txt_from_admins"><![CDATA[Из админов]]></string>
+    <string name="_bx_groups_txt_private_group"><![CDATA[Приватная группа]]></string>
+
+	<string name="_bx_groups_alert_action_fan_added"><![CDATA[присоединение нового участника]]></string>
+    <string name="_bx_groups_txt_ntfs_fan_added"><![CDATA[В группу "<a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a>" добавился новый член - <a href="{subentry_url}">{subentry_sample}</a>]]></string>
+    <string name="_bx_groups_alert_action_join_request"><![CDATA[запрос на присоединение к событию]]></string>
+    <string name="_bx_groups_txt_ntfs_join_request"><![CDATA[В группу "<a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a>" хочет присоединиться новый член - <a href="{subentry_url}">{subentry_sample}</a>]]></string>
+    <string name="_bx_groups_txt_ntfs_timeline_post_common"><![CDATA[В группе <a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> новая публикация от <a href="{subentry_url}">{subentry_sample}</a>]]></string>
+
+    <string name="_bx_groups_pre_lists_cats"><![CDATA[Категории групп]]></string>
+    <string name="_bx_groups_cat_General"><![CDATA[Обобщение]]></string>
+    <string name="_bx_groups_cat_Business"><![CDATA[Бизнес]]></string>
+    <string name="_bx_groups_cat_Interests"><![CDATA[Увлечение]]></string>
+    <string name="_bx_groups_cat_Causes"><![CDATA[Движение]]></string>
+    <string name="_bx_groups_cat_Fun"><![CDATA[Юмор]]></string>
+    <string name="_bx_groups_cat_Uncategorised"><![CDATA[Без категории]]></string>
+
+    <string name="_bx_groups_email_join_request"><![CDATA[Запрос на присоединение к группе]]></string>
+    <string name="_bx_groups_email_join_request_subject"><![CDATA[Запрос на присоединение к группе]]></string>
+    <string name="_bx_groups_email_join_request_body"><![CDATA[{email_header}
+<p>Получен запрос на присоединение к группе <a href="{EntryUrl}">{EntryTitle}</a> от <a href="{NewMemberUrl}">{NewMemberDisplayName}</a></p>
+{email_footer}]]></string>
+
+    <string name="_bx_groups_email_join_reject"><![CDATA[Отклонение запроса на присоединение к группе]]></string>
+    <string name="_bx_groups_email_join_reject_subject"><![CDATA[Ваш запрос на присоединение к группе был отклонен]]></string>
+    <string name="_bx_groups_email_join_reject_body"><![CDATA[{email_header}
+<p>Ваш запрос на присоединение к группе <a href="{EntryUrl}">{EntryTitle}</a> был отклонен администратором группы.</p>
+{email_footer}]]></string>
+
+    <string name="_bx_groups_email_join_confirm"><![CDATA[Одобрение запроса на присоединение к группе]]></string>
+    <string name="_bx_groups_email_join_confirm_subject"><![CDATA[Ваш запрос на присоединение к группе был одобрен]]></string>
+    <string name="_bx_groups_email_join_confirm_body"><![CDATA[{email_header}
+<p>Ваш запрос на присоединение к группе <a href="{EntryUrl}">{EntryTitle}</a> был одобрен.</p>
+{email_footer}]]></string>
+
+    <string name="_bx_groups_email_fan_remove"><![CDATA[Удаление из группы]]></string>
+    <string name="_bx_groups_email_fan_remove_subject"><![CDATA[Вы были удалены из группы]]></string>
+    <string name="_bx_groups_email_fan_remove_body"><![CDATA[{email_header}
+<p>Ваш профиль был удален из группы <a href="{EntryUrl}">{EntryTitle}</a> администратором группы.</p>
+{email_footer}]]></string>
+
+    <string name="_bx_groups_email_fan_become_admin"><![CDATA[Получение статуса администратора группы]]></string>
+    <string name="_bx_groups_email_fan_become_admin_subject"><![CDATA[Вы стали администратором группы]]></string>
+    <string name="_bx_groups_email_fan_become_admin_body"><![CDATA[{email_header}
+<p>Вы получили статус администратора группы <a href="{EntryUrl}">{EntryTitle}</a>.</p>
+{email_footer}]]></string>
+
+    <string name="_bx_groups_email_admin_become_fan"><![CDATA[Лишение статуса администратора группы]]></string>
+    <string name="_bx_groups_email_admin_become_fan_subject"><![CDATA[Вы были лишены статуса администратора группы]]></string>
+    <string name="_bx_groups_email_admin_become_fan_body"><![CDATA[{email_header}
+<p>Вы были лишены статуса администратора группы <a href="{EntryUrl}">{EntryTitle}</a></p>
+{email_footer}]]></string>
+
+    <string name="_bx_groups_email_invitation"><![CDATA[Приглашение в группу]]></string>
+    <string name="_bx_groups_email_invitation_subject"><![CDATA[Приглашение в группу "{EntryTitle}"]]></string>
+    <string name="_bx_groups_email_invitation_body"><![CDATA[{email_header}
+<p><a href="{InviterUrl}">{InviterDisplayName}</a> пригласил Вас в группу <a href="{EntryUrl}">{EntryTitle}</a>.</p>
+{email_footer}]]></string>
+</resources>

Некоторые файлы не были показаны из-за большого количества измененных файлов