Mchat with Messenger Function
Posted: 13 May 2010, 11:16
Mchat with Messenger Function
Written by Stoker
Here on this board I have modified the Mchat with a messenger function.
This means that you can jump to a new line using the keyboard combination SHIFT + ENTER, like when chatting on messenger.
Open mchat_body.html
Find:
Add after:
Find:
Replace with:
Open mchat/mchat_prosilver.css
Find:
Replace with:
Find:
Replace with:
Thats it, upload the changed file and refresh the template.
Written by Stoker
Here on this board I have modified the Mchat with a messenger function.
This means that you can jump to a new line using the keyboard combination SHIFT + ENTER, like when chatting on messenger.
Open mchat_body.html
Find:
Code: Select all
var mChatFocusFix = true;
Code: Select all
function foo(e) {
if (!e.shiftKey && e.keyCode==13) {
mChat.add();
if (e.preventDefault) e.preventDefault();
if (e.stopPropagation) e.stopPropagation();
e.cancelBubble = true;
e.returnValue = false;
}
}
Code: Select all
<input type="text" tabindex="1" name="message" class="mChatText" id="mChatMessage" />
Code: Select all
<textarea tabindex="1" onkeydown="foo(event)" name="message" id="mChatMessage" class="mChatText"></textarea><br />
Find:
Code: Select all
input.mChatText
Code: Select all
textarea.mChatText
Code: Select all
input.mChatText:hover
Code: Select all
textarea.mChatText:hover