Show off your AJAX Chat

2,481 views
Skip to first unread message

AJAX-chat

unread,
Jan 28, 2014, 1:02:11 PM1/28/14
to ajax...@googlegroups.com
Use this thread to post a link and show off your implementation of AJAX Chat.

Feel free to have some discussion, but don't derail too much so we can keep this thread on topic.

Toff DS

unread,
Feb 5, 2014, 6:24:26 PM2/5/14
to ajax...@googlegroups.com, ajax...@googlegroups.com

Wise Frog

unread,
Feb 6, 2014, 9:54:14 AM2/6/14
to ajax...@googlegroups.com, ajax...@googlegroups.com


I could swear i added my post an site to this thread. where is it? I am also surprised no one is using it

FireWire

unread,
Feb 6, 2014, 11:07:06 AM2/6/14
to ajax...@googlegroups.com
Hi.

You posted your site info in this thread: https://groups.google.com/forum/#!topic/ajax-chat/R97gA6kF6qE
which was started by SyN. But Frug made a new thread as a sticky with a better name for long term viewing. So just repost your info from the old thread.

//FireWire

sde wqa

unread,
Mar 2, 2014, 8:53:14 AM3/2/14
to ajax...@googlegroups.com
My 2 chats http://chat.jenkler.se
Find my patches here and feel free to use http://forum.jenkler.se/documentation/ajax-chat-youtube-t33.html

I hope this helps someone ;)
Message has been deleted

3.14...@gmail.com

unread,
Mar 18, 2014, 9:50:04 AM3/18/14
to
Here is my work in progress, currently at http://coinvisitor.com

sde wqa

unread,
Mar 22, 2014, 6:14:41 AM3/22/14
to ajax...@googlegroups.com
Direktlink to forumchat with Prosilver http://forum.jenkler.se

MoXAri Apph

unread,
Mar 30, 2014, 11:09:35 PM3/30/14
to ajax...@googlegroups.com, ajax...@googlegroups.com
I've got my site set up with the chat pretty well, gotta make a few changes sometime later though.

Codon Gamer

unread,
Apr 26, 2014, 1:48:28 PM4/26/14
to ajax...@googlegroups.com, ajax...@googlegroups.com

  techred the,e



On Tuesday, January 28, 2014 1:02:11 PM UTC-5, AJAX-chat wrote:

Ingrid Sedé

unread,
Apr 26, 2014, 11:23:49 PM4/26/14
to ajax...@googlegroups.com
Wow!! ;-)

Wise Frog

unread,
May 5, 2014, 11:29:09 AM5/5/14
to ajax...@googlegroups.com
http://unknownspirit.com/ and http://blackswampradio.net I am about to install all the new stuff syn did soon :)

Wise Frog

unread,
May 15, 2014, 1:04:47 PM5/15/14
to ajax...@googlegroups.com
ok i got my room just about done with every thing added all i need is many members now  hee hee like that is ever going to happen

repentance kim

unread,
Jul 3, 2014, 9:36:42 AM7/3/14
to
hello! ajax chat is really nice sources. Surely, author frug is also very nice.

here is my website using ajax chat, stand alone 0.8 version.  In my case, my ajax chat have quite simple appearence. my web : http://minichat.kr.pe  




2.jpg

Paul Bennis

unread,
Jul 3, 2014, 11:53:55 AM7/3/14
to
I honestly do love this chat script far above any other.  This isn't the first AJAX Chat I've ever assembled for a website, but really like how it's gellin with this one.  Thanks guys!

chat.bizarrca.de


Message has been deleted

Ingrid Sedé

