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

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

AntonLV 8 лет назад
Родитель
Сommit
11b86bc9d5
24 измененных файлов с 189 добавлено и 12 удалено
  1. 1 1
      modules/base/general/classes/BxBaseModGeneralDb.php
  2. 6 1
      modules/base/general/classes/BxBaseModGeneralModule.php
  3. 24 0
      modules/base/general/classes/BxBaseModGeneralSearchResult.php
  4. 8 0
      modules/base/general/js/showcase.js
  5. 5 2
      modules/base/profile/classes/BxBaseModProfileFormsEntryHelper.php
  6. 10 0
      modules/base/profile/template/css/main.css
  7. 16 0
      modules/base/profile/template/unit_with_cover_showcase.html
  8. 4 1
      modules/base/text/classes/BxBaseModTextSearchResult.php
  9. 18 0
      modules/base/text/template/css/main.css
  10. 1 1
      modules/base/text/template/unit_gallery.html
  11. 25 0
      modules/base/text/template/unit_showcase.html
  12. 32 0
      modules/boonex/acl/classes/BxAclModule.php
  13. 1 0
      modules/boonex/english/data/langs/system/en.xml
  14. 5 1
      modules/boonex/persons/classes/BxPersonsSearchResult.php
  15. 2 0
      modules/boonex/persons/install/langs/en.xml
  16. 9 2
      modules/boonex/persons/install/sql/enable.sql
  17. 1 0
      modules/boonex/persons/template/unit_with_cover_showcase.html
  18. 2 0
      modules/boonex/posts/classes/BxPostsConfig.php
  19. 4 0
      modules/boonex/posts/install/langs/en.xml
  20. 8 2
      modules/boonex/posts/install/sql/enable.sql
  21. 1 0
      modules/boonex/posts/template/unit_showcase.html
  22. 4 0
      modules/boonex/russian/data/langs/bx_posts/ru.xml
  23. 1 0
      modules/boonex/russian/data/langs/system/ru.xml
  24. 1 1
      template/scripts/BxBaseSearchResult.php

+ 1 - 1
modules/base/general/classes/BxBaseModGeneralDb.php

@@ -153,7 +153,7 @@ class BxBaseModGeneralDb extends BxDolModuleDb
 
 
     public function getEntriesByAuthor ($iProfileId)
     public function getEntriesByAuthor ($iProfileId)
     {
     {
-        $sQuery = $this->prepare ("SELECT * FROM `" . $this->_oConfig->CNF['TABLE_ENTRIES'] . "` WHERE `" . $this->_oConfig->CNF['FIELD_AUTHOR'] . "` = ?", $iProfileId);
+        $sQuery = $this->prepare ("SELECT * FROM `" . $this->_oConfig->CNF['TABLE_ENTRIES'] . "` WHERE `" . $this->_oConfig->CNF['FIELD_AUTHOR'] . "` = ? ORDER BY `" . $this->_oConfig->CNF['FIELD_ADDED'] . "` DESC", $iProfileId);
         return $this->getAll($sQuery);
         return $this->getAll($sQuery);
     }
     }
 
 

+ 6 - 1
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -37,7 +37,7 @@ class BxBaseModGeneralModule extends BxDolModule
         $this->_rss($aArgs);
         $this->_rss($aArgs);
     }
     }
 
 
-    // ====== SERVICE METHODS
+    // ====== SERVICE METHODS    
     public function serviceGetAuthor ($iContentId)
     public function serviceGetAuthor ($iContentId)
     {
     {
         $mixedResult = $this->_getFieldValue('FIELD_AUTHOR', $iContentId);
         $mixedResult = $this->_getFieldValue('FIELD_AUTHOR', $iContentId);
@@ -127,6 +127,11 @@ class BxBaseModGeneralModule extends BxDolModule
         return $this->_oDb->getEntriesBy($aParams);
         return $this->_oDb->getEntriesBy($aParams);
     }
     }
 
 
