Facebook like chat for elgg

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.

Supported version Elgg 1.8 .

Downloads for older version available at http://code.google.com/p/frei-chat/downloads/list

Bugs, support questions etc.. @ http://code.google.com/p/frei-chat/

Original Project can be found at @ http://evnix.com/drupal2/

Installation Information (Please follow strictly)

  1. BACKUP your Elgg DATABASE
  2. Download the plugin from here 
  3. Unzip > Upload to mod/
  4. Enable it in the Administration > Plugins
  5. Click on Chat > Settings
  6. Follow Step 1 (install the chat) (don’t turn on chat with out installing it)
  7. Click on the install link and it will open in a new tab
  8. Accept the license and click agree
  9. Select the CMS as Elgg and hit Submit
  10. 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*
  11. The error should disappear now and click on submit
  12. Your Elgg site’s Database details will be shown on next page. Input your specific password for the chat admin panel and save it
  13. Now you will be taken to a page. Leave it there and come back to Elgg > Administration > Plugins > Chat > Settings
  14. Turn on the chat (Step 2)
  15. If you need, you can configure the chat options by clicking on the chat admin link in Elgg > Administration > Plugins > Chat > Settings

To Upgrade :

  • Backup your exisitng plugin
  • Overwrite all the files excluding the arg.php & config.dat located inside your_elgg\mod\chat\vendors\freichat
  • Remove the folder named “page” and its contents from mod\chat\views\default (If any exists)

Tips (By 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’ && isloggedin()) {

  • 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  icon sad Facebook like chat for elgg
    // 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);

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. Use at your own risk icon wink Facebook like chat for elgg

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 icon wink Facebook like chat for elgg

About The Author

Team Webgalli is a leading edge web solutions firm focused on delivering the best and most cost-effective solutions to our clients in areas such as web design & development, software developments, databases, social network solutions, e-commerce solutions, web hosting, maintenance, promotions, marketing, etc. Starting as a company of four people.

0 Comments

Leave A Reply

You must be logged in to post a comment.