AntonLV 7 лет назад
Родитель
Сommit
f545d451c5

+ 2 - 1
modules/base/groups/classes/BxBaseModGroupsTemplate.php

@@ -14,12 +14,13 @@
  */
 class BxBaseModGroupsTemplate extends BxBaseModProfileTemplate
 {
-	protected $_iUnitCharsSummary;
+    protected $_iUnitCharsSummary;
 
     function __construct(&$oConfig, &$oDb)
     {
         parent::__construct($oConfig, $oDb);
 
+        $this->_bLetterAvatar = false;
         $this->_iUnitCharsSummary = 50;
 
         $this->_sUnitClassWithCover .= ' bx-base-groups-unit-with-cover';

+ 94 - 67
modules/base/profile/classes/BxBaseModProfileTemplate.php

@@ -17,8 +17,10 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
     protected $_sUnitClass;
     protected $_sUnitClassWithCover;
     protected $_sUnitClassWoInfo;
-	protected $_sUnitClassWoInfoShowCase;
+    protected $_sUnitClassWoInfoShowCase;
     protected $_sUnitClassShowCase;
+
+    protected $_bLetterAvatar;
     
     function __construct(&$oConfig, &$oDb)
     {
@@ -29,6 +31,8 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
         $this->_sUnitClassWoInfo = 'bx-base-pofile-unit-wo-info';
         $this->_sUnitClassWoInfoShowCase = 'bx-base-pofile-unit-wo-info bx-base-unit-showcase bx-base-pofile-unit-wo-info-showcase';
         $this->_sUnitClassShowCase = 'bx-base-pofile-unit-with-cover bx-base-unit-showcase bx-base-pofile-unit-showcase';
+
+        $this->_bLetterAvatar = true;
     }
 
     /**
@@ -79,44 +83,55 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
         $bThumbUrl = !empty($sThumbUrl);
         $bAvatarUrl = !empty($sAvatarUrl);
 
+        $bTmplVarsThumbnail = $bThumbUrl || $bAvatarUrl || $this->_bLetterAvatar;
+        $aTmplVarsThumbnail = array();
+        if($bTmplVarsThumbnail)
+            $aTmplVarsThumbnail = array(
+                'bx_if:show_thumb_image' => array(
+                    'condition' => $bThumbUrl,
+                    'content' => array(
+                        'thumb_url' => $sThumbUrl
+                    )
+                ),
+                'bx_if:show_avatar_image' => array(
+                    'condition' => $bAvatarUrl,
+                    'content' => array(
+                        'avatar_url' => $sAvatarUrl
+                    )
+                ),
+                'bx_if:show_thumb_letter' => array(
+                    'condition' => !$bThumbUrl && !$bAvatarUrl,
+                    'content' => array(
+                        'color' => implode(', ', BxDolTemplate::getColorCode($iProfile, 1.0)),
+                        'letter' => mb_strtoupper(mb_substr($sTitle, 0, 1))
+                    )
+                ),
+                'bx_if:show_online' => array(
+                    'condition' => $oProfile->isOnline(),
+                    'content' => array()
+                ),
+                'thumb_url' => $bThumbUrl ? $sThumbUrl : $this->getImageUrl('no-picture-thumb.png'),
+                'avatar_url' => $bAvatarUrl ? $sAvatarUrl : $this->getImageUrl('no-picture-thumb.png'),
+            );
+
         $sCoverUrl = $bPublicCover ? $this->urlCoverUnit($aData, false) : '';
         if(empty($sCoverUrl) && ($iCoverId = (int)getParam('sys_unit_cover_profile')) != 0)
             $sCoverUrl = BxDolTranscoder::getObjectInstance(BX_DOL_TRANSCODER_OBJ_COVER_UNIT_PROFILE)->getFileUrlById($iCoverId);
         if(empty($sCoverUrl))
             $sCoverUrl = $this->getImageUrl('cover.jpg');
-
+        
         $aTmplVarsMeta = $this->getSnippetMenuVars ($iProfile, $bPublic);
 
+        
         // generate html
-        return array (
-        	'class' => $this->_getUnitClass($aData, $sTemplateName),
+        return array_merge(array (
+            'class' => $this->_getUnitClass($aData, $sTemplateName),
             'id' => $iContentId,
-        	'public' => $bPublic,
-            'bx_if:show_thumb_image' => array(
-                'condition' => $bThumbUrl,
-                'content' => array(
-                    'thumb_url' => $sThumbUrl
-                )
-            ),
-            'bx_if:show_avatar_image' => array(
-                'condition' => $bAvatarUrl,
-                'content' => array(
-                    'avatar_url' => $sAvatarUrl
-                )
-            ),
-            'bx_if:show_thumb_letter' => array(
-                'condition' => !$bThumbUrl && !$bAvatarUrl,
-                'content' => array(
-                    'color' => implode(', ', BxDolTemplate::getColorCode($iProfile, 1.0)),
-                    'letter' => mb_strtoupper(mb_substr($sTitle, 0, 1))
-                )
+            'public' => $bPublic,
+            'bx_if:show_thumbnail' => array(
+                'condition' => $bTmplVarsThumbnail,
+                'content' => $aTmplVarsThumbnail
             ),
-            'bx_if:show_online' => array(
-            	'condition' => $oProfile->isOnline(),
-            	'content' => array()
-            ),
-            'thumb_url' => $bThumbUrl ? $sThumbUrl : $this->getImageUrl('no-picture-thumb.png'),
-            'avatar_url' => $bAvatarUrl ? $sAvatarUrl : $this->getImageUrl('no-picture-thumb.png'),
             'cover_url' => $sCoverUrl,
             'content_url' => $bPublic ? $sUrl : 'javascript:void(0);',
             'content_click' => !$bPublic ? 'javascript:bx_alert(' . bx_js_string('"' . _t('_sys_access_denied_to_private_content') . '"') . ');' : '',
@@ -129,7 +144,7 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
                 'condition' => !empty($aTmplVarsMeta),
                 'content' => $aTmplVarsMeta
             )
-        );
+        ), $aTmplVarsThumbnail);
     }
 
     function isProfilePublic($aData)
@@ -194,17 +209,17 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
         $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
         $sTitle = bx_process_output($aData[$CNF['FIELD_NAME']]);
 
-        $sUrlPicture = $this->urlPicture ($aData);
-        $sUrlPictureChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
-
         $sUrlAvatar = $this->urlAvatar($aData, false);
         $bUrlAvatar = !empty($sUrlAvatar);
 
+        $sUrlPicture = $this->urlPicture ($aData);
+        $sUrlPictureChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
+
         $sUrlCover = $this->urlCover ($aData, false);
         if(!$sUrlCover && $oPage !== false && $oPage->isPageCover()) {
             $aCover = $oPage->getPageCoverImage();
-			if(!empty($aCover))
-				$sUrlCover = BxDolCover::getCoverImageUrl($aCover);
+            if(!empty($aCover))
+                $sUrlCover = BxDolCover::getCoverImageUrl($aCover);
         }
 
         if(!$sUrlCover)
@@ -214,7 +229,7 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
 
         $sCoverPopup = '';
         $sCoverPopupId = $this->MODULE . '-popup-cover';
-        if ($bProfileViewAllowed && $aData[$CNF['FIELD_COVER']]) {
+        if($bProfileViewAllowed && $aData[$CNF['FIELD_COVER']]) {
             $sCoverPopup = BxTemplFunctions::getInstance()->transBox($sCoverPopupId, $this->parseHtmlByName('image_popup.html', array (
                 'image_url' => $sUrlCover,
                 'bx_if:owner' => array (
@@ -226,18 +241,47 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             )), true, true);
         }
 
+        $bShowAvatar = $bUrlAvatar || $this->_bLetterAvatar;
+        $aShowAvatar = array();
         $sPicturePopup = '';
-        $sPicturePopupId = $this->MODULE . '-popup-picture';
-        if ($bProfileViewAllowed && $aData[$CNF['FIELD_PICTURE']]) {
-            $sPicturePopup = BxTemplFunctions::getInstance()->transBox($sPicturePopupId, $this->parseHtmlByName('image_popup.html', array (
-                'image_url' => $sUrlPicture,
-                'bx_if:owner' => array (
-                    'condition' => CHECK_ACTION_RESULT_ALLOWED === $this->getModule()->checkAllowedEdit($aData),
-                    'content' => array (
-                        'change_image_url' => $sUrlPictureChange,
-                    ),
+        if($bShowAvatar) {
+            $sPicturePopupId = $this->MODULE . '-popup-picture';
+
+            $aShowAvatar = array(
+                'bx_if:show_ava_image' => array(
+                    'condition' => $bUrlAvatar,
+                    'content' => array(
+                        'ava_url' => $sUrlAvatar
+                    )
                 ),
-            )), true, true);
+                'bx_if:show_ava_letter' => array(
+                    'condition' => !$bUrlAvatar,
+                    'content' => array(
+                        'color' => implode(', ', BxDolTemplate::getColorCode($iProfile, 1.0)),
+                        'letter' => mb_substr($sTitle, 0, 1)
+                    )
+                ),
+                'bx_if:show_online' => array(
+                    'condition' => $oProfile->isOnline(),
+                    'content' => array()
+                ),
+                'picture_avatar_url' => $bUrlAvatar ? $sUrlAvatar : $this->getImageUrl('no-picture-preview.png'),
+                'picture_popup_id' => $sPicturePopupId,
+                'picture_url' => $sUrlPicture,
+                'picture_href' => !$aData[$CNF['FIELD_PICTURE']] && CHECK_ACTION_RESULT_ALLOWED === $this->getModule()->checkAllowedEdit($aData) ? $sUrlPictureChange : 'javascript:void(0);',
+            );
+
+            if($bProfileViewAllowed && $aData[$CNF['FIELD_PICTURE']]) {
+                $sPicturePopup = BxTemplFunctions::getInstance()->transBox($sPicturePopupId, $this->parseHtmlByName('image_popup.html', array (
+                    'image_url' => $sUrlPicture,
+                    'bx_if:owner' => array (
+                        'condition' => CHECK_ACTION_RESULT_ALLOWED === $this->getModule()->checkAllowedEdit($aData),
+                        'content' => array (
+                            'change_image_url' => $sUrlPictureChange,
+                        ),
+                    ),
+                )), true, true);
+            }
         }
 
         $sActionsMenu = '';
@@ -248,7 +292,7 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
         }
         else 
             $sActionsMenu = $this->getModule()->serviceEntityAllActions();
-
+        
         // generate html
         $aVars = array (
             'id' => $aData[$CNF['FIELD_ID']],
@@ -258,28 +302,11 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
 
             'action_menu' => $sActionsMenu,
 
-            'bx_if:show_ava_image' => array(
-                'condition' => $bUrlAvatar,
-                'content' => array(
-                    'ava_url' => $sUrlAvatar
-                )
-            ),
-            'bx_if:show_ava_letter' => array(
-                'condition' => !$bUrlAvatar,
-                'content' => array(
-            		'color' => implode(', ', BxDolTemplate::getColorCode($iProfile, 1.0)),
-                    'letter' => mb_substr($sTitle, 0, 1)
-                )
-            ),
-            'bx_if:show_online' => array(
-                'condition' => $oProfile->isOnline(),
-            	'content' => array()
+            'bx_if:show_avatar' => array(
+                'condition' => $bShowAvatar,
+                'content' => $aShowAvatar
             ),
-            'picture_avatar_url' => $bUrlAvatar ? $sUrlAvatar : $this->getImageUrl('no-picture-preview.png'),
             'picture_popup' => $sPicturePopup,
-            'picture_popup_id' => $sPicturePopupId,
-            'picture_url' => $sUrlPicture,
-            'picture_href' => !$aData[$CNF['FIELD_PICTURE']] && CHECK_ACTION_RESULT_ALLOWED === $this->getModule()->checkAllowedEdit($aData) ? $sUrlPictureChange : 'javascript:void(0);',
 
             'cover_popup' => $sCoverPopup,
             'cover_popup_id' => $sCoverPopupId,

+ 25 - 24
modules/base/profile/template/cover.html

@@ -9,19 +9,21 @@
             </div>
             <div class="bx-base-pofile-cover-info">
                 <div class="bx-base-pofile-ci-cnt bx-def-padding-leftright">
-                    <div class="bx-base-pofile-cover-thumb">
-                        <a class="bx-base-pofile-cover-thumb" href="__picture_href__" onclick="$('#__picture_popup_id__').dolPopupImage('__picture_url__', $(this).parent()); event.stopPropagation();">
-                            <bx_if:show_ava_image>
-                                <img class="bx-base-pofile-unit-ava bx-def-ava bx-def-ava-size" src="__ava_url__" />
-                            </bx_if:show_ava_image>
-                            <bx_if:show_ava_letter>
-                                <p class="bx-base-pofile-unit-ava bx-def-ava bx-def-ava-size bx-def-border bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
-                            </bx_if:show_ava_letter>
-                        </a>
-                        <bx_if:show_online>
-                            <div class="bx-base-pofile-unit-online"></div>
-                        </bx_if:show_online>
-                    </div>
+                    <bx_if:show_avatar>
+                        <div class="bx-base-pofile-cover-thumb">
+                            <a class="bx-base-pofile-cover-thumb" href="__picture_href__" onclick="$('#__picture_popup_id__').dolPopupImage('__picture_url__', $(this).parent()); event.stopPropagation();">
+                                <bx_if:show_ava_image>
+                                    <img class="bx-base-pofile-unit-ava bx-def-ava bx-def-ava-size" src="__ava_url__" />
+                                </bx_if:show_ava_image>
+                                <bx_if:show_ava_letter>
+                                    <p class="bx-base-pofile-unit-ava bx-def-ava bx-def-ava-size bx-def-border" style="background-color:rgba(__color__)">__letter__</p>
+                                </bx_if:show_ava_letter>
+                            </a>
+                            <bx_if:show_online>
+                                <div class="bx-base-pofile-unit-online"></div>
+                            </bx_if:show_online>
+                        </div>
+                    </bx_if:show_avatar>
                     <div class="bx-base-pofile-cover-user bx-def-margin-sec-topbottom">
                         <h1 class="bx-def-unit-info">__title__</h1>
                         <div class="bx-base-pofile-cover-actions bx-def-margin-sec-leftright-neg" onclick="event.stopPropagation();">__action_menu__</div>
@@ -35,17 +37,16 @@
 </div>
 <script>
     var oThumb = $('.bx-base-pofile-cover .bx-base-pofile-cover-thumb img');
+    var oCover = $('.bx-base-pofile-cover .bx-base-pofile-cover-image img');
+
+    var oSource = null;
     if(oThumb.length > 0)
-        oThumb.ready(function() {
-            var oOffset = oThumb.offset();
-            window.scrollTo(0, oOffset.top - $('.bx-header').height() - 20);
+        oSource = oThumb;
+    else if(oCover.length > 0)
+        oSource = oCover;
+
+    if(oSource)
+        oSource.ready(function() {
+            window.scrollTo(0, oCover.offset().top + oCover.height() - $('.bx-header').height()- 135);
         });
-    else {
-        var oCover = $('.bx-base-pofile-cover .bx-base-pofile-cover-image img');
-        if(oCover.length > 0)
-            oCover.ready(function() {
-                var oOffset = $('.bx-base-pofile-cover .bx-base-pofile-cover-thumb p').offset();
-                window.scrollTo(0, oOffset.top - $('.bx-header').height() - 20);
-            });
-    }
 </script>

+ 1 - 1
modules/base/profile/template/css/main.css

@@ -204,7 +204,7 @@ div.bx-base-pofile-cover-thumb {
     display: flex;
     -webkit-align-items: flex-end;
     align-items: flex-end;
-    height: 6.75rem;
+    height: 7.0rem;
     margin-right: 1rem;
     margin-bottom: 1rem;
 }

+ 18 - 16
modules/base/profile/template/unit_with_cover.html

@@ -1,21 +1,23 @@
 <div class="__class__ bx-def-padding-sec bx-def-box-sizing">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-border bx-def-round-corners bx-def-color-bg-box">
-	    <a class="bx-base-pofile-unit-cover" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
-	    	<div class="bx-def-unit-img bx-def-thumb-size">
-	            <bx_if:show_thumb_image>
-	                <img class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-border" src="__thumb_url__" />
-	            </bx_if:show_thumb_image>
-	            <bx_if:show_thumb_letter>
-	                <p class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-border bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
-	            </bx_if:show_thumb_letter>
-	            <bx_if:show_online>
-					<div class="bx-base-pofile-unit-online"></div>
-				</bx_if:show_online>
-			</div>
-	    </a>
-	    <div class="bx-base-pofile-unit-title bx-def-box-sizing bx-def-padding-sec"><a href="__content_url__" onclick="__content_click__">__title__</a></div>
-	    <div class="bx-base-pofile-unit-info">
+        <a class="bx-base-pofile-unit-cover" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
+            <bx_if:show_thumbnail>
+                <div class="bx-def-unit-img bx-def-thumb-size">
+                    <bx_if:show_thumb_image>
+                        <img class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-border" src="__thumb_url__" />
+                    </bx_if:show_thumb_image>
+                    <bx_if:show_thumb_letter>
+                        <p class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-border bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
+                    </bx_if:show_thumb_letter>
+                    <bx_if:show_online>
+                        <div class="bx-base-pofile-unit-online"></div>
+                    </bx_if:show_online>
+                </div>
+            </bx_if:show_thumbnail>
+        </a>
+        <div class="bx-base-pofile-unit-title bx-def-box-sizing bx-def-padding-sec"><a href="__content_url__" onclick="__content_click__">__title__</a></div>
+        <div class="bx-base-pofile-unit-info">
             <bx_if:meta><div class="bx-base-general-unit-meta bx-def-box-sizing bx-def-padding-sec-rightbottomleft">__meta__</div></bx_if:meta>
-	    </div>
+        </div>
     </div>
 </div>

+ 10 - 26
modules/boonex/channels/install/sql/install.sql

@@ -221,35 +221,19 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_channel', 'bx_channels', 'picture', 'a:1:{i:0;s:24:"bx_channels_picture_crop";}', 'a:1:{s:24:"bx_channels_picture_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_channels_form_profile_input_sys_picture', '_bx_channels_form_profile_input_picture', '', 0, 0, 0, '', '', '', '', '', '_bx_channels_form_profile_input_picture_err', '', '', 1, 0);
 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
-('bx_channel_add', 'delete_confirm', 2147483647, 0, 3),
-('bx_channel_add', 'cover', 2147483647, 0, 4),
-('bx_channel_add', 'picture', 2147483647, 1, 6),
-('bx_channel_add', 'channel_name', 2147483647, 1, 7),
-('bx_channel_add', 'do_submit', 2147483647, 1, 9),
-
-('bx_channel_delete', 'delete_confirm', 2147483647, 1, 0),
-('bx_channel_delete', 'cover', 2147483647, 0, 0),
-('bx_channel_delete', 'picture', 2147483647, 0, 0),
+('bx_channel_add', 'channel_name', 2147483647, 1, 1),
+('bx_channel_add', 'do_submit', 2147483647, 1, 2),
+
 ('bx_channel_delete', 'do_submit', 2147483647, 1, 1),
 ('bx_channel_delete', 'channel_name', 2147483647, 0, 2),
 
-('bx_channel_edit', 'delete_confirm', 2147483647, 0, 2),
-('bx_channel_edit', 'cover', 2147483647, 0, 3),
-('bx_channel_edit', 'picture', 2147483647, 1, 4),
-('bx_channel_edit', 'channel_name', 2147483647, 1, 5),
-('bx_channel_edit', 'do_submit', 2147483647, 1, 7),
-
-('bx_channel_edit_cover', 'delete_confirm', 2147483647, 0, 1),
-('bx_channel_edit_cover', 'channel_name', 2147483647, 0, 2),
-('bx_channel_edit_cover', 'picture', 2147483647, 0, 3),
-('bx_channel_edit_cover', 'cover', 2147483647, 1, 4),
-('bx_channel_edit_cover', 'do_submit', 2147483647, 1, 5),
-
-('bx_channel_view', 'delete_confirm', 2147483647, 0, 3),
-('bx_channel_view', 'picture', 2147483647, 0, 4),
-('bx_channel_view', 'cover', 2147483647, 0, 5),
-('bx_channel_view', 'do_submit', 2147483647, 0, 6),
-('bx_channel_view', 'channel_name', 2147483647, 1, 7),
+('bx_channel_edit', 'channel_name', 2147483647, 1, 1),
+('bx_channel_edit', 'do_submit', 2147483647, 1, 2),
+
+('bx_channel_edit_cover', 'cover', 2147483647, 1, 1),
+('bx_channel_edit_cover', 'do_submit', 2147483647, 1, 2),
+
+('bx_channel_view', 'channel_name', 2147483647, 1, 1),
 
 ('bx_channel_view_full', 'channel_name', 2147483647, 1, 1);
 

+ 2 - 2
modules/boonex/events/install/sql/install.sql

@@ -285,7 +285,7 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_event_add', 'delete_confirm', 2147483647, 0, 2),
 ('bx_event_add', 'cover', 2147483647, 0, 3),
 ('bx_event_add', 'initial_members', 2147483647, 1, 4),
-('bx_event_add', 'picture', 2147483647, 1, 5),
+('bx_event_add', 'picture', 2147483647, 0, 5),
 ('bx_event_add', 'event_name', 2147483647, 1, 6),
 ('bx_event_add', 'event_cat', 2147483647, 1, 7),
 ('bx_event_add', 'event_desc', 2147483647, 1, 8),
@@ -314,7 +314,7 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_event_edit', 'initial_members', 2147483647, 0, 2),
 ('bx_event_edit', 'delete_confirm', 2147483647, 0, 3),
 ('bx_event_edit', 'cover', 2147483647, 0, 4),
-('bx_event_edit', 'picture', 2147483647, 1, 5),
+('bx_event_edit', 'picture', 2147483647, 0, 5),
 ('bx_event_edit', 'event_name', 2147483647, 1, 6),
 ('bx_event_edit', 'event_cat', 2147483647, 1, 7),
 ('bx_event_edit', 'event_desc', 2147483647, 1, 8),

+ 26 - 47
modules/boonex/groups/install/sql/install.sql

@@ -257,57 +257,36 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_group', 'bx_groups', '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_group_add', 'delete_confirm', 2147483647, 0, 3),
-('bx_group_add', 'cover', 2147483647, 0, 4),
-('bx_group_add', 'initial_members', 2147483647, 1, 5),
-('bx_group_add', 'picture', 2147483647, 1, 6),
-('bx_group_add', 'group_name', 2147483647, 1, 7),
-('bx_group_add', 'group_cat', 2147483647, 1, 8),
-('bx_group_add', 'group_desc', 2147483647, 1, 9),
-('bx_group_add', 'location', 2147483647, 1, 10),
-('bx_group_add', 'join_confirmation', 2147483647, 1, 11),
-('bx_group_add', 'allow_view_to', 2147483647, 1, 12),
-('bx_group_add', 'allow_post_to', 2147483647, 1, 13),
-('bx_group_add', 'do_submit', 2147483647, 1, 14),
+('bx_group_add', 'initial_members', 2147483647, 1, 1),
+('bx_group_add', 'group_name', 2147483647, 1, 2),
+('bx_group_add', 'group_cat', 2147483647, 1, 3),
+('bx_group_add', 'group_desc', 2147483647, 1, 4),
+('bx_group_add', 'location', 2147483647, 1, 5),
+('bx_group_add', 'join_confirmation', 2147483647, 1, 6),
+('bx_group_add', 'allow_view_to', 2147483647, 1, 7),
+('bx_group_add', 'allow_post_to', 2147483647, 1, 8),
+('bx_group_add', 'do_submit', 2147483647, 1, 9),
 
 ('bx_group_invite', 'initial_members', 2147483647, 1, 1),
 ('bx_group_invite', 'do_submit', 2147483647, 1, 2),
 
-('bx_group_delete', 'delete_confirm', 2147483647, 1, 0),
-('bx_group_delete', 'cover', 2147483647, 0, 0),
-('bx_group_delete', 'picture', 2147483647, 0, 0),
-('bx_group_delete', 'do_submit', 2147483647, 1, 1),
-('bx_group_delete', 'group_name', 2147483647, 0, 2),
-('bx_group_delete', 'group_cat', 2147483647, 0, 3),
-
-('bx_group_edit', 'delete_confirm', 2147483647, 0, 2),
-('bx_group_edit', 'cover', 2147483647, 0, 3),
-('bx_group_edit', 'picture', 2147483647, 1, 5),
-('bx_group_edit', 'group_name', 2147483647, 1, 6),
-('bx_group_edit', 'group_cat', 2147483647, 1, 7),
-('bx_group_edit', 'group_desc', 2147483647, 1, 8),
-('bx_group_edit', 'location', 2147483647, 1, 9),
-('bx_group_edit', 'join_confirmation', 2147483647, 1, 10),
-('bx_group_edit', 'allow_view_to', 2147483647, 1, 11),
-('bx_group_edit', 'allow_post_to', 2147483647, 1, 12),
-('bx_group_edit', 'do_submit', 2147483647, 1, 13),
-
-('bx_group_edit_cover', 'join_confirmation', 2147483647, 0, 0),
-('bx_group_edit_cover', 'group_desc', 2147483647, 0, 0),
-('bx_group_edit_cover', 'delete_confirm', 2147483647, 0, 1),
-('bx_group_edit_cover', 'group_name', 2147483647, 0, 2),
-('bx_group_edit_cover', 'picture', 2147483647, 0, 3),
-('bx_group_edit_cover', 'group_cat', 2147483647, 0, 5),
-('bx_group_edit_cover', 'cover', 2147483647, 1, 7),
-('bx_group_edit_cover', 'do_submit', 2147483647, 1, 8),
-
-('bx_group_view', 'delete_confirm', 2147483647, 0, 3),
-('bx_group_view', 'picture', 2147483647, 0, 4),
-('bx_group_view', 'cover', 2147483647, 0, 5),
-('bx_group_view', 'do_submit', 2147483647, 0, 6),
-('bx_group_view', 'group_name', 2147483647, 1, 7),
-('bx_group_view', 'group_cat', 2147483647, 1, 8),
-('bx_group_view', 'group_desc', 2147483647, 0, 9),
+('bx_group_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_group_delete', 'do_submit', 2147483647, 1, 2),
+
+('bx_group_edit', 'group_name', 2147483647, 1, 1),
+('bx_group_edit', 'group_cat', 2147483647, 1, 2),
+('bx_group_edit', 'group_desc', 2147483647, 1, 3),
+('bx_group_edit', 'location', 2147483647, 1, 4),
+('bx_group_edit', 'join_confirmation', 2147483647, 1, 5),
+('bx_group_edit', 'allow_view_to', 2147483647, 1, 6),
+('bx_group_edit', 'allow_post_to', 2147483647, 1, 7),
+('bx_group_edit', 'do_submit', 2147483647, 1, 8),
+
+('bx_group_edit_cover', 'cover', 2147483647, 1, 1),
+('bx_group_edit_cover', 'do_submit', 2147483647, 1, 2),
+
+('bx_group_view', 'group_name', 2147483647, 1, 1),
+('bx_group_view', 'group_cat', 2147483647, 1, 2),
 
 ('bx_group_view_full', 'group_name', 2147483647, 1, 1),
 ('bx_group_view_full', 'group_cat', 2147483647, 1, 2),

+ 13 - 11
modules/boonex/lucid/data/template/bx_channels/unit.html

@@ -1,17 +1,19 @@
 <div class="__class__ bx-channels-unit-with-cover bx-def-padding-sec bx-def-box-sizing">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-border bx-def-round-corners bx-def-color-bg-box">
 	    <a class="bx-base-pofile-unit-cover" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
-	    	<div class="bx-def-unit-img bx-def-thumb-size">
-	            <bx_if:show_avatar_image>
-	                <img class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size" src="__avatar_url__" />
-	            </bx_if:show_avatar_image>
-	            <bx_if:show_thumb_letter>
-	                <p class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
-	            </bx_if:show_thumb_letter>
-	            <bx_if:show_online>
-					<div class="bx-base-pofile-unit-online"></div>
-				</bx_if:show_online>
-			</div>
+                <bx_if:show_thumbnail>
+                    <div class="bx-def-unit-img bx-def-thumb-size">
+                        <bx_if:show_avatar_image>
+                            <img class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size" src="__avatar_url__" />
+                        </bx_if:show_avatar_image>
+                        <bx_if:show_thumb_letter>
+                            <p class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
+                        </bx_if:show_thumb_letter>
+                        <bx_if:show_online>
+                            <div class="bx-base-pofile-unit-online"></div>
+                        </bx_if:show_online>
+                    </div>
+                </bx_if:show_thumbnail>
 	    </a>
 	    <div class="bx-base-pofile-unit-title bx-def-box-sizing bx-def-padding"><a href="__content_url__" onclick="__content_click__">__title__</a></div>
 	    <div class="bx-base-pofile-unit-info">

+ 13 - 11
modules/boonex/lucid/data/template/bx_events/unit.html

@@ -1,17 +1,19 @@
 <div class="__class__ bx-events-unit-with-cover bx-def-padding-sec bx-def-box-sizing">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-border bx-def-round-corners bx-def-color-bg-box">
 	    <a class="bx-base-pofile-unit-cover" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
-	    	<div class="bx-def-unit-img bx-def-thumb-size">
-	            <bx_if:show_avatar_image>
-	                <img class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size" src="__avatar_url__" />
-	            </bx_if:show_avatar_image>
-	            <bx_if:show_thumb_letter>
-	                <p class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
-	            </bx_if:show_thumb_letter>
-	            <bx_if:show_online>
-					<div class="bx-base-pofile-unit-online"></div>
-				</bx_if:show_online>
-			</div>
+                <bx_if:show_thumbnail>
+                    <div class="bx-def-unit-img bx-def-thumb-size">
+                        <bx_if:show_avatar_image>
+                            <img class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size" src="__avatar_url__" />
+                        </bx_if:show_avatar_image>
+                        <bx_if:show_thumb_letter>
+                            <p class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
+                        </bx_if:show_thumb_letter>
+                        <bx_if:show_online>
+                            <div class="bx-base-pofile-unit-online"></div>
+                        </bx_if:show_online>
+                    </div>
+                </bx_if:show_thumbnail>
 	    </a>
 	    <div class="bx-base-pofile-unit-title bx-def-box-sizing bx-def-padding"><a href="__content_url__" onclick="__content_click__">__title__</a></div>
 	    <div class="bx-base-pofile-unit-info">

+ 13 - 11
modules/boonex/lucid/data/template/bx_groups/unit.html

@@ -1,17 +1,19 @@
 <div class="__class__ bx-groups-unit-with-cover bx-def-padding-sec bx-def-box-sizing">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-border bx-def-round-corners bx-def-color-bg-box">
 	    <a class="bx-base-pofile-unit-cover" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
-	    	<div class="bx-def-unit-img bx-def-thumb-size">
-	            <bx_if:show_avatar_image>
-	                <img class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size" src="__avatar_url__" />
-	            </bx_if:show_avatar_image>
-	            <bx_if:show_thumb_letter>
-	                <p class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
-	            </bx_if:show_thumb_letter>
-	            <bx_if:show_online>
-					<div class="bx-base-pofile-unit-online"></div>
-				</bx_if:show_online>
-			</div>
+                <bx_if:show_thumbnail>
+                    <div class="bx-def-unit-img bx-def-thumb-size">
+                        <bx_if:show_avatar_image>
+                            <img class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size" src="__avatar_url__" />
+                        </bx_if:show_avatar_image>
+                        <bx_if:show_thumb_letter>
+                            <p class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
+                        </bx_if:show_thumb_letter>
+                        <bx_if:show_online>
+                            <div class="bx-base-pofile-unit-online"></div>
+                        </bx_if:show_online>
+                    </div>
+                </bx_if:show_thumbnail>
 	    </a>
 	    <div class="bx-base-pofile-unit-title bx-def-box-sizing bx-def-padding"><a href="__content_url__" onclick="__content_click__">__title__</a></div>
 	    <div class="bx-base-pofile-unit-info">

+ 13 - 11
modules/boonex/lucid/data/template/bx_spaces/unit.html

@@ -1,17 +1,19 @@
 <div class="__class__ bx-spaces-unit-with-cover bx-def-padding-sec bx-def-box-sizing">
     <div class="bx-base-pofile-unit-cnt bx-def-box bx-def-border bx-def-round-corners bx-def-color-bg-box">
 	    <a class="bx-base-pofile-unit-cover" style="background-image:url(__cover_url__);" href="__content_url__" onclick="__content_click__">
-	    	<div class="bx-def-unit-img bx-def-thumb-size">
-	            <bx_if:show_avatar_image>
-	                <img class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size" src="__avatar_url__" />
-	            </bx_if:show_avatar_image>
-	            <bx_if:show_thumb_letter>
-	                <p class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
-	            </bx_if:show_thumb_letter>
-	            <bx_if:show_online>
-					<div class="bx-base-pofile-unit-online"></div>
-				</bx_if:show_online>
-			</div>
+                <bx_if:show_thumbnail>
+                    <div class="bx-def-unit-img bx-def-thumb-size">
+                        <bx_if:show_avatar_image>
+                            <img class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size" src="__avatar_url__" />
+                        </bx_if:show_avatar_image>
+                        <bx_if:show_thumb_letter>
+                            <p class="bx-base-pofile-unit-thumb bx-def-thumb bx-def-thumb-size bx-def-box-sizing" style="background-color:rgba(__color__)">__letter__</p>
+                        </bx_if:show_thumb_letter>
+                        <bx_if:show_online>
+                            <div class="bx-base-pofile-unit-online"></div>
+                        </bx_if:show_online>
+                    </div>
+                </bx_if:show_thumbnail>
 	    </a>
 	    <div class="bx-base-pofile-unit-title bx-def-box-sizing bx-def-padding"><a href="__content_url__" onclick="__content_click__">__title__</a></div>
 	    <div class="bx-base-pofile-unit-info">

+ 2 - 0
modules/boonex/organizations/classes/BxOrgsTemplate.php

@@ -20,6 +20,8 @@ class BxOrgsTemplate extends BxBaseModGroupsTemplate
 
         parent::__construct($oConfig, $oDb);
 
+        $this->_bLetterAvatar = true;
+
         $this->_sUnitClass = 'bx-base-pofile-unit';
         $this->_sUnitClassWithCover = 'bx-base-pofile-unit-with-cover';
         $this->_sUnitClassWoInfo = 'bx-base-pofile-unit-wo-info';

+ 28 - 49
modules/boonex/spaces/install/sql/install.sql

@@ -259,59 +259,38 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_space', 'bx_spaces', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
-('bx_space_add', 'delete_confirm', 2147483647, 0, 3),
-('bx_space_add', 'cover', 2147483647, 0, 4),
-('bx_space_add', 'initial_members', 2147483647, 1, 5),
-('bx_space_add', 'picture', 2147483647, 1, 6),
-('bx_space_add', 'space_name', 2147483647, 1, 7),
-('bx_space_add', 'parent_space', 2147483647, 1, 8),
-('bx_space_add', 'space_cat', 2147483647, 1, 9),
-('bx_space_add', 'space_desc', 2147483647, 1, 10),
-('bx_space_add', 'location', 2147483647, 1, 11),
-('bx_space_add', 'join_confirmation', 2147483647, 1, 12),
-('bx_space_add', 'allow_view_to', 2147483647, 1, 13),
-('bx_space_add', 'allow_post_to', 2147483647, 1, 14),
-('bx_space_add', 'do_submit', 2147483647, 1, 15),
+('bx_space_add', 'initial_members', 2147483647, 1, 1),
+('bx_space_add', 'space_name', 2147483647, 1, 2),
+('bx_space_add', 'parent_space', 2147483647, 1, 3),
+('bx_space_add', 'space_cat', 2147483647, 1, 4),
+('bx_space_add', 'space_desc', 2147483647, 1, 5),
+('bx_space_add', 'location', 2147483647, 1, 6),
+('bx_space_add', 'join_confirmation', 2147483647, 1, 7),
+('bx_space_add', 'allow_view_to', 2147483647, 1, 8),
+('bx_space_add', 'allow_post_to', 2147483647, 1, 9),
+('bx_space_add', 'do_submit', 2147483647, 1, 10),
 
 ('bx_space_invite', 'initial_members', 2147483647, 1, 1),
 ('bx_space_invite', 'do_submit', 2147483647, 1, 2),
 
-('bx_space_delete', 'delete_confirm', 2147483647, 1, 0),
-('bx_space_delete', 'cover', 2147483647, 0, 0),
-('bx_space_delete', 'picture', 2147483647, 0, 0),
-('bx_space_delete', 'do_submit', 2147483647, 1, 1),
-('bx_space_delete', 'space_name', 2147483647, 0, 2),
-('bx_space_delete', 'space_cat', 2147483647, 0, 3),
-
-('bx_space_edit', 'delete_confirm', 2147483647, 0, 2),
-('bx_space_edit', 'cover', 2147483647, 0, 3),
-('bx_space_edit', 'picture', 2147483647, 1, 5),
-('bx_space_edit', 'space_name', 2147483647, 1, 6),
-('bx_space_edit', 'parent_space', 2147483647, 1, 7),
-('bx_space_edit', 'space_cat', 2147483647, 1, 8),
-('bx_space_edit', 'space_desc', 2147483647, 1, 9),
-('bx_space_edit', 'location', 2147483647, 1, 10),
-('bx_space_edit', 'join_confirmation', 2147483647, 1, 11),
-('bx_space_edit', 'allow_view_to', 2147483647, 1, 12),
-('bx_space_edit', 'allow_post_to', 2147483647, 1, 13),
-('bx_space_edit', 'do_submit', 2147483647, 1, 14),
-
-('bx_space_edit_cover', 'join_confirmation', 2147483647, 0, 0),
-('bx_space_edit_cover', 'space_desc', 2147483647, 0, 0),
-('bx_space_edit_cover', 'delete_confirm', 2147483647, 0, 1),
-('bx_space_edit_cover', 'space_name', 2147483647, 0, 2),
-('bx_space_edit_cover', 'picture', 2147483647, 0, 3),
-('bx_space_edit_cover', 'space_cat', 2147483647, 0, 5),
-('bx_space_edit_cover', 'cover', 2147483647, 1, 7),
-('bx_space_edit_cover', 'do_submit', 2147483647, 1, 8),
-
-('bx_space_view', 'delete_confirm', 2147483647, 0, 3),
-('bx_space_view', 'picture', 2147483647, 0, 4),
-('bx_space_view', 'cover', 2147483647, 0, 5),
-('bx_space_view', 'do_submit', 2147483647, 0, 6),
-('bx_space_view', 'space_name', 2147483647, 1, 7),
-('bx_space_view', 'space_cat', 2147483647, 1, 8),
-('bx_space_view', 'space_desc', 2147483647, 0, 9),
+('bx_space_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_space_delete', 'do_submit', 2147483647, 1, 2),
+
+('bx_space_edit', 'space_name', 2147483647, 1, 1),
+('bx_space_edit', 'parent_space', 2147483647, 1, 2),
+('bx_space_edit', 'space_cat', 2147483647, 1, 3),
+('bx_space_edit', 'space_desc', 2147483647, 1, 4),
+('bx_space_edit', 'location', 2147483647, 1, 5),
+('bx_space_edit', 'join_confirmation', 2147483647, 1, 6),
+('bx_space_edit', 'allow_view_to', 2147483647, 1, 7),
+('bx_space_edit', 'allow_post_to', 2147483647, 1, 8),
+('bx_space_edit', 'do_submit', 2147483647, 1, 9),
+
+('bx_space_edit_cover', 'cover', 2147483647, 1, 1),
+('bx_space_edit_cover', 'do_submit', 2147483647, 1, 2),
+
+('bx_space_view', 'space_name', 2147483647, 1, 1),
+('bx_space_view', 'space_cat', 2147483647, 1, 2),
 
 ('bx_space_view_full', 'space_name', 2147483647, 1, 1),
 ('bx_space_view_full', 'space_cat', 2147483647, 1, 2),