+    public function serviceGetAllByAuthor ($iProfileId)
+    {
+        return $this->_oDb->getEntriesByAuthor((int)$iProfileId);
+    }
+
     public function serviceGetSearchableFieldsExtended()
     public function serviceGetSearchableFieldsExtended()
     {
     {
         $CNF = &$this->_oConfig->CNF;
         $CNF = &$this->_oConfig->CNF;

+ 24 - 0
modules/base/general/classes/BxBaseModGeneralSearchResult.php

@@ -9,9 +9,12 @@
  * @{
  * @{
  */
  */
 
 
+define('BX_SYS_PER_PAGE_BROWSE_SHOWCASE', 32);
+
 class BxBaseModGeneralSearchResult extends BxTemplSearchResult
 class BxBaseModGeneralSearchResult extends BxTemplSearchResult
 {
 {
     protected $oModule;
     protected $oModule;
+    protected $bShowcaseView = false;
 
 
     function __construct($sMode = '', $aParams = array())
     function __construct($sMode = '', $aParams = array())
     {
     {
@@ -72,6 +75,27 @@ class BxBaseModGeneralSearchResult extends BxTemplSearchResult
 
 
         $this->setProcessPrivateContent(false);
         $this->setProcessPrivateContent(false);
     }
     }
+    
+    function showPagination($bAdmin = false, $bChangePage = true, $bPageReload = true)
+    {
+        if ($this->bShowcaseView)
+            return '';
+        else
+            return parent::showPagination ($bAdmin, $bChangePage, $bPageReload);
+    }
+    
+    function displayResultBlock ()
+    {
+		if ($this->bShowcaseView){
+            $this->addContainerClass(array('bx-def-margin-sec-lefttopright-neg', 'bx-base-unit-showcase-wrapper'));
+            $CNF = &$this->oModule->_oConfig->CNF;
+            $iPerPageInShowCase = isset($CNF['PARAM_PER_PAGE_BROWSE_SHOWCASE']) ? getParam($CNF['PARAM_PER_PAGE_BROWSE_SHOWCASE']) : BX_SYS_PER_PAGE_BROWSE_SHOWCASE;
+			$this->aCurrent['paginate']['perPage'] = empty($iPerPageInShowCase) ? BX_SYS_PER_PAGE_BROWSE_SHOWCASE : $iPerPageInShowCase;
+			$this->oModule->_oTemplate->addCss(array(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'flickity/|flickity.css'));
+            $this->oModule->_oTemplate->addJs(array('flickity/flickity.pkgd.min.js','modules/base/general/js/|showcase.js'));
+		}
+		return parent::displayResultBlock ();
+    }
 }
 }
 
 
 /** @} */
 /** @} */

+ 8 - 0
modules/base/general/js/showcase.js

@@ -0,0 +1,8 @@
+$(document).ready(function () {
+	$('.bx-base-unit-showcase-wrapper').flickity({
+	    cellSelector: '.bx-base-unit-showcase',
+		cellAlign: 'left',
+		pageDots: false,
+		imagesLoaded: true
+	});
+});

+ 5 - 2
modules/base/profile/classes/BxBaseModProfileFormsEntryHelper.php

@@ -126,8 +126,11 @@ class BxBaseModProfileFormsEntryHelper extends BxBaseModGeneralFormsEntryHelper
             $oProfile->approve(BX_PROFILE_ACTION_AUTO, 0, $this->_oModule->serviceActAsProfile());
             $oProfile->approve(BX_PROFILE_ACTION_AUTO, 0, $this->_oModule->serviceActAsProfile());
 
 
         // set created profile some default membership
         // set created profile some default membership
-        $iAclLevel = !isset($CNF['PARAM_DEFAULT_ACL_LEVEL']) ? MEMBERSHIP_ID_STANDARD : 
-            (isAdmin() ? MEMBERSHIP_ID_ADMINISTRATOR : getParam($CNF['PARAM_DEFAULT_ACL_LEVEL']));
+        if ((int)bx_get('level_id') && bx_srv('bx_acl', 'get_prices', [(int)bx_get('level_id'), true]))
+            $iAclLevel = (int)bx_get('level_id');
+        else
+            $iAclLevel = !isset($CNF['PARAM_DEFAULT_ACL_LEVEL']) ? MEMBERSHIP_ID_STANDARD : 
+               (isAdmin() ? MEMBERSHIP_ID_ADMINISTRATOR : getParam($CNF['PARAM_DEFAULT_ACL_LEVEL']));
         BxDolAcl::getInstance()->setMembership($iProfileId, $iAclLevel, 0, true);
         BxDolAcl::getInstance()->setMembership($iProfileId, $iAclLevel, 0, true);
 
 
         // process metas
         // process metas

+ 10 - 0
modules/base/profile/template/css/main.css

@@ -271,3 +271,13 @@ a.bx-base-pofile-cover-image:hover,
     overflow: hidden;
     overflow: hidden;
     text-overflow: ellipsis;
     text-overflow: ellipsis;
 }
 }
+
+/* showcase view */
+.bx-base-unit-showcase-wrapper .bx-base-unit-showcase
+{
+	width:calc(34%);
+    margin-bottom: 0px;
+}
+.bx-base-unit-showcase-wrapper {
+    display:block
+}

+ 16 - 0
modules/base/profile/template/unit_with_cover_showcase.html

@@ -0,0 +1,16 @@
+<div class="__class__ bx-base-text-unit bx-base-text-unit-gallery bx-base-unit-showcase bx-def-gal-unit-size bx-def-padding-sec bx-def-margin-sec-bottom">
+    <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__">
+            <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>
+        </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>

+ 4 - 1
modules/base/text/classes/BxBaseModTextSearchResult.php

@@ -11,7 +11,7 @@
 
 
 class BxBaseModTextSearchResult extends BxBaseModGeneralSearchResult
 class BxBaseModTextSearchResult extends BxBaseModGeneralSearchResult
 {
 {
-    protected $aUnitViews = array('extended' => 'unit.html', 'gallery' => 'unit_gallery.html', 'full' => 'unit_full.html');
+    protected $aUnitViews = array('extended' => 'unit.html', 'gallery' => 'unit_gallery.html', 'full' => 'unit_full.html', 'showcase' => 'unit_showcase.html');
     protected $sUnitViewDefault = 'gallery';
     protected $sUnitViewDefault = 'gallery';
     protected $sUnitViewParamName = 'unit_view';
     protected $sUnitViewParamName = 'unit_view';
 
 
@@ -29,6 +29,9 @@ class BxBaseModTextSearchResult extends BxBaseModGeneralSearchResult
 
 
         if ('unit_gallery.html' == $this->sUnitTemplate)
         if ('unit_gallery.html' == $this->sUnitTemplate)
             $this->addContainerClass (array('bx-def-margin-sec-lefttopright-neg', 'bx-base-text-unit-gallery-wrapper'));
             $this->addContainerClass (array('bx-def-margin-sec-lefttopright-neg', 'bx-base-text-unit-gallery-wrapper'));
+		if ('unit_showcase.html' == $this->sUnitTemplate){
+			$this->bShowcaseView = true;
+		}
     }
     }
 
 
     protected function processReplaceableMarkers($oProfileAuthor) 
     protected function processReplaceableMarkers($oProfileAuthor) 

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

@@ -136,6 +136,7 @@ div.bx-base-text-breadcrumb i {
     flex-pack: start;
     flex-pack: start;
     -webkit-justify-content: flex-start;
     -webkit-justify-content: flex-start;
     justify-content: flex-start;
     justify-content: flex-start;
+    margin-bottom: 10px;
 }
 }
 
 
 .bx-base-text-unit-gallery-wrapper .bx-base-text-unit-gallery {
 .bx-base-text-unit-gallery-wrapper .bx-base-text-unit-gallery {
@@ -160,6 +161,13 @@ div.bx-base-text-breadcrumb i {
         -ms-flex: 0 0 49.8%;
         -ms-flex: 0 0 49.8%;
         flex: 0 0 49.8%;
         flex: 0 0 49.8%;
     }
     }
+	
+	.bx-base-unit-showcase-wrapper .bx-base-unit-showcase
+	{
+	   width:calc(50%);
+	}
+
+    
 }
 }
 
 
 @media (min-width:533px) and (max-width:1024px) {
 @media (min-width:533px) and (max-width:1024px) {
@@ -170,6 +178,11 @@ div.bx-base-text-breadcrumb i {
         -ms-flex: 0 0 49.8%;
         -ms-flex: 0 0 49.8%;
         flex: 0 0 49.8%;
         flex: 0 0 49.8%;
     }
     }
+	
+	.bx-base-unit-showcase-wrapper .bx-base-unit-showcase
+	{
+	   width:calc(50%);
+	}
 }
 }
 
 
 @media (min-width:1024px) {
 @media (min-width:1024px) {
@@ -184,6 +197,11 @@ div.bx-base-text-breadcrumb i {
         -ms-flex: 0 0 33.25%;
         -ms-flex: 0 0 33.25%;
         flex: 0 0 33.25%;
         flex: 0 0 33.25%;
     }
     }
+	
+	.bx-base-unit-showcase-wrapper .bx-base-unit-showcase
+	{
+	   width:calc(50%);
+	}
 }
 }
 
 
 /* view page */
 /* view page */

