Jelajahi Sumber

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

AntonLV 8 tahun lalu
induk
melakukan
338ef043bc

+ 19 - 18
modules/boonex/channels/classes/BxCnlModule.php

@@ -182,24 +182,25 @@ class BxCnlModule extends BxBaseModGroupsModule
         $iMyProfileId = bx_get_logged_profile_id();
         if ($iMyProfileId){
             $CNF = &$this->_oConfig->CNF;
-            $oConnection = BxDolConnection::getObjectInstance('sys_profiles_subscriptions');
-            $aProfile = $oConnection->getConnectedContent($iMyProfileId);
-            $aVars = array();
-            foreach ($aProfile as $iProfileId) {
-                $oProfile = BxDolProfile::getInstance($iProfileId);
-                if ($oProfile){
-                    $iContentId = $oProfile->getContentId();
-                    $aContentInfo = $this->_oDb->getContentInfoById($oProfile->getContentId());
-                    if (isset($aContentInfo[$CNF['FIELD_NAME']]))
-                        array_push($aVars, array('title' => $aContentInfo[$CNF['FIELD_NAME']], 'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iContentId)));
-                }
-            }
-            
-            return $this->_oTemplate->parseHtmlByName('followers_list.html', 
-                array('bx_if:show_list' => array(
-                'condition' => count($aVars) > 0,
-                'content' => array('bx_repeat:items' => $aVars))
-            ));
+            $oConnection = BxDolConnection::getObjectInstance('sys_profiles_subscriptions');
+            $aProfile = $oConnection->getConnectedContent($iMyProfileId);
+            $aVars = array();
+            foreach ($aProfile as $iProfileId) {
+                $oProfile = BxDolProfile::getInstance($iProfileId);
+                if ($oProfile){
+                    $iContentId = $oProfile->getContentId();
+                    $aContentInfo = $this->_oDb->getContentInfoById($oProfile->getContentId());
+                    if (isset($aContentInfo[$CNF['FIELD_NAME']]))
+                        array_push($aVars, array('title' => $aContentInfo[$CNF['FIELD_NAME']], 'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iContentId)));
+                }
+            }
+            if (count($aVars) > 0){
+                return $this->_oTemplate->parseHtmlByName('followers_list.html', 
+                    array('bx_if:show_list' => array(
+                    'condition' => count($aVars) > 0,
+                    'content' => array('bx_repeat:items' => $aVars))
+                ));
+            }
         }
     }
     

+ 1 - 1
modules/boonex/channels/template/followers_list.html

@@ -1,4 +1,4 @@
-<bx_if:show_list>
+<bx_if:show_list>
     <ul>
         <bx_repeat:items>
             <li><a href="__link__">__title__</a></li>

+ 1 - 1
modules/boonex/charts/classes/BxChartsDb.php

@@ -94,7 +94,7 @@ class BxChartsDb extends BxBaseModGeneralDb
     /* Growth part */
     public function getStatistic()
     {
-        return $this->getAll("SELECT * FROM `sys_statistics` WHERE 1 ORDER BY `order`");
+        return $this->getAll("SELECT * FROM `sys_statistics` WHERE name <> 'bx_albums_media' ORDER BY `order`");
     }
 
     /* Growth part */

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

@@ -54,7 +54,8 @@ class BxOrgsConfig extends BxBaseModProfileConfig
         	'FIELD_VIEWS' => 'views',
             'FIELD_COMMENTS' => 'comments',
             'FIELDS_QUICK_SEARCH' => array('org_name'),
-        	'FIELD_LOCATION_PREFIX' => 'location',
+            '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
@@ -86,6 +87,7 @@ 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',

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

@@ -23,7 +23,8 @@ 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_enable_profile_activation_letter', 'on', @iCategId, '_bx_orgs_option_enable_profile_activation_letter', 'checkbox', '', '', '', 32),
+('bx_organizations_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
 
 -- PAGES
 

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

@@ -235,7 +235,8 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_organization', 'bx_organizations', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_organization', 'bx_organizations', 'profile_email', '', '', 0, 'text', '_bx_orgs_form_profile_input_sys_profile_email', '_bx_orgs_form_profile_input_profile_email', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
 ('bx_organization', 'bx_organizations', 'profile_status', '', '', 0, 'custom', '_bx_orgs_form_profile_input_sys_profile_status', '_bx_orgs_form_profile_input_profile_status', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
-('bx_organization', 'bx_organizations', 'profile_ip', '', '', 0, 'text', '_bx_orgs_form_profile_input_sys_profile_ip', '_bx_orgs_form_profile_input_profile_ip', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0);
+('bx_organization', 'bx_organizations', 'profile_ip', '', '', 0, 'text', '_bx_orgs_form_profile_input_sys_profile_ip', '_bx_orgs_form_profile_input_profile_ip', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_organization', 'bx_organizations', '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

+ 3 - 1
modules/boonex/persons/classes/BxPersonsConfig.php

@@ -49,7 +49,8 @@ class BxPersonsConfig extends BxBaseModProfileConfig
         	'FIELD_VIEWS' => 'views',
             'FIELD_COMMENTS' => 'comments',
             'FIELDS_QUICK_SEARCH' => array('fullname'),
-        	'FIELD_LOCATION_PREFIX' => 'location',
+            '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
@@ -77,6 +78,7 @@ 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',

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

@@ -23,7 +23,8 @@ 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_enable_profile_activation_letter', 'on', @iCategId, '_bx_persons_option_enable_profile_activation_letter', 'checkbox', '', '', '', 32),
+('bx_persons_labels', '', @iCategId, '_sys_option_labels', 'text', '', '', '', 40);
 
 -- PAGES
 

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

@@ -211,7 +211,8 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_person', 'bx_persons', 'gender', '', '#!Sex', 0, 'select', '_bx_persons_form_profile_input_sys_gender', '_bx_persons_form_profile_input_gender', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
 ('bx_person', 'bx_persons', 'profile_email', '', '', 0, 'text', '_bx_persons_form_profile_input_sys_profile_email', '_bx_persons_form_profile_input_profile_email', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
 ('bx_person', 'bx_persons', 'profile_status', '', '', 0, 'text', '_bx_persons_form_profile_input_sys_profile_status', '_bx_persons_form_profile_input_profile_status', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
-('bx_person', 'bx_persons', 'profile_ip', '', '', 0, 'text', '_bx_persons_form_profile_input_sys_profile_ip', '_bx_persons_form_profile_input_profile_ip', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0);
+('bx_person', 'bx_persons', 'profile_ip', '', '', 0, 'text', '_bx_persons_form_profile_input_sys_profile_ip', '_bx_persons_form_profile_input_profile_ip', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_person', 'bx_persons', '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 
 ('bx_person_add', 'picture', 2147483647, 1, 1),

+ 4 - 0
template/css/forms.css

@@ -565,3 +565,7 @@
 .bx-form-value .bx-form-input-autotoken-labels-sel b:after {
     display:none;
 }
+.bx-form-value .bx-form-input-autotoken-labels-sel b {
+    line-height:1.5rem;
+    font-size:85%;
+}

+ 1 - 1
template/form_field_labels.html

@@ -18,7 +18,7 @@
         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 .bx-form-input-autotoken-labels-sel").prepend(e);
         }
     };
     $("#__id__wrapper b").on('click', fCallack);