AntonLV 9 лет назад
Родитель
Сommit
4135565c02

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

@@ -48,15 +48,27 @@ class BxBaseModGeneralPageEntry extends BxTemplPage
         $oCover->setCoverClass($this->_oModule->getName() . '_cover');
         $oCover->setCoverClass($this->_oModule->getName() . '_cover');
 
 
         // set cover image
         // set cover image
-        if ($aThumb = $this->_getThumbForMetaObject()) {            
-            $oCover->setCoverImageUrl($aThumb);
+        $mixedThumb = $this->_getThumbForMetaObject();
+        if($mixedThumb !== false) {
+            $aCover = array(
+                'id' => $mixedThumb['id']
+            );
+
+            if(!empty($mixedThumb['transcoder']))
+                $aCover['transcoder'] = $mixedThumb['transcoder'];
+            else if(!empty($CNF['OBJECT_IMAGES_TRANSCODER_COVER'])) 
+                $aCover['transcoder'] = $CNF['OBJECT_IMAGES_TRANSCODER_COVER'];
+            else if(!empty($mixedThumb['object']))
+                $aCover['object'] = $mixedThumb['object'];
+
+            $oCover->setCoverImageUrl($aCover);
         }
         }
 
 
         // add content metatags
         // add content metatags
-        if (!empty($CNF['OBJECT_METATAGS']) && $aThumb) {
+        if (!empty($CNF['OBJECT_METATAGS']) && $mixedThumb) {
             $o = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS']);
             $o = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS']);
             if ($o)
             if ($o)
-                $o->metaAdd($this->_aContentInfo[$CNF['FIELD_ID']], $aThumb);
+                $o->metaAdd($this->_aContentInfo[$CNF['FIELD_ID']], $mixedThumb);
         }
         }
 
 
         $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
         $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');

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

@@ -1,6 +1,6 @@
 
 
 <div class="bx-base-text-unit bx-base-text-unit-ext bx-def-margin-bottom">
 <div class="bx-base-text-unit bx-base-text-unit-ext bx-def-margin-bottom">
-    <h1 class="bx-def-padding-sec-top"><a href="__content_url__">__title__</a></h1>
+    <h1 class="bx-base-text-unit-title bx-def-padding-sec-top"><a href="__content_url__">__title__</a></h1>
     <div class="bx-base-text-unit-info bx-def-margin-sec-top">
     <div class="bx-base-text-unit-info bx-def-margin-sec-top">
         <span class="bx-def-font-grayed">__entry_posting_date__</span>
         <span class="bx-def-font-grayed">__entry_posting_date__</span>
         <span class="bx-base-text-unit-info-div bx-def-font-grayed">&#183;</span>
         <span class="bx-base-text-unit-info-div bx-def-font-grayed">&#183;</span>

+ 1 - 0
modules/boonex/polls/classes/BxPollsConfig.php

@@ -75,6 +75,7 @@ class BxPollsConfig extends BxBaseModTextConfig
             'OBJECT_STORAGE' => 'bx_polls_files',
             'OBJECT_STORAGE' => 'bx_polls_files',
             'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_polls_preview',
             'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_polls_preview',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_polls_gallery',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_polls_gallery',
+        	'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_polls_cover',
             'OBJECT_VIDEOS_TRANSCODERS' => array(),
             'OBJECT_VIDEOS_TRANSCODERS' => array(),
         	'OBJECT_REPORTS' => 'bx_polls',
         	'OBJECT_REPORTS' => 'bx_polls',
             'OBJECT_VIEWS' => 'bx_polls',
             'OBJECT_VIEWS' => 'bx_polls',

+ 4 - 2
modules/boonex/polls/install/sql/install.sql

@@ -192,11 +192,13 @@ INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `
 
 
 INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
 INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
 ('bx_polls_preview', 'bx_polls_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_polls_files";}', 'no', '1', '2592000', '0'),
 ('bx_polls_preview', 'bx_polls_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_polls_files";}', 'no', '1', '2592000', '0'),
-('bx_polls_gallery', 'bx_polls_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_polls_files";}', 'no', '1', '2592000', '0');
+('bx_polls_gallery', 'bx_polls_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_polls_files";}', 'no', '1', '2592000', '0'),
+('bx_polls_cover', 'bx_polls_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_polls_files";}', 'no', '1', '2592000', '0');
 
 
 INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
 INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
 ('bx_polls_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
 ('bx_polls_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
-('bx_polls_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
+('bx_polls_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_polls_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0');
 
 
 
 
 -- FORMS
 -- FORMS

+ 3 - 3
modules/boonex/polls/install/sql/uninstall.sql

@@ -7,9 +7,9 @@ DROP TABLE IF EXISTS `bx_polls_entries`, `bx_polls_subentries`, `bx_polls_files`
 DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_polls_files' OR `object` = 'bx_polls_photos_resized';
 DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_polls_files' OR `object` = 'bx_polls_photos_resized';
 DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_polls_files' OR `object` = 'bx_polls_photos_resized';
 DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_polls_files' OR `object` = 'bx_polls_photos_resized';
 
 
-DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_polls_preview', 'bx_polls_gallery');
-DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_polls_preview', 'bx_polls_gallery');
-DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_polls_preview', 'bx_polls_gallery');
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_polls_preview', 'bx_polls_gallery', 'bx_polls_cover');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_polls_preview', 'bx_polls_gallery', 'bx_polls_cover');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_polls_preview', 'bx_polls_gallery', 'bx_polls_cover');
 
 
 
 
 -- FORMS
 -- FORMS

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

@@ -69,6 +69,7 @@ class BxPostsConfig extends BxBaseModTextConfig
             'OBJECT_STORAGE' => 'bx_posts_files',
             'OBJECT_STORAGE' => 'bx_posts_files',
             'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_posts_preview',
             'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_posts_preview',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_posts_gallery',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_posts_gallery',
+        	'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_posts_cover',
             'OBJECT_VIDEOS_TRANSCODERS' => array(),
             'OBJECT_VIDEOS_TRANSCODERS' => array(),
         	'OBJECT_REPORTS' => 'bx_posts',
         	'OBJECT_REPORTS' => 'bx_posts',
             'OBJECT_VIEWS' => 'bx_posts',
             'OBJECT_VIEWS' => 'bx_posts',

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

@@ -171,11 +171,13 @@ INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `
 
 
 INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
 INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
 ('bx_posts_preview', 'bx_posts_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_posts_files";}', 'no', '1', '2592000', '0'),
 ('bx_posts_preview', 'bx_posts_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_posts_files";}', 'no', '1', '2592000', '0'),