+ 1 - 1
modules/base/text/template/unit_gallery.html

@@ -1,4 +1,4 @@
-<div class="bx-base-text-unit bx-base-text-unit-gallery bx-def-gal-unit-size bx-def-padding-sec bx-def-margin-sec-bottom">
+<div class="bx-base-text-unit bx-base-text-unit-gallery bx-def-gal-unit-size bx-def-padding-sec">
 	<div class="bx-base-text-unit-cnt bx-def-box bx-def-round-corners bx-def-color-bg-box bx-def-box-sizing">
 	<div class="bx-base-text-unit-cnt bx-def-box bx-def-round-corners bx-def-color-bg-box bx-def-box-sizing">
 		<div class="bx-base-text-unit-text bx-def-padding-leftright bx-def-padding-sec-topbottom bx-def-font-align-center bx-def-box-sizing">
 		<div class="bx-base-text-unit-text bx-def-padding-leftright bx-def-padding-sec-topbottom bx-def-font-align-center bx-def-box-sizing">
 			<h2><a href="__content_url__">__title__</a></h2>
 			<h2><a href="__content_url__">__title__</a></h2>

+ 25 - 0
modules/base/text/template/unit_showcase.html

@@ -0,0 +1,25 @@
+<div class="bx-base-text-unit bx-base-text-unit-gallery bx-base-unit-showcase bx-def-gal-unit-size bx-def-padding-sec bx-def-margin-sec-bottom">
+    <div class="bx-base-text-unit-cnt bx-def-box bx-def-round-corners bx-def-color-bg-box bx-def-box-sizing">
+        <div class="bx-base-text-unit-text bx-def-padding-leftright bx-def-padding-sec-topbottom bx-def-font-align-center bx-def-box-sizing">
+            <h2><a href="__content_url__">__title__</a></h2>
+            <div class="bx-base-text-unit-info">
+                <bx_if:meta><div class="bx-base-general-unit-meta">__meta__</div></bx_if:meta>
+            </div>
+        </div>
+        <bx_if:thumb>
+            <a href="__content_url__" title="__summary_attr__">
+                <div class="bx-base-text-unit-thumb bx-def-gal-div-size bx-def-round-corners bx-def-font-middle" style="background-image:url(__gallery_url__)">
+                    <div class="bx-base-text-unit-strecher">__strecher__</div>
+                </div>
+            </a>
+        </bx_if:thumb>
+        <bx_if:no_thumb>
+            <div class="bx-def-gal-img-column">
+                <div class="bx-base-text-unit-no-thumb bx-def-gal-div-size bx-def-font-middle bx-def-font-grayed bx-def-padding bx-def-box-sizing">
+                    __summary_plain__
+                    <div class="bx-base-text-unit-strecher">__strecher__</div>
+                </div>
+            </div>
+        </bx_if:no_thumb>
+    </div>
+</div>

