Rename template for bbcode wsa(article)
authorCyperghost <olaf_schmitz_1@t-online.de>
Mon, 29 Jan 2024 10:51:05 +0000 (11:51 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Mon, 29 Jan 2024 10:51:05 +0000 (11:51 +0100)
com.woltlab.wcf/templates/shared_articleBBCode.tpl [deleted file]
com.woltlab.wcf/templates/shared_bbcode_wsa.tpl [new file with mode: 0644]
wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteArticleBBCode.class.php

diff --git a/com.woltlab.wcf/templates/shared_articleBBCode.tpl b/com.woltlab.wcf/templates/shared_articleBBCode.tpl
deleted file mode 100644 (file)
index d0445d0..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<article class="articleEmbeddedEntry embeddedContent" aria-labelledby="{$titleHash}_entryTitle{$article->articleID}">
-       <div class="embeddedContentLink">
-               <img
-                       class="embeddedContentImageElement"
-                       src="{if $article->getTeaserImage()}{$article->getTeaserImage()->getThumbnailLink('medium')}{else}{$__wcf->getStyleHandler()->getStyle()->getCoverPhotoURL()}{/if}"
-                       height="{if $article->getTeaserImage()}{$article->getTeaserImage()->getThumbnailHeight('medium')}{else}{$__wcf->getStyleHandler()->getStyle()->getCoverPhotoHeight()}{/if}"
-                       width="{if $article->getTeaserImage()}{$article->getTeaserImage()->getThumbnailWidth('medium')}{else}{$__wcf->getStyleHandler()->getStyle()->getCoverPhotoWidth()}{/if}"
-                       loading="lazy"
-                       alt="">
-
-               <div class="embeddedContentCategory">{lang}wcf.article.bbcode.type{/lang}</div>
-               
-               <h3 class="embeddedContentTitle" id="{$titleHash}_articleTitle{$article->articleID}">
-                       <a href="{$article->getLink()}" class="embeddedContentTitleLink">{$article->getTitle()}</a>
-               </h3>
-               
-               <div class="embeddedContentDescription">
-                       {@$article->getFormattedTeaser()}
-               </div>
-       </div>
-       
-       <div class="embeddedContentMeta">
-               <div class="embeddedContentMetaImage">
-                       {@$article->getUserProfile()->getAvatar()->getImageTag(32)}
-               </div>
-               
-               <div class="embeddedContentMetaContent">
-                       <div class="embeddedContentMetaAuthor">
-                               {@$article->getUserProfile()->getFormattedUsername()}
-                       </div>
-                       
-                       <div class="embeddedContentMetaTime">
-                               {time time=$article->time}
-                       </div>
-               </div>
-       </div>
-</article>
diff --git a/com.woltlab.wcf/templates/shared_bbcode_wsa.tpl b/com.woltlab.wcf/templates/shared_bbcode_wsa.tpl
new file mode 100644 (file)
index 0000000..d0445d0
--- /dev/null
@@ -0,0 +1,37 @@
+<article class="articleEmbeddedEntry embeddedContent" aria-labelledby="{$titleHash}_entryTitle{$article->articleID}">
+       <div class="embeddedContentLink">
+               <img
+                       class="embeddedContentImageElement"
+                       src="{if $article->getTeaserImage()}{$article->getTeaserImage()->getThumbnailLink('medium')}{else}{$__wcf->getStyleHandler()->getStyle()->getCoverPhotoURL()}{/if}"
+                       height="{if $article->getTeaserImage()}{$article->getTeaserImage()->getThumbnailHeight('medium')}{else}{$__wcf->getStyleHandler()->getStyle()->getCoverPhotoHeight()}{/if}"
+                       width="{if $article->getTeaserImage()}{$article->getTeaserImage()->getThumbnailWidth('medium')}{else}{$__wcf->getStyleHandler()->getStyle()->getCoverPhotoWidth()}{/if}"
+                       loading="lazy"
+                       alt="">
+
+               <div class="embeddedContentCategory">{lang}wcf.article.bbcode.type{/lang}</div>
+               
+               <h3 class="embeddedContentTitle" id="{$titleHash}_articleTitle{$article->articleID}">
+                       <a href="{$article->getLink()}" class="embeddedContentTitleLink">{$article->getTitle()}</a>
+               </h3>
+               
+               <div class="embeddedContentDescription">
+                       {@$article->getFormattedTeaser()}
+               </div>
+       </div>
+       
+       <div class="embeddedContentMeta">
+               <div class="embeddedContentMetaImage">
+                       {@$article->getUserProfile()->getAvatar()->getImageTag(32)}
+               </div>
+               
+               <div class="embeddedContentMetaContent">
+                       <div class="embeddedContentMetaAuthor">
+                               {@$article->getUserProfile()->getFormattedUsername()}
+                       </div>
+                       
+                       <div class="embeddedContentMetaTime">
+                               {time time=$article->time}
+                       </div>
+               </div>
+       </div>
+</article>
index 60d1091dd22fade947fd3608aadc3bfecc9a0ca2..003f9769fce7fa33118e381a5500950c260f90bf 100644 (file)
@@ -40,7 +40,7 @@ final class WoltLabSuiteArticleBBCode extends AbstractBBCode
                 'message' => WCF::getLanguage()->getDynamicVariable('wcf.message.content.no.permission.title')
             ], true);
         } elseif ($parser->getOutputType() == 'text/html') {
-            return WCF::getTPL()->fetch('shared_articleBBCode', 'wcf', [
+            return WCF::getTPL()->fetch('shared_bbcode_wsa', 'wcf', [
                 'article' => $article,
                 'articleID' => $article->articleID,
                 'titleHash' => \substr(StringUtil::getRandomID(), 0, 8),