{if $articleContent->getImage() && $articleContent->getImage()->hasThumbnail('large')}
getDiscussionProvider()->renderDiscussions()}
+
+
{include file='footer'}
diff --git a/wcfsetup/install/files/lib/data/article/content/ArticleContent.class.php b/wcfsetup/install/files/lib/data/article/content/ArticleContent.class.php
index 55f5de3e62d..eb3006b08f2 100644
--- a/wcfsetup/install/files/lib/data/article/content/ArticleContent.class.php
+++ b/wcfsetup/install/files/lib/data/article/content/ArticleContent.class.php
@@ -5,6 +5,7 @@
use wcf\data\article\Article;
use wcf\data\attachment\Attachment;
use wcf\data\CollectionDatabaseObject;
+use wcf\data\IMessage;
use wcf\data\ITitledLinkObject;
use wcf\data\language\Language;
use wcf\data\media\ViewableMedia;
@@ -42,7 +43,7 @@
*
* @extends CollectionDatabaseObject
*/
-class ArticleContent extends CollectionDatabaseObject implements ITitledLinkObject, IRouteController
+class ArticleContent extends CollectionDatabaseObject implements IMessage, ITitledLinkObject, IRouteController
{
/**
* @inheritDoc
@@ -138,6 +139,78 @@ public function getArticle(): Article
return $this->getCollection()->getArticle($this);
}
+ /**
+ * @since 6.3
+ */
+ #[\Override]
+ public function getExcerpt(int $maxLength = 255): string
+ {
+ return StringUtil::truncateHTML($this->getSimplifiedFormattedContent(), $maxLength);
+ }
+
+ /**
+ * @since 6.3
+ */
+ #[\Override]
+ public function getFormattedMessage(): string
+ {
+ return $this->getFormattedContent();
+ }
+
+ /**
+ * @since 6.3
+ */
+ #[\Override]
+ public function getMessage(): string
+ {
+ return $this->content ?? '';
+ }
+
+ /**
+ * @since 6.3
+ */
+ #[\Override]
+ public function isVisible(): bool
+ {
+ return $this->getArticle()->canRead();
+ }
+
+ /**
+ * @since 6.3
+ */
+ #[\Override]
+ public function getTime(): int
+ {
+ return $this->getArticle()->getTime();
+ }
+
+ /**
+ * @since 6.3
+ */
+ #[\Override]
+ public function getUserID(): ?int
+ {
+ return $this->getArticle()->getUserID();
+ }
+
+ /**
+ * @since 6.3
+ */
+ #[\Override]
+ public function getUsername(): string
+ {
+ return $this->getArticle()->getUsername();
+ }
+
+ /**
+ * @since 6.3
+ */
+ #[\Override]
+ public function __toString(): string
+ {
+ return $this->getFormattedContent();
+ }
+
/**
* Returns the language of this article content or `null` if no language has been specified.
*/
diff --git a/wcfsetup/install/files/lib/system/message/quote/ArticleContentMessageQuoteHandler.class.php b/wcfsetup/install/files/lib/system/message/quote/ArticleContentMessageQuoteHandler.class.php
new file mode 100644
index 00000000000..2456e7312d9
--- /dev/null
+++ b/wcfsetup/install/files/lib/system/message/quote/ArticleContentMessageQuoteHandler.class.php
@@ -0,0 +1,32 @@
+
+ * @since 6.3
+ */
+final class ArticleContentMessageQuoteHandler extends AbstractMessageQuoteHandler
+{
+ #[\Override]
+ public function getMessage(int $objectID): ?IMessage
+ {
+ $articleContent = new ArticleContent($objectID);
+ if ($articleContent->isNil()) {
+ return null;
+ }
+
+ if (!$articleContent->isVisible()) {
+ return null;
+ }
+
+ return $articleContent;
+ }
+}