From 725a94aeb23e70ce6c3e906a321b7405da665ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 4 Dec 2011 23:12:12 +0100 Subject: [PATCH] Adding chatMessage-Template --- template/chat.tpl | 10 +++++++++- template/chatMessage.tpl | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 template/chatMessage.tpl diff --git a/template/chat.tpl b/template/chat.tpl index 66153bf..65feaa2 100644 --- a/template/chat.tpl +++ b/template/chat.tpl @@ -207,7 +207,10 @@ {foreach from=$newestMessages item='message'}
  • {* TODO: Use an own time-function to display a short timestamp *} - {@$message->time|time} {@$message->getFormattedUsername()} {@$message->getFormattedMessage()} + {assign var='time' value=$message->time|time} + {assign var='username' value=$message->getFormattedUsername()|concat:': '} + {assign var='message' value=$message->getFormattedMessage()} + {include file='chatMessage'}
  • {/foreach} @@ -266,6 +269,11 @@ diff --git a/template/chatMessage.tpl b/template/chatMessage.tpl new file mode 100644 index 0000000..1135bef --- /dev/null +++ b/template/chatMessage.tpl @@ -0,0 +1 @@ +{@$time} {@$username}{@$message}