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

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

RomanL 4 лет назад
Родитель
Сommit
8fe1de0e44

+ 4 - 1
install/sql/system.sql

@@ -5299,7 +5299,10 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `
 ('', 0, 'system', '_sys_page_block_title_sys_create_post', '_sys_page_block_title_create_post', 11, 1, 4, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:20:"get_create_post_form";s:6:"params";a:1:{i:0;i:0;}s:5:"class";s:13:"TemplServices";}', 0, 1, 1, @iBlockOrder + 1),
 ('', 0, 'system', '_sys_page_block_title_sys_create_post_context', '_sys_page_block_title_create_post_context', 11, 1, 4, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:20:"get_create_post_form";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}s:5:"class";s:13:"TemplServices";}', 0, 1, 1, @iBlockOrder + 2),
 ('', 0, 'system', '_sys_page_block_title_sys_create_post_public', '_sys_page_block_title_create_post_public', 11, 1, 4, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:20:"get_create_post_form";s:6:"params";a:0:{}s:5:"class";s:13:"TemplServices";}', 0, 1, 1, @iBlockOrder + 3),
-('', 0, 'system', '_sys_page_block_title_sys_std_site_submenu', '_sys_page_block_title_std_site_submenu', 3, 0, 0, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:16:"get_site_submenu";s:6:"params";a:0:{}s:5:"class";s:13:"TemplServices";}', 0, 1, 1, @iBlockOrder + 4);
+
+('', 0, 'system', '_sys_page_block_title_sys_std_site_submenu', '_sys_page_block_title_std_site_submenu', 3, 0, 0, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:16:"get_site_submenu";s:6:"params";a:0:{}s:5:"class";s:13:"TemplServices";}', 0, 1, 1, @iBlockOrder + 4),
+
+('', 0, 'system', '_sys_page_block_title_sys_author', '_sys_page_block_title_author', 3, 0, 0, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:16:"get_block_author";s:6:"params";a:2:{i:0;s:8:"{module}";i:1;s:4:"{id}";}s:5:"class";s:13:"TemplServices";}', 0, 1, 1, @iBlockOrder + 5);
 
 -- content blocks
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `tabs`, `async`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES

+ 4 - 0
modules/base/general/classes/BxBaseModGeneralPageEntry.php

@@ -30,6 +30,10 @@ class BxBaseModGeneralPageEntry extends BxTemplPage
         parent::__construct($aObject, $oTemplate ? $oTemplate : $this->_oModule->_oTemplate);
 
         $this->_sCoverClass = $this->_oModule->getName() . '_cover';
+
+        $this->addMarkers([
+            'module' => $this->MODULE,
+        ]);
     }
 
     public function isActive()

+ 7 - 8
modules/base/profile/classes/BxBaseModProfileModule.php

@@ -901,16 +901,15 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
     /** 
      * @ref bx_base_general-entity_cover "entity_cover"
      */
-    public function serviceEntityCover ($iContentId = 0)
+    public function serviceEntityCover ($iContentId = 0, $aParams = [])
     {
-        $iContentId = $this->_getContent($iContentId, false);
-        if($iContentId === false)
+        $mixedContent = $this->_getContent($iContentId);
+        if($mixedContent === false)
             return false;
-        
-        $sModule = $this->_oConfig->getName();
-        $aData = BxDolRequest::serviceExists($sModule, 'get_all') ? BxDolService::call($sModule, 'get_all', array(array('type' => 'id', 'id' => $iContentId))) : array();
-        
-        return $this->_oTemplate->getBlockCover($aData, $sModule);
+
+        list($iContentId, $aContentInfo) = $mixedContent;
+
+        return $this->_oTemplate->getBlockCover($aContentInfo, $aParams);
     }
     
 	/**

+ 178 - 123
modules/base/profile/classes/BxBaseModProfileTemplate.php

@@ -250,34 +250,45 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
 
         return $aTmplVarsMeta;
     }
-    
-    function getBlockCover ($aData)
+
+    function getBlockCover($aData, $aParams = [])
     {
         $CNF = &$this->_oConfig->CNF;
+
         $oProfile = BxDolProfile::getInstanceByContentAndType($aData[$CNF['FIELD_ID']], $this->MODULE);
         if(!$oProfile)
             return '';
-        
-        $aVars = $this->prepareCover($aData, false);
-        
-        $aVars2 = [
-            'info' => isset($CNF['FIELD_TEXT']) ? strmaxtextlen(strip_tags($aData[$CNF['FIELD_TEXT']]), 150) : ''
-        ];
-        return $this->parseHtmlByName('cover_block.html', array_merge($aVars, $aVars2));
+
+        $aTmplVars = $this->prepareCover($aData, array_merge($aParams, [
+            'use_as_block' => true
+        ]));
+
+        return $this->parseHtmlByName('cover_block.html', $aTmplVars);
     }
-    function prepareCover($aData, $oPage)
+
+    function prepareCover($aData, $aParams = [])
     {
         $CNF = &$this->_oConfig->CNF;
         $oModule = $this->getModule();
 
-        BxDolTemplate::getInstance()->addInjection('injection_main_class', 'text', 'bx-base-profile-view');
+        $sClass = isset($aParams['class']) ? $aParams['class'] : '';
+        $sShowData = isset($aParams['show_data']) ? $aParams['show_data'] : '';
+        $bShowCover = !isset($aParams['show_cover']) || $aParams['show_cover'] === true;
+        $bShowAvatar = !isset($aParams['show_avatar']) || $aParams['show_avatar'] === true;
+        $sAddCode = "";
+
+        $bUseAsAuthor = isset($aParams['use_as_author']) && $aParams['use_as_author'] === true;
+        $bUseAsBlock = $bUseAsAuthor || (isset($aParams['use_as_block']) && $aParams['use_as_block'] === true);
+
+        if(!$bUseAsAuthor)
+            BxDolTemplate::getInstance()->addInjection('injection_main_class', 'text', 'bx-base-profile-view');
 
-        $bProfileViewAllowed = CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedView($aData);
+        $bProfileViewAllowed = $oModule->checkAllowedView($aData) === CHECK_ACTION_RESULT_ALLOWED;
 
-        if (CHECK_ACTION_RESULT_ALLOWED !== $oModule->checkAllowedViewProfileImage($aData))
+        if($oModule->checkAllowedViewProfileImage($aData) !== CHECK_ACTION_RESULT_ALLOWED)
             $aData[$CNF['FIELD_PICTURE']] = 0;
 
-        if (CHECK_ACTION_RESULT_ALLOWED !== $oModule->checkAllowedViewCoverImage($aData))
+        if($oModule->checkAllowedViewCoverImage($aData) !== CHECK_ACTION_RESULT_ALLOWED)
             $aData[$CNF['FIELD_COVER']] = 0;
 
         $oProfile = BxDolProfile::getInstanceByContentAndType($aData[$CNF['FIELD_ID']], $this->MODULE);
@@ -286,90 +297,113 @@ 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($oProfile->getDisplayName());
 
-        $sUrlAvatar = $this->urlAvatarBig($aData, false);
-        $bUrlAvatar = !empty($sUrlAvatar);
+        //--- Process Cover
+        $bTmplVarsShowCover = $bShowCover;
+        $aTmplVarsShowCover = [];
+        $sCoverPopup = '';
 
-        $sUrlPicture = $this->urlPicture ($aData);
-        $sUrlPictureChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
+        if($bTmplVarsShowCover) {
+            $sCoverPopupId = $this->MODULE . '-popup-cover';
+            $bIsAllowEditCover = $oModule->checkAllowedChangeCover($aData) === CHECK_ACTION_RESULT_ALLOWED;
+
+            $oPage = false;
+            if(isset($aParams['page']) && is_a($aParams['page'], 'BxDolPage'))
+                $oPage = $aParams['page'];
 
-        $sUrlCover = $this->urlCover ($aData, false);
-        if(!$sUrlCover && $oPage !== false && $oPage->isPageCover()) {
-            $aCover = $oPage->getPageCoverImage();
-            if(!empty($aCover))
-                $sUrlCover = BxDolCover::getCoverImageUrl($aCover);
-        }
-        $bUrlCover = true;
-        if(!$sUrlCover){
-            $sUrlCover = $this->getImageUrl('cover.svg');
             $bUrlCover = false;
-        }
-		else
-			BxDolTemplate::getInstance()->addPageMetaImage($sUrlCover);
-        
-        $sUrlCoverChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_COVER'] . '&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);
+            }
 
-        $bIsAllowEditCover = CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedChangeCover($aData);
-        $bIsAllowEditPicture =  CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedEdit($aData);
-        
-        $sAddClassCover = "";
-        $sAddClassPicture = "";
-        $sAddCode = "";
+            if(!empty($sUrlCover)) {
+                if(!$bUseAsAuthor)
+                    BxDolTemplate::getInstance()->addPageMetaImage($sUrlCover);
 
-        if(isset($CNF['FIELD_COVER']) && isset($CNF['OBJECT_UPLOADERS_COVER']) && isset($CNF['OBJECT_STORAGE_COVER']) && isset($CNF['OBJECT_IMAGES_TRANSCODER_COVER'])){
-            bx_alert('system', 'image_editor', 0, 0, array(
-               'module' => $oModule->getName(),
-               'image_type' => 'cover',
-               'is_allow_edit' => $bIsAllowEditCover,
-               'image_url' => $aData[$CNF['FIELD_COVER']] ? $sUrlCover : '',
-               'content_id' => $aData[$CNF['FIELD_ID']],
-               'uploader' => $CNF['OBJECT_UPLOADERS_COVER'][0],
-               'storage' => $CNF['OBJECT_STORAGE_COVER'],
-               'transcoder' => $CNF['OBJECT_IMAGES_TRANSCODER_COVER'],
-               'field' => $CNF['FIELD_COVER'],
-               'is_background' => true,
-               'add_class' => &$sAddClassCover,
-               'add_code' => &$sAddCode
-            ));
-        }
-        
-        if(isset($CNF['FIELD_PICTURE']) && isset($CNF['OBJECT_UPLOADERS_PICTURE']) && isset($CNF['OBJECT_STORAGE']) && isset($CNF['OBJECT_IMAGES_TRANSCODER_THUMB'])){
-            bx_alert('system', 'image_editor', 0, 0, array(
-               'module' => $oModule->getName(),
-               'image_type' => 'avatar',
-               'is_allow_edit' => $bIsAllowEditPicture,
-               'image_url' =>  $aData[$CNF['FIELD_PICTURE']] ? $sUrlPicture : '',
-               'content_id' => $aData[$CNF['FIELD_ID']],
-               'uploader' => $CNF['OBJECT_UPLOADERS_PICTURE'][0],
-               'storage' => $CNF['OBJECT_STORAGE'],
-               'transcoder' => $CNF['OBJECT_IMAGES_TRANSCODER_AVATAR_BIG'],
-               'field' => $CNF['FIELD_PICTURE'],
-               'is_background' => false,
-               'add_class' => &$sAddClassPicture,
-               'add_code' => &$sAddCode
-            )); 
-        }
-        
-        $sCoverPopup = '';
-        $sCoverPopupId = $this->MODULE . '-popup-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 (
-                    'condition' => $bIsAllowEditCover && empty($sAddClassCover),
-                    'content' => array (
-                        'change_image_url' => $sUrlCoverChange,
+                $bUrlCover = true;
+            }
+            else
+                $sUrlCover = $this->getImageUrl('cover.svg');
+
+            $sUrlCoverChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_COVER'] . '&id=' . $aData[$CNF['FIELD_ID']]);
+
+            $sAddClassCover = "";
+            if(isset($CNF['FIELD_COVER']) && isset($CNF['OBJECT_UPLOADERS_COVER']) && isset($CNF['OBJECT_STORAGE_COVER']) && isset($CNF['OBJECT_IMAGES_TRANSCODER_COVER'])){
+                bx_alert('system', 'image_editor', 0, 0, array(
+                   'module' => $oModule->getName(),
+                   'image_type' => 'cover',
+                   'is_allow_edit' => $bIsAllowEditCover,
+                   'image_url' => $aData[$CNF['FIELD_COVER']] ? $sUrlCover : '',
+                   'content_id' => $aData[$CNF['FIELD_ID']],
+                   'uploader' => $CNF['OBJECT_UPLOADERS_COVER'][0],
+                   'storage' => $CNF['OBJECT_STORAGE_COVER'],
+                   'transcoder' => $CNF['OBJECT_IMAGES_TRANSCODER_COVER'],
+                   'field' => $CNF['FIELD_COVER'],
+                   'is_background' => true,
+                   'add_class' => &$sAddClassCover,
+                   'add_code' => &$sAddCode
+                ));
+            }
+
+            $aTmplVarsShowCover = [
+                'cover_popup_id' => $sCoverPopupId,
+                'cover_url' => $sUrlCover,
+                'cover_href' => !$aData[$CNF['FIELD_COVER']] && $bIsAllowEditCover ? $sUrlCoverChange : 'javascript:void(0);',
+                'add_class' => $sAddClassCover,
+                'img_class' => $sAddClassCover != '' ? 'bx-media-editable-src' : '',
+            ];
+
+            if($bProfileViewAllowed && $aData[$CNF['FIELD_COVER']]) {
+                $sCoverPopup = BxTemplFunctions::getInstance()->transBox($sCoverPopupId, $this->parseHtmlByName('image_popup.html', array (
+                    'image_url' => $sUrlCover,
+                    'bx_if:owner' => array (
+                        'condition' => $bIsAllowEditCover && empty($sAddClassCover),
+                        'content' => array (
+                            'change_image_url' => $sUrlCoverChange,
+                        ),
                     ),
-                ),
-            )), true, true);
+                )), true, true);
+            }
         }
+        else
+            $sClass .= ' bx-no-cover';
 
-        $bShowAvatar = $bUrlAvatar || $this->_bLetterAvatar;
-        $aShowAvatar = array();
+        //--- Process Avatar
+        $sUrlAvatar = $this->urlAvatarBig($aData, false);
+        $bUrlAvatar = !empty($sUrlAvatar);
+
+        $bTmplVarsShowAvatar = $bShowAvatar && ($bUrlAvatar || $this->_bLetterAvatar);
+        $aTmplVarsShowAvatar = [];
         $sPicturePopup = '';
-        if($bShowAvatar) {
+
+        if($bTmplVarsShowAvatar) {
             $sPicturePopupId = $this->MODULE . '-popup-picture';
+            $bIsAllowEditPicture = $oModule->checkAllowedEdit($aData) === CHECK_ACTION_RESULT_ALLOWED;
+
+            $sUrlPicture = $this->urlPicture ($aData);
+            $sUrlPictureChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
+
+            $sAddClassPicture = "";
+            if(isset($CNF['FIELD_PICTURE']) && isset($CNF['OBJECT_UPLOADERS_PICTURE']) && isset($CNF['OBJECT_STORAGE']) && isset($CNF['OBJECT_IMAGES_TRANSCODER_THUMB'])){
+                bx_alert('system', 'image_editor', 0, 0, array(
+                   'module' => $oModule->getName(),
+                   'image_type' => 'avatar',
+                   'is_allow_edit' => $bIsAllowEditPicture,
+                   'image_url' =>  $aData[$CNF['FIELD_PICTURE']] ? $sUrlPicture : '',
+                   'content_id' => $aData[$CNF['FIELD_ID']],
+                   'uploader' => $CNF['OBJECT_UPLOADERS_PICTURE'][0],
+                   'storage' => $CNF['OBJECT_STORAGE'],
+                   'transcoder' => $CNF['OBJECT_IMAGES_TRANSCODER_AVATAR_BIG'],
+                   'field' => $CNF['FIELD_PICTURE'],
+                   'is_background' => false,
+                   'add_class' => &$sAddClassPicture,
+                   'add_code' => &$sAddCode
+                )); 
+            }
 
-            $aShowAvatar = array(
+            $aTmplVarsShowAvatar = array(
                 'add_class' => $sAddClassPicture,
                 'letter' => mb_substr($sTitle, 0, 1),
                 'img_class' => $sAddClassPicture != '' ? 'bx-media-editable-src' : '',
@@ -407,60 +441,81 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             }
         }
 
-        $sActionsMenu = $oModule->serviceEntityAllActions();
-        if(!$sActionsMenu && ($oMenu = BxTemplMenu::getObjectInstance($CNF['OBJECT_MENU_ACTIONS_VIEW_ENTRY'], $this)) !== false)
-            $sActionsMenu = $oMenu->getCode();
+        //--- Process Actions menu
+        $sActionsMenu = '';
+        if(!isset($aParams['show_menu_actions']) || $aParams['show_menu_actions'] === true) {
+            $sActionsMenu = $oModule->serviceEntityAllActions([$aData[$CNF['FIELD_ID']], $aData]);
+            if(!$sActionsMenu && ($oMenu = BxTemplMenu::getObjectInstance($CNF['OBJECT_MENU_ACTIONS_VIEW_ENTRY'], $this)) !== false)
+                $sActionsMenu = $oMenu->getCode();
+        }
 
+        //--- Process Meta menu
         $sMetaMenu = '';
-        if(!empty($CNF['OBJECT_MENU_VIEW_ENTRY_META']) && ($oMetaMenu = BxTemplMenu::getObjectInstance($CNF['OBJECT_MENU_VIEW_ENTRY_META'])) !== false) {
-            $oMetaMenu->setContentId($aData[$CNF['FIELD_ID']]);
-            $oMetaMenu->setContentPublic($this->isProfilePublic($aData));
-            $sMetaMenu = $oMetaMenu->getCode();
+        if((!isset($aParams['show_menu_meta']) || $aParams['show_menu_meta'] === true) && !empty($CNF['OBJECT_MENU_VIEW_ENTRY_META'])) {
+            $oMetaMenu = BxTemplMenu::getObjectInstance($CNF['OBJECT_MENU_VIEW_ENTRY_META']);
+            if($oMetaMenu !== false) {
+                $oMetaMenu->setContentId($aData[$CNF['FIELD_ID']]);
+                $oMetaMenu->setContentPublic($this->isProfilePublic($aData));
+                $sMetaMenu = $oMetaMenu->getCode();
+            }
         }
 
-        // generate html
-        $aVars = array (
+        $aTmplVars = [
             'module' => $this->_oConfig->getName(),
+            'class' => $sClass,
             'id' => $aData[$CNF['FIELD_ID']],
             'content_url' => $sUrl,
             'title' => $sTitle,
+            'bx_if:show_avatar' => [
+                'condition' => $bTmplVarsShowAvatar,
+                'content' => $aTmplVarsShowAvatar
+            ],
+            'bx_if:show_avatar_placeholder' => [
+                'condition' => !$bTmplVarsShowAvatar,
+                'content' => []
+            ],
+            'badges' => $oModule->serviceGetBadges($aData[$CNF['FIELD_ID']]),
             'action_menu' => $sActionsMenu,
-            'bx_if:show_avatar' => array(
-                'condition' => $bShowAvatar,
-                'content' => $aShowAvatar
-            ),
-            'bx_if:show_avatar_placeholder' => array(
-                'condition' => !$bShowAvatar,
-                'content' => array()
-            ),
-            'bx_if:show_cover' => array(
-                'condition' => $bUrlCover,
-                'content' => $aShowAvatar
-            ),
-            'bx_if:show_cover_placeholder' => array(
-                'condition' => !$bUrlCover,
-                'content' => array()
-            ),
+            'meta' => $sMetaMenu,
+            'show_data' => $sShowData,
             'picture_popup' => $sPicturePopup,
             'cover_popup' => $sCoverPopup,
-            'cover_popup_id' => $sCoverPopupId,
-            'cover_url' => $sUrlCover,
-            'add_class' => $sAddClassCover,
-            'img_class' => $sAddClassCover != '' ? 'bx-media-editable-src' : '',
             'additional_code' => $sAddCode,
-            'cover_href' => !$aData[$CNF['FIELD_COVER']] && $bIsAllowEditCover ? $sUrlCoverChange : 'javascript:void(0);',
-            'badges' => $oModule->serviceGetBadges($aData[$CNF['FIELD_ID']]),
-            'meta' => $sMetaMenu,
-        );
-        
-        return $aVars;
+        ];
+
+        if($bUseAsBlock)
+            $aTmplVars = array_merge($aTmplVars, [
+                'bx_if:show_cover' => [
+                    'condition' => $bTmplVarsShowCover,
+                    'content' => $aTmplVarsShowCover
+                ],
+                'bx_if:show_text' => [
+                    'condition' => !isset($aParams['show_text']) || $aParams['show_text'] === true,
+                    'content' => [
+                        'text' => isset($CNF['FIELD_TEXT']) ? strmaxtextlen(strip_tags($aData[$CNF['FIELD_TEXT']]), 150) : ''
+                    ]
+                ]
+            ]);
+        else
+            $aTmplVars = array_merge($aTmplVars, $aTmplVarsShowCover, [
+                'bx_if:show_cover' => [
+                    'condition' => $bUrlCover,
+                    'content' => []
+                ],
+                'bx_if:show_cover_placeholder' => [
+                    'condition' => !$bUrlCover,
+                    'content' => []
+                ],
+            ]);
+
+        return $aTmplVars;
     }
     /**
      * Get profile cover
      */
     function setCover ($oPage, $aData, $sTemplateName = 'cover.html')
     {
-        BxDolCover::getInstance($this)->set($this->prepareCover($aData, $oPage), $sTemplateName);
+        BxDolCover::getInstance($this)->set($this->prepareCover($aData, ['page' => $oPage]), $sTemplateName);
     }
 
     /**

+ 14 - 11
modules/base/profile/template/cover_block.html

@@ -1,12 +1,14 @@
 <div class="bx-base-profile-cover-block-wrapper">
     <div class="bx-base-pofile-cover-wrapper __class__ bx-def-centered bx-def-box-sizing">
         <div class="bx-base-pofile-cover bx-def-cover-color-bg bx-def-box-sizing">
-            <div class="bx-base-pofile-cover-image __add_class__">
-                <a class="bx-base-pofile-cover-image bx-def-box-sizing" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
-                    <img class="bx-base-pofile-cover-image __img_class__" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />"/>
-                </a>
-                <div class="bx-cover-gradient"></div>
-            </div>
+            <bx_if:show_cover>
+                <div class="bx-base-pofile-cover-image __add_class__">
+                    <a class="bx-base-pofile-cover-image bx-def-box-sizing" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
+                        <img class="bx-base-pofile-cover-image __img_class__" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />"/>
+                    </a>
+                    <div class="bx-cover-gradient"></div>
+                </div>
+            </bx_if:show_cover>
             <div class="bx-base-pofile-cover-info">
                 <div class="bx-base-pofile-ci-cnt bx-def-padding-leftright">
                     <bx_if:show_avatar>
@@ -24,13 +26,14 @@
                 <div class="bx-base-pofile-cover-user bx-def-margin-sec-topbottom">
                     <div class="bx-base-profile-cover-title-bages">
                         <h1 class="bx-def-unit-info">__title__ </h1>
-                        <div class="bx-base-profile-cover-bages bx-base-bages-container">
-                            __badges__
-                        </div>
+                        <div class="bx-base-profile-cover-bages bx-base-bages-container">__badges__</div>
                     </div>
-                    <div class="bx-base-pofile-cover-actions bx-def-margin-sec-leftright-neg" onclick="event.stopPropagation();">__action_menu__</div>
-                    <div class="bx-def-margin-sec bx-def-unit-desc">__info__</div>
+                    <div class="bx-base-pofile-cover-actions bx-def-padding-sec-leftright bx-def-box-sizing" onclick="event.stopPropagation();">__action_menu__</div>
+                    <bx_if:show_text>
+                        <div class="bx-def-padding-leftright bx-def-padding-sec-bottom bx-def-unit-desc">__text__</div>
+                    </bx_if:show_text>
                 </div>
+                __show_data__
             </div>
         </div>
     </div>

+ 16 - 4
modules/base/profile/template/css/main.css

@@ -218,6 +218,11 @@ p.bx-base-pofile-unit-thumb.bx-def-ava-size {
 
 
 /* --- Profile Cover --- */
+.bx-base-pofile-cover-wrapper.bx-no-cover div.bx-base-pofile-cover-thumb {
+    height: auto;
+    margin: 1rem 0 0 0;
+}
+
 .bx-media-phone .bx-base-pofile-cover-wrapper {
     padding-left: 0;
     padding-right: 0;
@@ -230,6 +235,9 @@ p.bx-base-pofile-unit-thumb.bx-def-ava-size {
     border-left-width: 0;
     border-right-width: 0;
 }
+.bx-db-content  .bx-base-pofile-cover {
+    border-width: 0;
+}
 div.bx-base-pofile-cover-image {
     position: relative;
     max-width: 100%;
@@ -453,15 +461,19 @@ a.bx-base-pofile-cover-thumb p.bx-base-pofile-unit-thumb.bx-def-ava-big-size {
 .bx-base-profile-cover-block-wrapper .bx-base-pofile-cover-image{
     max-height: 15rem;
 }
-
 .bx-base-profile-cover-block-wrapper .bx-base-pofile-ci-cnt{
-    justify-content: center
+    -webkit-justify-content: center;
+    justify-content: center;
 }
+.bx-base-profile-cover-block-wrapper .bx-base-profile-cover-title-bages {
+    -webkit-align-self: center;
+    align-self: center;
 
-.bx-base-profile-cover-block-wrapper .bx-base-pofile-cover-user{
-    align-items: center
+    -webkit-flex-direction: column;
+    flex-direction: column;
 }
 .bx-base-profile-cover-block-wrapper .bx-menu-custom.bx-menu-custom-hor{
+    -webkit-justify-content: center;
     justify-content: center;
 }
 .bx-base-profile-cover-block-wrapper div.bx-base-pofile-cover{

+ 21 - 16
modules/boonex/artificer/data/template/mod_groups/cover_block.html

@@ -1,30 +1,35 @@
 <div class="bx-base-profile-cover-block-wrapper">
-    <div class="bx-base-pofile-cover-wrapper relative bg-gradient-to-b from-gray-100 rounded to-white dark:from-black dark:to-gray-900">
+    <div class="bx-base-pofile-cover-wrapper __class__ relative bg-gradient-to-b from-gray-100 to-white dark:from-black dark:to-gray-900 rounded-md">
         <div class="bx-base-pofile-cover">
-            <div class="bx-base-pofile-cover-image-wrp relative overflow-hidden">
-                <div class="absolute w-full h-2/3">
-                    <div class="absolute top-6 -left-1/4 w-2/3 h-2/3 bg-blue-700 filter blur-3xl z-0 opacity-50 animate-goo"></div>
-                    <div class="absolute top-6 -right-1/4 w-2/3 h-2/3 bg-green-700 filter blur-3xl z-0 opacity-50 animate-goo"></div>
-                </div>
-                <div class="bx-base-pofile-cover-image relative h-64 lg:h-40 max-w-7xl mx-auto opacity-100 __add_class__">
-                    <a class="bx-base-pofile-cover-image box-border absolute h-full w-full" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
-                        <img class="bx-base-pofile-cover-image h-64 mx-auto w-full object-cover bg-cover lg:h-40 rounded z-10 __img_class__" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />" />
-                    </a>
+            <bx_if:show_cover>
+                <div class="bx-base-pofile-cover-image-wrp relative overflow-hidden">
+                    <div class="absolute w-full h-2/3">
+                        <div class="absolute top-6 -left-1/4 w-2/3 h-2/3 bg-blue-700 filter blur-3xl z-0 opacity-50 animate-goo"></div>
+                        <div class="absolute top-6 -right-1/4 w-2/3 h-2/3 bg-green-700 filter blur-3xl z-0 opacity-50 animate-goo"></div>
+                    </div>
+                    <div class="bx-base-pofile-cover-image relative h-64 lg:h-40 max-w-7xl mx-auto opacity-100 __add_class__">
+                        <a class="bx-base-pofile-cover-image box-border absolute h-full w-full" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
+                            <img class="bx-base-pofile-cover-image h-64 mx-auto w-full object-cover bg-cover lg:h-40 rounded z-10 __img_class__" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />" />
+                        </a>
+                    </div>
                 </div>
-            </div>
+            </bx_if:show_cover>
             <div class="bx-base-pofile-cover-info relative mx-auto px-6 ">
                 <div class="bx-base-pofile-cover-user relative flex flex-col flex-colmt-6 pt-6 sm:pb-1">
-                    <div class="bx-base-profile-cover-title-bages min-w-0 flex-1 mb-1">
+                    <div class="bx-base-profile-cover-title-bages min-w-0 flex-1 mb-4">
                         <h1 class="bx-def-unit-info text-4xl font-bold text-gray-900 dark:text-gray-50 text-center sm:truncate">__title__ </h1>
                         <div class="bx-base-profile-cover-meta-holder">
                             <div class="bx-base-profile-cover-meta flex flex-row flex-wrap justify-center mt-6 md:mt-2 -ml-1  text-base font-medium">__meta__</div>
                         </div>
                     </div>
-                    <div class="bx-base-pofile-cover-actions relative flex lg:flex-1 h-14 md:h-10 mt-4" onclick="event.stopPropagation();">__action_menu__</div>
-                    <div class="py-4 flex justify-between">
-                        <div class="mt-1 lg:mt-2 font-normal text-sm lg:text-base text-gray-500 group-hover:text-gray-600 dark:text-gray-400 dark:group-hover:text-gray-300">__info__</div>
-                    </div>
+                    <div class="bx-base-pofile-cover-actions relative flex lg:flex-1 h-14 md:h-10 mb-4" onclick="event.stopPropagation();">__action_menu__</div>
+                    <bx_if:show_text>
+                        <div class="flex justify-between mb-4">
+                            <div class="font-normal text-sm lg:text-base text-gray-500 group-hover:text-gray-600 dark:text-gray-400 dark:group-hover:text-gray-300">__text__</div>
+                        </div>
+                    </bx_if:show_text>
                 </div>
+                __show_data__
             </div>
         </div>
     </div>

+ 23 - 18
modules/boonex/artificer/data/template/mod_profile/cover_block.html

@@ -1,19 +1,21 @@
 <div class="bx-base-profile-cover-block-wrapper">
-    <div class="bx-base-pofile-cover-wrapper relative bg-gradient-to-b from-gray-100 rounded to-white dark:from-black dark:to-gray-900">
+    <div class="bx-base-pofile-cover-wrapper __class__ relative bg-gradient-to-b from-gray-100 to-white dark:from-black dark:to-gray-900 rounded-md">
         <div class="bx-base-pofile-cover">
-            <div class="bx-base-pofile-cover-image-wrp relative overflow-hidden">
-                <div class="absolute w-full h-2/3">
-                    <div class="absolute top-6 -left-1/4 w-2/3 h-2/3 bg-blue-700 filter blur-3xl z-0 opacity-50 animate-goo"></div>
-                    <div class="absolute top-6 -right-1/4 w-2/3 h-2/3 bg-green-700 filter blur-3xl z-0 opacity-50 animate-goo"></div>
-                </div>
-                <div class="bx-base-pofile-cover-image relative h-64 lg:h-40 max-w-7xl mx-auto opacity-100 __add_class__">
-                    <a class="bx-base-pofile-cover-image box-border absolute h-full w-full" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
-                        <img class="bx-base-pofile-cover-image h-64 mx-auto w-full object-cover bg-cover lg:h-40 rounded z-10 __img_class__" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />" />
-                    </a>
+            <bx_if:show_cover>
+                <div class="bx-base-pofile-cover-image-wrp relative overflow-hidden">
+                    <div class="absolute w-full h-2/3">
+                        <div class="absolute top-6 -left-1/4 w-2/3 h-2/3 bg-blue-700 filter blur-3xl z-0 opacity-50 animate-goo"></div>
+                        <div class="absolute top-6 -right-1/4 w-2/3 h-2/3 bg-green-700 filter blur-3xl z-0 opacity-50 animate-goo"></div>
+                    </div>
+                    <div class="bx-base-pofile-cover-image relative h-64 lg:h-40 max-w-7xl mx-auto opacity-100 __add_class__">
+                        <a class="bx-base-pofile-cover-image box-border absolute h-full w-full" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)">
+                            <img class="bx-base-pofile-cover-image h-64 mx-auto w-full object-cover bg-cover lg:h-40 rounded z-10 __img_class__" style="background-image:url(__cover_url__)" src="<bx_icon_url:spacer.gif />" />
+                        </a>
+                    </div>
                 </div>
-            </div>
-            <div class="bx-base-pofile-cover-info relative mx-auto px-6 ">
-                <div class="bx-base-pofile-ci-cnt relative flex flex-col -mt-16 ">
+            </bx_if:show_cover>
+            <div class="bx-base-pofile-cover-info relative mx-auto px-6">
+                <div class="bx-base-pofile-ci-cnt relative flex flex-col -mt-20 pt-4">
                     <bx_if:show_avatar>
                         <div class="bx-base-pofile-cover-thumb flex justify-center __add_class__">
                              <a class="bx-base-pofile-cover-thumb" href="__picture_href__" onclick="$('#__picture_popup_id__').dolPopupImage('__picture_url__', $(this).parent()); event.stopPropagation();">
@@ -30,17 +32,20 @@
                     </bx_if:show_avatar_placeholder>
                 </div>
                 <div class="bx-base-pofile-cover-user relative flex flex-col flex-colmt-6 pt-6 sm:pb-1">
-                    <div class="bx-base-profile-cover-title-bages min-w-0 flex-1 mb-1">
+                    <div class="bx-base-profile-cover-title-bages min-w-0 flex-1 mb-4">
                         <h1 class="bx-def-unit-info text-4xl font-bold text-gray-900 dark:text-gray-50 text-center sm:truncate">__title__ </h1>
                         <div class="bx-base-profile-cover-meta-holder">
                             <div class="bx-base-profile-cover-meta flex flex-row flex-wrap justify-center mt-6 md:mt-2 -ml-1  text-base font-medium">__meta__</div>
                         </div>
                     </div>
-                    <div class="bx-base-pofile-cover-actions relative flex lg:flex-1 h-14 md:h-10 mt-4" onclick="event.stopPropagation();">__action_menu__</div>
-                    <div class="py-4 flex justify-between">
-                        <div class="mt-1 lg:mt-2 font-normal text-sm lg:text-base text-gray-500 group-hover:text-gray-600 dark:text-gray-400 dark:group-hover:text-gray-300">__info__</div>
-                    </div>
+                    <div class="bx-base-pofile-cover-actions relative flex lg:flex-1 h-14 md:h-10 mb-4" onclick="event.stopPropagation();">__action_menu__</div>
+                    <bx_if:show_text>
+                        <div class="flex justify-between mb-4">
+                            <div class="font-normal text-sm lg:text-base text-gray-500 group-hover:text-gray-600 dark:text-gray-400 dark:group-hover:text-gray-300">__text__</div>
+                        </div>
+                    </bx_if:show_text>
                 </div>
+                __show_data__
             </div>
         </div>
     </div>

+ 3 - 0
modules/boonex/artificer/data/template/mod_profile/css/main.css

@@ -117,6 +117,9 @@ p.bx-base-pofile-unit-thumb.bx-def-ava-big-size {
 
 
 /*--- Profile Cover ---*/
+.bx-base-pofile-cover-wrapper.bx-no-cover .bx-base-pofile-ci-cnt {
+    margin-top: 0;
+}
 .bx-base-profile-cover-meta .bx-menu-custom.bx-menu-custom-hor {
     -webkit-align-items: center;
     align-items: center;

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

@@ -3060,6 +3060,8 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_page_block_title_confirm_email"><![CDATA[Email Confirmation]]></string>
 	<string name="_sys_page_block_title_confirm_phone"><![CDATA[Phone Confirmation]]></string>
 	<string name="_sys_page_block_title_create_account"><![CDATA[Sign up]]></string>
+        <string name="_sys_page_block_title_sys_author"><![CDATA[Author]]></string>
+	<string name="_sys_page_block_title_author"><![CDATA[Author]]></string>
         <string name="_sys_page_block_title_sys_create_post"><![CDATA[Create Post]]></string>
 	<string name="_sys_page_block_title_create_post"><![CDATA[Add new...]]></string>
 	<string name="_sys_page_block_title_sys_create_post_context"><![CDATA[Create Post (Context)]]></string>

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

@@ -45,6 +45,7 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 ('bx_organizations_view_profile', 'view-organization-profile', '_bx_orgs_page_title_sys_view_profile', '_bx_orgs_page_title_view_profile', 'bx_organizations', 7, 2147483647, 1, 'page.php?i=view-organization-profile', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
 
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('bx_organizations_view_profile', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_cover_block', '_bx_orgs_page_block_title_cover_block', 3, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:12:\"entity_cover\";}', 0, 0, 1, 0),
 ('bx_organizations_view_profile', 2, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_subscriptions', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:21:\"profile_subscriptions\";}', 0, 1, 0, 0),
 ('bx_organizations_view_profile', 2, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_subscribed_me', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:21:\"profile_subscribed_me\";}', 0, 1, 0, 0),
 ('bx_organizations_view_profile', 2, 'bx_organizations', '', '_bx_orgs_page_block_title_profile_related_me', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:16:"bx_organizations";s:6:"method";s:18:"profile_related_me";}', 0, 1, 0, 0),
@@ -256,8 +257,7 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `
 ('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_featured_entries_view_showcase', '_bx_orgs_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 2),
 ('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_recommended_entries_view_showcase', '_bx_orgs_page_block_title_recommended_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:18:\"browse_recommended\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 3),
 ('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_active_entries_view_showcase', '_bx_orgs_page_block_title_active_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:16:\"showcase_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 4),
-('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_active_profiles', '_bx_orgs_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:15:\"gallery_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 5),
-('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_cover_block', '_bx_orgs_page_block_title_cover_block', 3, 2147483647, 'service', 'a:2:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:12:\"entity_cover\";}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 6);
+('', 0, 'bx_organizations', '_bx_orgs_page_block_title_sys_active_profiles', '_bx_orgs_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:16:\"bx_organizations\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:15:\"gallery_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 5);
 
 -- MENU
 

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

@@ -41,6 +41,7 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 ('bx_persons_view_profile', 'view-persons-profile', '_bx_persons_page_title_sys_view_profile', '_bx_persons_page_title_view_profile', 'bx_persons', 7, 2147483647, 1, 'page.php?i=view-persons-profile', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
 
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('bx_persons_view_profile', 0, 'bx_persons', '_bx_persons_page_block_title_sys_cover_block', '_bx_persons_page_block_title_cover_block', 3, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:12:\"entity_cover\";}', 0, 0, 1, 0),
 ('bx_persons_view_profile', 2, 'bx_persons', '', '_bx_persons_page_block_title_profile_subscriptions', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:21:\"profile_subscriptions\";}', 0, 1, 0, 0),
 ('bx_persons_view_profile', 2, 'bx_persons', '', '_bx_persons_page_block_title_profile_subscribed_me', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:21:\"profile_subscribed_me\";}', 0, 1, 0, 0),
 ('bx_persons_view_profile', 2, 'bx_persons', '', '_bx_persons_page_block_title_profile_related_me', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:18:"profile_related_me";}', 0, 1, 0, 0),
@@ -198,8 +199,7 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_featured_entries_view_showcase', '_bx_persons_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 1),
 ('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_recommended_entries_view_showcase', '_bx_persons_page_block_title_recommended_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:18:\"browse_recommended\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 2),
 ('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_active_entries_view_showcase', '_bx_persons_page_block_title_active_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:16:\"showcase_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 3),
-('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_active_profiles', '_bx_persons_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:15:\"gallery_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 4),
-('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_cover_block', '_bx_persons_page_block_title_cover_block', 3, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:12:\"entity_cover\";}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 5);
+('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_active_profiles', '_bx_persons_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:15:\"gallery_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 4);
 
 -- MENU
 

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

@@ -3028,6 +3028,8 @@
 	<string name="_sys_page_block_title_confirm_email"><![CDATA[Email - Подтверждение]]></string>
 	<string name="_sys_page_block_title_confirm_phone"><![CDATA[Телефон - Подтверждение]]></string>
 	<string name="_sys_page_block_title_create_account"><![CDATA[Присоединиться]]></string>
+        <string name="_sys_page_block_title_sys_author"><![CDATA[Автор]]></string>
+	<string name="_sys_page_block_title_author"><![CDATA[Автор]]></string>
         <string name="_sys_page_block_title_sys_create_post"><![CDATA[Создать публикацию]]></string>
 	<string name="_sys_page_block_title_create_post"><![CDATA[Добавить...]]></string>
 	<string name="_sys_page_block_title_sys_create_post_context"><![CDATA[Создать публикацию (в контекст)]]></string>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
plugins_public/tailwind/css/tailwind.min.css


+ 29 - 1
template/scripts/BxBaseServices.php

@@ -651,7 +651,35 @@ class BxBaseServices extends BxDol implements iBxDolProfileService
             'menu' => $oMenu
         );
     }
-    
+
+    public function serviceGetBlockAuthor($sModule, $iContentId = 0)
+    {
+        if(!$iContentId && bx_get('id') !== false)
+            $iContentId = (int)bx_get('id');
+
+        $sMethodGetAuthor = 'get_author';
+        if(!$sModule || !$iContentId || !BxDolRequest::serviceExists($sModule, $sMethodGetAuthor))
+            return '';
+
+        $iAuthor = bx_srv($sModule, $sMethodGetAuthor, [$iContentId]);
+        if(!$iAuthor)
+            return '';
+
+        $oAuthor = BxDolProfile::getInstance($iAuthor);
+        if(!$oAuthor)
+            return '';
+
+        $sModuleAuthor = $oAuthor->getModule();
+        $sMethodGetCover = 'entity_cover';
+        if(!BxDolRequest::serviceExists($sModuleAuthor, $sMethodGetCover))
+            return '';
+
+        return bx_srv($sModuleAuthor, $sMethodGetCover, [$oAuthor->getContentId(), [
+            'use_as_author' => true,
+            'show_cover' => false
+        ]]);
+    }
+
     /**
      * @page service Service Calls
      * @section bx_system_general System Services 

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