AntonLV %!s(int64=7) %!d(string=hai) anos
pai
achega
eec180ad95
Modificáronse 59 ficheiros con 1014 adicións e 225 borrados
  1. 68 0
      inc/classes/BxDolLabel.php
  2. 92 0
      inc/classes/BxDolLabelQuery.php
  3. 27 3
      install/sql/system.sql
  4. 1 5
      modules/base/general/classes/BxBaseModGeneralFormEntry.php
  5. 13 2
      modules/base/general/classes/BxBaseModGeneralTemplate.php
  6. 6 0
      modules/base/general/template/breadcrumb.html
  7. 17 0
      modules/base/general/template/css/main.css
  8. 0 11
      modules/base/text/classes/BxBaseModTextTemplate.php
  9. 1 6
      modules/base/text/template/breadcrumb.html
  10. 0 17
      modules/base/text/template/css/main.css
  11. 1 2
      modules/boonex/albums/classes/BxAlbumsConfig.php
  12. 1 2
      modules/boonex/albums/install/sql/enable.sql
  13. 15 5
      modules/boonex/channels/classes/BxCnlDb.php
  14. 25 1
      modules/boonex/channels/classes/BxCnlModule.php
  15. 96 0
      modules/boonex/channels/classes/BxCnlTemplate.php
  16. 8 5
      modules/boonex/channels/install/langs/en.xml
  17. 3 0
      modules/boonex/channels/install/sql/enable.sql
  18. 1 0
      modules/boonex/channels/template/breadcrumb.html
  19. 1 0
      modules/boonex/channels/template/entry-childs.html
  20. 1 0
      modules/boonex/channels/template/entry-parent.html
  21. 19 0
      modules/boonex/decorous/data/template/studio/scripts/BxTemplStudioFormsLabels.php
  22. 0 1
      modules/boonex/directory/classes/BxDirConfig.php
  23. 1 2
      modules/boonex/directory/install/sql/enable.sql
  24. 15 0
      modules/boonex/english/data/langs/system/en.xml
  25. 1 2
      modules/boonex/files/classes/BxFilesConfig.php
  26. 3 2
      modules/boonex/files/install/sql/enable.sql
  27. 3 4
      modules/boonex/forum/classes/BxForumConfig.php
  28. 1 2
      modules/boonex/forum/install/sql/enable.sql
  29. 1 3
      modules/boonex/glossary/classes/BxGlsrConfig.php
  30. 1 2
      modules/boonex/glossary/install/sql/enable.sql
  31. 8 9
      modules/boonex/groups/classes/BxGroupsConfig.php
  32. 1 2
      modules/boonex/groups/install/sql/enable.sql
  33. 19 0
      modules/boonex/lucid/data/template/studio/scripts/BxTemplStudioFormsLabels.php
  34. 25 26
      modules/boonex/market/classes/BxMarketConfig.php
  35. 1 2
      modules/boonex/market/install/sql/enable.sql
  36. 19 0
      modules/boonex/ocean/data/template/studio/scripts/BxTemplStudioFormsLabels.php
  37. 0 1
      modules/boonex/organizations/classes/BxOrgsConfig.php
  38. 1 2
      modules/boonex/organizations/install/sql/enable.sql
  39. 0 2
      modules/boonex/persons/classes/BxPersonsConfig.php
  40. 1 2
      modules/boonex/persons/install/sql/enable.sql
  41. 14 15
      modules/boonex/photos/classes/BxPhotosConfig.php
  42. 1 2
      modules/boonex/photos/install/sql/enable.sql
  43. 20 21
      modules/boonex/polls/classes/BxPollsConfig.php
  44. 1 2
      modules/boonex/polls/install/sql/enable.sql
  45. 0 2
      modules/boonex/posts/classes/BxPostsConfig.php
  46. 1 2
      modules/boonex/posts/install/sql/enable.sql
  47. 19 0
      modules/boonex/protean/data/template/studio/scripts/BxTemplStudioFormsLabels.php
  48. 29 25
      modules/boonex/russian/data/langs/bx_channels/ru.xml
  49. 15 0
      modules/boonex/russian/data/langs/system/ru.xml
  50. 1 1
      modules/boonex/spaces/classes/BxSpacesTemplate.php
  51. 16 17
      modules/boonex/videos/classes/BxVideosConfig.php
  52. 1 2
      modules/boonex/videos/install/sql/enable.sql
  53. 1 1
      studio/classes/BxDolStudioForms.php
  54. 47 0
      studio/classes/BxDolStudioFormsLabels.php
  55. 19 0
      studio/template/form_add_label.html
  56. 10 0
      studio/template/forms_labels.html
  57. 30 9
      studio/template/scripts/BxBaseStudioForms.php
  58. 266 0
      studio/template/scripts/BxBaseStudioFormsLabels.php
  59. 26 3
      template/scripts/BxBaseFormView.php

+ 68 - 0
inc/classes/BxDolLabel.php

@@ -0,0 +1,68 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaCore UNA Core
+ * @{
+ */
+
+class BxDolLabel extends BxDolFactory implements iBxDolSingleton
+{
+    protected $_oDb;
+
+    protected function __construct()
+    {
+        parent::__construct();
+
+        $this->_oDb = new BxDolLabelQuery();
+    }
+
+    public function __clone()
+    {
+        if (isset($GLOBALS['bxDolClasses'][get_class($this)]))
+            trigger_error('Clone is not allowed for the class: ' . get_class($this), E_USER_ERROR);
+    }
+
+    public static function getInstance()
+    {
+        if(!isset($GLOBALS['bxDolClasses'][__CLASS__]))
+            $GLOBALS['bxDolClasses'][__CLASS__] = new BxDolLabel();
+
+        return $GLOBALS['bxDolClasses'][__CLASS__];
+    }
+
+    public function getLabels($aParams = array())
+    {
+        return $this->_oDb->getLabels($aParams);
+    }
+
+    public function onAdd($iId)
+    {
+        $aLabel = $this->_oDb->getLabels(array('type' => 'id', 'id' => $iId));
+        if(empty($aLabel) || !is_array($aLabel))
+            return;
+
+        bx_alert('label', 'added', $iId, false, array('label' => $aLabel));
+    }
+
+    public function onEdit($iId)
+    {
+        $aLabel = $this->_oDb->getLabels(array('type' => 'id', 'id' => $iId));
+        if(empty($aLabel) || !is_array($aLabel))
+            return;
+
+        bx_alert('label', 'edited', $iId, false, array('label' => $aLabel));
+    }
+
+    public function onDelete($iId)
+    {
+        $aLabel = $this->_oDb->getLabels(array('type' => 'id', 'id' => $iId));
+        if(empty($aLabel) || !is_array($aLabel))
+            return;
+
+        bx_alert('label', 'deleted', $iId, false, array('label' => $aLabel));
+    }
+}
+
+/** @} */

+ 92 - 0
inc/classes/BxDolLabelQuery.php

@@ -0,0 +1,92 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaCore UNA Core
+ * @{
+ */
+
+/**
+ * @see BxDolLabel
+ */
+class BxDolLabelQuery extends BxDolDb
+{
+    protected $_sTableLabels;
+
+    public function __construct()
+    {
+    	parent::__construct();
+
+        $this->_sTableLabels = 'sys_labels';
+    }
+
+    public function getLabels($aParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aMethod = array('name' => 'getAll', 'params' => array(0 => 'query'));
+
+        $sSelectClause = "`tl`.*";
+        $sJoinClause = $sWhereClause = $sGroupClause = "";
+        $sOrderClause = "`tl`.`order` ASC";
+
+        if(isset($aParams['count_only']) && $aParams['count_only'] === true) {
+            $aMethod['name'] = 'getOne';
+            $sSelectClause = "COUNT(`tl`.`id`)";
+        }
+
+        switch($aParams['type']) {
+            case 'id':
+                $aMethod['name'] = 'getRow';
+                $aMethod['params'][1] = array(
+                    'id' => $aParams['id']
+                );
+
+                $sWhereClause = " AND `tl`.`id`=:id";
+                break;
+
+            case 'value':
+                $aMethod['name'] = 'getRow';
+                $aMethod['params'][1] = array(
+                    'value' => mb_strtoupper($aParams['value'])
+                );
+
+                $sWhereClause = " AND UPPER(`tl`.`value`)=:value";
+                break;
+
+            case 'parent':
+                $aMethod['params'][1] = array(
+                    'parent' => $aParams['parent']
+                );
+
+                $sWhereClause = " AND `tl`.`parent`=:parent";
+                break;
+
+            case 'parent_order':
+                $aMethod['name'] = 'getOne';
+                $aMethod['params'][1] = array(
+                    'parent' => $aParams['parent']
+                );
+
+                $sSelectClause = "MAX(`tl`.`order`)";
+                $sWhereClause = " AND `tl`.`parent`=:parent";
+                break;
+        }
+
+        if(!empty($sGroupClause))
+            $sGroupClause = "GROUP BY " . $sGroupClause;
+
+        if(!empty($sOrderClause))
+            $sOrderClause = "ORDER BY " . $sOrderClause;
+
+        $aMethod['params'][0] = "SELECT " . $sSelectClause . " 
+            FROM `" . $this->_sTableLabels . "` AS `tl`" . $sJoinClause . " 
+            WHERE 1" . $sWhereClause . " " . $sGroupClause . " " . $sOrderClause;
+
+        return call_user_func_array(array($this, $aMethod['name']), $aMethod['params']);
+    }
+    
+}
+
+/** @} */

+ 27 - 3
install/sql/system.sql

@@ -3734,7 +3734,9 @@ INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `fie
 ('sys_studio_forms_pre_values', 'Sql', 'SELECT * FROM `sys_form_pre_values` WHERE 1 ', 'sys_form_pre_values', 'id', 'Order', '', '', 1000, NULL, 'start', '', 'Key,Value', 'LKey,LKey2', 'auto', '', '', 'BxTemplStudioFormsPreValues', ''),
 
 ('sys_studio_search_forms', 'Sql', 'SELECT * FROM `sys_objects_search_extended` WHERE 1 ', 'sys_objects_search_extended', 'id', 'module,title', 'active', '', 100, NULL, 'start', '', 'module', 'title', 'like', 'module', 'title', 'BxTemplStudioFormsSearchForms', ''),
-('sys_studio_search_forms_fields', 'Sql', 'SELECT * FROM `sys_search_extended_fields` WHERE 1 AND `object`=?', 'sys_search_extended_fields', 'id', 'order', 'active', '', 100, NULL, 'start', '', 'type', 'caption', 'like', '', '', 'BxTemplStudioFormsSearchFields', '');
+('sys_studio_search_forms_fields', 'Sql', 'SELECT * FROM `sys_search_extended_fields` WHERE 1 AND `object`=?', 'sys_search_extended_fields', 'id', 'order', 'active', '', 100, NULL, 'start', '', 'type', 'caption', 'like', '', '', 'BxTemplStudioFormsSearchFields', ''),
+
+('sys_studio_labels', 'Sql', 'SELECT * FROM `sys_labels` WHERE 1 ', 'sys_labels', 'id', 'order', '', '', 100, NULL, 'start', '', 'value', '', 'like', 'value', '', 'BxTemplStudioFormsLabels', '');
 
 CREATE TABLE IF NOT EXISTS `sys_grid_fields` (
   `object` varchar(64) NOT NULL,
@@ -3845,7 +3847,12 @@ INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable
 ('sys_studio_search_forms_fields', 'type', '_adm_form_txt_search_forms_fields_type', '15%', 0, '', '', 3),
 ('sys_studio_search_forms_fields', 'caption', '_adm_form_txt_search_forms_fields_caption', '40%', 1, '38', '', 4),
 ('sys_studio_search_forms_fields', 'search_type', '_adm_form_txt_search_forms_fields_search_type', '15%', 0, '', '', 5),
-('sys_studio_search_forms_fields', 'actions', '', '20%', 0, '', '', 6);
+('sys_studio_search_forms_fields', 'actions', '', '20%', 0, '', '', 6),
+
+('sys_studio_labels', 'order', '', '1%', 0, 0, '', 1),
+('sys_studio_labels', 'value', '_adm_form_txt_labels_value', '70%', 0, 38, '', 2),
+('sys_studio_labels', 'items', '_adm_form_txt_labels_items', '10%', 0, 0, '', 3),
+('sys_studio_labels', 'actions', '', '19%', 0, 0, '', 4);
 
 
 CREATE TABLE IF NOT EXISTS `sys_grid_actions` (
@@ -3912,7 +3919,11 @@ INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `conf
 ('sys_studio_search_forms', 'single', 'edit', '', 'pencil-alt', 0, 1),
 
 ('sys_studio_search_forms_fields', 'single', 'edit', '', 'pencil-alt', 0, 1),
-('sys_studio_search_forms_fields', 'independent', 'reset', '_adm_form_btn_search_forms_fields_reset', '', 0, 1);
+('sys_studio_search_forms_fields', 'independent', 'reset', '_adm_form_btn_search_forms_fields_reset', '', 0, 1),
+
+('sys_studio_labels', 'independent', 'add', '_adm_form_btn_labels_add', '', 0, 1),
+('sys_studio_labels', 'single', 'edit', '', 'pencil-alt', 0, 1),
+('sys_studio_labels', 'single', 'delete', '', 'remove', 1, 2);
 
 -- 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
@@ -4423,6 +4434,19 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `
 
 -- --------------------------------------------------------
 
+CREATE TABLE `sys_labels` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `module` varchar(32) NOT NULL,
+  `parent` int(11) NOT NULL DEFAULT 0,
+  `level` int(11) NOT NULL DEFAULT 0,
+  `order` int(11) NOT NULL DEFAULT 0,
+  `value` varchar(255) NOT NULL,
+  PRIMARY KEY (id),
+  UNIQUE KEY `value` (`value`)
+);
+
+-- --------------------------------------------------------
+
 CREATE TABLE `sys_objects_metatags` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `object` varchar(64) NOT NULL,

+ 1 - 5
modules/base/general/classes/BxBaseModGeneralFormEntry.php

@@ -65,10 +65,6 @@ class BxBaseModGeneralFormEntry extends BxTemplFormView
             $this->aInputs[$CNF['FIELD_PHOTO']]['ghost_template'] = '';
         }
 
-        if (isset($CNF['FIELD_LABELS']) && isset($this->aInputs[$CNF['FIELD_LABELS']])) {
-            $this->aInputs[$CNF['FIELD_LABELS']]['values'] = array_map('trim', getParam($CNF['PARAM_LABELS']) ? explode(',', getParam($CNF['PARAM_LABELS'])) : array());
-        }
-
         if (isset($CNF['FIELD_ALLOW_VIEW_TO']) && isset($this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']]) && $oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW'])) {
 
             $aSave = array('db' => array('pass' => 'Xss'));
@@ -104,7 +100,7 @@ class BxBaseModGeneralFormEntry extends BxTemplFormView
         if (isset($CNF['FIELD_LABELS']) && isset($this->aInputs[$CNF['FIELD_LABELS']]) && !empty($aValues['id']) && ($oMetatags = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS'])) && $oMetatags->keywordsIsEnabled() && ($aLabels = $oMetatags->keywordsGet($aValues['id']))) {
             $this->aInputs[$CNF['FIELD_LABELS']]['content_id'] = $aValues['id'];
             $this->aInputs[$CNF['FIELD_LABELS']]['meta_object'] = $CNF['OBJECT_METATAGS'];
-            $this->aInputs[$CNF['FIELD_LABELS']]['value'] = array_intersect($aLabels, $this->aInputs[$CNF['FIELD_LABELS']]['values']);
+            $this->aInputs[$CNF['FIELD_LABELS']]['value'] = $aLabels;
         }
 
         if (isset($CNF['FIELD_ANONYMOUS']) && isset($this->aInputs[$CNF['FIELD_ANONYMOUS']]) && isset($CNF['FIELD_AUTHOR']) && isset($aValues[$CNF['FIELD_AUTHOR']])) {

+ 13 - 2
modules/base/general/classes/BxBaseModGeneralTemplate.php

@@ -112,7 +112,18 @@ class BxBaseModGeneralTemplate extends BxDolModuleTemplate
         return $aVars;
     }
 
-    function entryText ($aData, $sTemplateName = 'entry-text.html')
+    public function entryBreadcrumb($aContentInfo, $aTmplVarsItems = array())
+    {
+    	$CNF = &BxDolModule::getInstance($this->MODULE)->_oConfig->CNF;
+
+    	return $this->parseHtmlByName('breadcrumb.html', array(
+    		'url_home' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']),
+    		'icon_home' => $CNF['ICON'],
+    		'bx_repeat:items' => $aTmplVarsItems
+    	));
+    }
+
+    public function entryText ($aData, $sTemplateName = 'entry-text.html')
     {
         $aVars = $this->getTmplVarsText($aData);
 
@@ -122,7 +133,7 @@ class BxBaseModGeneralTemplate extends BxDolModuleTemplate
         return $this->parseHtmlByName($sTemplateName, $aVars);
     }
 
-    function entryLocation ($iContentId)
+    public function entryLocation ($iContentId)
     {
         $CNF = &$this->getModule()->_oConfig->CNF;
 

+ 6 - 0
modules/base/general/template/breadcrumb.html

@@ -0,0 +1,6 @@
+<div class="bx-base-general-breadcrumb">
+    <a class ="bx-base-general-breadcrumb-home" href="__url_home__"><i class="sys-icon __icon_home__"></i></a>
+    <bx_repeat:items>
+        <i class="sys-icon chevron-right bx-def-margin-sec-leftright"></i><a href="__url__">__title__</a>
+    </bx_repeat:items>
+</div>

+ 17 - 0
modules/base/general/template/css/main.css

@@ -1,4 +1,21 @@
 
+/* breadcrumb */
+div.bx-base-general-breadcrumb  {
+    white-space: nowrap;
+    overflow: hidden;
+}
+div.bx-base-general-breadcrumb a,
+div.bx-base-general-breadcrumb i {
+    display: inline-block;
+    vertical-align: top;
+
+    height: 2.2rem;
+    line-height: 2.2rem;
+}
+.bx-base-general-breadcrumb-home i.sys-icon {
+    font-size: 2.0rem;
+}
+
 /* view entry */
 .bx-base-general-entity-info > p:first-child {
     margin-top:0;

+ 0 - 11
modules/base/text/classes/BxBaseModTextTemplate.php

@@ -431,17 +431,6 @@ class BxBaseModTextTemplate extends BxBaseModGeneralTemplate
         return _t($CNF['T']['txt_all_entries_in'], $sUrl, $oProfile->getDisplayName(), $this->getModule()->_oDb->getEntriesNumByContext($oProfile->id()));
     }
 
-    public function entryBreadcrumb($aContentInfo, $aTmplVarsItems = array())
-    {
-    	$CNF = &BxDolModule::getInstance($this->MODULE)->_oConfig->CNF;
-
-    	return $this->parseHtmlByName('breadcrumb.html', array(
-    		'url_home' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']),
-    		'icon_home' => $CNF['ICON'],
-    		'bx_repeat:items' => $aTmplVarsItems
-    	));
-    }
-
     protected function checkPrivacy ($aData, $isCheckPrivateContent, $oModule, $sTemplateName = '')
     {
         if ($isCheckPrivateContent && CHECK_ACTION_RESULT_ALLOWED !== ($sMsg = $oModule->checkAllowedView($aData))) {

+ 1 - 6
modules/base/text/template/breadcrumb.html

@@ -1,6 +1 @@
-<div class="bx-base-text-breadcrumb">
-	<a class ="bx-base-text-breadcrumb-home" href="__url_home__"><i class="sys-icon __icon_home__"></i></a>
-	<bx_repeat:items>
-		<i class="sys-icon chevron-right bx-def-margin-sec-leftright"></i><a href="__url__">__title__</a>
-	</bx_repeat:items>
-</div>
+<bx_include_base:../modules/base/general/template/breadcrumb.html />

+ 0 - 17
modules/base/text/template/css/main.css

@@ -1,22 +1,5 @@
 @import url(../../../general/template/css/main.css);
 
-/* Breadcrumb */
-div.bx-base-text-breadcrumb  {
-	white-space: nowrap;
-	overflow: hidden;
-}
-div.bx-base-text-breadcrumb a,
-div.bx-base-text-breadcrumb i {
-	display: inline-block;
-	vertical-align: top;
-
-	height: 2.2rem;
-	line-height: 2.2rem;	
-}
-.bx-base-text-breadcrumb-home i.sys-icon {
-	font-size: 2.0rem;
-}
-
 /* unit */
 .bx-base-text-unit h2,
 .bx-base-text-unit h1 {

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

@@ -72,8 +72,7 @@ class BxAlbumsConfig extends BxBaseModTextConfig
             'PARAM_CHARS_SUMMARY' => 'bx_albums_summary_chars',
             'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_albums_plain_summary_chars',
             'PARAM_NUM_RSS' => 'bx_albums_rss_num',
-        	'PARAM_SEARCHABLE_FIELDS' => 'bx_albums_searchable_fields',
-            'PARAM_LABELS' => 'bx_albums_labels',
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_albums_searchable_fields',
 
             // objects
             'OBJECT_STORAGE' => 'bx_albums_files',

+ 1 - 2
modules/boonex/albums/install/sql/enable.sql

@@ -17,8 +17,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_albums_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('bx_albums_album_browsing_unit', '10', @iCategId, '_bx_albums_option_album_browsing_unit', 'digit', '', '', '', 20),
 ('bx_albums_rss_num', '10', @iCategId, '_bx_albums_option_rss_num', 'digit', '', '', '', 20),
-('bx_albums_searchable_fields', 'title,text', @iCategId, '_bx_albums_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:9:"bx_albums";s:6:"method";s:21:"get_searchable_fields";}', 30),
-('bx_albums_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('bx_albums_searchable_fields', 'title,text', @iCategId, '_bx_albums_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:9:"bx_albums";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 

+ 15 - 5
modules/boonex/channels/classes/BxCnlDb.php

@@ -18,16 +18,26 @@ class BxCnlDb extends BxBaseModGroupsDb
     {
         parent::__construct($oConfig);
     }
-    
+
     public function getChannelIdByName($sName)
     {
         $CNF = &$this->_oConfig->CNF;
-        $aBindings = array(
+
+        return $this->getOne("SELECT `" . $CNF['FIELD_ID'] . "` FROM `" . $CNF['TABLE_ENTRIES'] . "` WHERE `" . $CNF['FIELD_NAME'] . "` = :name", array(
             'name' => $sName,
-        );
-        return $this->getOne("SELECT `" . $CNF['FIELD_ID'] . "` FROM `" . $CNF['TABLE_ENTRIES'] . "` WHERE `" . $CNF['FIELD_NAME'] . "` = :name", $aBindings);
+        ));
     }
-    
+
+    public function getChannelInfoByName($sName)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        return $this->getRow("SELECT `c`.*, `p`.`account_id`, `p`.`id` AS `profile_id`, `a`.`email` AS `profile_email`, `a`.`ip` AS `profile_ip`, `p`.`status` AS `profile_status` FROM `" . $CNF['TABLE_ENTRIES'] . "` AS `c` INNER JOIN `sys_profiles` AS `p` ON (`p`.`content_id` = `c`.`id` AND `p`.`type` = :type) INNER JOIN `sys_accounts` AS `a` ON (`p`.`account_id` = `a`.`id`) WHERE `c`.`channel_name` = :name", array(
+            'type' => $this->_oConfig->getName(),
+            'name' => $sName,
+        ));
+    }
+
     public function addContentToChannel($iContentId, $iCnlId, $sModuleName, $iAuthorId)
     {
         $CNF = &$this->_oConfig->CNF;

+ 25 - 1
modules/boonex/channels/classes/BxCnlModule.php

@@ -106,7 +106,31 @@ class BxCnlModule extends BxBaseModGroupsModule
         
         return $this->_oDb->removeContentFromChannel($iContentId, $sModuleName);
     }
-    
+
+    public function serviceEntityBreadcrumb($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 $this->_oTemplate->entryBreadcrumb($aContentInfo);
+    }
+
+    public function serviceEntityParent($iContentId = 0)
+    {
+        return $this->_serviceTemplateFunc('entryParent', $iContentId);
+    }
+
+    public function serviceEntityChilds($iContentId = 0)
+    {
+        return $this->_serviceTemplateFunc('entryChilds', $iContentId);
+    }
+
     function serviceSearchResultByHashtag($iContentId = 0)
     {
         $CNF = &$this->_oConfig->CNF;

+ 96 - 0
modules/boonex/channels/classes/BxCnlTemplate.php

@@ -19,6 +19,102 @@ class BxCnlTemplate extends BxBaseModGroupsTemplate
         $this->MODULE = 'bx_channels';
         parent::__construct($oConfig, $oDb);
     }
+
+    public function entryBreadcrumb($aContentInfo, $aTmplVarsItems = array())
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+        $oLabel = BxDolLabel::getInstance();
+        $oPermalink = BxDolPermalinks::getInstance();
+
+        $aLabel = $oLabel->getLabels(array('type' => 'value', 'value' => $aContentInfo[$CNF['FIELD_NAME']]));
+
+        $aTmplVarsItems = array();
+        $this->_entryBreadcrumb($aLabel['id'], $oLabel, $oPermalink, $aTmplVarsItems);
+        $aTmplVarsItems = array_reverse($aTmplVarsItems);
+
+    	return parent::entryBreadcrumb($aContentInfo, $aTmplVarsItems);
+    }
+
+    public function entryParent($aContentInfo)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $oLabel = BxDolLabel::getInstance();
+
+        $aLabel = $oLabel->getLabels(array('type' => 'value', 'value' => $aContentInfo[$CNF['FIELD_NAME']]));
+        if(empty($aLabel) || !is_array($aLabel) || (int)$aLabel['parent'] == 0)
+            return false;
+
+        $aLabelParent = $oLabel->getLabels(array('type' => 'id', 'id' => $aLabel['parent']));
+        $aContentInfoParent = $this->_oDb->getChannelInfoByName($aLabelParent['value']);
+        if(empty($aContentInfoParent) || !is_array($aContentInfoParent))
+            return false;
+
+        return $this->parseHtmlByName('entry-parent.html', array('content' => $this->_entryRelatives(array($aContentInfoParent['profile_id']))));
+    }
+
+    public function entryChilds($aContentInfo)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $oLabel = BxDolLabel::getInstance();
+
+        $aLabel = $oLabel->getLabels(array('type' => 'value', 'value' => $aContentInfo[$CNF['FIELD_NAME']]));
+        if(empty($aLabel) || !is_array($aLabel))
+            return false;
+
+        $aLabelChildren = $oLabel->getLabels(array('type' => 'parent', 'parent' => $aLabel['id']));
+        if(empty($aLabelChildren) || !is_array($aLabelChildren))
+            return false;
+
+        $aIds = array();
+        foreach($aLabelChildren as $aLabelChild) {
+            $aContentInfoChild = $this->_oDb->getChannelInfoByName($aLabelChild['value']);
+            if(empty($aContentInfoChild) || !is_array($aContentInfoChild))
+                continue;
+            
+            $aIds[] = $aContentInfoChild['profile_id'];
+        }
+
+        if(empty($aIds))
+            return false;
+
+        return $this->parseHtmlByName('entry-childs.html', array('content' => $this->_entryRelatives($aIds)));
+    }
+
+    protected function _entryBreadcrumb($iLabel, &$oLabel, &$oPermalink, &$aTmplVarsItems)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aLabel = $oLabel->getLabels(array('type' => 'id', 'id' => $iLabel));
+        if(empty($aLabel) || !is_array($aLabel))
+            return;
+
+        $iChannel = (int)$this->_oDb->getChannelIdByName($aLabel['value']);
+        $aTmplVarsItems[] = array(
+            'url' => $iChannel != 0 ? $oPermalink->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iChannel) : 'javascript:void(0)',
+            'title' => bx_process_output($aLabel['value'])
+        );
+
+        if(empty($aLabel['parent']))
+            return;
+
+        $this->_entryBreadcrumb((int)$aLabel['parent'], $oLabel, $oPermalink, $aTmplVarsItems);
+    }
+    
+    protected function _entryRelatives($aProfiles)
+    {
+        $sResult = '';
+
+        foreach($aProfiles as $iProfile) {
+            $oProfile = BxDolProfile::getInstance($iProfile);
+            if(!$oProfile)
+                continue;
+
+            $sResult .= $oProfile->getUnit(false, array('template' => 'unit_wo_cover'));
+        }
+
+        return $sResult;
+    }
 }
 
 /** @} */

+ 8 - 5
modules/boonex/channels/install/langs/en.xml

@@ -108,18 +108,21 @@
 	<string name="_bx_channels_page_block_title_top_profiles"><![CDATA[Top Channels]]></string>
         <string name="_bx_channels_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
 	<string name="_bx_channels_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+        <string name="_bx_channels_page_block_title_entry_breadcrumb"><![CDATA[Breadcrumb]]></string>
+        <string name="_bx_channels_page_block_title_entry_parent"><![CDATA[Parent Channel]]></string>
+        <string name="_bx_channels_page_block_title_entry_childs"><![CDATA[Child Channels]]></string>
 	<string name="_bx_channels_page_block_title_search_form"><![CDATA[Search Form]]></string>
-  <string name="_bx_channels_page_block_title_entries_my"><![CDATA[My Followed Channels]]></string>
-  <string name="_bx_channels_page_trigger_block_title_entries_my"><![CDATA[My Followed Channels]]></string>
-  <string name="_bx_channels_page_block_title_search_results"><![CDATA[Search Results]]></string>
-  <string name="_bx_channels_page_block_title_search_results_by_hashtag"><![CDATA[Search Results By Hashtag]]></string>
+        <string name="_bx_channels_page_block_title_entries_my"><![CDATA[My Followed Channels]]></string>
+        <string name="_bx_channels_page_trigger_block_title_entries_my"><![CDATA[My Followed Channels]]></string>
+        <string name="_bx_channels_page_block_title_search_results"><![CDATA[Search Results]]></string>
+        <string name="_bx_channels_page_block_title_search_results_by_hashtag"><![CDATA[Search Results By Hashtag]]></string>
 	<string name="_bx_channels_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
 	<string name="_bx_channels_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
 	<string name="_bx_channels_page_block_title_sys_featured_entries_view_showcase"><![CDATA[Featured Channels (Showcase View)]]></string>
 	<string name="_bx_channels_page_block_title_featured_entries_view_showcase"><![CDATA[Featured Channels]]></string>
 	<string name="_bx_channels_page_block_title_sys_recommended_entries_view_showcase"><![CDATA[Recommended Channels (Showcase View)]]></string>
 	<string name="_bx_channels_page_block_title_recommended_entries_view_showcase"><![CDATA[Recommended Channels]]></string>
-	
+
 	<string name="_bx_channels_menu_title_submenu"><![CDATA[Channels Submenu]]></string>
 	<string name="_bx_channels_menu_set_title_submenu"><![CDATA[Channels Submenu]]></string>
 	<string name="_bx_channels_menu_set_title_view_profile_actions"><![CDATA[Channel Actions]]></string>

+ 3 - 0
modules/boonex/channels/install/sql/enable.sql

@@ -38,6 +38,9 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 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_channels_view_profile', 1, 'bx_channels', '', '_bx_channels_page_block_title_entry_social_sharing', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 0, 0),
 ('bx_channels_view_profile', 1, 'bx_channels', '', '_bx_channels_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:18:\"entity_all_actions\";}', 0, 0, 0, 0),
+('bx_channels_view_profile', 1, 'bx_channels', '', '_bx_channels_page_block_title_entry_breadcrumb', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_channels";s:6:"method";s:17:"entity_breadcrumb";}', 0, 0, 1, 1),
+('bx_channels_view_profile', 2, 'bx_channels', '', '_bx_channels_page_block_title_entry_parent', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_channels";s:6:"method";s:13:"entity_parent";}', 0, 0, 1, 1),
+('bx_channels_view_profile', 3, 'bx_channels', '', '_bx_channels_page_block_title_entry_childs', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_channels";s:6:"method";s:13:"entity_childs";}', 0, 0, 1, 1),
 ('bx_channels_view_profile', 4, 'bx_channels', '', '_bx_channels_page_block_title_search_results_by_hashtag', 0, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:24:\"search_result_by_hashtag\";}', 0, 0, 0, 0),
 ('bx_channels_view_profile', 4, 'bx_channels', '', '_bx_channels_page_block_title_profile_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:11:\"bx_channels\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 1);
 

+ 1 - 0
modules/boonex/channels/template/breadcrumb.html

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

+ 1 - 0
modules/boonex/channels/template/entry-childs.html

@@ -0,0 +1 @@
+__content__

+ 1 - 0
modules/boonex/channels/template/entry-parent.html

@@ -0,0 +1 @@
+__content__

+ 19 - 0
modules/boonex/decorous/data/template/studio/scripts/BxTemplStudioFormsLabels.php

@@ -0,0 +1,19 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaStudioView UNA Studio Representation classes
+ * @ingroup     UnaStudio
+ * @{
+ */
+defined('BX_DOL') or die('hack attempt');
+
+class BxTemplStudioFormsLabels extends BxBaseStudioFormsLabels
+{
+    function __construct($aOptions, $oTemplate = false)
+    {
+        parent::__construct($aOptions, $oTemplate);
+    }
+}
+/** @} */

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

@@ -82,7 +82,6 @@ class BxDirConfig extends BxBaseModTextConfig
             'PARAM_NUM_RSS' => 'bx_directory_rss_num',
             'PARAM_SEARCHABLE_FIELDS' => 'bx_directory_searchable_fields',
             'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_directory_per_page_browse_showcase',
-            'PARAM_LABELS' => 'bx_directory_labels',
             'PARAM_CATEGORY_LEVEL_MAX' => 1,
 
             // objects

+ 1 - 2
modules/boonex/directory/install/sql/enable.sql

@@ -16,8 +16,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_directory_per_page_profile', '6', @iCategId, '_bx_directory_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_directory_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('bx_directory_rss_num', '10', @iCategId, '_bx_directory_option_rss_num', 'digit', '', '', '', 20),
-('bx_directory_searchable_fields', 'title,text', @iCategId, '_bx_directory_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:12:"bx_directory";s:6:"method";s:21:"get_searchable_fields";}', 30),
-('bx_directory_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('bx_directory_searchable_fields', 'title,text', @iCategId, '_bx_directory_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:12:"bx_directory";s:6:"method";s:21:"get_searchable_fields";}', 30);
 
 
 -- PAGE: create entry

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

@@ -677,6 +677,9 @@
 	<string name="_adm_form_btn_forms_cancel"><![CDATA[Cancel]]></string>
 	<string name="_adm_form_btn_forms_edit"><![CDATA[Edit form]]></string>
 	<string name="_adm_form_btn_forms_save"><![CDATA[Save]]></string>
+        <string name="_adm_form_btn_labels_add"><![CDATA[Add]]></string>
+        <string name="_adm_form_btn_labels_cancel"><![CDATA[Cancel]]></string>
+        <string name="_adm_form_btn_labels_submit"><![CDATA[Submit]]></string>
 	<string name="_adm_form_btn_pre_lists_add"><![CDATA[Add]]></string>
 	<string name="_adm_form_btn_pre_lists_cancel"><![CDATA[Cancel]]></string>
 	<string name="_adm_form_btn_pre_lists_create"><![CDATA[Add New List]]></string>
@@ -740,6 +743,9 @@
 	<string name="_adm_form_err_field_values"><![CDATA[You need to select a data set from the list.]]></string>
 	<string name="_adm_form_err_forms_edit"><![CDATA[Cannot update form]]></string>
 	<string name="_adm_form_err_forms_title"><![CDATA[Enter name, more than 3 characters]]></string>
+        <string name="_adm_form_err_labels_add"><![CDATA[Cannot add label]]></string>
+        <string name="_adm_form_err_labels_edit"><![CDATA[Cannot update label]]></string>
+        <string name="_adm_form_err_labels_value"><![CDATA[Label should have unique non-empty value.]]></string>
 	<string name="_adm_form_err_missing_params"><![CDATA[The required parameters are missing.]]></string>
 	<string name="_adm_form_err_pre_lists_create"><![CDATA[Cannot add list]]></string>
 	<string name="_adm_form_err_pre_lists_edit"><![CDATA[Cannot update list]]></string>
@@ -872,6 +878,14 @@
 	<string name="_adm_form_txt_forms_n_displays"><![CDATA[{0} displays]]></string>
 	<string name="_adm_form_txt_forms_n_fields"><![CDATA[{0} fields]]></string>
 	<string name="_adm_form_txt_forms_title"><![CDATA[System Name]]></string>
+        <string name="_adm_form_txt_labels_add_popup"><![CDATA[Add label]]></string>
+        <string name="_adm_form_txt_labels_edit_popup"><![CDATA[Edit "{0}" label]]></string>
+        <string name="_adm_form_txt_labels_items"><![CDATA[Items]]></string>
+        <string name="_adm_form_txt_labels_manage_items"><![CDATA[Manage child labels]]></string>
+        <string name="_adm_form_txt_labels_n_items"><![CDATA[{0} items]]></string>
+        <string name="_adm_form_txt_labels_parent"><![CDATA[Parent]]></string>
+        <string name="_adm_form_txt_labels_parent_empty"><![CDATA[No Parent]]></string>
+        <string name="_adm_form_txt_labels_value"><![CDATA[Label]]></string>
 	<string name="_adm_form_txt_pre_lists_country"><![CDATA[Country]]></string>
 	<string name="_adm_form_txt_pre_lists_create_popup"><![CDATA[Add New List]]></string>
 	<string name="_adm_form_txt_pre_lists_edit_popup"><![CDATA[Edit "{0}" List]]></string>
@@ -939,6 +953,7 @@
 	<string name="_adm_lmi_cpt_images"><![CDATA[Images]]></string>
 	<string name="_adm_lmi_cpt_items"><![CDATA[Items]]></string>
 	<string name="_adm_lmi_cpt_keys"><![CDATA[Keys]]></string>
+        <string name="_adm_lmi_cpt_labels"><![CDATA[Labels]]></string>
 	<string name="_adm_lmi_cpt_latest"><![CDATA[Latest]]></string>
 	<string name="_adm_lmi_cpt_levels"><![CDATA[Levels]]></string>
 	<string name="_adm_lmi_cpt_logo"><![CDATA[Logo]]></string>

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

@@ -70,8 +70,7 @@ class BxFilesConfig extends BxBaseModTextConfig
             'PARAM_CHARS_SUMMARY' => 'bx_files_summary_chars',
             'PARAM_CHARS_SUMMARY_PLAIN' => '',
             'PARAM_NUM_RSS' => 'bx_files_rss_num',
-        	'PARAM_SEARCHABLE_FIELDS' => 'bx_files_searchable_fields',
-            'PARAM_LABELS' => 'bx_files_labels',
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_files_searchable_fields',
 
             // objects
             'OBJECT_STORAGE' => 'bx_files_files',

+ 3 - 2
modules/boonex/files/install/sql/enable.sql

@@ -16,8 +16,9 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_files_per_page_profile', '6', @iCategId, '_bx_files_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_files_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('bx_files_rss_num', '10', @iCategId, '_bx_files_option_rss_num', 'digit', '', '', '', 20),
-('bx_files_searchable_fields', 'title,desc,data', @iCategId, '_bx_files_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_files";s:6:"method";s:21:"get_searchable_fields";}', 30),
-('bx_files_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('bx_files_searchable_fields', 'title,desc,data', @iCategId, '_bx_files_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_files";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 

+ 3 - 4
modules/boonex/forum/classes/BxForumConfig.php

@@ -86,10 +86,9 @@ class BxForumConfig extends BxBaseModTextConfig
             'PARAM_CHARS_SUMMARY' => 'bx_forum_summary_chars',
             'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_forum_plain_summary_chars',
             'PARAM_NUM_RSS' => 'bx_forum_rss_num',
-        	'PARAM_SEARCHABLE_FIELDS' => 'bx_forum_searchable_fields',
-        	'PARAM_AUTOSUBSCRIBE_CREATED' => 'bx_forum_autosubscribe_created',
-            'PARAM_AUTOSUBSCRIBE_REPLIED' => 'bx_forum_autosubscribe_replied',
-            'PARAM_LABELS' => 'bx_forum_labels',            
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_forum_searchable_fields',
+            'PARAM_AUTOSUBSCRIBE_CREATED' => 'bx_forum_autosubscribe_created',
+            'PARAM_AUTOSUBSCRIBE_REPLIED' => 'bx_forum_autosubscribe_replied',           
 
             // objects
             'OBJECT_GRID' => 'bx_forum',

+ 1 - 2
modules/boonex/forum/install/sql/enable.sql

@@ -18,10 +18,9 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_forum_per_page_index', '6', @iCategId, '_bx_forum_option_per_page_index', 'digit', '', '', '', 11),
 ('bx_forum_per_page_profile', '6', @iCategId, '_bx_forum_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_forum_rss_num', '10', @iCategId, '_bx_forum_option_rss_num', 'digit', '', '', '', 20),
-('bx_forum_searchable_fields', 'title,text,text_comments', @iCategId, '_bx_forum_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_forum";s:6:"method";s:21:"get_searchable_fields";}', 30),
+('bx_forum_searchable_fields', 'title,text,text_comments', @iCategId, '_bx_forum_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_forum";s:6:"method";s:21:"get_searchable_fields";}', 30);
 -- ('bx_forum_autosubscribe_created', '', @iCategId, '_bx_forum_option_autosubscribe_created', 'checkbox', '', '', '', 40),
 -- ('bx_forum_autosubscribe_replied', '', @iCategId, '_bx_forum_option_autosubscribe_replied', 'checkbox', '', '', '', 41),
-('bx_forum_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 50);
 
 
 

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

@@ -68,8 +68,6 @@ class BxGlsrConfig extends BxBaseModTextConfig
             'PARAM_NUM_RSS' => 'bx_glossary_rss_num',
             'PARAM_SEARCHABLE_FIELDS' => 'bx_glossary_searchable_fields',
             'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_glossary_per_page_browse_showcase',
-            'PARAM_LABELS' => 'bx_glossary_labels',
-            
 
             // objects
             'OBJECT_STORAGE' => 'bx_glossary_files',
@@ -80,7 +78,7 @@ class BxGlsrConfig extends BxBaseModTextConfig
             'OBJECT_REPORTS' => 'bx_glossary',
             'OBJECT_VIEWS' => 'bx_glossary',
             'OBJECT_VOTES' => 'bx_glossary',
-        	'OBJECT_SCORES' => 'bx_glossary',
+            'OBJECT_SCORES' => 'bx_glossary',
             'OBJECT_FAVORITES' => 'bx_glossary',
             'OBJECT_FEATURED' => 'bx_glossary',
             'OBJECT_METATAGS' => 'bx_glossary',

+ 1 - 2
modules/boonex/glossary/install/sql/enable.sql

@@ -18,8 +18,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_glossary_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('bx_glossary_rss_num', '10', @iCategId, '_bx_glossary_option_rss_num', 'digit', '', '', '', 20),
 ('bx_glossary_searchable_fields', 'title,text', @iCategId, '_bx_glossary_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:11:"bx_glossary";s:6:"method";s:21:"get_searchable_fields";}', 30),
-('bx_glossary_activate_terms_after_creation', 'on', @iCategId, '_bx_glossary_option_activate_terms_after_creation', 'checkbox', '', '', '', 40),
-('bx_glossary_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 50);
+('bx_glossary_activate_terms_after_creation', 'on', @iCategId, '_bx_glossary_option_activate_terms_after_creation', 'checkbox', '', '', '', 40);
 
 
 -- PAGE: create entry

+ 8 - 9
modules/boonex/groups/classes/BxGroupsConfig.php

@@ -56,7 +56,7 @@ class BxGroupsConfig extends BxBaseModProfileConfig
             'FIELD_COMMENTS' => 'comments',
             'FIELDS_QUICK_SEARCH' => array('group_name'),
             'FIELD_LOCATION_PREFIX' => 'location',
-			'FIELD_LABELS' => 'labels',
+            'FIELD_LABELS' => 'labels',
             '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
@@ -64,7 +64,7 @@ class BxGroupsConfig extends BxBaseModProfileConfig
             'URI_EDIT_ENTRY' => 'edit-group-profile',
             'URI_EDIT_COVER' => 'edit-group-cover',
             'URI_JOINED_ENTRIES' => 'joined-groups',
-        	'URI_MANAGE_COMMON' => 'groups-manage',
+            'URI_MANAGE_COMMON' => 'groups-manage',
 
             'URL_HOME' => 'page.php?i=groups-home',
             'URL_ENTRY_FANS' => 'page.php?i=group-fans',
@@ -77,7 +77,6 @@ class BxGroupsConfig extends BxBaseModProfileConfig
             'PARAM_SEARCHABLE_FIELDS' => 'bx_groups_searchable_fields',
             'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_groups_per_page_browse_showcase',
             'PARAM_PER_PAGE_BROWSE_RECOMMENDED' => 'bx_groups_per_page_browse_recommended',
-			'PARAM_LABELS' => 'bx_groups_labels',
 
             // objects
             'OBJECT_STORAGE' => 'bx_groups_pics',
@@ -89,18 +88,18 @@ class BxGroupsConfig extends BxBaseModProfileConfig
             'OBJECT_IMAGES_TRANSCODER_PICTURE' => 'bx_groups_picture',
             'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_groups_cover',
             'OBJECT_IMAGES_TRANSCODER_COVER_THUMB' => 'bx_groups_cover_thumb',
-        	'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_groups_gallery',
+            'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_groups_gallery',
             'OBJECT_VIEWS' => 'bx_groups',
             'OBJECT_VOTES' => 'bx_groups',
-        	'OBJECT_SCORES' => 'bx_groups',
-        	'OBJECT_FAVORITES' => 'bx_groups',
-        	'OBJECT_FEATURED' => 'bx_groups',
-        	'OBJECT_COMMENTS' => 'bx_groups',
+            'OBJECT_SCORES' => 'bx_groups',
+            'OBJECT_FAVORITES' => 'bx_groups',
+            'OBJECT_FEATURED' => 'bx_groups',
+            'OBJECT_COMMENTS' => 'bx_groups',
             'OBJECT_REPORTS' => 'bx_groups',
             'OBJECT_METATAGS' => 'bx_groups',
             'OBJECT_FORM_ENTRY' => 'bx_group',
             'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_group_view',
-        	'OBJECT_FORM_ENTRY_DISPLAY_VIEW_FULL' => 'bx_group_view_full', // for "info" tab on view group page
+            'OBJECT_FORM_ENTRY_DISPLAY_VIEW_FULL' => 'bx_group_view_full', // for "info" tab on view group page
             'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_group_add',
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_group_edit',
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT_COVER' => 'bx_group_edit_cover',

+ 1 - 2
modules/boonex/groups/install/sql/enable.sql

@@ -16,8 +16,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `e
 ('bx_groups_num_rss', '10', @iCategId, '_bx_groups_option_num_rss', 'digit', '', '', '', 12),
 ('bx_groups_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('bx_groups_per_page_browse_recommended', '10', @iCategId, '_sys_option_per_page_browse_recommended', 'digit', '', '', '', 16),
-('bx_groups_searchable_fields', 'group_name,group_desc', @iCategId, '_bx_groups_option_searchable_fields', 'list', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:21:"get_searchable_fields";}', '', '', 30),
-('bx_groups_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('bx_groups_searchable_fields', 'group_name,group_desc', @iCategId, '_bx_groups_option_searchable_fields', 'list', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:21:"get_searchable_fields";}', '', '', 30);
 
 -- PAGES
 

+ 19 - 0
modules/boonex/lucid/data/template/studio/scripts/BxTemplStudioFormsLabels.php

@@ -0,0 +1,19 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaStudioView UNA Studio Representation classes
+ * @ingroup     UnaStudio
+ * @{
+ */
+defined('BX_DOL') or die('hack attempt');
+
+class BxTemplStudioFormsLabels extends BxBaseStudioFormsLabels
+{
+    function __construct($aOptions, $oTemplate = false)
+    {
+        parent::__construct($aOptions, $oTemplate);
+    }
+}
+/** @} */

+ 25 - 26
modules/boonex/market/classes/BxMarketConfig.php

@@ -32,13 +32,13 @@ class BxMarketConfig extends BxBaseModTextConfig
 
             // database tables
             'TABLE_ENTRIES' => $aModule['db_prefix'] . 'products',
-        	'TABLE_ENTRIES_FULLTEXT' => 'title_text',
-        	'TABLE_PHOTOS2ENTRIES' => $aModule['db_prefix'] . 'photos2products',
-        	'TABLE_FILES2ENTRIES' => $aModule['db_prefix'] . 'files2products',
-        	'TABLE_FILES' => $aModule['db_prefix'] . 'files',
-        	'TABLE_DOWNLOADS' => $aModule['db_prefix'] . 'downloads_track',
-        	'TABLE_LICENSES' => $aModule['db_prefix'] . 'licenses',
-        	'TABLE_LICENSES_DELETED' => $aModule['db_prefix'] . 'licenses_deleted',
+            'TABLE_ENTRIES_FULLTEXT' => 'title_text',
+            'TABLE_PHOTOS2ENTRIES' => $aModule['db_prefix'] . 'photos2products',
+            'TABLE_FILES2ENTRIES' => $aModule['db_prefix'] . 'files2products',
+            'TABLE_FILES' => $aModule['db_prefix'] . 'files',
+            'TABLE_DOWNLOADS' => $aModule['db_prefix'] . 'downloads_track',
+            'TABLE_LICENSES' => $aModule['db_prefix'] . 'licenses',
+            'TABLE_LICENSES_DELETED' => $aModule['db_prefix'] . 'licenses_deleted',
 
             // database fields
             'FIELD_ID' => 'id',
@@ -86,9 +86,9 @@ class BxMarketConfig extends BxBaseModTextConfig
             'URI_AUTHOR_ENTRIES' => 'products-author',
             'URI_ENTRIES_BY_CONTEXT' => 'products-context',
             'URI_ADD_ENTRY' => 'create-product',
-        	'URI_EDIT_ENTRY' => 'edit-product',
-        	'URI_DOWNLOAD_ENTRY' => 'download-product',
-        	'URI_MANAGE_COMMON' => 'products-manage',
+            'URI_EDIT_ENTRY' => 'edit-product',
+            'URI_DOWNLOAD_ENTRY' => 'download-product',
+            'URI_MANAGE_COMMON' => 'products-manage',
 
             'URL_HOME' => 'page.php?i=products-home',
             'URL_LATEST' => 'page.php?i=products-latest',
@@ -105,35 +105,34 @@ class BxMarketConfig extends BxBaseModTextConfig
             'PARAM_CHARS_SUMMARY' => 'bx_market_summary_chars',
             'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_market_plain_summary_chars',
             'PARAM_NUM_RSS' => 'bx_market_rss_num',
-        	'PARAM_SEARCHABLE_FIELDS' => 'bx_market_searchable_fields',
-            'PARAM_LABELS' => 'bx_market_labels',
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_market_searchable_fields',
 
             // objects            
             'OBJECT_STORAGE' => 'bx_market_photos',
-        	'OBJECT_STORAGE_FILES' => 'bx_market_files',
+            'OBJECT_STORAGE_FILES' => 'bx_market_files',
             'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_market_preview',
-        	'OBJECT_IMAGES_TRANSCODER_ICON' => 'bx_market_icon',
-        	'OBJECT_IMAGES_TRANSCODER_THUMB' => 'bx_market_thumb',
-        	'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_market_cover',
-        	'OBJECT_IMAGES_TRANSCODER_SCREENSHOT' => 'bx_market_screenshot',
+            'OBJECT_IMAGES_TRANSCODER_ICON' => 'bx_market_icon',
+            'OBJECT_IMAGES_TRANSCODER_THUMB' => 'bx_market_thumb',
+            'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_market_cover',
+            'OBJECT_IMAGES_TRANSCODER_SCREENSHOT' => 'bx_market_screenshot',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_market_gallery',
             'OBJECT_VIDEOS_TRANSCODERS' => array(),
-        	'OBJECT_REPORTS' => 'bx_market',
+            'OBJECT_REPORTS' => 'bx_market',
             'OBJECT_VIEWS' => 'bx_market',
             'OBJECT_VOTES' => 'bx_market',
-        	'OBJECT_SCORES' => 'bx_market',
-        	'OBJECT_FAVORITES' => 'bx_market',
+            'OBJECT_SCORES' => 'bx_market',
+            'OBJECT_FAVORITES' => 'bx_market',
             'OBJECT_FEATURED' => 'bx_market',
             'OBJECT_METATAGS' => 'bx_market',
             'OBJECT_COMMENTS' => 'bx_market',
-        	'OBJECT_CATEGORY' => 'bx_market_cats',
+            'OBJECT_CATEGORY' => 'bx_market_cats',
             'OBJECT_PRIVACY_VIEW' => 'bx_market_allow_view_to',
-			'OBJECT_PRIVACY_PURCHASE' => 'bx_market_allow_purchase_to',
-			'OBJECT_PRIVACY_COMMENT' => 'bx_market_allow_comment_to',
-			'OBJECT_PRIVACY_VOTE' => 'bx_market_allow_vote_to',
+            'OBJECT_PRIVACY_PURCHASE' => 'bx_market_allow_purchase_to',
+            'OBJECT_PRIVACY_COMMENT' => 'bx_market_allow_comment_to',
+            'OBJECT_PRIVACY_VOTE' => 'bx_market_allow_vote_to',
             'OBJECT_FORM_ENTRY' => 'bx_market',
             'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_market_entry_view',
-        	'OBJECT_FORM_ENTRY_DISPLAY_VIEW_FULL' => 'bx_market_entry_view_full',
+            'OBJECT_FORM_ENTRY_DISPLAY_VIEW_FULL' => 'bx_market_entry_view_full',
             'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_market_entry_add',
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_market_entry_edit',
             'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_market_entry_delete',
@@ -154,7 +153,7 @@ class BxMarketConfig extends BxBaseModTextConfig
             'OBJECT_GRID_LICENSES_ADMINISTRATION' => 'bx_market_licenses_administration',
             'OBJECT_GRID_LICENSES' => 'bx_market_licenses',
             'OBJECT_UPLOADERS' => array('bx_market_simple', 'bx_market_html5'),
-        	'OBJECT_CONNECTION_SUBENTRIES' => 'bx_market_subentries',
+            'OBJECT_CONNECTION_SUBENTRIES' => 'bx_market_subentries',
 
             // menu items which visibility depends on custom visibility checking
             'MENU_ITEM_TO_METHOD' => array (

+ 1 - 2
modules/boonex/market/install/sql/enable.sql

@@ -18,8 +18,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_market_per_page_profile', '6', @iCategId, '_bx_market_option_per_page_profile', 'digit', '', '', '', 21),
 ('bx_market_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 23),
 ('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),
-('bx_market_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('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 

+ 19 - 0
modules/boonex/ocean/data/template/studio/scripts/BxTemplStudioFormsLabels.php

@@ -0,0 +1,19 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaStudioView UNA Studio Representation classes
+ * @ingroup     UnaStudio
+ * @{
+ */
+defined('BX_DOL') or die('hack attempt');
+
+class BxTemplStudioFormsLabels extends BxBaseStudioFormsLabels
+{
+    function __construct($aOptions, $oTemplate = false)
+    {
+        parent::__construct($aOptions, $oTemplate);
+    }
+}
+/** @} */

+ 0 - 1
modules/boonex/organizations/classes/BxOrgsConfig.php

@@ -90,7 +90,6 @@ class BxOrgsConfig extends BxBaseModProfileConfig
             'PARAM_PUBLIC_SBSD' => 'bx_organizations_public_subscribed_me',
             'PARAM_REDIRECT_AADD' => 'bx_organizations_redirect_aadd',
             'PARAM_REDIRECT_AADD_CUSTOM_URL' => 'bx_organizations_redirect_aadd_custom_url',
-            'PARAM_LABELS' => 'bx_organizations_labels',
 
             // objects
             'OBJECT_STORAGE' => 'bx_organizations_pics',

+ 1 - 2
modules/boonex/organizations/install/sql/enable.sql

@@ -23,8 +23,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `e
 ('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),
-('bx_organizations_enable_profile_activation_letter', 'on', @iCategId, '_bx_orgs_option_enable_profile_activation_letter', 'checkbox', '', '', '', 32),
-('bx_organizations_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('bx_organizations_enable_profile_activation_letter', 'on', @iCategId, '_bx_orgs_option_enable_profile_activation_letter', 'checkbox', '', '', '', 32);
 
 -- PAGES
 

+ 0 - 2
modules/boonex/persons/classes/BxPersonsConfig.php

@@ -81,8 +81,6 @@ class BxPersonsConfig extends BxBaseModProfileConfig
             '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',
-            'PARAM_LABELS' => 'bx_persons_labels',
-            
             'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_persons_per_page_browse_showcase',
             'PARAM_PER_PAGE_BROWSE_RECOMMENDED' => 'bx_persons_per_page_browse_recommended',
 

+ 1 - 2
modules/boonex/persons/install/sql/enable.sql

@@ -23,8 +23,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `e
 ('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),
-('bx_persons_enable_profile_activation_letter', 'on', @iCategId, '_bx_persons_option_enable_profile_activation_letter', 'checkbox', '', '', '', 32),
-('bx_persons_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('bx_persons_enable_profile_activation_letter', 'on', @iCategId, '_bx_persons_option_enable_profile_activation_letter', 'checkbox', '', '', '', 32);
 
 -- PAGES
 

+ 14 - 15
modules/boonex/photos/classes/BxPhotosConfig.php

@@ -29,7 +29,7 @@ class BxPhotosConfig extends BxBaseModTextConfig
 
             // database tables
             'TABLE_ENTRIES' => $aModule['db_prefix'] . 'entries',
-        	'TABLE_ENTRIES_FULLTEXT' => 'title_text',
+            'TABLE_ENTRIES_FULLTEXT' => 'title_text',
             'TABLE_FILES' => $aModule['db_prefix'] . 'photos',
 
             // database fields
@@ -45,11 +45,11 @@ class BxPhotosConfig extends BxBaseModTextConfig
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_PHOTO' => 'pictures',
             'FIELD_THUMB' => 'thumb',
-			'FIELD_FOR_STORING_FILE_ID' => 'thumb',
-			'FIELD_VIEWS' => 'views',
+            'FIELD_FOR_STORING_FILE_ID' => 'thumb',
+            'FIELD_VIEWS' => 'views',
             'FIELD_COMMENTS' => 'comments',
-	        'FIELD_STATUS' => 'status',
-        	'FIELD_STATUS_ADMIN' => 'status_admin',
+            'FIELD_STATUS' => 'status',
+            'FIELD_STATUS_ADMIN' => 'status_admin',
             'FIELD_LABELS' => 'labels',
             '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
@@ -59,33 +59,32 @@ class BxPhotosConfig extends BxBaseModTextConfig
             'URI_AUTHOR_ENTRIES' => 'photos-author',
             'URI_ENTRIES_BY_CONTEXT' => 'photos-context',
             'URI_ADD_ENTRY' => 'create-photo',
-        	'URI_EDIT_ENTRY' => 'edit-photo',
-        	'URI_MANAGE_COMMON' => 'photos-manage',
+            'URI_EDIT_ENTRY' => 'edit-photo',
+            'URI_MANAGE_COMMON' => 'photos-manage',
 
             'URL_HOME' => 'page.php?i=photos-home',
             'URL_POPULAR' => 'page.php?i=photos-popular',
             'URL_UPDATED' => 'page.php?i=photos-updated',
-        	'URL_MANAGE_COMMON' => 'page.php?i=photos-manage',
-        	'URL_MANAGE_ADMINISTRATION' => 'page.php?i=photos-administration',
+            'URL_MANAGE_COMMON' => 'page.php?i=photos-manage',
+            'URL_MANAGE_ADMINISTRATION' => 'page.php?i=photos-administration',
 
             // some params
             'PARAM_CHARS_SUMMARY' => 'bx_photos_summary_chars',
             'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_photos_plain_summary_chars',
             'PARAM_NUM_RSS' => 'bx_photos_rss_num',
-        	'PARAM_SEARCHABLE_FIELDS' => 'bx_photos_searchable_fields',
-            'PARAM_LABELS' => 'bx_photos_labels',
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_photos_searchable_fields',
 
             // objects
             'OBJECT_STORAGE' => 'bx_photos_photos',
             'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_photos_preview',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_photos_gallery',
-        	'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_photos_cover',
-        	'OBJECT_REPORTS' => 'bx_photos',
+            'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_photos_cover',
+            'OBJECT_REPORTS' => 'bx_photos',
             'OBJECT_VIEWS' => 'bx_photos',
             'OBJECT_VOTES' => 'bx_photos',
             'OBJECT_VOTES_STARS' => 'bx_photos_stars',
-        	'OBJECT_SCORES' => 'bx_photos',
-        	'OBJECT_FAVORITES' => 'bx_photos',
+            'OBJECT_SCORES' => 'bx_photos',
+            'OBJECT_FAVORITES' => 'bx_photos',
             'OBJECT_FEATURED' => 'bx_photos',
             'OBJECT_METATAGS' => 'bx_photos',
             'OBJECT_COMMENTS' => 'bx_photos',

+ 1 - 2
modules/boonex/photos/install/sql/enable.sql

@@ -16,8 +16,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_photos_per_page_profile', '6', @iCategId, '_bx_photos_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_photos_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('bx_photos_rss_num', '10', @iCategId, '_bx_photos_option_rss_num', 'digit', '', '', '', 20),
-('bx_photos_searchable_fields', 'title,text', @iCategId, '_bx_photos_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:21:"get_searchable_fields";}', 30),
-('bx_photos_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('bx_photos_searchable_fields', 'title,text', @iCategId, '_bx_photos_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:21:"get_searchable_fields";}', 30);
 
 
 -- PAGE: create entry

+ 20 - 21
modules/boonex/polls/classes/BxPollsConfig.php

@@ -27,9 +27,9 @@ class BxPollsConfig extends BxBaseModTextConfig
 
             // database tables
             'TABLE_ENTRIES' => $aModule['db_prefix'] . 'entries',
-        	'TABLE_SUBENTRIES' => $aModule['db_prefix'] . 'subentries',
+            'TABLE_SUBENTRIES' => $aModule['db_prefix'] . 'subentries',
             'TABLE_VOTES_SUBENTRIES_TRACK' => $aModule['db_prefix'] . 'votes_subentries_track',
-        	'TABLE_ENTRIES_FULLTEXT' => 'title_text',
+            'TABLE_ENTRIES_FULLTEXT' => 'title_text',
 
             // database fields
             'FIELD_ID' => 'id',
@@ -39,17 +39,17 @@ class BxPollsConfig extends BxBaseModTextConfig
             'FIELD_TITLE' => '',
             'FIELD_TEXT' => 'text',
             'FIELD_TEXT_ID' => 'poll-text',
-        	'FIELD_CATEGORY' => 'cat',
-        	'FIELD_SUBENTRIES' => 'subentries',
+            'FIELD_CATEGORY' => 'cat',
+            'FIELD_SUBENTRIES' => 'subentries',
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
-        	'FIELD_ANONYMOUS_VOTING' => 'anonymous',
-        	'FIELD_HIDDEN_RESULTS' => 'hidden_results',
+            'FIELD_ANONYMOUS_VOTING' => 'anonymous',
+            'FIELD_HIDDEN_RESULTS' => 'hidden_results',
             'FIELD_PHOTO' => 'pictures',
             'FIELD_THUMB' => 'thumb',
-        	'FIELD_VIEWS' => 'views',
+            'FIELD_VIEWS' => 'views',
             'FIELD_COMMENTS' => 'comments',
-	        'FIELD_STATUS' => 'status',
-        	'FIELD_STATUS_ADMIN' => 'status_admin',
+            'FIELD_STATUS' => 'status',
+            'FIELD_STATUS_ADMIN' => 'status_admin',
             'FIELD_LOCATION_PREFIX' => 'location',
             'FIELD_LABELS' => 'labels',
             'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
@@ -59,36 +59,35 @@ class BxPollsConfig extends BxBaseModTextConfig
             'URI_AUTHOR_ENTRIES' => 'polls-author',
             'URI_ENTRIES_BY_CONTEXT' => 'polls-context',
             'URI_ADD_ENTRY' => 'create-poll',
-        	'URI_EDIT_ENTRY' => 'edit-poll',
-        	'URI_MANAGE_COMMON' => 'polls-manage',
+            'URI_EDIT_ENTRY' => 'edit-poll',
+            'URI_MANAGE_COMMON' => 'polls-manage',
 
             'URL_HOME' => 'page.php?i=polls-home',
             'URL_POPULAR' => 'page.php?i=polls-popular',
             'URL_UPDATED' => 'page.php?i=polls-updated',
-        	'URL_MANAGE_COMMON' => 'page.php?i=polls-manage',
-        	'URL_MANAGE_ADMINISTRATION' => 'page.php?i=polls-administration',
+            'URL_MANAGE_COMMON' => 'page.php?i=polls-manage',
+            'URL_MANAGE_ADMINISTRATION' => 'page.php?i=polls-administration',
 
             // some params
             'PARAM_CHARS_TITLE' => 'bx_polls_title_chars',
             'PARAM_CHARS_SUMMARY' => '',
             'PARAM_CHARS_SUMMARY_PLAIN' => '',
             'PARAM_NUM_RSS' => 'bx_polls_rss_num',
-        	'PARAM_SEARCHABLE_FIELDS' => 'bx_polls_searchable_fields',
-            'PARAM_LABELS' => 'bx_polls_labels',
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_polls_searchable_fields',
 
             // objects
             'OBJECT_STORAGE' => 'bx_polls_files',
             'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_polls_preview',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_polls_gallery',
-        	'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_polls_cover',
+            'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_polls_cover',
             'OBJECT_VIDEOS_TRANSCODERS' => array(),
-        	'OBJECT_REPORTS' => 'bx_polls',
+            'OBJECT_REPORTS' => 'bx_polls',
             'OBJECT_VIEWS' => 'bx_polls',
             'OBJECT_VOTES' => 'bx_polls',
-        	'OBJECT_VOTES_SUBENTRIES' => 'bx_polls_subentries',
-        	'OBJECT_SCORES' => 'bx_polls',
-        	'OBJECT_FAVORITES' => 'bx_polls',
-        	'OBJECT_FEATURED' => 'bx_polls',
+            'OBJECT_VOTES_SUBENTRIES' => 'bx_polls_subentries',
+            'OBJECT_SCORES' => 'bx_polls',
+            'OBJECT_FAVORITES' => 'bx_polls',
+            'OBJECT_FEATURED' => 'bx_polls',
             'OBJECT_METATAGS' => 'bx_polls',
             'OBJECT_COMMENTS' => 'bx_polls',
             'OBJECT_CATEGORY' => 'bx_polls_cats',

+ 1 - 2
modules/boonex/polls/install/sql/enable.sql

@@ -15,8 +15,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_polls_per_page_browse', '12', @iCategId, '_bx_polls_option_per_page_browse', 'digit', '', '', '', 10),
 ('bx_polls_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('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),
-('bx_polls_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('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

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

@@ -77,8 +77,6 @@ class BxPostsConfig extends BxBaseModTextConfig
             'PARAM_NUM_RSS' => 'bx_posts_rss_num',
             'PARAM_SEARCHABLE_FIELDS' => 'bx_posts_searchable_fields',
             'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_posts_per_page_browse_showcase',
-            'PARAM_LABELS' => 'bx_posts_labels',
-            
 
             // objects
             'OBJECT_STORAGE' => 'bx_posts_covers',

+ 1 - 2
modules/boonex/posts/install/sql/enable.sql

@@ -17,8 +17,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_posts_per_page_profile', '6', @iCategId, '_bx_posts_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_posts_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('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),
-('bx_posts_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('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
 

+ 19 - 0
modules/boonex/protean/data/template/studio/scripts/BxTemplStudioFormsLabels.php

@@ -0,0 +1,19 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaStudioView UNA Studio Representation classes
+ * @ingroup     UnaStudio
+ * @{
+ */
+defined('BX_DOL') or die('hack attempt');
+
+class BxTemplStudioFormsLabels extends BxBaseStudioFormsLabels
+{
+    function __construct($aOptions, $oTemplate = false)
+    {
+        parent::__construct($aOptions, $oTemplate);
+    }
+}
+/** @} */

+ 29 - 25
modules/boonex/russian/data/langs/bx_channels/ru.xml

@@ -83,42 +83,46 @@
     <string name="_bx_channels_page_block_title_entries_actions"><![CDATA[Каналы - Действия]]></string>
     <string name="_bx_channels_page_block_title_sys_entries_of_author"><![CDATA[Просматриваемые каналы]]></string>
     <string name="_bx_channels_page_block_title_entries_of_author"><![CDATA[Просматриваемые каналы]]></string>
-	<string name="_bx_channels_page_block_title_favorites_of_author"><![CDATA[Избранные каналы]]></string>   
+    <string name="_bx_channels_page_block_title_favorites_of_author"><![CDATA[Избранные каналы]]></string>   
     <string name="_bx_channels_page_block_title_sys_favorites_of_author"><![CDATA[Избранные каналы]]></string>
-	<string name="_bx_channels_page_block_title_create_profile"><![CDATA[Создать канал]]></string>
-	<string name="_bx_channels_page_block_title_edit_profile"><![CDATA[Редактировать канал]]></string>
-	<string name="_bx_channels_page_block_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
-	<string name="_bx_channels_page_block_title_delete_profile"><![CDATA[Удалить канал]]></string>
-	<string name="_bx_channels_page_block_title_profile_info_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Инфо]]></string>
-	<string name="_bx_channels_page_block_title_profile_info"><![CDATA[Инфо]]></string>
-	<string name="_bx_channels_page_block_title_system_profile_info"><![CDATA[Инфо]]></string>
-	<string name="_bx_channels_page_block_title_profile_description"><![CDATA[Описание]]></string>
-	<string name="_bx_channels_page_block_title_profile_friends_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Друзья]]></string>
-	<string name="_bx_channels_page_block_title_profile_friends"><![CDATA[Друзья]]></string>
-	<string name="_bx_channels_page_block_title_system_profile_friends"><![CDATA[Друзья]]></string>
-	<string name="_bx_channels_page_block_title_admins"><![CDATA[Администраторы]]></string>
-	<string name="_bx_channels_page_block_title_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_channels_page_block_title_create_profile"><![CDATA[Создать канал]]></string>
+    <string name="_bx_channels_page_block_title_edit_profile"><![CDATA[Редактировать канал]]></string>
+    <string name="_bx_channels_page_block_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+    <string name="_bx_channels_page_block_title_delete_profile"><![CDATA[Удалить канал]]></string>
+    <string name="_bx_channels_page_block_title_profile_info_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Инфо]]></string>
+    <string name="_bx_channels_page_block_title_profile_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_channels_page_block_title_system_profile_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_channels_page_block_title_profile_description"><![CDATA[Описание]]></string>
+    <string name="_bx_channels_page_block_title_profile_friends_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Друзья]]></string>
+    <string name="_bx_channels_page_block_title_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_channels_page_block_title_system_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_channels_page_block_title_admins"><![CDATA[Администраторы]]></string>
+    <string name="_bx_channels_page_block_title_profile_comments"><![CDATA[Комментарии]]></string>
     <string name="_bx_channels_page_block_title_profile_comments_link"><![CDATA[Комментарии к <a href="{entry_link}">{title}</a>]]></string>
-	<string name="_bx_channels_page_block_title_profile_actions"><![CDATA[Действия]]></string>
-	<string name="_bx_channels_page_block_title_featured_profiles"><![CDATA[Продвинутые каналы]]></string>
-	<string name="_bx_channels_page_block_title_latest_profiles"><![CDATA[Новые каналы]]></string>
-	<string name="_bx_channels_page_block_title_system_manage"><![CDATA[Управление собственными каналами]]></string>
-	<string name="_bx_channels_page_block_title_system_manage_administration"><![CDATA[Управление всеми каналами]]></string>
-	<string name="_bx_channels_page_block_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_channels_page_block_title_profile_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_channels_page_block_title_featured_profiles"><![CDATA[Продвинутые каналы]]></string>
+    <string name="_bx_channels_page_block_title_latest_profiles"><![CDATA[Новые каналы]]></string>
+    <string name="_bx_channels_page_block_title_system_manage"><![CDATA[Управление собственными каналами]]></string>
+    <string name="_bx_channels_page_block_title_system_manage_administration"><![CDATA[Управление всеми каналами]]></string>
+    <string name="_bx_channels_page_block_title_manage"><![CDATA[Управление]]></string>
     <string name="_bx_channels_page_block_title_top_profiles"><![CDATA[Популярные каналы]]></string>
-	<string name="_bx_channels_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
+    <string name="_bx_channels_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
     <string name="_bx_channels_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_channels_page_block_title_entry_breadcrumb"><![CDATA["Хлебные крошки"]]></string>
+    <string name="_bx_channels_page_block_title_entry_parent"><![CDATA[Родительский канал]]></string>
+    <string name="_bx_channels_page_block_title_entry_childs"><![CDATA[Дочерние каналы]]></string>
     <string name="_bx_channels_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
-	<string name="_bx_channels_page_block_title_entries_my"><![CDATA[Мои просматриваемые каналы]]></string>
-        <string name="_bx_channels_page_trigger_block_title_entries_my"><![CDATA[Мои просматриваемые каналы]]></string>
+    <string name="_bx_channels_page_block_title_entries_my"><![CDATA[Мои просматриваемые каналы]]></string>
+    <string name="_bx_channels_page_trigger_block_title_entries_my"><![CDATA[Мои просматриваемые каналы]]></string>
     <string name="_bx_channels_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
-	<string name="_bx_channels_page_block_title_search_results_by_hashtag"><![CDATA[Результаты поиска по хештегу]]></string>
+    <string name="_bx_channels_page_block_title_search_results_by_hashtag"><![CDATA[Результаты поиска по хештегу]]></string>
     <string name="_bx_channels_page_block_title_search_form_cmts"><![CDATA[Форма поиска комментариев]]></string>
     <string name="_bx_channels_page_block_title_search_results_cmts"><![CDATA[Результаты поиска комментариев]]></string>
     <string name="_bx_channels_page_block_title_sys_featured_entries_view_showcase"><![CDATA[Продвинутые каналы]]></string>
     <string name="_bx_channels_page_block_title_featured_entries_view_showcase"><![CDATA[Продвинутые каналы (Витринный просмотр)]]></string>
     <string name="_bx_channels_page_block_title_sys_recommended_entries_view_showcase"><![CDATA[Рекомендованные каналы (Витринный просмотр)]]></string>
     <string name="_bx_channels_page_block_title_recommended_entries_view_showcase"><![CDATA[Рекомендованные каналы]]></string>
+    
     <string name="_bx_channels_menu_title_submenu"><![CDATA[Каналы - Подменю]]></string>
     <string name="_bx_channels_menu_set_title_submenu"><![CDATA[Каналы - Подменю]]></string>
     <string name="_bx_channels_menu_set_title_view_profile_actions"><![CDATA[Канал - Действия]]></string>
@@ -128,7 +132,7 @@
     <string name="_bx_channels_menu_set_title_view_profile_submenu"><![CDATA[Подменю просмотра канала]]></string>
     <string name="_bx_channels_menu_title_entries_my"><![CDATA[Каналы профиля - Меню действий]]></string>
     <string name="_bx_channels_menu_set_title_entries_my"><![CDATA[Каналы профиля - Меню]]></string>
-	<string name="_bx_channels_menu_set_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_channels_menu_set_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
     <string name="_bx_channels_menu_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
     <string name="_bx_channels_menu_item_title_system_delete"><![CDATA[Удалить]]></string>
     <string name="_bx_channels_menu_item_title_delete"><![CDATA[Удалить]]></string>

+ 15 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -677,6 +677,9 @@
 	<string name="_adm_form_btn_forms_cancel"><![CDATA[Отменить]]></string>
 	<string name="_adm_form_btn_forms_edit"><![CDATA[Редактировать Форму]]></string>
 	<string name="_adm_form_btn_forms_save"><![CDATA[Сохранить]]></string>
+        <string name="_adm_form_btn_labels_add"><![CDATA[Добавить]]></string>
+        <string name="_adm_form_btn_labels_cancel"><![CDATA[Отменить]]></string>
+        <string name="_adm_form_btn_labels_submit"><![CDATA[Отправить]]></string>
 	<string name="_adm_form_btn_pre_lists_add"><![CDATA[Добавить]]></string>
 	<string name="_adm_form_btn_pre_lists_cancel"><![CDATA[Отменить]]></string>
 	<string name="_adm_form_btn_pre_lists_create"><![CDATA[Добавить новый список]]></string>
@@ -740,6 +743,9 @@
 	<string name="_adm_form_err_field_values"><![CDATA[Нужно выбрать набор данных из списка.]]></string>
 	<string name="_adm_form_err_forms_edit"><![CDATA[Невозможно обновить форму]]></string>
 	<string name="_adm_form_err_forms_title"><![CDATA[Введите название, более 3 символов]]></string>
+        <string name="_adm_form_err_labels_add"><![CDATA[Невозможно добавить метку]]></string>
+        <string name="_adm_form_err_labels_edit"><![CDATA[Невозможно обновить метку]]></string>
+        <string name="_adm_form_err_labels_value"><![CDATA[Метка должна иметь уникальное, не пустое значение.]]></string>
 	<string name="_adm_form_err_missing_params"><![CDATA[Отсутствуют необходимые параметры.]]></string>
 	<string name="_adm_form_err_pre_lists_create"><![CDATA[Невозможно добавить список]]></string>
 	<string name="_adm_form_err_pre_lists_edit"><![CDATA[Невозможно обновить список]]></string>
@@ -872,6 +878,14 @@
 	<string name="_adm_form_txt_forms_n_displays"><![CDATA[{0} дисплеев]]></string>
 	<string name="_adm_form_txt_forms_n_fields"><![CDATA[{0} полей]]></string>
 	<string name="_adm_form_txt_forms_title"><![CDATA[Системное имя]]></string>
+        <string name="_adm_form_txt_labels_add_popup"><![CDATA[Добавить метку]]></string>
+        <string name="_adm_form_txt_labels_edit_popup"><![CDATA[Изменить "{0}" метку]]></string>
+        <string name="_adm_form_txt_labels_items"><![CDATA[Элементы]]></string>
+        <string name="_adm_form_txt_labels_manage_items"><![CDATA[Управление дочерними метками]]></string>
+        <string name="_adm_form_txt_labels_n_items"><![CDATA[{0} элемент]]></string>
+        <string name="_adm_form_txt_labels_parent"><![CDATA[Родитель]]></string>
+        <string name="_adm_form_txt_labels_parent_empty"><![CDATA[Нет родителя]]></string>
+        <string name="_adm_form_txt_labels_value"><![CDATA[Метка]]></string>        
 	<string name="_adm_form_txt_pre_lists_country"><![CDATA[Страна]]></string>
 	<string name="_adm_form_txt_pre_lists_create_popup"><![CDATA[Добавить новый список]]></string>
 	<string name="_adm_form_txt_pre_lists_edit_popup"><![CDATA[Редактировать "{0}" список]]></string>
@@ -939,6 +953,7 @@
 	<string name="_adm_lmi_cpt_images"><![CDATA[Изображения]]></string>
 	<string name="_adm_lmi_cpt_items"><![CDATA[Элементы]]></string>
 	<string name="_adm_lmi_cpt_keys"><![CDATA[Ключи]]></string>
+        <string name="_adm_lmi_cpt_labels"><![CDATA[Метки]]></string>
 	<string name="_adm_lmi_cpt_latest"><![CDATA[Новые]]></string>
 	<string name="_adm_lmi_cpt_levels"><![CDATA[Уровни]]></string>
 	<string name="_adm_lmi_cpt_logo"><![CDATA[Лого]]></string>

+ 1 - 1
modules/boonex/spaces/classes/BxSpacesTemplate.php

@@ -46,7 +46,7 @@ class BxSpacesTemplate extends BxBaseModGroupsTemplate
             $oProfile = BxDolProfile::getInstance($iProfileId);
             if(!$oProfile)
                 continue;
-            $sRv .= $oProfile->getUnit(false, array('template' => 'unit_live_search'));
+            $sRv .= $oProfile->getUnit(false, array('template' => 'unit_wo_cover'));
         }
         return $sRv;
     }

+ 16 - 17
modules/boonex/videos/classes/BxVideosConfig.php

@@ -28,7 +28,7 @@ class BxVideosConfig extends BxBaseModTextConfig
 
             // database tables
             'TABLE_ENTRIES' => $aModule['db_prefix'] . 'entries',
-        	'TABLE_ENTRIES_FULLTEXT' => 'title_text',
+            'TABLE_ENTRIES_FULLTEXT' => 'title_text',
 
             // database fields
             'FIELD_ID' => 'id',
@@ -43,13 +43,13 @@ class BxVideosConfig extends BxBaseModTextConfig
             'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
             'FIELD_PHOTO' => 'pictures',
             'FIELD_THUMB' => 'thumb',
-        	'FIELD_POSTER' => '', //'poster',
-        	'FIELD_VIDEOS' => 'videos',
+            'FIELD_POSTER' => '', //'poster',
+            'FIELD_VIDEOS' => 'videos',
             'FIELD_VIDEO' => 'video',
-			'FIELD_VIEWS' => 'views',
+            'FIELD_VIEWS' => 'views',
             'FIELD_COMMENTS' => 'comments',
-	        'FIELD_STATUS' => 'status',
-        	'FIELD_STATUS_ADMIN' => 'status_admin',
+            'FIELD_STATUS' => 'status',
+            'FIELD_STATUS_ADMIN' => 'status_admin',
             'FIELD_LABELS' => 'labels',
             '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
@@ -59,29 +59,28 @@ class BxVideosConfig extends BxBaseModTextConfig
             'URI_AUTHOR_ENTRIES' => 'videos-author',
             'URI_ENTRIES_BY_CONTEXT' => 'videos-context',
             'URI_ADD_ENTRY' => 'create-video',
-        	'URI_EDIT_ENTRY' => 'edit-video',
-        	'URI_MANAGE_COMMON' => 'videos-manage',
+            'URI_EDIT_ENTRY' => 'edit-video',
+            'URI_MANAGE_COMMON' => 'videos-manage',
 
             'URL_HOME' => 'page.php?i=videos-home',
             'URL_POPULAR' => 'page.php?i=videos-popular',
             'URL_UPDATED' => 'page.php?i=videos-updated',
-        	'URL_MANAGE_COMMON' => 'page.php?i=videos-manage',
-        	'URL_MANAGE_ADMINISTRATION' => 'page.php?i=videos-administration',
+            'URL_MANAGE_COMMON' => 'page.php?i=videos-manage',
+            'URL_MANAGE_ADMINISTRATION' => 'page.php?i=videos-administration',
 
             // some params
             'PARAM_CHARS_SUMMARY' => 'bx_videos_summary_chars',
             'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_videos_plain_summary_chars',
             'PARAM_NUM_RSS' => 'bx_videos_rss_num',
-        	'PARAM_SEARCHABLE_FIELDS' => 'bx_videos_searchable_fields',
-            'PARAM_LABELS' => 'bx_videos_labels',
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_videos_searchable_fields',
 
             // objects
             'OBJECT_STORAGE' => 'bx_videos_photos',
-        	'OBJECT_STORAGE_VIDEOS' => 'bx_videos_videos',
+            'OBJECT_STORAGE_VIDEOS' => 'bx_videos_videos',
             'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_videos_preview',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_videos_gallery',
-        	'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_videos_cover',
-        	'OBJECT_IMAGES_TRANSCODER_POSTER' => 'bx_videos_poster',
+            'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_videos_cover',
+            'OBJECT_IMAGES_TRANSCODER_POSTER' => 'bx_videos_poster',
             'OBJECT_VIDEOS_TRANSCODERS' => array(
             	'poster' => 'bx_videos_video_poster_cover', 
             	'poster_preview' => 'bx_videos_video_poster_preview',
@@ -89,8 +88,8 @@ class BxVideosConfig extends BxBaseModTextConfig
             	'mp4' => 'bx_videos_video_mp4', 
             	'webm' => 'bx_videos_video_webm'
             ),
-        	'OBJECT_VIDEO_TRANSCODER_HEIGHT' => '480px',
-        	'OBJECT_REPORTS' => 'bx_videos',
+            'OBJECT_VIDEO_TRANSCODER_HEIGHT' => '480px',
+            'OBJECT_REPORTS' => 'bx_videos',
             'OBJECT_VIEWS' => 'bx_videos',
             'OBJECT_VOTES' => 'bx_videos',
             'OBJECT_VOTES_STARS' => 'bx_videos_stars',

+ 1 - 2
modules/boonex/videos/install/sql/enable.sql

@@ -16,8 +16,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_videos_per_page_profile', '6', @iCategId, '_bx_videos_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_videos_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
 ('bx_videos_rss_num', '10', @iCategId, '_bx_videos_option_rss_num', 'digit', '', '', '', 20),
-('bx_videos_searchable_fields', 'title,text', @iCategId, '_bx_videos_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:21:"get_searchable_fields";}', 30),
-('bx_videos_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
+('bx_videos_searchable_fields', 'title,text', @iCategId, '_bx_videos_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:9:"bx_videos";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 

+ 1 - 1
studio/classes/BxDolStudioForms.php

@@ -14,7 +14,7 @@ define('BX_DOL_STUDIO_FORM_TYPE_PRE_LISTS', 'pre_lists');
 define('BX_DOL_STUDIO_FORM_TYPE_PRE_VALUES', 'pre_values');
 define('BX_DOL_STUDIO_FORM_TYPE_SEARCH_FORMS', 'search_forms');
 define('BX_DOL_STUDIO_FORM_TYPE_SEARCH_FIELDS', 'search_fields');
-
+define('BX_DOL_STUDIO_FORM_TYPE_LABELS', 'labels');
 
 define('BX_DOL_STUDIO_FORM_TYPE_DEFAULT', BX_DOL_STUDIO_FORM_TYPE_FORMS);
 

+ 47 - 0
studio/classes/BxDolStudioFormsLabels.php

@@ -0,0 +1,47 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaStudio UNA Studio
+ * @{
+ */
+
+class BxDolStudioFormsLabels extends BxTemplStudioGrid
+{
+    protected $_oLabel;
+
+    protected $_iParent;
+
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+        parent::__construct ($aOptions, $oTemplate);
+
+        $this->oDb = new BxDolStudioFormsQuery();
+
+        $this->_oLabel = BxDolLabel::getInstance();
+
+        $this->_iParent = bx_get('parent') !== false ? (int)bx_get('parent') : 0;
+        $this->_aQueryAppend['parent'] = $this->_iParent;
+
+        $this->_aParent = array();
+        if(!empty($this->_iParent))
+            $this->_aParent = $this->_oLabel->getLabels(array('type' => 'id', 'id' => $this->_iParent));
+    }
+
+    protected function _delete ($mixedId)
+    {
+        $this->_oLabel->onDelete($mixedId);
+
+        return parent::_delete($mixedId);
+    }
+
+    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
+    {
+        $this->_aOptions['source'] .= $this->oDb->prepareAsString(" AND `parent`=?", $this->_iParent);
+
+        return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
+    }
+}
+
+/** @} */

+ 19 - 0
studio/template/form_add_label.html

@@ -0,0 +1,19 @@
+<div class="bx-form-add-label bx-def-color-bg-block">
+    <div class="bx-form-add-label-cnt">
+        __form__
+        <script type="text/javascript">
+            $(document).ready(function () {
+                $("#__form_id__").ajaxForm({ 
+                    dataType: "json",
+                    beforeSubmit: function (formData, jqForm, options) {
+                        bx_loading($("#__form_id__"), true);
+                    },
+                    success: function (data) {
+                        $(".bx-popup-applied:visible").dolPopupHide();
+                        glGrids.__object__.processJson(data, '__action__');
+                    }
+                });
+            });
+        </script>
+    </div>
+</div>

+ 10 - 0
studio/template/forms_labels.html

@@ -0,0 +1,10 @@
+__content__
+<script type="text/javascript">
+    var __js_object__ = new BxDolStudioFormsLabels({
+        sActionUrl: '<bx_url_root />grid.php',
+        sPageUrl: '<bx_url_studio />builder_forms.php?page=labels',
+        sObjNameGrid: '__grid_object__',
+        sParamsDivider: '__params_divider__',
+        sTextSearchInput: '<bx_text_js:_sys_grid_search />'
+    });
+</script>

+ 30 - 9
studio/template/scripts/BxBaseStudioForms.php

@@ -20,13 +20,14 @@ class BxBaseStudioForms extends BxDolStudioForms
         $this->sSubpageUrl = BX_DOL_URL_STUDIO . 'builder_forms.php?page=';
 
         $this->aGridObjects = array(
-	        'forms' => 'sys_studio_forms',
-	        'displays' => 'sys_studio_forms_displays',
-	        'fields' => 'sys_studio_forms_fields',
-	        'pre_lists' => 'sys_studio_forms_pre_lists',
-	        'pre_values' => 'sys_studio_forms_pre_values',
-        	'search_forms' => 'sys_studio_search_forms',
-        	'search_fields' => 'sys_studio_search_forms_fields',
+            'forms' => 'sys_studio_forms',
+            'displays' => 'sys_studio_forms_displays',
+            'fields' => 'sys_studio_forms_fields',
+            'pre_lists' => 'sys_studio_forms_pre_lists',
+            'pre_values' => 'sys_studio_forms_pre_values',
+            'search_forms' => 'sys_studio_search_forms',
+            'search_fields' => 'sys_studio_search_forms_fields',
+            'labels' => 'sys_studio_labels',
     	);
     }
 
@@ -58,6 +59,7 @@ class BxBaseStudioForms extends BxDolStudioForms
             BX_DOL_STUDIO_FORM_TYPE_PRE_VALUES => array('icon' => 'indent'),
             BX_DOL_STUDIO_FORM_TYPE_SEARCH_FORMS => array('icon' => 'search'),
             BX_DOL_STUDIO_FORM_TYPE_SEARCH_FIELDS => array('icon' => 'check-square'),
+            BX_DOL_STUDIO_FORM_TYPE_LABELS => array('icon' => 'tags'),
         );
         foreach($aMenuItems as $sMenuItem => $aItem)
             $aMenu[] = array(
@@ -116,6 +118,15 @@ class BxBaseStudioForms extends BxDolStudioForms
         return array('code' => 0, 'message' => '', 'content' => $this->getSearchFieldsObject()->getFormsSelector($sModule));
     }
 
+    function actionGetLabels()
+    {
+        if(($sModule = bx_get('form_module')) === false)
+            return array('code' => 2, 'message' => _t('_adm_form_err_missing_params'));
+
+        $sModule = bx_process_input($sModule);
+        return array('code' => 0, 'message' => '', 'content' => $this->getLabelsObject()->getFormsSelector($sModule));
+    }
+
     protected function getForms()
     {
         return $this->getGrid($this->aGridObjects['forms']);
@@ -181,6 +192,16 @@ class BxBaseStudioForms extends BxDolStudioForms
         return $this->getGridObject($this->aGridObjects['search_fields']);
     }
 
+    protected function getLabels()
+    {
+        return $this->getGrid($this->aGridObjects['labels']);
+    }
+
+    protected function getLabelsObject()
+    {
+        return $this->getGridObject($this->aGridObjects['labels']);
+    }
+
     protected function getGridObject($sObjectName)
     {
         $oGrid = BxDolGrid::getObjectInstance($sObjectName);
@@ -199,8 +220,8 @@ class BxBaseStudioForms extends BxDolStudioForms
         return BxDolStudioTemplate::getInstance()->parseHtmlByName('forms.html', array(
             'js_object' => $this->getPageJsObject(),
             'content' => $this->getBlockCode(array(
-				'items' => $oGrid->getCode()
-			))
+                'items' => $oGrid->getCode()
+            ))
         ));
     }
 

+ 266 - 0
studio/template/scripts/BxBaseStudioFormsLabels.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    UnaView UNA Studio Representation classes
+ * @ingroup     UnaStudio
+ * @{
+ */
+
+bx_import('BxTemplStudioFormView');
+
+class BxStudioFormsLabelsCheckerHelper extends BxDolFormCheckerHelper
+{
+    public function checkAvailUnique($s)
+    {
+        $aLabel = BxDolLabel::getInstance()->getLabels(array(
+            'type' => 'value', 
+            'value' => $s
+        ));
+
+        return empty($aLabel) || !is_array($aLabel);
+    }
+}
+
+class BxBaseStudioFormsLabels extends BxDolStudioFormsLabels
+{
+    protected $_sBaseUrl;
+
+    function __construct($aOptions, $oTemplate = false)
+    {
+        parent::__construct($aOptions, $oTemplate);
+
+        $this->_sBaseUrl = BX_DOL_URL_STUDIO . bx_append_url_params('builder_forms.php', array(
+            'page' => 'labels'
+        ));
+    }
+
+    public function performActionAdd()
+    {
+        $sAction = 'add';
+
+        $oForm = $this->_getForm($sAction);
+        $oForm->initChecker();
+
+        if($oForm->isSubmittedAndValid()) {
+            $aValsToAdd = array('module' => 'custom');
+
+            $iParent = (int)$oForm->getCleanValue('parent');
+            if($iParent != 0) {
+                $aParent = $this->_oLabel->getLabels(array('type' => 'id', 'id' => $iParent));
+
+                $aValsToAdd['level'] = $aParent['level'] + 1;
+            }
+            else
+                $aValsToAdd['level'] = 0;
+
+            $aValsToAdd['order'] = $this->_oLabel->getLabels(array('type' => 'parent_order', 'parent' => $iParent)) + 1;
+
+            $iId = $oForm->insert($aValsToAdd);
+            if($iId !== false) {
+                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
+
+                $this->_oLabel->onAdd($iId);
+            }
+            else
+                $aRes = array('msg' => _t('_adm_form_err_labels_add'));
+
+            echoJson($aRes);
+        }
+        else {
+            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('adm-form-labels-add-popup', _t('_adm_form_txt_labels_add_popup'), $this->_oTemplate->parseHtmlByName('form_add_label.html', array(
+                'form_id' => $oForm->aFormAttrs['id'],
+                'form' => $oForm->getCode(true),
+                'object' => $this->_sObject,
+                'action' => $sAction
+            )));
+
+            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
+        }
+    }
+
+    public function performActionEdit()
+    {
+        $sAction = 'edit';
+
+        $aIds = bx_get('ids');
+        if(!$aIds || !is_array($aIds)) {
+            $iId = (int)bx_get('id');
+            if(!$iId)
+                return echoJson(array());
+
+            $aIds = array($iId);
+        }
+
+        $iId = (int)array_shift($aIds);
+
+        $aLabel = $this->_oLabel->getLabels(array('type' => 'id', 'id' => $iId));
+        if(empty($aLabel) || !is_array($aLabel))
+            return echoJson(array());
+
+        $oForm = $this->_getForm($sAction, $aLabel);
+        $oForm->initChecker();
+
+        if($oForm->isSubmittedAndValid()) {
+            if($oForm->update($iId) !== false) {
+                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
+
+                $this->_oLabel->onEdit($iId);
+            }
+            else
+                $aRes = array('msg' => _t('_adm_form_err_labels_edit'));
+
+            echoJson($aRes);
+        }
+        else {
+            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('adm-form-labels-edit-popup', _t('_adm_form_txt_labels_edit_popup', $aLabel['value']), $this->_oTemplate->parseHtmlByName('form_add_label.html', array(
+                'form_id' => $oForm->aFormAttrs['id'],
+                'form' => $oForm->getCode(true),
+                'object' => $this->_sObject,
+                'action' => $sAction
+            )));
+
+            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
+        }
+    }
+
+    function getJsObject()
+    {
+        return 'oBxDolStudioFormsLabels';
+    }
+
+    function getCode($isDisplayHeader = true)
+    {
+        return $this->_oTemplate->parseHtmlByName('forms_labels.html', array(
+            'content' => parent::getCode($isDisplayHeader),
+            'js_object' => $this->getJsObject(),
+            'grid_object' => $this->_sObject,
+            'params_divider' => $this->sParamsDivider
+        ));
+    }
+
+    protected function _addJsCss()
+    {
+        parent::_addJsCss();
+        $this->_oTemplate->addJs(array('jquery.form.min.js'));
+
+        $oForm = new BxTemplStudioFormView(array());
+        $oForm->addCssJs();
+    }
+
+    protected function _getCellModule($mixedValue, $sKey, $aField, $aRow)
+    {
+        $mixedValue = $this->_limitMaxLength($this->getModuleTitle($aRow['module']), $sKey, $aField, $aRow, $this->_isDisplayPopupOnTextOverflow);
+        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
+    }
+
+    protected function _getCellItems ($mixedValue, $sKey, $aField, $aRow)
+    {
+        $iItems = $this->_oLabel->getLabels(array('type' => 'parent', 'parent' => $aRow['id'], 'count_only' => true));
+
+        $sLink = bx_append_url_params($this->_sBaseUrl, array('parent' => $aRow['id']));
+        $mixedValue = $this->_oTemplate->parseLink($sLink, _t('_adm_form_txt_labels_n_items', $iItems), array(
+            'title' => _t('_adm_form_txt_labels_manage_items')
+        ));
+
+        return parent::_getCellDefault ($mixedValue, $sKey, $aField, $aRow);
+    }
+
+    protected function _getForm($sAction, $aLabel = array())
+    {
+        $aForm = array(
+            'form_attrs' => array(
+                'id' => 'adm-form-search-form-edit',
+                'action' => BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&parent=' . $this->_iParent,
+                'method' => BX_DOL_STUDIO_METHOD_DEFAULT
+            ),
+            'params' => array (
+                'db' => array(
+                    'table' => 'sys_labels',
+                    'key' => 'id',
+                    'uri' => '',
+                    'uri_title' => '',
+                    'submit_name' => 'do_submit'
+                ),
+                'checker_helper' => 'BxStudioFormsLabelsCheckerHelper'
+            ),
+            'inputs' => array (
+                'id' => array(
+                    'type' => 'hidden',
+                    'name' => 'id',
+                    'value' => isset($aLabel['id']) ? (int)$aLabel['id'] : 0,
+                    'db' => array (
+                        'pass' => 'Int',
+                    ),
+                ),
+                'parent' => array(
+                    'type' => 'select',
+                    'name' => 'parent',
+                    'caption' => _t('_adm_form_txt_labels_parent'),
+                    'info' => '',
+                    'value' => $this->_iParent,
+                    'db' => array (
+                        'pass' => 'Int',
+                    ),
+                ),
+                'value' => array(
+                    'type' => 'text',
+                    'name' => 'value',
+                    'caption' => _t('_adm_form_txt_labels_value'),
+                    'info' => '',
+                    'value' => isset($aLabel['value']) ? $aLabel['value'] : '',
+                    'required' => '1',
+                    'db' => array (
+                        'pass' => 'Xss',
+                    ),
+                    'checker' => array (
+                        'func' => 'AvailUnique',
+                        'params' => array(),
+                        'error' => _t('_adm_form_err_labels_value'),
+                    ),
+                ),
+                'controls' => array(
+                    'name' => 'controls',
+                    'type' => 'input_set',
+                    array(
+                        'type' => 'submit',
+                        'name' => 'do_submit',
+                        'value' => _t('_adm_form_btn_labels_submit'),
+                    ),
+                    array (
+                        'type' => 'reset',
+                        'name' => 'close',
+                        'value' => _t('_adm_form_btn_labels_cancel'),
+                        'attrs' => array(
+                            'onclick' => "$('.bx-popup-applied:visible').dolPopupHide()",
+                            'class' => 'bx-def-margin-sec-left',
+                        ),
+                    )
+                )
+            )
+        );
+
+        if($sAction == 'add') {
+            if(empty($this->_iParent))
+                $aForm['inputs']['parent']['values'][] = array('key' => 0, 'value' => _t('_adm_form_txt_labels_parent_empty'));
+            else 
+                $aForm['inputs']['parent']['values'][] = array('key' => $this->_iParent, 'value' => $this->_aParent['value']);
+            
+            $aForm['inputs']['parent']['values'][] = array('key' => '', 'value' => '----', 'attrs' => array('disabled' => 'disabled'));
+
+            $aLabels = $this->_oLabel->getLabels(array('type' => 'parent', 'parent' => $this->_iParent));
+            foreach($aLabels as $aLabel)
+                $aForm['inputs']['parent']['values'][] = array(
+                    'key' => $aLabel['id'], 
+                    'value' => $aLabel['value']
+                );
+        }
+        else
+            $aForm['inputs']['parent']['type'] = 'hidden';
+
+        return new BxTemplStudioFormView($aForm);
+    }
+}
+
+/** @} */

+ 26 - 3
template/scripts/BxBaseFormView.php

@@ -1124,9 +1124,32 @@ BLAH;
 
         return $this->oTemplate->parseHtmlByName('form_field_labels_view.html', array(
             'values' => $s,
-        ));        
+        ));
     }
-    
+
+    protected function genCustomInputLabels ($aInput)
+    {
+        $aValues = array();
+        $oLabel = BxDolLabel::getInstance();
+        $this->_getLabelOptions(0, $oLabel, $aValues);
+
+        $aInput['type'] = 'select_multiple';
+        $aInput['values'] = $aValues;
+
+        return $this->genInputSelectMultiple($aInput);
+    }
+
+    protected function _getLabelOptions($iParent, &$oLabel, &$aValues)
+    {
+        $aLabels = $oLabel->getLabels(array('type' => 'parent', 'parent' => $iParent));
+        foreach($aLabels as $aLabel) {
+            $aValues[] = array('key' => $aLabel['value'], 'value' => str_repeat('&nbsp;&nbsp;&nbsp;', (int)$aLabel['level']) . ' ' . $aLabel['value']);
+
+            $this->_getLabelOptions($aLabel['id'], $oLabel, $aValues);
+        }
+    }
+
+    /*
     protected function genCustomInputLabels ($aInput)
     {
         // generate currently selected labels
@@ -1140,7 +1163,6 @@ BLAH;
         }
 
         // generate "following" labels
-
         $aFollowingLabels = bx_srv('bx_channels', 'get_following_channels_names', array(bx_get_logged_profile_id()));
         if (!is_array($aFollowingLabels))
             $aFollowingLabels = array();
@@ -1179,6 +1201,7 @@ BLAH;
             'values' => $sValues,
         ));
     }
+     */
     
     /**
      * Generate Select Element