Community Documentation

drupalchat module integration with friendlist module

Last updated January 3, 2012. Created by Sibiraj on October 19, 2011.
Edited by Devin Carlson. Log in to edit this page.

first of all got to drupalchat.module file
Add define this variable DRUPALCHAT_REL_FL on top of this module

<?php

define
('DRUPALCHAT_REL_FL',        3);

?>

go to: function _drupalchat_buddylist

Add the line

<?php

 
elseif ($drupalchat_rel == DRUPALCHAT_REL_FL) {
   
$result = db_query("SELECT * FROM {friendlist_statuses} WHERE requester_id = %d AND status='%s'", $uid,'TW_BOTH');
    while (
$friendlist = db_fetch_object($result)) {
    
$users[] = $friendlist->requestee_id;
    }
  }
//placed before return
return $users;
?>

Then open drupalchat.admin.inc file

Then place the code in the drupalchat_settings_form

<?php

// line 86

if (module_exists('friendlist_api')) {
   
$form['drupalchat_rel']['#options'][DRUPALCHAT_REL_FL] = t('Friendlist module');
  }

?>

Done!!!!!!

Go to admin/settings/drupalchat

change Relationship method.

Page status

No known problems

Log in to edit this page

About this page

Drupal version
Drupal 6.x
Audience
Contributors
Level
Intermediate
Keywords
drupal chat, friendlist, integration

Tutorials and site recipes

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.