+ 32 - 0
modules/boonex/acl/classes/BxAclModule.php

@@ -369,6 +369,38 @@ class BxAclModule extends BxDolModule
     	return true;
     	return true;
     }
     }
 
 
+    /**
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-other Other
+     * @subsubsection bx_acl-get_prices get_prices
+     * 
+     * @code bx_srv('bx_acl', 'get_prices', [...]); @endcode
+     * 
+     * Get array of available price options for membership levels
+     *
+     * @param $iLevelId membership level id
+     * @param $bFreeUnlimitedOnly get unlimited free pricing options only
+     * @return array of levels, or empty array of there are no any pricing options avaiulable
+     * 
+     * @see BxAclModule::serviceGetPrices
+     */
+    /** 
+     * @ref bx_acl-get_prices "get_prices"
+     */
+	public function serviceGetPrices($iLevelId = 0, $bFreeUnlimitedOnly = false)
+    {
+        $aParams = array(
+            'type' => $iLevelId ? 'by_level_id' : 'all_full',
+            'value' => $iLevelId,
+        );
+        $aPrices = $this->_oDb->getPrices($aParams, false);        
+
+        return array_filter($aPrices, function ($r) use ($bFreeUnlimitedOnly) {
+            return $bFreeUnlimitedOnly ? !$r['price'] && !$r['period'] : true;
+        });
+    }
+    
     protected function _serviceRegisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, $sType)
     protected function _serviceRegisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, $sType)
     {
     {
     	$aItem = $this->serviceGetCartItem($iItemId);
     	$aItem = $this->serviceGetCartItem($iItemId);

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

@@ -2568,4 +2568,5 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_week_thu"><![CDATA[Thursday]]></string>
 	<string name="_week_thu"><![CDATA[Thursday]]></string>
 	<string name="_week_tue"><![CDATA[Tuesday]]></string>
 	<string name="_week_tue"><![CDATA[Tuesday]]></string>
 	<string name="_week_wed"><![CDATA[Wednesday]]></string>
 	<string name="_week_wed"><![CDATA[Wednesday]]></string>
+	<string name="_sys_option_per_page_browse_showcase"><![CDATA[Number of items in showcase view]]></string>
 </resources>
 </resources>

+ 5 - 1
modules/boonex/persons/classes/BxPersonsSearchResult.php

@@ -16,7 +16,11 @@ class BxPersonsSearchResult extends BxBaseModProfileSearchResult
         parent::__construct($sMode, $aParams);
         parent::__construct($sMode, $aParams);
 
 
         $this->sUnitTemplate = 'unit_with_cover.html';
         $this->sUnitTemplate = 'unit_with_cover.html';
-
+        if ('showcase' == $aParams['unit_view']){
+			$this->bShowcaseView = true;
+            $this->sUnitTemplate = 'unit_with_cover_showcase.html';
+		}
+        
         $this->aCurrent =  array(
         $this->aCurrent =  array(
             'name' => 'bx_persons',
             'name' => 'bx_persons',
             'module_name' => 'bx_persons',
             'module_name' => 'bx_persons',

+ 2 - 0
modules/boonex/persons/install/langs/en.xml

@@ -259,4 +259,6 @@
     <string name="_bx_persons_email_friend_request_body"><![CDATA[{email_header}
     <string name="_bx_persons_email_friend_request_body"><![CDATA[{email_header}
 <p><a href="{SenderUrl}">{SenderDisplayName}</a> wants to be friends with you. <a href="{FriendsLink}">Respond</a>.</p>
 <p><a href="{SenderUrl}">{SenderDisplayName}</a> wants to be friends with you. <a href="{FriendsLink}">Respond</a>.</p>
 {email_footer}]]></string>
 {email_footer}]]></string>
+
+    <string name="_bx_persons_page_block_title_featured_entries_view_showcase"><![CDATA[Featured People (Showcase View)]]></string>
 </resources>
 </resources>

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

@@ -17,10 +17,11 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `e
 ('bx_persons_redirect_aadd_custom_url', '', @iCategId, '_bx_persons_option_redirect_aadd_custom_url', 'digit', '', '', '', 4),
 ('bx_persons_redirect_aadd_custom_url', '', @iCategId, '_bx_persons_option_redirect_aadd_custom_url', 'digit', '', '', '', 4),
 ('bx_persons_num_connections_quick', '6', @iCategId, '_bx_persons_option_num_connections_quick', 'digit', '', '', '', 10),
 ('bx_persons_num_connections_quick', '6', @iCategId, '_bx_persons_option_num_connections_quick', 'digit', '', '', '', 10),
 ('bx_persons_per_page_browse', '24', @iCategId, '_bx_persons_option_per_page_browse', 'digit', '', '', '', 11),
 ('bx_persons_per_page_browse', '24', @iCategId, '_bx_persons_option_per_page_browse', 'digit', '', '', '', 11),
-('bx_persons_num_rss', '10', @iCategId, '_bx_persons_option_num_rss', 'digit', '', '', '', 12),
+('bx_persons_num_rss', '10', @iCategId, '_bx_persons_option_num_rss', 'digit', '', '', '', 13),
 ('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_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_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_public_subscribed_me', '', @iCategId, '_bx_persons_option_public_subscribed_me', 'checkbox', '', '', '', 31),
+('bx_persons_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 12);
 
 
 -- PAGES
 -- PAGES
 
 
@@ -175,6 +176,12 @@ SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
 ('sys_home', 1, 'bx_persons', '_bx_persons_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:22:"browse_recent_profiles";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
 ('sys_home', 1, 'bx_persons', '_bx_persons_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:22:"browse_recent_profiles";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
 
 
+-- PAGE: service blocks
+
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('', 0, 'bx_persons', '_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:1;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 1);
+
 -- MENU
 -- MENU
 
 
 -- MENU: add to site menu
 -- MENU: add to site menu

+ 1 - 0
modules/boonex/persons/template/unit_with_cover_showcase.html

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

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

@@ -66,6 +66,8 @@ class BxPostsConfig extends BxBaseModTextConfig
             'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_posts_plain_summary_chars',
             'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_posts_plain_summary_chars',
             'PARAM_NUM_RSS' => 'bx_posts_rss_num',
             'PARAM_NUM_RSS' => 'bx_posts_rss_num',
         	'PARAM_SEARCHABLE_FIELDS' => 'bx_posts_searchable_fields',
         	'PARAM_SEARCHABLE_FIELDS' => 'bx_posts_searchable_fields',
+            'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_posts_per_page_browse_showcase',
+            
 
 
             // objects
             // objects
             'OBJECT_STORAGE' => 'bx_posts_files',
             'OBJECT_STORAGE' => 'bx_posts_files',

+ 4 - 0
modules/boonex/posts/install/langs/en.xml

@@ -217,4 +217,8 @@
     <string name="_bx_posts_txt_sample_single_with_article"><![CDATA[a post]]></string>
     <string name="_bx_posts_txt_sample_single_with_article"><![CDATA[a post]]></string>
     <string name="_bx_posts_txt_sample_comment_single"><![CDATA[comment to post]]></string>
     <string name="_bx_posts_txt_sample_comment_single"><![CDATA[comment to post]]></string>
     <string name="_bx_posts_txt_sample_vote_single"><![CDATA[vote to post]]></string>
     <string name="_bx_posts_txt_sample_vote_single"><![CDATA[vote to post]]></string>
+	
+    <string name="_bx_posts_page_block_title_recent_entries_view_showcase"><![CDATA[Latest Posts (Showcase View)]]></string>
+    <string name="_bx_posts_page_block_title_popular_entries_view_showcase"><![CDATA[Popular Posts (Showcase View)]]></string>
+    <string name="_bx_posts_page_block_title_featured_entries_view_showcase"><![CDATA[Featured Posts (Showcase View)]]></string>
 </resources>
 </resources>

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

@@ -16,7 +16,9 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_posts_per_page_browse', '12', @iCategId, '_bx_posts_option_per_page_browse', 'digit', '', '', '', 10),
 ('bx_posts_per_page_browse', '12', @iCategId, '_bx_posts_option_per_page_browse', 'digit', '', '', '', 10),
 ('bx_posts_per_page_profile', '6', @iCategId, '_bx_posts_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_posts_per_page_profile', '6', @iCategId, '_bx_posts_option_per_page_profile', 'digit', '', '', '', 12),
 ('bx_posts_rss_num', '10', @iCategId, '_bx_posts_option_rss_num', 'digit', '', '', '', 20),
 ('bx_posts_rss_num', '10', @iCategId, '_bx_posts_option_rss_num', 'digit', '', '', '', 20),
-('bx_posts_searchable_fields', 'title,text', @iCategId, '_bx_posts_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:21:"get_searchable_fields";}', 30);
+('bx_posts_searchable_fields', 'title,text', @iCategId, '_bx_posts_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:8:"bx_posts";s:6:"method";s:21:"get_searchable_fields";}', 30),
+('bx_posts_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 10)
+;
 
 
 -- PAGE: create entry
 -- PAGE: create entry
 
 
@@ -157,7 +159,11 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbo
 
 
 ('', 0, 'bx_posts', '_bx_posts_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2),
 ('', 0, 'bx_posts', '_bx_posts_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2),
 ('', 0, 'bx_posts', '_bx_posts_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 3),
 ('', 0, 'bx_posts', '_bx_posts_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 3),
-('', 0, 'bx_posts', '_bx_posts_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 4);
+('', 0, 'bx_posts', '_bx_posts_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 4),
+('', 0, 'bx_posts', '_bx_posts_page_block_title_recent_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:13:\"browse_public\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:1;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 5),
+('', 0, 'bx_posts', '_bx_posts_page_block_title_popular_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:13:\"browse_popular\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:1;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 6),
+('', 0, 'bx_posts', '_bx_posts_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:1;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 6);
+
 
 
 -- MENU: add to site menu
 -- MENU: add to site menu
 
 

+ 1 - 0
modules/boonex/posts/template/unit_showcase.html

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

+ 4 - 0
modules/boonex/russian/data/langs/bx_posts/ru.xml

@@ -217,4 +217,8 @@
     <string name="_bx_posts_txt_sample_single_with_article"><![CDATA[публикация]]></string>
     <string name="_bx_posts_txt_sample_single_with_article"><![CDATA[публикация]]></string>
     <string name="_bx_posts_txt_sample_comment_single"><![CDATA[комментарий к публикации]]></string>
     <string name="_bx_posts_txt_sample_comment_single"><![CDATA[комментарий к публикации]]></string>
     <string name="_bx_posts_txt_sample_vote_single"><![CDATA[голос за публикацию]]></string>
     <string name="_bx_posts_txt_sample_vote_single"><![CDATA[голос за публикацию]]></string>
+	
+	<string name="_bx_posts_page_block_title_recent_entries_view_showcase"><![CDATA[Последние публикации (Showcase View)]]></string>
+	<string name="_bx_posts_page_block_title_popular_entries_view_showcase"><![CDATA[Популярные публикации (Витринный просмотр)]]></string>
+	<string name="_bx_posts_page_block_title_featured_entries_view_showcase"><![CDATA[Продвинутые публикации (Витринный просмотр)]]></string>
 </resources>
 </resources>

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

@@ -2567,4 +2567,5 @@
 	<string name="_week_thu"><![CDATA[Четверг]]></string>
 	<string name="_week_thu"><![CDATA[Четверг]]></string>
 	<string name="_week_tue"><![CDATA[Вторник]]></string>
 	<string name="_week_tue"><![CDATA[Вторник]]></string>
 	<string name="_week_wed"><![CDATA[Среда]]></string>
 	<string name="_week_wed"><![CDATA[Среда]]></string>
+	<string name="_sys_option_per_page_browse_showcase"><![CDATA[Количество позиций при отображении витриной]]></string>
 </resources>
 </resources>

+ 1 - 1
template/scripts/BxBaseSearchResult.php

@@ -26,7 +26,7 @@ class BxBaseSearchResult extends BxDolSearchResult
 
 
     protected $sCenterContentUnitSelector = false;
     protected $sCenterContentUnitSelector = false;
 
 
-    protected $aContainerClasses = array('bx-search-result-block', 'bx-def-margin-bottom', 'bx-clearfix');
+    protected $aContainerClasses = array('bx-search-result-block', 'bx-clearfix');
 
 
     protected $aUnitParams = array(); ///< additional params array to pass to unit display function
     protected $aUnitParams = array(); ///< additional params array to pass to unit display function