FreiChat related discussions
Avatars in main chat window

Hi, I am using freichat with jomsocial, and I want to have the avatars appearing in the main chat window (where you type messages). Can you tell me where I can put that in the code?

Also I've noticed sometimes I can see 10 guests in the chat, but on google analytics there are maybe 1 or 2 people. Is this google bots or other bots? If so, where/how can I detect that in the code and ignore those?

Also, does the video chat use WebRTC. Does video chat work on mobile devices and iphone?

Thanks, Chris.

Hi, I am using freichat with jomsocial, and I want to have the avatars appearing in the main chat window (where you type messages). Can you tell me where I can put that in the code? Also I've noticed sometimes I can see 10 guests in the chat, but on google analytics there are maybe 1 or 2 people. Is this google bots or other bots? If so, where/how can I detect that in the code and ignore those? Also, does the video chat use WebRTC. Does video chat work on mobile devices and iphone? Thanks, Chris.

Hi, I am using freichat with jomsocial, and I want to have the avatars appearing in the main chat window (where you type messages). Can you tell me where I can put that in the code?

It will require considerable amount of customization , do you have knowledge in javascript and html ?

Also I've noticed sometimes I can see 10 guests in the chat,

You can try using comet mode as the polling technique in freichat backend .

Also, does the video chat use WebRTC. Does video chat work on mobile devices and iphone?

Yes, it uses webRTC for video chat .
It does not support mobile devices yet .

>Hi, I am using freichat with jomsocial, and I want to have the avatars appearing in the main chat window (where you type messages). Can you tell me where I can put that in the code? It will require considerable amount of customization , do you have knowledge in javascript and html ? >Also I've noticed sometimes I can see 10 guests in the chat, You can try using comet mode as the polling technique in freichat backend . >Also, does the video chat use WebRTC. Does video chat work on mobile devices and iphone? Yes, it uses webRTC for video chat . It does not support mobile devices yet .

Thanks, Yes I have a lot of experience with html/javascript/php, I was just wondering which files would need changing.
I will try comet mode and see if the number of users is still higher than the actual number of users.

Thanks, Yes I have a lot of experience with html/javascript/php, I was just wondering which files would need changing. I will try comet mode and see if the number of users is still higher than the actual number of users.

You need to make the customization in the file freichat/client/freichat.js

You need the avatar inside the chatwindow , that means you will have to pass the avatar url when the create chat window function is called .

You can do that by editing the function FreiChat.create_users()

You will find the function FreiChat.create_chat_window_mesg() in the string users_html in that function .

You need to pass userdata[users_len].avatar to that function along with the username and userid .

After doing above , edit FreiChat.create_chat_window_mesg() and replace the line

FreiChat.chatWindowHTML(user,id);

with

FreiChat.chatWindowHTML(user,id, your_passed_avatar);

The method FreiChat.chatWindowHTML() generates the actual HTML for the chat window . Now edit the str variable in this function to get the avatar .

You may also need to edit the css , which you can find in freichat/client/themes/YOUR_THEME/styles.css

You need to make the customization in the file freichat/client/freichat.js You need the avatar inside the chatwindow , that means you will have to pass the avatar url when the create chat window function is called . You can do that by editing the function FreiChat.create_users() You will find the function FreiChat.create_chat_window_mesg() in the string ```users_html``` in that function . You need to pass ```userdata[users_len].avatar``` to that function along with the username and userid . After doing above , edit FreiChat.create_chat_window_mesg() and replace the line ``` FreiChat.chatWindowHTML(user,id); ``` with ``` FreiChat.chatWindowHTML(user,id, your_passed_avatar); ``` The method FreiChat.chatWindowHTML() generates the actual HTML for the chat window . Now edit the ```str``` variable in this function to get the avatar . You may also need to edit the css , which you can find in ``freichat/client/themes/YOUR_THEME/styles.css``

Thanks Adesh, I really appreciate the detailed answer. I will definitely try this. Just another thing - I switched to comet as you said, but I quite often can still see 8-10 users in the chat (guests) but actually only me online, or me and one other person showing in Google Analytics. How does it detect guests online? Is it querying joomla somehow? (my setup is jomsocial and joomla).

Thanks, Chris.

Thanks Adesh, I really appreciate the detailed answer. I will definitely try this. Just another thing - I switched to comet as you said, but I quite often can still see 8-10 users in the chat (guests) but actually only me online, or me and one other person showing in Google Analytics. How does it detect guests online? Is it querying joomla somehow? (my setup is jomsocial and joomla). Thanks, Chris.
147
4
0
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft