Instalar cometchat en ILIAS

Bueno, en realidad la instalación no es tan complicada, la documentación es muy clara, lo que mas cuesta es realizar las modificaciones de archivo integration.php, así que aquí lo dejo para que le den una mirada al las funciones, donde podrán observar que cambios realizar.

define('TABLE_PREFIX',                             ''                                                                              );
define('DB_USERTABLE',                          'usr_data'                                                                      );
define('DB_USERTABLE_NAME',                     'login'                                                         );
define('DB_USERTABLE_USERID',           'usr_id'                                                                );
define('DB_USERTABLE_LASTACTIVITY',     'lastactivity'                                                  );

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* FUNCTIONS */

function getUserID() {
    $userid = 0; // Return 0 if user is not logged in

        if (!empty($_COOKIE['PHPSESSID'])) {
        $sql = ("select user_id from ".TABLE_PREFIX."usr_session 
            where session_id = '".mysql_real_escape_string($_COOKIE['PHPSESSID'])."'");
        $query = mysql_query($sql);
        $session = mysql_fetch_array($query);
        $userid = $session['user_id'];
        }

    return $userid;     
}

function getFriendsList($userid,$time) {
    $sql = ("select DISTINCT ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." avatar, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." link, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX.DB_USERTABLE." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID."  '".mysql_real_escape_string($userid)."' and ('".mysql_real_escape_string($time)."'-lastactivity  'invisible' OR cometchat_status.status  'offline') order by username asc");

return $sql;
}

function getUserDetails($userid) {
        $sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity,  ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." link,  ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." avatar, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX.DB_USERTABLE." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'");
        return $sql;

return $sql;
}

function updateLastActivity($userid) {
        $sql = ("update `".TABLE_PREFIX.DB_USERTABLE."` set ".DB_USERTABLE_LASTACTIVITY." = '".getTimeStamp()."' where ".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'");
        return $sql;
}

function getUserStatus($userid) {
         $sql = ("select cometchat_status.message, cometchat_status.status from cometchat_status where userid = '".mysql_real_escape_string($userid)."'");
         return $sql;
}

function getLink($link) {
    return 'users.php?id='.$link;
}

function getAvatar($image) {
    if (is_file(dirname(dirname(__FILE__)).'/data/aulavirtual/usr_images/usr_'.$image.'_xxsmall.jpg')) {
        return 'data/aulavirtual/usr_images/usr_'.$image.'_xxsmall.jpg';
    } else {
        return 'templates/default/images/no_photo_xxsmall.jpg';
    }
}

function getTimeStamp() {
        return time();
}

function processTime($time) {
        return $time;
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* HOOKS */

function hooks_statusupdate($userid,$statusmessage) {

}

function hooks_forcefriends() {

}

function hooks_activityupdate($userid,$status) {

}

function hooks_message($userid,$unsanitizedmessage) {

}