From cfa7ce79a90a3809ca0088496a13b3afe048dc01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 27 Dec 2011 14:21:06 +0100 Subject: [PATCH] Adding separator --- file/lib/data/chat/message/ChatMessage.class.php | 1 + template/chatMessage.tpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/file/lib/data/chat/message/ChatMessage.class.php b/file/lib/data/chat/message/ChatMessage.class.php index a94bdce..ac50043 100755 --- a/file/lib/data/chat/message/ChatMessage.class.php +++ b/file/lib/data/chat/message/ChatMessage.class.php @@ -103,6 +103,7 @@ public function jsonify($raw = false) { 'formattedUsername' => $this->getFormattedUsername(), 'formattedMessage' => (string) $this, 'formattedTime' => \wcf\util\DateUtil::format(\wcf\util\DateUtil::getDateTimeByTimestamp($this->time), 'H:i:s'), + 'separator' => ($this->type == self::TYPE_NORMAL) ? ': ' : ' ', 'sender' => $this->sender, 'username' => $this->getUsername(), 'time' => $this->time, diff --git a/template/chatMessage.tpl b/template/chatMessage.tpl index 466534a..b3566fb 100644 --- a/template/chatMessage.tpl +++ b/template/chatMessage.tpl @@ -1 +1 @@ -{literal}
{@$formattedUsername}
{@$formattedMessage}
{/literal} +{literal}
{@$formattedUsername}{$separator}
{@$formattedMessage}
{/literal}