unread,
Aug 19, 2014, 12:46:50 AM8/19/14
to ajax...@googlegroups.com, ajax...@googlegroups.com
I can see that my effort has been deleted. Probably because there was some nudity visible although it hadn't the focus on it.
I was'nt aware of the of the huge impact the imagery would have on the normal people.
Since my customers (i'm a prostitute ) tend to be very normal individuals my guess was that it would be ok.

I'm so deeply sorry for the people i've offended it breaks my hart! 

I was still interested in the socket implementation but i'm leaving this group now.
Gonna build my own Suck-it implementation and i'm not gonna share it. :P

ClubSyNXTremeTV

unread,
Aug 19, 2014, 6:48:41 AM8/19/14
to
Well speaking for myself Ingrid, I have nothing against you or your lifestyle but I really would think a link and a NSFW warning would probably have been a safer solution.

TriCity Torrents

unread,
Aug 25, 2014, 9:17:44 AM8/25/14
to ajax...@googlegroups.com, ajax...@googlegroups.com

Here is our Ajax Chat and hoping to add more to it soon like icons
http://tricitytorrents.com/chat/




On Tuesday, January 28, 2014 1:02:11 PM UTC-5, AJAX-chat wrote:
Message has been deleted

Fabian Wilson

unread,
Aug 25, 2014, 5:35:40 PM8/25/14
to Ravi T, ajax...@googlegroups.com
You should start a new thread instead of posting in an old thread for something else.
Also provide what version of chat you are using and if any mods have been added.


On Mon, Aug 25, 2014 at 3:29 PM, Ravi T <ravi4u...@gmail.com> wrote:
I'm facing problem here. http://ddlivechat.tk/ i can't see any messages nor chatbot is working. 
After installing ajax chat, there was error with saying extended document at the end of the document. So i added $config['contentType'] = 'text/html'; in config.php
And also online users is showing blank. Where did i made mistake in installing. Someone please guide me with the problem.


On Tuesday, January 28, 2014 11:32:11 PM UTC+5:30, AJAX-chat wrote:
Use this thread to post a link and show off your implementation of AJAX Chat.

Feel free to have some discussion, but don't derail too much so we can keep this thread on topic.

--
You received this message because you are subscribed to the Google Groups "AJAX-chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ajax-chat+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Mikael Jenkler

unread,
Aug 26, 2014, 5:18:09 AM8/26/14
to
I still waiting for 0.8.8 from http://frug.github.io/AJAX-Chat/ webpage. I will then update my chat at http://forum.jenkler.se. I hope it will be released soon ;)
Message has been deleted

ClubSyNXTremeTV

unread,
Oct 29, 2014, 5:34:50 PM10/29/14
to


Starting over fresh. Moved to the 0.9 testing branch.
The chat is still vanilla but I made my own skin to match my new site in progress.




Message has been deleted

donshakespeare

unread,
Jan 28, 2015, 7:30:51 PM1/28/15
to ajax...@googlegroups.com, ajax...@googlegroups.com
Hello all,

I have written a few tutorials on few of our plugins; so this is how it all looks when put together.
Check out the awesome AJAX Chat in action at Leofec.com. http://www.leofec.com/chat/

The image attached shows the youtube plugin, the gravatar pics (registered user, the bot, and guests), accurate country flag based on IP.

By the way, this is fully integrated with the magnificent MODx Revolution CMS.

Cheers.


AJAXChat.jpg

Halomythfinders S

unread,
Jan 31, 2015, 4:15:45 PM1/31/15
to ajax...@googlegroups.com, ajax...@googlegroups.com

This is my Ajax chat for my SMF forums, This is for a site with more of a bloody theme to it due to what we do (game development -_-) I still have alot I want to accomplish and get done, like adding member groups and stuff

Stephen Gemme

unread,
Mar 13, 2015, 9:56:38 AM3/13/15
to ajax...@googlegroups.com
Surprised I haven't replied to this yet. 

Just rebuilt the chat from scratch because my car club has migrated from a phpBB3 forum to a Drupal-based static website. No longer need to integrate phpBB3 so I built the website up from scratch and likewise the chat room. Still have a few things to implement but here's the logon screen and the in-chat screenshots. 

The Logon screen background is a randomly selected picture from a folder I have hosted on the site, the "Users Currently Online" is my own little snippet that I added so people can view who's around before bothering to sign in. Please excuse all the log in and outs of the admin profile, I took these screenshots while I was testing on the new website. 

Miles

unread,
Nov 3, 2017, 2:13:31 PM11/3/17
to ajax...@googlegroups.com

Hey,

kinda old this thread, but after all these years you may take this as a statement that Ajax Chat is still the best of its kind around.There's no doubt about that. Kudos and Chapeau to all the developers, that have been involved in (Sadly the active development including updates and mods seems to be stalled lately) .
Anyway this statement should at least go with an example of its high customizability which you may humbly get from a screenshot of our little RPG Chat, which is on its own still a work in progress. If nothing else may be this could contribute to inspire some coding individuals (more capable than I am)  to help keeping Ajax Chat alive.







Ahtsham Rana

unread,
Nov 8, 2017, 10:53:07 AM11/8/17
to AJAX-chat
I've just installed it on my forum @ ForumVU.com/chat/
Its a work in progress, would be adding some custom styles when I have the time. Really glad I found AJAX-Chat after all, been searching for such an app for a very long time and there were no good options to integrate with Mybb.

svicar...@gmail.com

unread,
Nov 16, 2017, 8:45:28 AM11/16/17
to AJAX-chat
My Slovenian chat website (klepetalnica): https://www.klepetalo.com/
My Switzerland chat website (schweiz chat): https://www.schweizchat.com/


On Tuesday, January 28, 2014 at 7:02:11 PM UTC+1, AJAX-chat wrote:

Laura Pruett

unread,
Apr 3, 2018, 6:32:55 PM4/3/18
to AJAX-chat

This is my Ajax chat I'm currently working on to fit my Gaming site.

Fiksik Jump

unread,
Aug 10, 2018, 12:51:08 AM8/10/18
to AJAX-chat
https://newkrovatka.ru/ Russia))))

среда, 4 апреля 2018 г., 1:32:55 UTC+3 пользователь Laura Pruett написал:

Malcolm Hough

unread,
Nov 13, 2018, 4:36:48 PM11/13/18
to AJAX-chat
Here is what I have so far, have only started using AJAX Chat in the last month or so, have added PM popup tabs for private messaging as I didn't like the way it was but other than that it's great. Still some minor bugs to sort out then I am done.
ScreenShot.jpg

Fiksik Jump

unread,
Nov 14, 2018, 5:17:22 AM11/14/18
to AJAX-chat
Не поделитесь кодом?

среда, 14 ноября 2018 г., 0:36:48 UTC+3 пользователь Malcolm Hough написал:

Miles

unread,
Nov 14, 2018, 5:44:05 AM11/14/18
to AJAX-chat
Would you mind sharing your PM popup mod?

Malcolm Hough

unread,
Nov 14, 2018, 9:18:56 AM11/14/18
to AJAX-chat
Yes sure, I will get it all together and post it back here.

Fiksik Jump

unread,
Nov 14, 2018, 9:41:24 AM11/14/18
to ajax...@googlegroups.com
thanks

Malcolm Hough

unread,
Nov 14, 2018, 10:39:42 AM11/14/18
to ajax...@googlegroups.com
OK here is the code for the PM PopUp Tabs. As I have already mentioned it's not quite finished and there is some minor bugs, mostly cosmetic, and I also want to tidy up the code and remove any unwanted code or elements that is no longer needed but other than that it is working fine.

If you have any problems let me know and I will attatch the files directly, but I must say I have edited and made a number of changes to the code.

In chat.js

Find

            menu     = '<li><a href="javascript:ajaxChat.insertMessageWrapper(\'/msg '

                   
+ encodedUserName
                   
+ ' \');">'
                   
+ this.lang['userMenuSendPrivateMessage']
                   
+ '</a></li>'
                   
+ '<li><a href="javascript:ajaxChat.insertMessageWrapper(\'/describe '
                   
+ encodedUserName
                   
+ ' \');">'
                   
+ this.lang['userMenuDescribe']
                   
+ '</a></li>'
                   
+ '<li><a href="javascript:ajaxChat.sendMessageWrapper(\'/query '
                   
+ encodedUserName
                   
+ '\');">'
                   
+ this.lang['userMenuOpenPrivateChannel']
                   
+ '</a></li>'
                   
+ '<li><a href="javascript:ajaxChat.sendMessageWrapper(\'/query\');">'
                   
+ this.lang['userMenuClosePrivateChannel']
                   
+ '</a></li>'
                   
+ '<li><a href="javascript:ajaxChat.sendMessageWrapper(\'/ignore '
                   
+ encodedUserName
                   
+ '\');">'
                   
+ this.lang['userMenuIgnore']
                   
+ '</a></li>';
And replace with the following
            menu     = '<li><a href="javascript:ajaxChat.insertMessageWrapper(\'/msg '

                   
+ encodedUserName
                   
+ ' \');PMPopupBox(\'' + encodedUserName + '\', \'' + userID + '\' );">'
                   
+ this.lang['userMenuSendPrivateMessage']
                   
+ '</a></li>'
                   
+ '<li><a href="javascript:ajaxChat.insertMessageWrapper(\'/describe '
                   
+ encodedUserName
                   
+ ' \');">'
                   
+ this.lang['userMenuDescribe']
                   
+ '</a></li>'
                   
+ '<li><a href="javascript:ajaxChat.sendMessageWrapper(\'/query '
                   
+ encodedUserName
                   
+ '\');">'
                   
+ this.lang['userMenuOpenPrivateChannel']
                   
+ '</a></li>'
                   
+ '<li><a href="javascript:ajaxChat.sendMessageWrapper(\'/query\');">'
                   
+ this.lang['userMenuClosePrivateChannel']
                   
+ '</a></li>'
                   
+ '<li><a href="javascript:ajaxChat.sendMessageWrapper(\'/ignore '
                   
+ encodedUserName
                   
+ '\');">'
                   
+ this.lang['userMenuIgnore']
                   
+ '</a></li>';
Now find
            switch(messageParts[0]) {

                       
case '/privmsg':
And directly blow that add the following
        var GetPmUser = userName;
       
var GetPmUserID = userID;
       
var GetPmText = messageText;
       
//alert("UserName: "+ GetPmUser + " UserID: " + GetPmUserID + " Text: " + GetPmText);
       
if (document.getElementById(GetPmUserID) === null) {
       
       
var obj = document.createElement('div');
        obj
.id = GetPmUserID;
        obj
.style.cssText = 'float:left; margin-left:5px; overflow:hidden; width:240px; position:relative;';
        document
.getElementById("PopUpHolder").appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "PMtab"+GetPmUserID;
        obj
.className = GetPmUserID;
        obj
.style.cssText = 'background:#0CF; background-image: linear-gradient(lightblue, #0CF, lightblue); border-top-right-radius: 8px; border-top-left-radius: 8px; height: 20px; width: 160px; display: block; font-size: 14px; font-weight: bold; vertical-align: middle; padding-left: 2px; border-top-width: thin; border-right-width: thin; border-left-width: thin; border-top-style: groove; border-right-style: groove; border-left-style: groove; border-top-color: #000; border-right-color: #000; border-left-color: #000; overflow: hidden; position: relative; float: left; border-bottom-width: thin; cursor: pointer;';
        obj
.setAttribute('onclick','minimizepm(this)');
        document
.getElementById(GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "PMuser"+GetPmUserID;
        obj
.style.cssText = 'float: left; overflow: hidden; color: #FF0; font-size: 12px; padding-top: 3px; padding-right: 10px;';
        document
.getElementById("PMtab"+GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "PMclose"+GetPmUserID;
        obj
.class = "PMclose"+GetPmUserID;
        obj
.style.cssText = 'float: right; color: #FFF; display: block; padding-right: 5px; cursor: pointer; position: relative;';
        obj
.innerText = "X";
        obj
.setAttribute('onclick','closepm(this)');
        document
.getElementById("PMtab"+GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('input');
        obj
.id = "Hidmsg"+GetPmUserID;
        obj
.class = "Hidmsg"+GetPmUserID;
        obj
.type = "hidden";
        obj
.style.cssText = '';
        document
.getElementById(GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "PMContainer"+GetPmUserID;
        obj
.class = "PMContainer"+GetPmUserID;
        obj
.style.cssText = value='width: auto; border: thin groove #666; background-color: #0FF; display: block; clear: left; white-space: normal; overflow: hidden; padding: 5px; word-spacing: normal; float: left; position: relative;';
        document
.getElementById(GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "PMBox"+GetPmUserID;
        obj
.class = GetPmUser;
        obj
.style.cssText = value='height: 250px; width: 216px; border: thin groove #666; background-color: #0FF; display: block; clear: left; white-space: normal; overflow-y: scroll; padding: 5px; word-spacing: normal; float: left;';
        document
.getElementById("PMContainer"+GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "MsgInput"+GetPmUserID;
        obj
.class = "MsgInput"+GetPmUserID;
        obj
.style.cssText = value='-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; width: 100%; margin: 0;/*remove defaults*/ background: #EEF; border: 1px solid #333; overflow-y: auto;/*resets IE*/ overflow-x: hidden; overflow: hidden; float: left;';
        document
.getElementById("PMContainer"+GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('span');
        obj
.id = "MsgSpan"+GetPmUserID;
        obj
.class = "MsgSpan"+GetPmUserID;
        obj
.style.cssText = value='display: block; overflow: hidden;';
        document
.getElementById("MsgInput"+GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('textarea');
        obj
.id = "SndMsg"+GetPmUserID;
        obj
.class = GetPmUserID;
        obj
.style.cssText = value='width:100%; height: 20px;';
        obj
.setAttribute('onkeyup','ajaxChat.handleSndMsgFieldKeyUp(event)');
        obj
.setAttribute('onkeydown','ajaxChat.handleSndMsgFieldKeyDown(event)');
        document
.getElementById("MsgInput"+GetPmUserID).appendChild(obj);

       
var GetPMBox = GetPmUser;
       
var GetHidmsg = "Hidmsg"+GetPmUserID;

        $
('#PMuser'+GetPmUserID).html(GetPmUser)

        document
.getElementById('Hidmsg'+GetPmUserID).value = "/msg " + GetPmUser + " ";

       
var result = GetPmText.replace('/privmsg','');
       
var thisresult = result.replace(/ *\[[^\]]*]/g, '');

        $
('#PMBox' + GetPmUserID).append("<b>"+ GetPmUser +":</b> " + thisresult+"<br/>");
       
       
var objDiv = document.getElementById("PMBox" + GetPmUserID);
        objDiv
.scrollTop = objDiv.scrollHeight;
       
       
}
       
       
else {
       
var result = GetPmText.replace('/privmsg','');
       
       
var thisresult = result.replace(/ *\[[^\]]*]/g, '');
       
        document
.getElementById(GetPmUserID).style.display='block'
       
        $
('#PMBox' + GetPmUserID).append("<b>"+ GetPmUser +":</b> " + thisresult+"<br/>");
       
       
var objDiv = document.getElementById("PMBox" + GetPmUserID);
        objDiv
.scrollTop = objDiv.scrollHeight;
       
       
}
Now find
    handleInputFieldKeyDown: function(event) {

       
var text, lastWord, i;

       
// Enter key without shift should send messages

       
if(event.keyCode === 13 && !event.shiftKey) {

           
this.sendMessage();

           
try {

               
event.preventDefault();

           
} catch(e) {

               
event.returnValue = false; // IE<9
           
}
           
return false;
       
}

       
// Tab should complete usernames
       
else if(event.keyCode === 9 && !event.shiftKey) {

            text
= this.dom['inputField'].value;

           
if(text) {

                lastWord
= text.match(/\w+/g).slice(-1)[0];

               
if (lastWord.length > 1) {

                   
for (i = 0; i < this.userNamesList.length; i++) {

                       
if(this.userNamesList[i].replace("(","").toLowerCase().indexOf

(lastWord.toLowerCase()) === 0) {

                           
this.dom['inputField'].value = text.replace(new RegExp(lastWord +

'$'), this.userNamesList[i]);

                           
break;
                       
}
                   
}
               
}
           
}

           
try {

               
event.preventDefault();

           
} catch(e) {

               
event.returnValue = false; // IE
           
}

           
return false;
       
}

       
return true;
   
},

    handleInputFieldKeyUp
: function(event) {

       
this.updateMessageLengthCounter();
   
},

    updateMessageLengthCounter
: function() {

       
if(this.dom['messageLengthCounter']) {

           
this.updateDOM(

               
'messageLengthCounter',

               
this.dom['inputField'].value.length    + '/' + this.messageTextMaxLength,

               
false,

               
true
           
);
       
}
   
},

    sendMessage
: function(text) {

        text
= text ? text : this.dom['inputField'].value;

       
if(!text) {

           
return;
       
}

        text
= this.parseInputMessage(text);

       
if(text) {

            clearTimeout
(this.timer);

           
var message =     'lastID='

                           
+ this.lastID
                           
+ '&text='
                           
+ this.encodeText(text);

           
this.makeRequest(this.ajaxURL,'POST',message);
       
}

       
this.dom['inputField'].value = '';
       
this.dom['inputField'].focus();
       
this.updateMessageLengthCounter();
   
},
And replace with the following
            //Handlers for PM Popup
    handleSndMsgFieldKeyDown
: function(event) {
       
       
var PMinputID = event.target.id;
       
var PMUserID2 = event.target.class;
       
//alert(PMUserID2);
       
var MyPmTxt = PMinputID.substring(6);
       
var KpTxt = document.getElementById('Hidmsg'+ MyPmTxt).value
       
var PMMsgTxt = event.target.value;
       
var text, lastWord, i;

       
// Enter key without shift should send messages
       
if(event.keyCode === 13 && !event.shiftKey) {

            document
.getElementById('Hidmsg'+ PMUserID2).value = document.getElementById('Hidmsg'+

PMUserID2).value + PMMsgTxt;
            document
.getElementById('TempMsgHolder').value = document.getElementById('Hidmsg'+

PMUserID2).value;
           
var UserSend = document.getElementById('PMuser'+ PMUserID2).value;
           
var MyUserName = document.getElementById('MyUserName').value;
           
            $
('#PMBox' + PMUserID2).append("<b>"+ MyUserName +":</b> " + PMMsgTxt+"<br/>");
           
           
var objDiv = document.getElementById("PMBox" + PMUserID2);
            objDiv
.scrollTop = objDiv.scrollHeight;
           
           
this.sendMessage();
            document
.getElementById('Hidmsg'+ PMUserID2).value = KpTxt;
            document
.getElementById('TempMsgHolder').value = " ";
            document
.getElementById('SndMsg'+ PMUserID2).value = "";
           
           
try {

               
event.preventDefault();

           
} catch(e) {

               
event.returnValue = false; // IE<9

           
}

           
return false;
       
}

       
// Tab should complete usernames
       
else if(event.keyCode === 9 && !event.shiftKey) {

            text
= document.getElementById(PMinputID).value;
           
//text = this.dom['inputField'].value;

           
if(text) {

                lastWord
= text.match(/\w+/g).slice(-1)[0];

               
if (lastWord.length > 1) {

                   
for (i = 0; i < this.userNamesList.length; i++) {

                       
if(this.userNamesList[i].replace("(","").toLowerCase().indexOf

(lastWord.toLowerCase()) === 0) {

                            document
.getElementById(PMinputID).value = text.replace(new

RegExp(lastWord + '$'), this.userNamesList[i])+" ";

                           
break;

                       
}

                   
}

               
}

           
}

           
try {

               
event.preventDefault();

           
} catch(e) {

               
event.returnValue = false; // IE

           
}

           
return false;
       
}

       
return true;
   
},

    handleSndMsgFieldKeyUp
: function(event) {

       
this.updateMessageLengthCounter();

   
},

    handleInputFieldKeyDown
: function(event) {

       
var text, lastWord, i;

       
// Enter key without shift should send messages
       
if(event.keyCode === 13 && !event.shiftKey) {

           
this.sendMessage();

           
try {

               
event.preventDefault();

           
} catch(e) {

               
event.returnValue = false; // IE<9

           
}

           
return false;
       
}

       
// Tab should complete usernames
       
else if(event.keyCode === 9 && !event.shiftKey) {

            text
= this.dom['inputField'].value;

           
if(text) {

                lastWord
= text.match(/\w+/g).slice(-1)[0];

               
if (lastWord.length > 1) {

                   
for (i = 0; i < this.userNamesList.length; i++) {

                       
if(this.userNamesList[i].replace("(","").toLowerCase().indexOf

(lastWord.toLowerCase()) === 0) {

                           
this.dom['inputField'].value = text.replace(new RegExp(lastWord +

'$'), this.userNamesList[i])+" ";

                           
break;

                       
}

                   
}

               
}

           
}

           
try {

               
event.preventDefault();

           
} catch(e) {

               
event.returnValue = false; // IE

           
}

           
return false;
       
}

       
return true;
   
},

    handleInputFieldKeyUp
: function(event) {

       
this.updateMessageLengthCounter();

   
},

    updateMessageLengthCounter
: function(userID) {
    userID
= this.userID;
       
if(this.dom['messageLengthCounter']) {

           
this.updateDOM(

               
'messageLengthCounter',

               
this.dom['inputField'].value.length    + '/' + this.messageTextMaxLength,
               
//this.dom['SndMsg'+userID].value.length    + '/' + this.messageTextMaxLength,

               
false,
               
true
           
);
       
}
   
},

    sendMessage
: function(text) {

       
var snd = document.getElementById('TempMsgHolder').value;
       
if (snd > " "){
        text
= text ? text : snd;
       
}
       
else {
        text
= text ? text : this.dom['inputField'].value;
       
}
        document
.getElementById('TempMsgHolder').value == "";

       
if(!text) {

           
return;
       
}

        text
= this.parseInputMessage(text);

       
if(text) {

            clearTimeout
(this.timer);

           
var message =     'lastID='

                           
+ this.lastID
                           
+ '&text='
                           
+ this.encodeText(text);

           
this.makeRequest(this.ajaxURL,'POST',message);
       
}

       
this.dom['inputField'].value = '';
       
//this.dom['inputField'].focus();
       
this.updateMessageLengthCounter();
   
},
Now find
            insertMessageWrapper: function(text) {
And directly blow that add the following
            var ret = text.replace('/msg','');
And at the very end of chat.js after the last closing } add the following
    //Create PM POPup
   
function PMPopupBox(userName, userID, messageText) {

       
var GetPmUser = userName;
       
var GetPmUserID = userID;
       
var GetPmText = messageText;
       
       
if (document.getElementById(GetPmUserID) === null) {
       
       
var obj = document.createElement('div');
        obj
.id = GetPmUserID;
        obj
.style.cssText = 'float:left; margin-left:5px; overflow:hidden; width:240px; position:relative;';
        document
.getElementById("PopUpHolder").appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "PMtab"+GetPmUserID;
        obj
.className = GetPmUserID;
        obj
.style.cssText = 'background:#0CF; background-image: linear-gradient(lightblue, #0CF, lightblue); border-top-right-radius: 8px; border-top-left-radius: 8px; height: 20px; width: 160px; display: block; font-size: 14px; font-weight: bold; vertical-align: middle; padding-left: 2px; border-top-width: thin; border-right-width: thin; border-left-width: thin; border-top-style: groove; border-right-style: groove; border-left-style: groove; border-top-color: #000; border-right-color: #000; border-left-color: #000; overflow: hidden; position: relative; float: left; border-bottom-width: thin; cursor: pointer;';
        obj
.setAttribute('onclick','minimizepm(this)');
        document
.getElementById(GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "PMuser"+GetPmUserID;
        obj
.style.cssText = 'float: left; overflow: hidden; color: #FF0; font-size: 12px; padding-top: 3px; padding-right: 10px;';
        document
.getElementById("PMtab"+GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "PMclose"+GetPmUserID;
        obj
.class = "PMclose"+GetPmUserID;
        obj
.style.cssText = 'float: right; color: #FFF; display: block; padding-right: 5px; cursor: pointer; position: relative;';
        obj
.innerText = "X";
        obj
.setAttribute('onclick','closepm(this)');
        document
.getElementById("PMtab"+GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('input');
        obj
.id = "Hidmsg"+GetPmUserID;
        obj
.class = "Hidmsg"+GetPmUserID;
        obj
.type = "hidden";
        obj
.style.cssText = '';
        document
.getElementById(GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "PMContainer"+GetPmUserID;
        obj
.class = "PMContainer"+GetPmUserID;
        obj
.style.cssText = value='width: auto; border: thin groove #666; background-color: #0FF; display: block; clear: left; white-space: normal; overflow: hidden; padding: 5px; word-spacing: normal; float: left; position: relative;';
        document
.getElementById(GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "PMBox"+GetPmUserID;
        obj
.class = GetPmUser;
        obj
.style.cssText = value='height: 250px; width: 216px; border: thin groove #666; background-color: #0FF; display: block; clear: left; white-space: normal; overflow-y: scroll; padding: 5px; word-spacing: normal; float: left;';
        document
.getElementById("PMContainer"+GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('div');
        obj
.id = "MsgInput"+GetPmUserID;
        obj
.class = "MsgInput"+GetPmUserID;
        obj
.style.cssText = value='-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; width: 100%; margin: 0;/*remove defaults*/ background: #EEF; border: 1px solid #333; overflow-y: auto;/*resets IE*/ overflow-x: hidden; overflow: hidden; float: left;';
        document
.getElementById("PMContainer"+GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('span');
        obj
.id = "MsgSpan"+GetPmUserID;
        obj
.class = "MsgSpan"+GetPmUserID;
        obj
.style.cssText = value='display: block; overflow: hidden;';
        document
.getElementById("MsgInput"+GetPmUserID).appendChild(obj);
       
       
var obj = document.createElement('textarea');
        obj
.id = "SndMsg"+GetPmUserID;
        obj
.class = GetPmUserID;
        obj
.style.cssText = value='width:100%; height: 30px;';
        obj
.setAttribute('onkeyup','ajaxChat.handleSndMsgFieldKeyUp(event)');
        obj
.setAttribute('onkeydown','ajaxChat.handleSndMsgFieldKeyDown(event)');
        document
.getElementById("MsgInput"+GetPmUserID).appendChild(obj);

       
var GetPMBox = GetPmUser;
       
var GetHidmsg = "Hidmsg"+GetPmUserID;

        $
('#PMuser'+GetPmUserID).html(GetPmUser)

        document
.getElementById('Hidmsg'+GetPmUserID).value = "/msg " + GetPmUser + " ";

       
++i;

       
var result = GetPmText.replace('/privmsg','');

        $
('#PMBox' + GetPmUserID).append("<b>"+ GetPmUser +":</b> " + result+"<br/>");
       
       
var objDiv = document.getElementById("PMBox" + GetPmUserID);
        objDiv
.scrollTop = objDiv.scrollHeight;
       
       
}
       
       
else {
            document
.getElementById(GetPmUserID).style.display ='block';
            document
.getElementById(PMContainer+GetPmUserID).style.display ='block';;
            document
.getElementById(PMtab+GetPmUserID).style.borderBottom = 'none';
            document
.getElementById(PMPopup+GetPmUserID).style.width = "220px";
           
var objDiv = document.getElementById("PMBox" + GetPmUserID);
            objDiv
.scrollTop = objDiv.scrollHeight;
       
}
       
}

       
//Minmize PM POPup
       
function minimizepm(elem) {
           
var thisval = elem.className;
           
var getPMID = "PMContainer" + thisval;
           
var getPMtab = "PMtab" + thisval;
           
var getPMPopup = "PMPopup" + thisval;
           
//alert(getPMID);
           
var x = document.getElementById(getPMID);
           
//alert(x);
           
if (x.style.display === "block") {
            document
.getElementById(getPMID).style.display ='none';
           
//document.getElementById(thisval).style.width = '160px';
           
//document.getElementById(getPMPopup).style.width = "160px";
            document
.getElementById(getPMtab).style.borderBottom = 'groove';
           
var objDiv = document.getElementById("PMBox" + getPMID);
            objDiv
.scrollTop = objDiv.scrollHeight;
           
}
           
else {
                document
.getElementById(getPMID).style.display ='block';
               
//document.getElementById(thisval).style.width = '220px';
               
//document.getElementById(getPMPopup).style.width = "250px";
                document
.getElementById(getPMtab).style.borderBottom = 'none';
               
var objDiv = document.getElementById("PMBox" + getPMID);
                    objDiv
.scrollTop = objDiv.scrollHeight;
           
}
       
}

       
function closepm(elem) {
           
var PMPopup = elem.parentNode.parentNode.id;
           
//alert(elem.parentNode.parentNode.id);
            document
.getElementById(PMPopup).style.display ='none';
       
}
And in loggedin.html add the following where you want the PopUps to be.
        <input name="TempMsgHolder" id="TempMsgHolder" type="hidden" value="" />
       
<input name="MyUserName" id="MyUserName" type="hidden" value="" />
       
<div class="PopUpHolder" id="PopUpHolder"></div>
Make sure and add a link to jQuery library in the head of loggedin.html
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>

chat_js.txt
Message has been deleted
Message has been deleted
Message has been deleted

Miles

unread,
Nov 14, 2018, 10:52:11 AM11/14/18
to ajax...@googlegroups.com
Highly appreciated. Thanks for the effort! :)

Malcolm Hough

unread,
Nov 14, 2018, 10:57:43 AM11/14/18
to AJAX-chat
No problem, hope it works for you. I tried other PM mods but could never get them to work so decided to make my own.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Fiksik Jump

unread,
Nov 14, 2018, 11:29:04 AM11/14/18
to ajax...@googlegroups.com
the code is incomplete


$('#PMBox' + GetPmUserID).append("<b>"+<span styl
Message has been deleted
Message has been deleted
Message has been deleted

Malcolm Hough

unread,
Nov 14, 2018, 12:00:41 PM11/14/18
to ajax...@googlegroups.com
Sorry looks like Google has cut away some of the code, I have attached a text file with the code in it.
chat_js.txt

Malcolm Hough

unread,
Nov 14, 2018, 12:10:13 PM11/14/18
to AJAX-chat
Strange how Google would not let me attach the .js file directly instead it deleted the post :/


        $
('#PMBox' + GetPmUserID).append("<b>"+<span styl

Fiksik Jump

unread,
Nov 15, 2018, 2:52:01 AM11/15/18
to AJAX-chat
thanks

ahmad muselli

unread,
Dec 1, 2019, 1:02:58 PM12/1/19
to AJAX-chat
Is there a new update for chat

Bobby Russ

unread,
Dec 1, 2019, 2:51:28 PM12/1/19
to ahmad muselli, AJAX-chat
Haven't seen any.  I think the project is no longer active.

--
You received this message because you are subscribed to the Google Groups "AJAX-chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ajax-chat+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/ajax-chat/1ac742a5-a775-493f-bbd4-e449b9e6c229%40googlegroups.com.
Message has been deleted

Miles

unread,
Dec 31, 2019, 1:23:02 AM12/31/19
to ajax...@googlegroups.com
Some may be interested in or inspired by what has become of our little  RPG project meanwhile.
We still use phpBB with AjaxChat integrated, the possibilities are countless and we're quite happy the way it went so far.

overview.jpg



A selection of new features you can see in the screenshots like 
  • database driven inline Charactersheet which is realtime modifiable by our GameMaster.
  • players have buttons for special actions using their powerpoints (red bar). Green Bar is health.
  • font | RPG awesome build menus
  • a master dice operation menu for special inChat rolls like saving throws
  • image libraries for npcs, locations and encounters and several ways to post them
  • and a whole lot of other rpg shit, I'm sure nobody is interested in ;)

dice.jpg


Reply all
Reply to author
Forward
0 new messages