Here is the FreiChatx integration for Elgg 1.8. This plugin will add a live chat to your Elgg site just like facebook or google chat. Powered by php and jQuery. The original chat script is a powerful fast and easy to install one. It has a lot of features like Avatar support, Able to chat even while you browse different pages, smiley support, url to clickable url support, support for wordwrap, Sound alert for new message, Status, Server load reduction algorithms implemented, File sending etc.. More over it can be easily integrated with any systems like Joomla, WordPress, Drupal etc.. or even custom Database powered systems.
This tutorial is for integration of FreiChat with Elgg based social networking sites.
Supported version Elgg 1.8 .
Downloads for older versions of vendor library available at http://code.google.com/p/frei-chat/downloads/list
Installation Information (Please follow strictly)
- BACKUP your Elgg DATABASE
- Download the plugin from here
- Unzip > Upload to mod/
- Enable it in the Administration > Plugins
- Click on Chat > Settings
- Follow Step 1 (install the chat) (don’t turn on chat with out installing it)
- Click on the install link and it will open in a new tab
- Accept the license and click agree
- Select the CMS as Elgg and hit Submit
- Now you will be presented with an error message that the settings.php is not readable. Change the path of the settings.php to your_elgg_installation_path/engine/settings.php and hit submit*
- The error should disappear now and click on submit
- Your Elgg site’s Database details will be shown on next page. Input your specific password for the chat admin panel and save it
- Now you will be taken to a page. Leave it there and come back to Elgg > Administration > Plugins > Chat > Settings
- Turn on the chat (Step 2)
- If you need, you can configure the chat options by clicking on the chat admin link in Elgg > Administration > Plugins > Chat > Settings
Video Tutorial
- Contributor : RVR, Elgg community
To Upgrade :
- Backup your exisitng plugin
- Overwrite all the files excluding the arg.php & config.dat located inside your_elgg/mod/chat/vendors/freichat
Tips and Hacks
To allow chat only for friends and logged in users
- Contributor : Matt Beckett of Elgg community
- The default configuration allows anonymous users to chat also, this can be removed by changing line 3 of views/default/chat/chat.php to
if (elgg_get_plugin_setting(‘chat_installed’, ‘chat’) == ‘yes’ && elgg_is_logged_in()) {
- if you want chat between friends only, here’s an answer.Edit the file /vendors/freichat/server/drivers/elgg.php. Go to the bottom of the file and find this code:
// 7. Get Appropriate UserData from FreiChatX Table if ($this->usr_list_wanted == true) { $result = $this->getList();
Directly below this line, and before the “return $result;” add the following code
$query = "SELECT guid_two FROM " . DBprefix . "entity_relationships WHERE guid_one = " . $_SESSION[$this->uid . 'usr_ses_id'] . " AND relationship = 'friend'"; $friendsarray = $this->db->query($query)->fetchAll(); //fix odd result format $friends = array(); foreach($friendsarray as $array){ $friends[] = $array[0]; } if(count($friends) == 0){ // we have no friends // so we can't see anyone online $result = array(); } else{ //filter the list by friends now for($i=0; $i<count($result); $i++){ if(!in_array($result[$i]['session_id'], $friends)){ // this user is not our friend, remove them unset($result[$i]); } } } $result = array_values($result);
To remove the Powered by Evnix link from the chat window
- Open elggmodchatvendorsfreichatclientfreichat.js and remove the following line
<div id='evnix"+randstr+"power' class='evnix"+randstr2+"power'><font size='1'>"+freidefines.pwdby+" <a href='http://www.evnix.com' target='_blank' rel="nofollow">EvNix</a></font></div>
- PS : The Chat plugins license requires you to provide link back to the Evnix website. Removing the powered by Evnix credits is a violation of license. When compared with the other paid chat softwares, freichat costs negligible fee only. So purchase a license of the chat software and support the devs. You are then free to remove any credits or back links.
To show display name instead of username
- Contributed by Anoop Mohan
- Edit mod/chat/vendors/freichat/server/drivers/Elgg.php and change username to name in the following four lines.
// Line number 21 $query = "SELECT username FROM " . DBprefix . "users_entity WHERE guid='" . $session_id . "' LIMIT 1"; // Line number 29 if (isset($result['username'])) { // Line number 30 $_SESSION[$this->uid . 'usr_name'] = $result['username'] // Line number 44 $query = "SELECT DISTINCT f.status_mesg,f.username,f.session_id,f.status,f.guest,e.guid_two
Few other non official hacks can be found here.
Disclaimer : This is a third party integration for Elgg. Team Webgalli won’t be responsible for any error / security bugs happening to your site due to errors in this library.
The original project can be found at : http://code.google.com/p/frei-chat/
Bugs, support questions etc.. @ http://code.google.com/p/frei-chat/
Hope you like it
Is there a more Facebook-Like Chat theme to download?
Unfortunately there are no ready facebook like themes are available. But you can customize the design by changing the css of the chat plugin. Look inside the vendors directory.
cool, i love it.
good job! nice nice.
How can I remove the Evnix powered link?
Just added the steps to Remove the powered by Evnix link to the tutorial. Remember that the Evnix License insist on you to provide the back links to their website, if you are using their script.
Hi,
am adding the above code to set chat for friends only.. but when i changed that, chat is disappearing..
please help me on this…
Sorry, It did not work for me. I didn’t understand number eight, “Accept the license and click agree”. All I found was a yes or no box if that what it meant.
Click save and proceed.
That code is not checked with latest versions of Freichat.
I installed the chat and added the code so that only people logged in could use. However now I’m getting this error at the top of the screen.
Deprecated in 1.8: isloggedin() is deprecated by elgg_is_logged_in() Called from [#9]
@Anthony : this is because of the deprecated function. Please use the new Elgg function elgg_is_logged_in(). We have updated the post with the information.
Help! I did everything it said here and refreshed it and nothing happened. Whats wrong? I have configured everything.
Have you ever considered about adding a little bit more than just your articles? I mean, what you say is fundamental and everything. But think about if you added some great pictures or videos to give your posts more, “pop”! Your content is excellent but with images and videos, this website could certainly be one of the greatest in its niche. Superb blog!
We cant provide you an answer coz we dont know what error you are getting.
. We are a group of volunteers and starting a new scheme in our community. Your site provided us with valuable info to work on. You have done a formidable job and our entire community will be grateful to you.
These unstalation steps are not working for me
I succesfully completed step 11 of this tutorial, but I’m stuck on a blank page that appears on what should be step 12. Any ideas, please?
We cant help you with a blank page. We need more information on the error. Check your error_log on whats the error logged.
Hello Team,
Thanks for your quick reply!
My server’s error log is blank, but in “My visitors log” I found a 500(internal server error) logged.
I tried once again to complete the install of this plugin, but I’m stuck on receiving the same blank page. It’s comming from page address
[URL removed for security reason]
Send us your FTP / Site admin and Cpanel login via pm to info [at] webgalli [dot] com. We will have a look
PS : we have removed the above URL from your comment, because it will expose your installation path to public.
Never mind… I modified the arg.php file myself and it’s working like a charm!
Thanks anyway…
Glad to know you sorted out it and thanks for posting the solution. If you liked the plugin, don’t forget to recommend it.
what was the change made in the file arg.php’m having the same problem
Sorry pel English
The change you need to make is open mod/chat/vendors/freichat/arg.php in a text editor. Find the line 24
$installed=false;
and change it to $installed=true;I have tried all the hacks to remove the “Powered by” from the newest version, 7.2, and none of them seem to work. Removing from the language file removes the chat from my site completely. Any one have any ideas?
Thanks, Bob
In the new version, you can try changing the line number 45 of vendors/freichat/arg.php (Not tested, please report back). Also the freichat licence insist on you to keep the link back
.
i have changed the location but still getting error. what to do???
When your community is deprived the cat(chat) appears all the same on the page of connection. To solve this problem to edit the file view/default/chat/chat.php lines 15 to add:
if (elgg_is_logged_in()) {
And line 34 to add:
}
Make sure you pointed to the exact location of your elgg/engine/settings.php
has anyone got the videochat to work with this?
thanks
The current release of this plugin has no video chat options.
Is it possible to have a copy of the chat logs in this plugin? if not could you develop it to do so?
Thanks
Sorry I mean is it possibe to save a copy of all sites chat logs so that the site administrator can monitor them. If not you you develop this feature.
Thanks
Hi, I have installed this, and its great…But, how can I get rid of the link at the top left that Says Chatroom that floats around on the page? This possible to do?
I apologize, I have done more reading of the documentation and edited the arg.php file to disable the chat button, my next question would be, what would I have to do to be able to make a link to the chatroom, so I can add it to a menu item, thankyou very much for your time.
@Taner : Yes its possible with additional development. Get in touch with us at info [at] webgalli [dot] com and send the complete requirements.
@Kimmie : If you dont need chat rooms, use the previous version. Or you can edit the arg.php located inside mod/chat/vendors/freichat/ and disable the chat room plugin feature.
If you disable the chat room, you wont be able to load it.
Hello, after installing, the drop down menu dashboard stopped working.
How to fix it?
(Facebook Themplate)
Thank you!
Turn on the avoid jQuery conflict option in the chat admin panel
Hie,
i have followed the steps which you have mentioned in tutorial to remove powered by.. but i didnt find any code like that.. could you explain me if any other steps exist…
thank you
Removing the powered by Evnix, from the chat is against the license. Buy a license from evnix and you are free to remove it.
Instalei o Freichat em http://www.motovips.com.br mais não consigo ativar, aparece a tela para inserir a senha de admin, mas quando insiro a senha a tela fica branca. Neste caminho http://www.motovips.com.br/mod/chat/vendors/freichat/server/admin.php,
o que pode ser????
me ajude, não consigo ativar.
Use english only
error : C:/xampp/htdocs/adh/mod/chat/vendors/engine/settings.php
missing C:/xampp/htdocs/adh/mod/chat/vendors/engine/settings.php error
I installed freichatx it get installed on elgg
I followed same steps shown in vdo & got access to chat admin panel
then Administration > Plugins > Chat > Settings > Yes > save
But after that I didn’t get online user & chatroom options.
Please help me
How can I change the avatar to users’ profile picture?
When I click “Agree” button, page reloads. Does not go to next page for integration option.
No Idea. Try to stick with the install informations. If not working, then the evnix team offers paid installation support. Or if needed, we can install it for you for a small fee.
it is currently not supported out of box.
In Firefox I get error:
[18:31:49.669] Exposing chrome JS objects to content without __exposedProps__ is insecure and deprecated. See https://developer.mozilla.org/en/XPConnect_wrappers for more information. @ resource://jid1-uabu5a9hduqzcw-at-jetpack-api-utils-lib/securable-module.js -> resource://jid1-uabu5a9hduqzcw-at-jetpack-api-utils-lib/content/worker.js:230
I Install in Internet Explorer and all is ok now.
Thanks for letting us know. Hope this will be useful for some one too.
why i can not chat. I see user online. but i can’t see text for chat.
Sorry. if you do not understand. I’m not good at English.
Hi, I am using Freichat 8.1 in my Joomla 3.0. It is showing ‘Powered by Codologic’. I have tried with your suggestion to remove that. But, there’s not any option like ‘freidefines.pwdby’. If you come to know, please let me know. Thanking you.
Riyad
it shows me wrong password as the video shown above….
@Riyad : You are not authorized to remove that link. If you want to remove it, get a licence from codologic.
@Manish : follow the instructions carefully.
Thank you so much! I got it working but sometimes it says below on the chat ‘You are Banned”.. How do I fix this? and also if i disable chat rooms will they be able to chat 1 on 1 only?
Awesome plugin! My only problem is that for some reason the avatars aren’t showing up. Is there some permission I need to change for that?
The vendor library doesn’t support the usage of Elgg avatars. We will take care of it when we have some free time.
por favor amigos me aparece esto, como lo resuelvo?? gracias….
Archivo start.php faltante en el paquete no es v
A couple of the hacks seem to be out of date with the newer versions.
First the one to limit chat users to logged in users;
if (elgg_get_plugin_setting(“chat_installed”, “chat”) == “yes” && elgg_is_logged_in()) {
This code breaks the chat and it does not show up on any of my pages.
Also, the code to use “names” instead of “usernames” does not appear in the actual code of the latest upgrade 1.6.1
Other than that, it is a great program and many thanks to all that have made it possible.
The login logic code is working fine. Not sure whats the error with your special case.
Regarding the username logic, we haven’t tested the hacks with any of the latest freichat versions. These hacks are contributed by the community.
Warning: require_once(/home/content/45/11004645/html/mod/chat/vendors/freichat) [function.require-once]: failed to open stream: No such file or directory in /home/content/45/11004645/html/mod/chat/vendors/freichat/installation/integ/Elgg.php on line 61
Fatal error: require_once() [function.require]: Failed opening required ‘/home/content/45/11004645/html/mod/chat/vendors/freichat’ (include_path=’.:/usr/local/php5_3/lib/php’) in /home/content/45/11004645/html/mod/chat/vendors/freichat/installation/integ/Elgg.php on line 61
errors how to resolve them ?
@Anuj: Check whether the file exists in the path via an FTP / cPanel. If it exists and you are still getting this message, then its a permission error. If not, download the plugin once more and try the installation again.
My client is requiring closer integration with elgg groups. For example, entering the “Newbies” group in elgg would open up the chat window and automatically have the “Newbies” group within Frei Chat highlighted.
Synchronizing the names of the elgg groups and the chat groups would also be a requirement.
Can you help here?
Olá, sou brasileiro, estou aqui para informar que eu não estou achando a engine do freichat, se eu mudar a url e botar em uma pasta vazia pra ver se o freichat instala sozinho a engine mas não da certo, fica uma página branca, como eu localizo essa engine ? ou é a engine que está dando erro ou é a params.php obrigado!
FATAL ERRO
Um erro irrecuperável ocorreu e foi registrado. Contacte o administrador do site com as seguintes informações: Exceção # 1385633724.
Please use English.
Please use English.
Boa noite instalo o freichat até a parte que sincronizo o aerquivo settings.php até aí tá tudo certo depois que clico para o próximo passo a página fica em branco com o nome step1:
e a página fica em branco não dá para digitar a a senha. Sigo todos os paços até a página ficar em branco para colocar a senha.
Caso, possam me ajudar fico agradecido.