Hello
(sorry, I'm a noob to AJAX, Java and PHP)
I recently installed an Ajax chat on my site, not knowing that Ajax is actually a type of coding? (I thought 'AJAX Chat' was just a name, like 'Chatango' etc) so I'm finding it confusing on where to find support specifically for the version? of AJAX chat I'm using (I've found several different variations of AJAX chats available for download on the web).
Anyway, I'd like to know how I can add an avatar for chat users? I know it's possible, since I've found lots of support for this function, but only for the phpbb forum mod which exracts the forum members avatar (and I'm using a standalone version).
Thanks in advance for any advice.
It's going to depend a LOT on the actual code. AJAX is just the language/technology the chat is coded in. Your question would be about the same as saying "I have a Java Chat client, how do I add user avatars?" There's so many ways this could be coded that there isn't a single meaningful answer.
Thanks for your reply
Yes it was a bit vague (sorry) it's just difficult when I don't know what it is that I'm looking for.
I just found a way to change username colours, so that a particular user has a different coloured name (not just the user group colour). Perhaps the entries I need to change are around there?
This was the code before I altered it:
This is how I added seperate colours for individual usernames:Code:getChatListMessageString: function(dateObject, userID, userName, userRole, messageID, messageText, channelID, ip) { var rowClass = this.DOMbufferRowClass; var userClass = this.getRoleClass(userRole); var colon; if(messageText.indexOf('/action') == 0 || messageText.indexOf('/me') == 0 || messageText.indexOf('/privaction') == 0) { userClass += ' action'; colon = ' '; } else { colon = ': '; } var dateTime = this.settings['dateFormat'] ? '<span class="dateTime">' + this.formatDate(this.settings['dateFormat'], dateObject) + '</span> ' : ''; return '<div id="' + this.getMessageDocumentID(messageID) + '" class="' + rowClass + '">' + this.getDeletionLink(messageID, userID, userRole, channelID) + dateTime + '<span class="' + userClass + '"' + this.getChatListUserNameTitle(userID, userName, userRole, ip) + ' dir="' + this.baseDirection + '" onclick="ajaxChat.insertText(this.firstChild.nodeValue);">' + userName + '</span>' + colon + this.replaceText(messageText) + '</div>'; },
What do you call 'getChatListMessageString' for example? is it string? and are they standard commands like 'background-color' is in CSS for example?Code:getChatListMessageString: function(dateObject, userID, userName, userRole, messageID, messageText, channelID, ip) { var rowClass = this.DOMbufferRowClass; var userClass = this.getRoleClass(userRole); var colon; if(messageText.indexOf('/action') == 0 || messageText.indexOf('/me') == 0 || messageText.indexOf('/privaction') == 0) { userClass += ' action'; colon = ' '; } else { colon = ': '; } var dateTime = this.settings['dateFormat'] ? '<span class="dateTime">' + this.formatDate(this.settings['dateFormat'], dateObject) + '</span> ' : ''; var strfixed = '<div id="' + this.getMessageDocumentID(messageID) + '" class="' + rowClass + '">' + this.getDeletionLink(messageID, userID, userRole, channelID) + dateTime + '<span class="' + userClass + '"' + this.getChatListUserNameTitle(userID, userName, userRole, ip) + ' dir="' + this.baseDirection + '" onclick="ajaxChat.insertText(this.firstChild.nodeValue);">' + userName + '</span>' + colon + this.replaceText(messageText) + '</div>'; if(strfixed.match("Username1")) { strfixed=strfixed.replace('onclick', 'style="color: #888888;" onclick'); } if(strfixed.match("Username2")) { strfixed=strfixed.replace('onclick', 'style="color: #00FFFF;" onclick'); } if(strfixed.match("Username3")) { strfixed=strfixed.replace('onclick', 'style="color: #009F51;" onclick'); } return strfixed; },
I think your username span needs another span after it with an image tag.
getChatListMessageString might be a class or a constructor. I'm not sure, since I haven't done any advanced JavaScript.
ok well, looks like my search continues...
Thanks anyway![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks