Use alignment in video and audio
authorCyperghost <olaf_schmitz_1@t-online.de>
Thu, 11 Apr 2024 09:42:16 +0000 (11:42 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Thu, 11 Apr 2024 09:42:16 +0000 (11:42 +0200)
wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteMediaBBCode.class.php

index 71e381dcf03c0e6c4dad80224648d53c383bb470..90d9a6984dd8287aa4afceca901b5ec39d5e5450 100644 (file)
@@ -57,9 +57,10 @@ final class WoltLabSuiteMediaBBCode extends AbstractBBCode
             }
 
             if ($parser->getOutputType() == 'text/html') {
+                $float = (!empty($openingTag['attributes'][2])) ? $openingTag['attributes'][2] : 'none';
+
                 if ($media->isImage) {
                     $thumbnailSize = (!empty($openingTag['attributes'][1])) ? $openingTag['attributes'][1] : 'original';
-                    $float = (!empty($openingTag['attributes'][2])) ? $openingTag['attributes'][2] : 'none';
                     $width = (!empty($openingTag['attributes'][3])) ? $openingTag['attributes'][3] : 'auto';
 
                     return WCF::getTPL()->fetch('mediaBBCodeTag', 'wcf', [
@@ -78,7 +79,7 @@ final class WoltLabSuiteMediaBBCode extends AbstractBBCode
                     return WCF::getTPL()->fetch('mediaBBCodeTag', 'wcf', [
                         'mediaLink' => $this->getLink($media),
                         'removeLinks' => $removeLinks,
-                        'float' => 'none',
+                        'float' => $float,
                         'media' => $media->getLocalizedVersion(MessageEmbeddedObjectManager::getInstance()->getActiveMessageLanguageID()),
                         'width' => 'auto',
                     ]);