AntonLV 9 роки тому
батько
коміт
62f3bd03b0

+ 1 - 0
modules/boonex/timeline/classes/BxTimelineConfig.php

@@ -88,6 +88,7 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
         	'storage_videos' => $this->_sName . '_videos',
         	'transcoder_photos_preview' => $this->_sName . '_photos_preview',
         	'transcoder_photos_view' => $this->_sName . '_photos_view',
+        	'transcoder_photos_big' => $this->_sName . '_photos_big',
         	'transcoder_videos_poster' => $this->_sName . '_videos_poster',
         	'transcoder_videos_mp4' => $this->_sName . '_videos_mp4',
         	'transcoder_videos_webm' => $this->_sName . '_videos_webm',

+ 4 - 5
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -1113,18 +1113,17 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
                 $aPhotos = $this->_oDb->getMedia(BX_TIMELINE_MEDIA_PHOTO, $aEvent['id']);
                 if(!empty($aPhotos) && is_array($aPhotos)) {
-                    $oStorage = BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_photos'));
-
                     $oTranscoder = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_view'));
+                    $oTranscoderBig = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_big'));
 
                     foreach($aPhotos as $iPhotoId) {
-                        $sPhotoSrcOrig = $oStorage->getFileUrlById($iPhotoId);
+                        $sPhotoSrcBig = $oTranscoderBig->getFileUrl($iPhotoId);
 
                         $aResult['content']['images'][] = array(
                             'src' => $oTranscoder->getFileUrl($iPhotoId),
-                            'src_orig' => $sPhotoSrcOrig,
+                            'src_orig' => $sPhotoSrcBig,
                             'title' => '',
-                            'onclick' => $sJsObject . '.showPhoto(this, \'' . $sPhotoSrcOrig . '\')'
+                            'onclick' => $sJsObject . '.showPhoto(this, \'' . $sPhotoSrcBig . '\')'
                         );
                     }
                 }

+ 1 - 0
modules/boonex/timeline/install/config.php

@@ -70,6 +70,7 @@ $aConfig = array(
     'transcoders' => array(
     	'bx_timeline_photos_preview',
     	'bx_timeline_photos_view',
+        'bx_timeline_photos_big',
     	'bx_timeline_videos_poster',
     	'bx_timeline_videos_mp4',
     	'bx_timeline_videos_webm'

+ 2 - 0
modules/boonex/timeline/install/sql/install.sql

@@ -258,6 +258,7 @@ 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`, `override_class_name`, `override_class_file`) VALUES
 ('bx_timeline_photos_preview', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
 ('bx_timeline_photos_view', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
+('bx_timeline_photos_big', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
 
 ('bx_timeline_videos_poster', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
 ('bx_timeline_videos_mp4', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
@@ -266,6 +267,7 @@ INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`,
 INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES
 ('bx_timeline_photos_preview', 'Resize', 'a:3:{s:1:"w";s:3:"100";s:1:"h";s:3:"100";s:13:"square_resize";s:1:"1";}', '0'),
 ('bx_timeline_photos_view', 'Resize', 'a:3:{s:1:"w";s:3:"318";s:1:"h";s:3:"318";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_timeline_photos_big', 'Resize', 'a:2:{s:1:"w";s:4:"1280";s:1:"h";s:4:"1280";}', '0'),
 
 ('bx_timeline_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
 ('bx_timeline_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),

+ 5 - 0
modules/boonex/timeline/js/post.js

@@ -223,6 +223,7 @@ BxTimelinePost.prototype._onGetPost = function(oData) {
 	if(!$.trim(oData.item).length) 
 		return;
 
+	var $this = this;
 	var oView = $('#' + this._aHtmlIds['main_' + oData.view]);
 
 	var oLoadMore = oView.find('.' + this.sSP + '-load-more');
@@ -249,12 +250,16 @@ BxTimelinePost.prototype._onGetPost = function(oData) {
 			oItem = bDivider ? oDivider.after(oContent).next('.' + this.sClassItem + ':hidden') : oContent.prependTo(oItems);
 			oItem.bx_anim('show', this._sAnimationEffect, this._iAnimationSpeed, function() {
 				$(this).find('a.bx-link').dolConverLinks();
+
+				$this.initFlickity();
 			});
 			break;
 
 		case 'outline':
 			this.prependMasonry(oContent, function(oItems) {
 				$(oItems).find('a.bx-link').dolConverLinks();
+
+				$this.initFlickity();
 			});
 			break;
 	}