-('bx_posts_gallery', 'bx_posts_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_posts_files";}', 'no', '1', '2592000', '0');
+('bx_posts_gallery', 'bx_posts_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_posts_files";}', 'no', '1', '2592000', '0'),
+('bx_posts_cover', 'bx_posts_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_posts_files";}', 'no', '1', '2592000', '0');
 
 
 INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
 INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
 ('bx_posts_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
 ('bx_posts_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
-('bx_posts_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
+('bx_posts_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_posts_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0');
 
 
 -- FORMS
 -- FORMS
 
 

+ 3 - 3
modules/boonex/posts/install/sql/uninstall.sql

@@ -8,9 +8,9 @@ DROP TABLE IF EXISTS `bx_posts_posts`, `bx_posts_files`, `bx_posts_photos_resize
 DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_posts_files' OR `object` = 'bx_posts_photos_resized';
 DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_posts_files' OR `object` = 'bx_posts_photos_resized';
 DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_posts_files' OR `object` = 'bx_posts_photos_resized';
 DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_posts_files' OR `object` = 'bx_posts_photos_resized';
 
 
-DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_posts_preview', 'bx_posts_gallery');
-DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_posts_preview', 'bx_posts_gallery');
-DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_posts_preview', 'bx_posts_gallery');
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_posts_preview', 'bx_posts_gallery', 'bx_posts_cover');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_posts_preview', 'bx_posts_gallery', 'bx_posts_cover');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_posts_preview', 'bx_posts_gallery', 'bx_posts_cover');
 
 
 -- FORMS
 -- FORMS
 
 

+ 1 - 0
modules/boonex/snipcart/classes/BxSnipcartConfig.php

@@ -73,6 +73,7 @@ class BxSnipcartConfig extends BxBaseModTextConfig
             'OBJECT_STORAGE' => 'bx_snipcart_files',
             'OBJECT_STORAGE' => 'bx_snipcart_files',
             'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_snipcart_preview',
             'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_snipcart_preview',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_snipcart_gallery',
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_snipcart_gallery',
+        	'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_snipcart_cover',
             'OBJECT_VIDEOS_TRANSCODERS' => array(),
             'OBJECT_VIDEOS_TRANSCODERS' => array(),
         	'OBJECT_REPORTS' => 'bx_snipcart',
         	'OBJECT_REPORTS' => 'bx_snipcart',
             'OBJECT_VIEWS' => 'bx_snipcart',
             'OBJECT_VIEWS' => 'bx_snipcart',

+ 4 - 2
modules/boonex/snipcart/install/sql/install.sql

@@ -176,11 +176,13 @@ INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `
 
 
 INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
 INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
 ('bx_snipcart_preview', 'bx_snipcart_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_snipcart_files";}', 'no', '1', '2592000', '0'),
 ('bx_snipcart_preview', 'bx_snipcart_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_snipcart_files";}', 'no', '1', '2592000', '0'),
-('bx_snipcart_gallery', 'bx_snipcart_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_snipcart_files";}', 'no', '1', '2592000', '0');
+('bx_snipcart_gallery', 'bx_snipcart_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_snipcart_files";}', 'no', '1', '2592000', '0'), 
+('bx_snipcart_cover', 'bx_snipcart_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_snipcart_files";}', 'no', '1', '2592000', '0');
 
 
 INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
 INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
 ('bx_snipcart_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
 ('bx_snipcart_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
-('bx_snipcart_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
+('bx_snipcart_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_snipcart_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0');
 
 
 -- FORMS
 -- FORMS
 INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
 INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 

+ 3 - 3
modules/boonex/snipcart/install/sql/uninstall.sql

@@ -7,9 +7,9 @@ DROP TABLE IF EXISTS `bx_snipcart_entries`, `bx_snipcart_settings`, `bx_snipcart
 DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_snipcart_files' OR `object` = 'bx_snipcart_photos_resized';
 DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_snipcart_files' OR `object` = 'bx_snipcart_photos_resized';
 DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_snipcart_files' OR `object` = 'bx_snipcart_photos_resized';
 DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_snipcart_files' OR `object` = 'bx_snipcart_photos_resized';
 
 
-DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_snipcart_preview', 'bx_snipcart_gallery');
-DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_snipcart_preview', 'bx_snipcart_gallery');
-DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_snipcart_preview', 'bx_snipcart_gallery');
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_snipcart_preview', 'bx_snipcart_gallery', 'bx_snipcart_cover');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_snipcart_preview', 'bx_snipcart_gallery', 'bx_snipcart_cover');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_snipcart_preview', 'bx_snipcart_gallery', 'bx_snipcart_cover');
 
 
 
 
 -- FORMS
 -- FORMS