From dfecaf598702e8ee64cbebf0165a98eec824d6c0 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 28 Jul 2016 11:05:01 +0200 Subject: [PATCH] Added message preview buttons --- files/lib/page/ConversationPage.class.php | 2 +- templates/conversationAdd.tpl | 2 +- templates/conversationMessageInlineEditor.tpl | 6 +++++- templates/conversationQuickReply.tpl | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/files/lib/page/ConversationPage.class.php b/files/lib/page/ConversationPage.class.php index 25abb67..bfdaf18 100644 --- a/files/lib/page/ConversationPage.class.php +++ b/files/lib/page/ConversationPage.class.php @@ -257,7 +257,7 @@ class ConversationPage extends MultipleLinkPage { 'permissionCanUseSmilies' => 'user.message.canUseSmilies' ]); - BBCodeHandler::getInstance()->setAllowedBBCodes(explode(',', WCF::getSession()->getPermission('user.message.allowedBBCodes'))); + BBCodeHandler::getInstance()->setDisallowedBBCodes(explode(',', WCF::getSession()->getPermission('user.message.disallowedBBCodes'))); } /** diff --git a/templates/conversationAdd.tpl b/templates/conversationAdd.tpl index 1e5c717..db9b381 100644 --- a/templates/conversationAdd.tpl +++ b/templates/conversationAdd.tpl @@ -125,7 +125,7 @@
- {include file='messageFormPreviewButton'} + {include file='messageFormPreviewButton' previewMessageObjectType='com.woltlab.wcf.conversation.message' previewMessageObjectID=0} {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/templates/conversationMessageInlineEditor.tpl b/templates/conversationMessageInlineEditor.tpl index b837163..79fd56b 100644 --- a/templates/conversationMessageInlineEditor.tpl +++ b/templates/conversationMessageInlineEditor.tpl @@ -1,5 +1,6 @@ +{capture assign='wysiwygSelector'}messageEditor{@$message->messageID}{/capture}
- @@ -8,6 +9,9 @@
+ + {include file='messageFormPreviewButton' previewMessageFieldID=$wysiwygSelector previewButtonID=$wysiwygSelector|concat:'_PreviewButton' previewMessageObjectType='com.woltlab.wcf.conversation.message' previewMessageObjectID=$message->messageID} +
diff --git a/templates/conversationQuickReply.tpl b/templates/conversationQuickReply.tpl index f8903bd..6e31837 100644 --- a/templates/conversationQuickReply.tpl +++ b/templates/conversationQuickReply.tpl @@ -18,6 +18,7 @@
-- 2.20.1