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

+ 4 - 2
modules/base/text/classes/BxBaseModTextConfig.php

@@ -15,8 +15,10 @@ class BxBaseModTextConfig extends BxBaseModGeneralConfig
 
     /**
      * Determine whether Timeline post will use common content (header image + text)
-     * or content received from attachments (header image + images + videos + polls + text).
-     * By default the first variant is used.
+     * or content received from attachments (header image + text + images + videos + polls).
+     * By default the first variant is used. 
+     * Note. The variable can be removed in future, when all Text Based modules 
+     * implement 'attachments' related parameters. 
      */
     protected $_bAttachmentsInTimeline;
 

+ 6 - 10
modules/base/text/classes/BxBaseModTextModule.php

@@ -295,11 +295,11 @@ class BxBaseModTextModule extends BxBaseModGeneralModule implements iBxDolConten
 
     
     // ====== PROTECTED METHODS
-    protected function _getImagesForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams = array())
+    protected function _getImagesForTimelinePostAttach($aEvent, $aContentInfo, $sUrl, $aBrowseParams = array())
     {
         $CNF = &$this->_oConfig->CNF;
 
-        $aResults = parent::_getImagesForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams);
+        $aResults = parent::_getImagesForTimelinePostAttach($aEvent, $aContentInfo, $sUrl, $aBrowseParams);
         if(!$this->_oConfig->isAttachmentsInTimeline() || empty($CNF['OBJECT_STORAGE_PHOTOS']) || empty($CNF['OBJECT_IMAGES_TRANSCODER_GALLERY_PHOTOS']))
             return $aResults;
 
@@ -326,15 +326,14 @@ class BxBaseModTextModule extends BxBaseModGeneralModule implements iBxDolConten
 
         return $aResults;
     }
-    
-    protected function _getVideosForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams = array())
+
+    protected function _getVideosForTimelinePostAttach($aEvent, $aContentInfo, $sUrl, $aBrowseParams = array())
     {
         $CNF = &$this->_oConfig->CNF;
 
-        $iMaxNumber = 1;
-
+        $aResults = parent::_getVideosForTimelinePostAttach($aEvent, $aContentInfo, $sUrl, $aBrowseParams); 
         if(!$this->_oConfig->isAttachmentsInTimeline() || empty($CNF['OBJECT_STORAGE_VIDEOS']) || empty($CNF['OBJECT_VIDEOS_TRANSCODERS']))
-            return parent::_getVideosForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams);
+            return $aResults;
 
         $iContentId = (int)$aContentInfo[$CNF['FIELD_ID']];
         $oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE_VIDEOS']);
@@ -343,9 +342,6 @@ class BxBaseModTextModule extends BxBaseModGeneralModule implements iBxDolConten
         if(!$aGhostFiles)
             return array();
 
-        if($iMaxNumber > 0)
-            $aGhostFiles = array_slice($aGhostFiles, 0, $iMaxNumber);
-
         $oTcPoster = BxDolTranscoderVideo::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['poster']);
         $oTcMp4 = BxDolTranscoderVideo::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4']);
         $oTcWebm = BxDolTranscoderVideo::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['webm']);

+ 2 - 0
modules/base/text/template/css/polls.css

@@ -59,6 +59,8 @@
 .bx-base-text-polls-showcase .bx-base-text-poll {
     position: relative;
     width: 100%;
+    padding-top: 0;
+    padding-bottom: 0;
 }
 
 /* Media: phone2 */