mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Adding chatMessage-Template
This commit is contained in:
parent
ca2d596d31
commit
725a94aeb2
@ -207,7 +207,10 @@
|
||||
{foreach from=$newestMessages item='message'}
|
||||
<li>
|
||||
{* 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'}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
@ -266,6 +269,11 @@
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
TimWolla.WCF.Chat.titleTemplate = new WCF.Template('{ldelim}$title} - {'wcf.chat.title'|language|encodeJS} - {PAGE_TITLE|language|encodeJS}');
|
||||
{capture assign='time'}{literal}{@$time}{/literal}{/capture}
|
||||
{capture assign='username'}{literal}{@$username}{/literal}{/capture}
|
||||
{capture assign='message'}{literal}{@$message}{/literal}{/capture}
|
||||
{capture assign='chatMessageTemplate'}{include file='chatMessage'}{/capture}
|
||||
TimWolla.WCF.Chat.messageTemplate = new WCF.Template('{$chatMessageTemplate|encodeJS}');
|
||||
TimWolla.WCF.Chat.init({$room->roomID}, 1);
|
||||
//]]>
|
||||
</script>
|
||||
|
1
template/chatMessage.tpl
Normal file
1
template/chatMessage.tpl
Normal file
@ -0,0 +1 @@
|
||||
{@$time} {@$username}{@$message}
|
Loading…
Reference in New Issue
Block a user