mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Make config editable via template event
This commit is contained in:
parent
14fcafc483
commit
61c835cd38
@ -21,22 +21,24 @@
|
|||||||
'chat.error.reload': '{lang}chat.error.reload{/lang}'
|
'chat.error.reload': '{lang}chat.error.reload{/lang}'
|
||||||
});
|
});
|
||||||
|
|
||||||
{event name='beforeInit'}
|
|
||||||
|
|
||||||
// Boot the chat
|
// Boot the chat
|
||||||
{if MODULE_SMILEY}WCF.TabMenu.init();{/if}
|
{if MODULE_SMILEY}WCF.TabMenu.init();{/if}
|
||||||
new WCF.Message.Smilies();
|
new WCF.Message.Smilies();
|
||||||
{capture assign='messageTemplate'}{include application='chat' file='message'}{/capture}
|
{capture assign='messageTemplate'}{include application='chat' file='message'}{/capture}
|
||||||
{capture assign='userTemplate'}{include application='chat' file='userListUser'}{/capture}
|
{capture assign='userTemplate'}{include application='chat' file='userListUser'}{/capture}
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
reloadTime: {@CHAT_RELOADTIME},
|
||||||
|
messageURL: '{link application="chat" controller="NewMessages"}{/link}',
|
||||||
|
installedCommands: [ {implode from=$commands item='command'}'{$command|encodeJS}'{/implode} ],
|
||||||
|
messageTypes: { {implode from=$messageTypes key='name' item='messageType'}'{$name|substr:5|encodeJS}': '{$messageType|encodeJS}'{/implode} }
|
||||||
|
};
|
||||||
|
|
||||||
|
{event name='beforeInit'}
|
||||||
|
|
||||||
be.bastelstu.Chat.init(
|
be.bastelstu.Chat.init(
|
||||||
{$roomID},
|
{$roomID},
|
||||||
{
|
config,
|
||||||
reloadTime: {@CHAT_RELOADTIME},
|
|
||||||
messageURL: '{link application="chat" controller="NewMessages"}{/link}',
|
|
||||||
installedCommands: [ {implode from=$commands item='command'}'{$command|encodeJS}'{/implode} ],
|
|
||||||
messageTypes: { {implode from=$messageTypes key='name' item='messageType'}'{$name|substr:5|encodeJS}': '{$messageType|encodeJS}'{/implode} }
|
|
||||||
},
|
|
||||||
new WCF.Template('{literal}{if $newMessageCount}({#$newMessageCount}) {/if}{$title} - {/literal}{"chat.general.title"|language|encodeJS} - {PAGE_TITLE|language|encodeJS}'),
|
new WCF.Template('{literal}{if $newMessageCount}({#$newMessageCount}) {/if}{$title} - {/literal}{"chat.general.title"|language|encodeJS} - {PAGE_TITLE|language|encodeJS}'),
|
||||||
new WCF.Template('{@$messageTemplate|encodeJS}'),
|
new WCF.Template('{@$messageTemplate|encodeJS}'),
|
||||||
new WCF.Template('{@$userTemplate|encodeJS}')
|
new WCF.Template('{@$userTemplate|encodeJS}')
|
||||||
|
Loading…
Reference in New Issue
Block a user