ArrowChat - Facebook Style Chat

ArrowChat - Facebook Style Chat v4.0.2

No permission to download

ArrowSuites

Active member
In preparation for a new feature coming soon, we have made the following changes to software update times:

Old
Business Licenses: 1 Year
Premium Licenses: 6 Months
Kick Starter Licenses: 6 Months

New
Business Licenses: Unlimited
Premium Licenses: 1 Year
Kick Starter Licenses: 1 Year

This change is effective immediately and is retroactive for anyone that had an active license.
 

Glockie

Well-known member
In preparation for a new feature coming soon, we have made the following changes to software update times:

Old
Business Licenses: 1 Year
Premium Licenses: 6 Months
Kick Starter Licenses: 6 Months

New
Business Licenses: Unlimited
Premium Licenses: 1 Year
Kick Starter Licenses: 1 Year

This change is effective immediately and is retroactive for anyone that had an active license.
Video chat/cams a possibility?
And what new features?
 

ArrowSuites

Active member
This resource has been removed and is no longer available. The following reason was provided:
This resource has been deleted by XenForo Ltd. in line with our resource housekeeping criteria.
 

Iggy

Well-known member
its a shame to see, but idk how long it takes to upgrade the software....coming up on 2 years now.....
support for 2000 platforms but not modern php and memcached etc.......you guys came so close and built a nice script we really like, but it needs to be maintained....still hoping to see that happen.....
 

ArrowSuites

Active member
This software is still being actively maintained and we actually have a huge update coming in March with some big improvements to mobile.

However, we are going to end our resource here on XenForo. This is the 4th or 5th time it’s been deleted. We receive sporadic emails from XenForo and have for a long time so it’s just going to be deleted over and over again. Unfortunately, when deleted, we have to contact staff and I’m sure they’ll be sick of recovering it if they aren’t already.

You can contact us or purchase at https://www.arrowchat.com

Thank you all for your support over the years and a big shoutout to @Martok for his help.

The ArrowChat Team
 

ArrowSuites

Active member
If you are using memcached with XenForo, here is the get_user_id() function instead of doing the cookie route:

PHP:
    function get_user_id()
    {
        global $db;
        
        $userid = NULL;
        
        $m = new Memcached();
        $m->addServer('127.0.0.1', 11211);

        if (!empty($_COOKIE['xf_session']))
        {   
            $session = $m->get('xf_session_' . $_COOKIE['xf_session']);
            
            if (!empty($session))
            {
                $data = unserialize($session[0]);
                $data = unserialize($data);
                $userid = $data['user_id'];
                
                if (!empty($userid))
                {
                    $result = $db->execute("
                        SELECT is_banned, user_state
                        FROM " . TABLE_PREFIX . DB_USERTABLE . "
                        WHERE " . DB_USERTABLE_USERID . " = '" . $userid . "'
                    ");
                    
                    if ($row = $db->fetch_array($result))
                    {
                        if ($row['is_banned'] == 1 OR $row['user_state'] == 'email_confirm' OR $row['user_state'] == 'moderated' OR $data['isIpBanned']['result'] == true)
                        {
                            $userid = NULL;
                        }
                    }
                }
            }
        }

        return $userid;
    }
 

matyprot

Member
If you are using memcached with XenForo, here is the get_user_id() function instead of doing the cookie route:

PHP:
    function get_user_id()
    {
        global $db;
       
        $userid = NULL;
       
        $m = new Memcached();
        $m->addServer('127.0.0.1', 11211);

        if (!empty($_COOKIE['xf_session']))
        {  
            $session = $m->get('xf_session_' . $_COOKIE['xf_session']);
           
            if (!empty($session))
            {
                $data = unserialize($session[0]);
                $data = unserialize($data);
                $userid = $data['user_id'];
               
                if (!empty($userid))
                {
                    $result = $db->execute("
                        SELECT is_banned, user_state
                        FROM " . TABLE_PREFIX . DB_USERTABLE . "
                        WHERE " . DB_USERTABLE_USERID . " = '" . $userid . "'
                    ");
                   
                    if ($row = $db->fetch_array($result))
                    {
                        if ($row['is_banned'] == 1 OR $row['user_state'] == 'email_confirm' OR $row['user_state'] == 'moderated' OR $data['isIpBanned']['result'] == true)
                        {
                            $userid = NULL;
                        }
                    }
                }
            }
        }

        return $userid;
    }
thanks, it need past to /arrowchat/includes/integration.php
Code:
<?php

    /*
    || #################################################################### ||
    || #                             ArrowChat                            # ||
    || # ---------------------------------------------------------------- # ||
    || #    Copyright ©2010-2012 ArrowSuites LLC. All Rights Reserved.    # ||
    || # This file may not be redistributed in whole or significant part. # ||
    || # ---------------- ARROWCHAT IS NOT FREE SOFTWARE ---------------- # ||
    || #   http://www.arrowchat.com | http://www.arrowchat.com/license/   # ||
    || #################################################################### ||
    */
    
    /**
     * This function returns the user ID of the logged in user on your site.  Technical support will not
     * help you with this for stand-alone installations.  You must purchase the professional installation
     * if you are having trouble.
     *
     * Suggestion: Check out the other integration files in the functions/integrations directory for
     * many examples of how this can be done.  The easiest way is to get the user ID through a cookie.
     *
     * @return the user ID of the logged in user or NULL if not logged in
     */
    function get_user_id()
    {
        global $db;
        
        $userid = NULL;
        
        $m = new Memcached();
        $m->addServer('127.0.0.1', 11211);

        if (!empty($_COOKIE['xf_session']))
        {   
            $session = $m->get('xf_session_' . $_COOKIE['xf_session']);
            
            if (!empty($session))
            {
                $data = unserialize($session[0]);
                $data = unserialize($data);
                $userid = $data['user_id'];
                
                if (!empty($userid))
                {
                    $result = $db->execute("
                        SELECT is_banned, user_state
                        FROM " . TABLE_PREFIX . DB_USERTABLE . "
                        WHERE " . DB_USERTABLE_USERID . " = '" . $userid . "'
                    ");
                    
                    if ($row = $db->fetch_array($result))
                    {
                        if ($row['is_banned'] == 1 OR $row['user_state'] == 'email_confirm' OR $row['user_state'] == 'moderated' OR $data['isIpBanned']['result'] == true)
                        {
                            $userid = NULL;
                        }
                    }
                }
            }
        }

        return $userid;
    }

    /**
     * This function returns the SQL statement for the buddylist of the user.  You should retrieve
     * all ONLINE friends that the user is friends with.  Do not retrieve offline users.  You can use
     * global $online_timeout to get the online timeout.
     * ex: AND (arrowchat_status.session_time + 60 + " . $online_timeout . ") > " . time() . "
     *
     * @param userid the user ID of the person receiving the buddylist
     * @param the time of the buddylist request
     * @return the SQL statement to retrieve the user's friend list
     */
    function get_friend_list($userid, $time)
    {
        global $db;
        global $online_timeout;
        
        $sql = ("
            SELECT DISTINCT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_AVATAR . " avatar, CONCAT(" . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . ",'.'," . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . ") link, arrowchat_status.is_admin, arrowchat_status.status
            FROM " . TABLE_PREFIX . DB_FRIENDSTABLE . "
            JOIN " . TABLE_PREFIX . DB_USERTABLE . "
                ON  " . TABLE_PREFIX . DB_FRIENDSTABLE . "." . DB_FRIENDSTABLE_FRIENDID . " = " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . "
            LEFT JOIN arrowchat_status
                ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = arrowchat_status.userid
            WHERE " . TABLE_PREFIX . DB_FRIENDSTABLE . "." . DB_FRIENDSTABLE_USERID . " = '" . $db->escape_string($userid) . "'
                AND arrowchat_status.session_time > (" . time() . " - " . $online_timeout . " - 60)
            ORDER BY " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " ASC
        ");
        
        return $sql;
    }

    /**
     * This function returns the SQL statement for all online users.  You should retrieve
     * all ONLINE users regardless of friend status.  Do not retrieve offline users.  You can use
     * global $online_timeout to get the online timeout.
     * ex: AND (arrowchat_status.session_time + 60 + " . $online_timeout . ") > " . time() . "
     *
     * @param userid the user ID of the person receiving the buddylist
     * @param the time of the buddylist request
     * @return the SQL statement to retrieve all online users
     */
    function get_online_list($userid, $time)
    {
        global $db;
        global $online_timeout;
        
        $sql = ("
            SELECT DISTINCT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_AVATAR . " avatar, CONCAT(" . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . ",'.'," . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . ") link, arrowchat_status.is_admin, arrowchat_status.status
            FROM " . TABLE_PREFIX . DB_USERTABLE . "
            JOIN arrowchat_status
                ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = arrowchat_status.userid 
            WHERE arrowchat_status.session_time > (" . time() . " - " . $online_timeout . " - 60)
                AND " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " != '" . $db->escape_string($userid) . "'
            ORDER BY " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " ASC
        ");
        
        return $sql;
    }

    /**
     * This function returns the SQL statement to get the user details of a specific user.  You should
     * get the user's ID, username, last activity time in unix, link to their profile, avatar, and status.
     *
     * @param userid the user ID to get the details of
     * @return the SQL statement to retrieve the user's defaults
     */
    function get_user_details($userid)
    {
        global $db;
        
        $sql = ("
            SELECT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity,  CONCAT(" . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . ",'.'," . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . ") link,  " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_AVATAR . " avatar, arrowchat_status.is_admin, arrowchat_status.status
            FROM " . TABLE_PREFIX . DB_USERTABLE . "
            LEFT JOIN arrowchat_status
                ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = arrowchat_status.userid
            WHERE " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = '" . $db->escape_string($userid) . "'
        ");
        
        return $sql;
    }

    /**
     * This function returns the profile link of the specified user ID.
     *
     * @param userid the user ID to get the profile link of
     * @return the link of the user ID's profile
     */
    function get_link($link, $user_id)
    {
        global $base_url;
        
        return $base_url . '../index.php?members/' . $link;
    }

    /**
     * This function returns the URL of the avatar of the specified user ID.
     *
     * @param userid the user ID of the user
     * @param image if the image includes more than just a user ID, this param is passed
     * in from the avatar row in the buddylist and get user details functions.
     * @return the link of the user ID's avatar
     */
    function get_avatar($image, $user_id)
    {
        global $base_url;
        
        $group = floor($user_id / 1000);
        
        if (!empty($image))
        {
            $md5 = md5(strtolower(trim($image)));
            return 'https://secure.gravatar.com/avatar/' . $md5 . '?s=50';
        }
        else if (is_file(dirname(dirname(dirname(__FILE__))) . '/data/avatars/s/' . $group . '/' . $user_id . '.jpg'))
        {
            return $base_url . '../data/avatars/s/' . $group . '/' . $user_id . '.jpg';
        }
        else
        {
            return $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.png";
        }
    }
    
    /**
     * This function returns the group ID of the user into an array.
     *
     * @param userid the user ID of the user
     * @return an array of groups the user is in or NULL if no groups
     */
    function get_group_id($userid)
    {
        global $db;
        
        $group_ids = array();
      
        $result = $db->execute("
            SELECT user_group_id, secondary_group_ids
            FROM " . TABLE_PREFIX . DB_USERTABLE . "
            WHERE " . DB_USERTABLE_USERID . " = '" . $db->escape_string($userid) . "'
        ");
      
        if ($result AND $db->count_select() > 0)
        {     
            if ($row = $db->fetch_array($result))
            {
                $group_ids[] = $row['user_group_id'];
                
                $tmp = explode(",", $row['secondary_group_ids']);
                
                foreach ($tmp as $val)
                {
                    if (!empty($val))
                        $group_ids[] = $val;
                }
            }
            
            return $group_ids;
        }
        else
        {
            return NULL;
        }
    }
    
    /**
     * This function returns an array of all the groups and their names so that
     * the ArrowChat admin panel can manage them.
     *
     * @return nested arrays of the group IDs and names. The nested array must follow:
               array(group id, group name)
     */
    function get_all_groups()
    {
        global $db;
        
        $groups = array();
        
        $result = $db->execute("
            SELECT user_group_id, title
            FROM " . TABLE_PREFIX . "user_group
        ");
        
        if ($result AND $db->count_select() > 0)
        {     
            while ($row = $db->fetch_array($result))
            {
                $groups[] = array($row['user_group_id'], $row['title']);
            }
            
            return $groups;
        }
        else
        {
            return NULL;
        }
    }

    /**
     * This function returns the name of the logged in user.  You should not need to
     * change this function.
     *
     * @param userid the user ID of the user
     * @return the name of the user
     */
    function get_username($userid)
    {
        global $db;
        global $language;
        global $show_full_username;
        
        $users_name = $language[83];

        $result = $db->execute("
            SELECT " . DB_USERTABLE_NAME . " name
            FROM " . TABLE_PREFIX . DB_USERTABLE . "
            WHERE " . DB_USERTABLE_USERID . " = '" . $db->escape_string($userid) . "'
        "); 

        if ($result AND $db->count_select() > 0) 
        {
            $row = $db->fetch_array($result);
            $users_name = $row['name'];
        }

        $pieces = explode(" ", $users_name);
        
        if ($show_full_username == 1)
        {
            return $users_name;
        }
        else
        {
            return $pieces[0];
        }
    }

?>
correct?
 

ArrowSuites

Active member
thanks, it need past to /arrowchat/includes/integration.php
Code:
<?php

    /*
    || #################################################################### ||
    || #                             ArrowChat                            # ||
    || # ---------------------------------------------------------------- # ||
    || #    Copyright ©2010-2012 ArrowSuites LLC. All Rights Reserved.    # ||
    || # This file may not be redistributed in whole or significant part. # ||
    || # ---------------- ARROWCHAT IS NOT FREE SOFTWARE ---------------- # ||
    || #   http://www.arrowchat.com | http://www.arrowchat.com/license/   # ||
    || #################################################################### ||
    */
   
    /**
     * This function returns the user ID of the logged in user on your site.  Technical support will not
     * help you with this for stand-alone installations.  You must purchase the professional installation
     * if you are having trouble.
     *
     * Suggestion: Check out the other integration files in the functions/integrations directory for
     * many examples of how this can be done.  The easiest way is to get the user ID through a cookie.
     *
     * @return the user ID of the logged in user or NULL if not logged in
     */
    function get_user_id()
    {
        global $db;
       
        $userid = NULL;
       
        $m = new Memcached();
        $m->addServer('127.0.0.1', 11211);

        if (!empty($_COOKIE['xf_session']))
        {  
            $session = $m->get('xf_session_' . $_COOKIE['xf_session']);
           
            if (!empty($session))
            {
                $data = unserialize($session[0]);
                $data = unserialize($data);
                $userid = $data['user_id'];
               
                if (!empty($userid))
                {
                    $result = $db->execute("
                        SELECT is_banned, user_state
                        FROM " . TABLE_PREFIX . DB_USERTABLE . "
                        WHERE " . DB_USERTABLE_USERID . " = '" . $userid . "'
                    ");
                   
                    if ($row = $db->fetch_array($result))
                    {
                        if ($row['is_banned'] == 1 OR $row['user_state'] == 'email_confirm' OR $row['user_state'] == 'moderated' OR $data['isIpBanned']['result'] == true)
                        {
                            $userid = NULL;
                        }
                    }
                }
            }
        }

        return $userid;
    }

    /**
     * This function returns the SQL statement for the buddylist of the user.  You should retrieve
     * all ONLINE friends that the user is friends with.  Do not retrieve offline users.  You can use
     * global $online_timeout to get the online timeout.
     * ex: AND (arrowchat_status.session_time + 60 + " . $online_timeout . ") > " . time() . "
     *
     * @param userid the user ID of the person receiving the buddylist
     * @param the time of the buddylist request
     * @return the SQL statement to retrieve the user's friend list
     */
    function get_friend_list($userid, $time)
    {
        global $db;
        global $online_timeout;
       
        $sql = ("
            SELECT DISTINCT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_AVATAR . " avatar, CONCAT(" . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . ",'.'," . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . ") link, arrowchat_status.is_admin, arrowchat_status.status
            FROM " . TABLE_PREFIX . DB_FRIENDSTABLE . "
            JOIN " . TABLE_PREFIX . DB_USERTABLE . "
                ON  " . TABLE_PREFIX . DB_FRIENDSTABLE . "." . DB_FRIENDSTABLE_FRIENDID . " = " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . "
            LEFT JOIN arrowchat_status
                ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = arrowchat_status.userid
            WHERE " . TABLE_PREFIX . DB_FRIENDSTABLE . "." . DB_FRIENDSTABLE_USERID . " = '" . $db->escape_string($userid) . "'
                AND arrowchat_status.session_time > (" . time() . " - " . $online_timeout . " - 60)
            ORDER BY " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " ASC
        ");
       
        return $sql;
    }

    /**
     * This function returns the SQL statement for all online users.  You should retrieve
     * all ONLINE users regardless of friend status.  Do not retrieve offline users.  You can use
     * global $online_timeout to get the online timeout.
     * ex: AND (arrowchat_status.session_time + 60 + " . $online_timeout . ") > " . time() . "
     *
     * @param userid the user ID of the person receiving the buddylist
     * @param the time of the buddylist request
     * @return the SQL statement to retrieve all online users
     */
    function get_online_list($userid, $time)
    {
        global $db;
        global $online_timeout;
       
        $sql = ("
            SELECT DISTINCT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_AVATAR . " avatar, CONCAT(" . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . ",'.'," . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . ") link, arrowchat_status.is_admin, arrowchat_status.status
            FROM " . TABLE_PREFIX . DB_USERTABLE . "
            JOIN arrowchat_status
                ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = arrowchat_status.userid
            WHERE arrowchat_status.session_time > (" . time() . " - " . $online_timeout . " - 60)
                AND " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " != '" . $db->escape_string($userid) . "'
            ORDER BY " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " ASC
        ");
       
        return $sql;
    }

    /**
     * This function returns the SQL statement to get the user details of a specific user.  You should
     * get the user's ID, username, last activity time in unix, link to their profile, avatar, and status.
     *
     * @param userid the user ID to get the details of
     * @return the SQL statement to retrieve the user's defaults
     */
    function get_user_details($userid)
    {
        global $db;
       
        $sql = ("
            SELECT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity,  CONCAT(" . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . ",'.'," . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . ") link,  " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_AVATAR . " avatar, arrowchat_status.is_admin, arrowchat_status.status
            FROM " . TABLE_PREFIX . DB_USERTABLE . "
            LEFT JOIN arrowchat_status
                ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = arrowchat_status.userid
            WHERE " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = '" . $db->escape_string($userid) . "'
        ");
       
        return $sql;
    }

    /**
     * This function returns the profile link of the specified user ID.
     *
     * @param userid the user ID to get the profile link of
     * @return the link of the user ID's profile
     */
    function get_link($link, $user_id)
    {
        global $base_url;
       
        return $base_url . '../index.php?members/' . $link;
    }

    /**
     * This function returns the URL of the avatar of the specified user ID.
     *
     * @param userid the user ID of the user
     * @param image if the image includes more than just a user ID, this param is passed
     * in from the avatar row in the buddylist and get user details functions.
     * @return the link of the user ID's avatar
     */
    function get_avatar($image, $user_id)
    {
        global $base_url;
       
        $group = floor($user_id / 1000);
       
        if (!empty($image))
        {
            $md5 = md5(strtolower(trim($image)));
            return 'https://secure.gravatar.com/avatar/' . $md5 . '?s=50';
        }
        else if (is_file(dirname(dirname(dirname(__FILE__))) . '/data/avatars/s/' . $group . '/' . $user_id . '.jpg'))
        {
            return $base_url . '../data/avatars/s/' . $group . '/' . $user_id . '.jpg';
        }
        else
        {
            return $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.png";
        }
    }
   
    /**
     * This function returns the group ID of the user into an array.
     *
     * @param userid the user ID of the user
     * @return an array of groups the user is in or NULL if no groups
     */
    function get_group_id($userid)
    {
        global $db;
       
        $group_ids = array();
     
        $result = $db->execute("
            SELECT user_group_id, secondary_group_ids
            FROM " . TABLE_PREFIX . DB_USERTABLE . "
            WHERE " . DB_USERTABLE_USERID . " = '" . $db->escape_string($userid) . "'
        ");
     
        if ($result AND $db->count_select() > 0)
        {    
            if ($row = $db->fetch_array($result))
            {
                $group_ids[] = $row['user_group_id'];
               
                $tmp = explode(",", $row['secondary_group_ids']);
               
                foreach ($tmp as $val)
                {
                    if (!empty($val))
                        $group_ids[] = $val;
                }
            }
           
            return $group_ids;
        }
        else
        {
            return NULL;
        }
    }
   
    /**
     * This function returns an array of all the groups and their names so that
     * the ArrowChat admin panel can manage them.
     *
     * @return nested arrays of the group IDs and names. The nested array must follow:
               array(group id, group name)
     */
    function get_all_groups()
    {
        global $db;
       
        $groups = array();
       
        $result = $db->execute("
            SELECT user_group_id, title
            FROM " . TABLE_PREFIX . "user_group
        ");
       
        if ($result AND $db->count_select() > 0)
        {    
            while ($row = $db->fetch_array($result))
            {
                $groups[] = array($row['user_group_id'], $row['title']);
            }
           
            return $groups;
        }
        else
        {
            return NULL;
        }
    }

    /**
     * This function returns the name of the logged in user.  You should not need to
     * change this function.
     *
     * @param userid the user ID of the user
     * @return the name of the user
     */
    function get_username($userid)
    {
        global $db;
        global $language;
        global $show_full_username;
       
        $users_name = $language[83];

        $result = $db->execute("
            SELECT " . DB_USERTABLE_NAME . " name
            FROM " . TABLE_PREFIX . DB_USERTABLE . "
            WHERE " . DB_USERTABLE_USERID . " = '" . $db->escape_string($userid) . "'
        ");

        if ($result AND $db->count_select() > 0)
        {
            $row = $db->fetch_array($result);
            $users_name = $row['name'];
        }

        $pieces = explode(" ", $users_name);
       
        if ($show_full_username == 1)
        {
            return $users_name;
        }
        else
        {
            return $pieces[0];
        }
    }

?>
correct?
Sorry for the slow response (we don't get email notifications). Yes, that is where the code should go.
 

ArrowSuites

Active member
ArrowSuites updated ArrowChat - Facebook Style Chat with a new update entry:

Version 4.0 beta is now available!

It's our biggest update in two years with a focus on redesigning the front-end UI.

A Modern User Interface
  • Combining Features
    Rather than clutter up the user's screen with multiple tabs, we've combined chat rooms, notifications, and moderation into one tab.

  • Streamlined Chat Rooms
    The chat room windows now look like the user windows. This provides a more friendly user interface and allows for easy group chat integration in the future.

  • Chat Tabs...

Read the rest of this update entry...
 

hellboy78

Active member
I don't really understand why for video chat for mobile I need to use agora.io and pay per minute.
if works for desktop using internet datas, should do the same for mobile
 
Top