Просмотр исходного кода

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

AntonLV 8 лет назад
Родитель
Сommit
063416807e

+ 5 - 4
inc/classes/BxDolMetatags.php

@@ -325,10 +325,11 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
      */
     public function keywordsAddOne($iId, $s, $bDeletePreviousKeywords = true)
     {
-        if ($bDeletePreviousKeywords)
-            $this->_oQuery->keywordsDelete($iId);
-
-        return $this->_oQuery->keywordsAdd($iId, array($s));
+        if ($iRet = $this->_oQuery->keywordsAdd($iId, array($s), $bDeletePreviousKeywords)) {
+            bx_alert($this->_sObject, 'keyword_added', $iId, bx_get_logged_profile_id(), array('meta' => $s, 'content_id' => $iId));
+            bx_alert('meta_keyword', 'added', $iId, bx_get_logged_profile_id(), array('meta' => $s, 'content_id' => $iId, 'object' => $this->_sObject));
+        }
+        return $iRet;
     }
 
     /**

+ 10 - 0
modules/base/general/classes/BxBaseModGeneralFormEntry.php

@@ -64,6 +64,10 @@ class BxBaseModGeneralFormEntry extends BxTemplFormView
             $this->aInputs[$CNF['FIELD_PHOTO']]['content_id'] = 0;
             $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', explode(',', getParam($CNF['PARAM_LABELS'])));
+        }
     }
 
     function initChecker ($aValues = array (), $aSpecificValues = array())
@@ -83,6 +87,12 @@ class BxBaseModGeneralFormEntry extends BxTemplFormView
 
             $this->aInputs[$CNF['FIELD_PHOTO']]['ghost_template'] = $this->_oModule->_oTemplate->parseHtmlByName($this->_sGhostTemplate, $this->_getPhotoGhostTmplVars($aContentInfo));
         }
+
+        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']);
+        }
         
         parent::initChecker ($aValues, $aSpecificValues);
     }

+ 10 - 0
modules/base/general/classes/BxBaseModGeneralFormsEntryHelper.php

@@ -413,6 +413,11 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
             $oMetatags->metaAddAuto($aContentInfo[$CNF['FIELD_ID']], $aContentInfo, $CNF, $CNF['OBJECT_FORM_ENTRY_DISPLAY_EDIT']);
             if (isset($CNF['FIELD_LOCATION_PREFIX']) && isset($oForm->aInputs[$CNF['FIELD_LOCATION_PREFIX']]) && $oMetatags->locationsIsEnabled())
                 $oMetatags->locationsAddFromForm($aContentInfo[$CNF['FIELD_ID']], empty($CNF['FIELD_LOCATION_PREFIX']) ? '' : $CNF['FIELD_LOCATION_PREFIX']);
+
+            if (!empty($CNF['FIELD_LABELS']) && ($aLabels = bx_get($CNF['FIELD_LABELS'])) && $oMetatags->keywordsIsEnabled()) {
+                foreach ($aLabels as $sLabel)
+                    $oMetatags->keywordsAddOne($aContentInfo[$CNF['FIELD_ID']], $sLabel, false);
+            }
         }
 
         return '';
@@ -436,6 +441,11 @@ class BxBaseModGeneralFormsEntryHelper extends BxDolProfileForms
                 $oMetatags->metaAddAuto($aContentInfo[$CNF['FIELD_ID']], $aContentInfo, $CNF, $CNF['OBJECT_FORM_ENTRY_DISPLAY_ADD']);
             if ($oMetatags->locationsIsEnabled() && $aContentInfo)
                 $oMetatags->locationsAddFromForm($aContentInfo[$CNF['FIELD_ID']], $CNF['FIELD_LOCATION_PREFIX']);
+
+            if (!empty($CNF['FIELD_LABELS']) && ($aLabels = bx_get($CNF['FIELD_LABELS'])) && $oMetatags->keywordsIsEnabled()) {
+                foreach ($aLabels as $sLabel)
+                    $oMetatags->keywordsAddOne($aContentInfo[$CNF['FIELD_ID']], $sLabel, false);
+            }
         }
     }
 

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

@@ -1978,6 +1978,8 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_form_input_age"><![CDATA[Age]]></string>
 	<string name="_sys_form_input_sys_location"><![CDATA[Location]]></string>
 	<string name="_sys_form_input_location"><![CDATA[Location]]></string>
+	<string name="_sys_form_input_sys_labels"><![CDATA[Labels]]></string>
+	<string name="_sys_form_input_labels"><![CDATA[Labels]]></string>
 	<string name="_sys_form_login"><![CDATA[Log in]]></string>
 	<string name="_sys_form_login_input_caption_system_agreement"><![CDATA[Agreement]]></string>
 	<string name="_sys_form_login_input_caption_system_captcha"><![CDATA[Captcha]]></string>
@@ -2720,6 +2722,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_week_thu"><![CDATA[Thursday]]></string>
 	<string name="_week_tue"><![CDATA[Tuesday]]></string>
 	<string name="_week_wed"><![CDATA[Wednesday]]></string>
+	<string name="_sys_option_labels"><![CDATA[Labels]]></string>
 	<string name="_sys_option_per_page_browse_showcase"><![CDATA[Number of items in showcase view]]></string>
 	<string name="_sys_option_per_page_browse_recommended"><![CDATA[Number of items in recommended view]]></string>
 	<string name="_sys_javascript_requred"><![CDATA[This site requires JavaScript! Please, enable it in the browser!]]></string>

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

@@ -54,7 +54,8 @@ class BxForumConfig extends BxBaseModTextConfig
         	'FIELD_STICK' => 'stick',
         	'FIELD_LOCK' => 'lock',
         	'FIELD_STATUS' => 'status',
-        	'FIELD_STATUS_ADMIN' => 'status_admin',
+            'FIELD_STATUS_ADMIN' => 'status_admin',
+            '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
@@ -81,7 +82,8 @@ class BxForumConfig extends BxBaseModTextConfig
             '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_AUTOSUBSCRIBE_REPLIED' => 'bx_forum_autosubscribe_replied',
+            'PARAM_LABELS' => 'bx_forum_labels',            
 
             // objects
             'OBJECT_GRID' => 'bx_forum',

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

@@ -79,6 +79,7 @@
     <string name="_bx_forum_page_block_title_entry_breadcrumb"><![CDATA[Breadcrumb]]></string>
     <string name="_bx_forum_page_block_title_entry_comments"><![CDATA[Replies ({0})]]></string>
     <string name="_bx_forum_page_block_title_entry_participants"><![CDATA[Participants]]></string>
+    <string name="_bx_forum_page_block_title_entry_info"><![CDATA[Info]]></string>
     <string name="_bx_forum_page_title_browse"><![CDATA[Discussions]]></string>
 	<string name="_bx_forum_page_title_search_results"><![CDATA[Discussions matching "{0}"]]></string>
 	<string name="_bx_forum_page_title_browse_by_author"><![CDATA[Discussions of {display_name}]]></string>
@@ -277,4 +278,4 @@
 <hr />
 <p>{Message}</p>
 {email_footer}]]></string>
-</resources>
+</resources>

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

@@ -20,7 +20,9 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_forum_rss_num', '10', @iCategId, '_bx_forum_option_rss_num', 'digit', '', '', '', 20),
 ('bx_forum_searchable_fields', 'title,text', @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_autosubscribe_replied', '', @iCategId, '_bx_forum_option_autosubscribe_replied', 'checkbox', '', '', '', 41),
+('bx_forum_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 50);
+
 
 
 -- PAGE: create entry
@@ -53,6 +55,7 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('bx_forum_view_entry', 2, @sName,'', '_bx_forum_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_forum";s:6:"method";s:13:"entity_author";}', 0, 0, 1, 0),
 ('bx_forum_view_entry', 2, @sName, '_bx_forum_page_block_title_sys_entry_context', '_bx_forum_page_block_title_entry_context', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_forum\";s:6:\"method\";s:14:\"entity_context\";}', 0, 0, 1, 1),
 ('bx_forum_view_entry', 3, @sName,'', '_bx_forum_page_block_title_entry_participants', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_forum";s:6:"method";s:19:"entity_participants";}', 0, 0, 1, 0),
+('bx_forum_view_entry', 3, @sName, '', '_bx_forum_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_forum\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 0, 1),
 ('bx_forum_view_entry', 4, @sName,'', '_bx_forum_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_forum";s:6:"method";s:17:"entity_text_block";}', 0, 0, 1, 0),
 ('bx_forum_view_entry', 4, @sName,'', '_bx_forum_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_forum";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 1, 1),
 ('bx_forum_view_entry', 4, @sName,'', '_bx_forum_page_block_title_entry_attachments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_forum";s:6:"method";s:18:"entity_attachments";}', 0, 0, 1, 2),

+ 1 - 0
modules/boonex/forum/install/sql/install.sql

@@ -234,6 +234,7 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 (@sName, @sName, 'title', '', '', 0, 'text', '_bx_forum_form_entry_input_sys_title', '_bx_forum_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_forum_form_entry_input_title_err', 'Xss', '', 1, 0),
 (@sName, @sName, 'cat', '', '#!bx_forum_cats', 0, 'select', '_bx_forum_form_entry_input_sys_cat', '_bx_forum_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_forum_form_entry_input_cat_err', 'Xss', '', 1, 0),
 (@sName, @sName, 'attachments', 'a:1:{i:0;s:14:"bx_forum_html5";}', 'a:2:{s:15:"bx_forum_simple";s:26:"_sys_uploader_simple_title";s:14:"bx_forum_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_forum_form_entry_input_sys_attachments', '_bx_forum_form_entry_input_attachments', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+(@sName, @sName, 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 
 ('bx_forum_search', @sName, 'author', '', '', 0, 'custom', '_bx_forum_form_search_input_sys_author', '_bx_forum_form_search_input_author', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_forum_search', @sName, 'category', '', '#!bx_forum_cats', 0, 'select', '_bx_forum_form_search_input_sys_category', '_bx_forum_form_search_input_category', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),

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

@@ -48,6 +48,7 @@ class BxPostsConfig extends BxBaseModTextConfig
 	        '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
 
             // page URIs
@@ -70,6 +71,7 @@ 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

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

@@ -17,7 +17,8 @@ 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_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);
 
 -- PAGE: create entry
 

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

@@ -246,7 +246,8 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_posts', 'bx_posts', 'cat', '', '#!bx_posts_cats', 0, 'select', '_bx_posts_form_entry_input_sys_cat', '_bx_posts_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_posts_form_entry_input_cat_err', 'Xss', '', 1, 0),
 ('bx_posts', 'bx_posts', 'added', '', '', 0, 'datetime', '_bx_posts_form_entry_input_sys_date_added', '_bx_posts_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_posts', 'bx_posts', 'changed', '', '', 0, 'datetime', '_bx_posts_form_entry_input_sys_date_changed', '_bx_posts_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
-('bx_posts', 'bx_posts', 'published', '', '', 0, 'datetime', '_bx_posts_form_entry_input_sys_date_published', '_bx_posts_form_entry_input_date_published', '_bx_posts_form_entry_input_date_published_info', 0, 0, 0, '', '', '', '', '', '', 'DateTimeUtc', '', 1, 0);
+('bx_posts', 'bx_posts', 'published', '', '', 0, 'datetime', '_bx_posts_form_entry_input_sys_date_published', '_bx_posts_form_entry_input_date_published', '_bx_posts_form_entry_input_date_published_info', 0, 0, 0, '', '', '', '', '', '', 'DateTimeUtc', '', 1, 0),
+('bx_posts', 'bx_posts', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
 
 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 

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

@@ -79,6 +79,7 @@
     <string name="_bx_forum_page_block_title_entry_breadcrumb"><![CDATA["Хлебные крошки"]]></string>
     <string name="_bx_forum_page_block_title_entry_comments"><![CDATA[Ответов ({0})]]></string>
     <string name="_bx_forum_page_block_title_entry_participants"><![CDATA[Участники]]></string>
+    <string name="_bx_forum_page_block_title_entry_info"><![CDATA[Инфо]]></string>
     <string name="_bx_forum_page_title_browse"><![CDATA[Обсуждения]]></string>
 	<string name="_bx_forum_page_title_search_results"><![CDATA[Обсуждения, соответствующие "{0}"]]></string>
 	<string name="_bx_forum_page_title_browse_by_author"><![CDATA[Обсуждения {display_name}]]></string>
@@ -278,4 +279,4 @@
 <hr />
 <p>{Message}</p>
 {email_footer}]]></string>
-</resources>
+</resources>

+ 5 - 2
modules/boonex/russian/data/langs/system/ru.xml

@@ -1976,7 +1976,9 @@
 	<string name="_sys_form_forgot_password_input_submit"><![CDATA[Выполнить]]></string>
 	<string name="_sys_form_input_age"><![CDATA[Возраст]]></string>
 	<string name="_sys_form_input_sys_location"><![CDATA[Расположение]]></string>
-	<string name="_sys_form_input_location"><![CDATA[Расположение]]></string>
+    <string name="_sys_form_input_location"><![CDATA[Расположение]]></string>
+	<string name="_sys_form_input_sys_labels"><![CDATA[Метки]]></string>
+	<string name="_sys_form_input_labels"><![CDATA[Метки]]></string>
 	<string name="_sys_form_login"><![CDATA[Вход]]></string>
 	<string name="_sys_form_login_input_caption_system_agreement"><![CDATA[Соглашение]]></string>
 	<string name="_sys_form_login_input_caption_system_captcha"><![CDATA[Капча]]></string>
@@ -2716,7 +2718,8 @@
 	<string name="_week_sun"><![CDATA[Воскресенье]]></string>
 	<string name="_week_thu"><![CDATA[Четверг]]></string>
 	<string name="_week_tue"><![CDATA[Вторник]]></string>
-	<string name="_week_wed"><![CDATA[Среда]]></string>
+    <string name="_week_wed"><![CDATA[Среда]]></string>
+    <string name="_sys_option_labels"><![CDATA[Метки]]></string>
 	<string name="_sys_option_per_page_browse_showcase"><![CDATA[Количество позиций при отображении витриной]]></string>
   <string name="_sys_option_per_page_browse_recommended"><![CDATA[Количество позиций при отображении рекомендованных]]></string>
   <string name="_sys_javascript_requred"><![CDATA[Для корректной работы нужен включенный JavaScript! Пожалуйста, включите его в барузере!]]></string>

+ 7 - 1
samples/forms.php

@@ -40,7 +40,13 @@ function PageCompMainCode()
                 'type' => 'block_header',
                 'caption' => 'Contact details',
             ),
-
+            'labels' => array(
+                'type' => 'custom',
+                'name' => 'labels',
+                'caption' => _t('Labels'),
+                'value' => ['Hello World', 'Привет Мир'],
+                'values' => ['Hello World', 'Привет Мир', 'Guten Tag', 'Жакшы кун'],
+            ),
             'name' => array(
                 'type' => 'text',
                 'name' => 'name',

+ 11 - 0
template/css/forms.css

@@ -508,6 +508,7 @@
     padding:0px;
     height:auto;
 	box-shadow: none;
+    min-height: 2.8rem;
 }
 .bx-form-value .bx-form-input-autotoken b {
     cursor:pointer;
@@ -554,3 +555,13 @@
     margin-right: 8px;
     margin-right: 0.5rem;
 }
+.bx-form-value .bx-form-input-autotoken-labels b {
+    padding-left: 1em;
+}
+.bx-form-value .bx-form-input-autotoken-labels-sel b {
+    padding-right: 1em;
+    margin-top: 0.625rem;
+}
+.bx-form-value .bx-form-input-autotoken-labels-sel b:after {
+    display:none;
+}

+ 25 - 0
template/form_field_labels.html

@@ -0,0 +1,25 @@
+<div id="__id__wrapper">
+    <div id="__id__" class="bx-form-input-autotoken bx-form-input-autotoken-labels bx-def-font-inputs bx-form-input-text">
+        __value__
+    </div>
+    <div class="bx-form-input-autotoken bx-form-input-autotoken-labels bx-form-input-autotoken-labels-sel">
+        __values__
+    </div>
+</div>
+<script>
+    var fCallack = function () {
+        // adding label
+        if ($(this).parent('.bx-form-input-autotoken-labels-sel').length) {
+            var e = $(this).remove().on('click', fCallack);
+            e.append('<input type="hidden" name="__name__[]" value="' + e.text() + '">');
+            $("#__id__").append(e);
+        }
+        // removing label
+        else if ($(this).parent('#__id__').length) {
+            var e = $(this).remove().on('click', fCallack);
+            e.find('input').remove();
+            $("#__id__wrapper .bx-form-input-autotoken-labels-sel").append(e);
+        }
+    };
+    $("#__id__wrapper b").on('click', fCallack);
+</script>

+ 5 - 0
template/form_field_labels_view.html

@@ -0,0 +1,5 @@
+<div class="bx-form-value">
+    <div class="bx-form-input-autotoken bx-form-input-autotoken-labels bx-form-input-autotoken-labels-sel">
+        __values__
+    </div>
+</div>

+ 41 - 0
template/scripts/BxBaseFormView.php

@@ -1087,6 +1087,47 @@ BLAH;
         ));
     }
 
+    protected function genCustomViewRowValueLabels ($aInput)
+    {        
+        if (!$aInput['value'] || !is_array($aInput['value']) || !($oMetatags = BxDolMetatags::getObjectInstance($aInput['meta_object'])) || !$oMetatags->keywordsIsEnabled())
+            return '';
+
+        $s = ''; 
+        foreach ($aInput['value'] as $sLabel)
+            $s .= '<a href="' . $oMetatags->keywordsGetHashTagUrl($sLabel, $aInput['content_id']) . '"><b class="val bx-def-color-bg-hl bx-def-round-corners">' . trim($sLabel) . '</b></a>';
+
+        return $this->oTemplate->parseHtmlByName('form_field_labels_view.html', array(
+            'values' => $s,
+        ));        
+    }
+    
+    protected function genCustomInputLabels ($aInput)
+    {
+        $sValue = '';
+        if (!empty($aInput['value']) && is_array($aInput['value'])) {
+            foreach ($aInput['value'] as $sVal) {
+               $sValue .= '<b class="val bx-def-color-bg-hl bx-def-round-corners">' . trim($sVal) . '<input type="hidden" name="' . $aInput['name'] . '[]" value="' . trim($sVal) . '" /></b>';
+            }
+            $sValue = trim($sValue, ',');
+        }
+
+        $sValues = '';
+        if (!empty($aInput['values']) && is_array($aInput['values'])) {
+            $a = array_diff($aInput['values'], !empty($aInput['value']) && is_array($aInput['value']) ? $aInput['value'] : array());
+            foreach ($a as $sVal) {
+               $sValues .= '<b class="val bx-def-color-bg-hl bx-def-round-corners">' . trim($sVal) . '</b>';
+            }
+            $sValues = trim($sValues, ',');
+        }
+        
+        return $this->oTemplate->parseHtmlByName('form_field_labels.html', array(
+            'id' => $aInput['name'] . time() . mt_rand(0, 100),
+            'name' => $aInput['name'],
+            'value' => $sValue,
+            'values' => $sValues,
+        ));
+    }
+    
     /**
      * Generate Select Element	
      *