Flash Chat, Web Messenger, Chat Software, Java Chat Server, Live Help Chat, PHP Chat

Flash Chat Software, site messenger software, live chat help
User Manual

Home HomePre page Server API | Introduction Next page

Friend List Integration


Friend List integration

The whole scenario is that the chat server will integrate the friendlist from an external database through dynamic application, like PHP, ASP, ASP.net or JSP if Friendlist module is enabled in chat server. The script will be used to add, remove, and query database.

Parameters List:

The following parameters and values should not be changed.

Parameter Value Description
action %action% This defines the action that the script will perform: 0:Query Friend 1:Add Friend 2:Remove Friend 3:Update Friend
username %username% This defines the user who will perform the action
destusername %destusername% This defines the user whose information entry the script will process
friendgroup %friendgroup% This defines the action that the server will perform.

 

The Application Return:

The application will return an xml-formatted string to chat server for further processing

Action Necessary Parameter Parameter example Return
0:Query Friend Action, username Action=0&username=jack It indicates all of jack’s friend will be returned <UD> <FL> <g n="general"> <u n="tom"> </g> <g n="stranger"> <u n="rose">" </g> </FL> </UD This returning value indicates tom is jack's friend, rose is not jack's friend, but jack is rose's friend
1:Add Friend Action, username, destusername, friendgroup 1.Action=1&username=jack&destusername=tom&friendgroup=general It means jack add tom as his friend 2.Action=1&username=jack&destusername=tom&friendgroup=stranger It indicates jack won’t add tom as his friend <FL r=" 0"> It indicates the friend is added successfully (if tom is already jack's friend before, it also returns success) <FL r=" 1"> It indicates it failed to add the friend
2:Remove Friend Action, username, destusername Action=2&username=jack&destusername=tom It indicates jack will remove tom from his friend list <FL r=" 0"> It indicates the friend is removed successfully (if tom is already not jack's friend before, it also returns success) <FL r=" 1"> It indicates it failed to remove the friend
3:Update Friend Action, username, destusername, friendgroup Action=3&username=jack&destusername=tom&friendgroup=general. It indicates jack will "Add Friends" Action=3&username=jack&destusername=tom&friendgroup=stranger. It indicates jack will "Remove Friends"  

Sample configuration:

In <123flashchat installed directory>/server/etc/groups/default/server.xml <integrated-user-data url="http://yoursite/userdata.php?action=%action%&amp;username=%username%&amp;destusername=%destusername%&amp;friendgroup=%friendgroup%" charset="UTF-8" enable="On"></integrated-user-data>

Sample Code:

You can download sample code from here:

The sample Friendlist database can be generated from friendlist.sql.

The sample code could be used directly if you have imported the sample database and configure the user-data-url in server.xml after restarting your chat server.

You could modify the value of following parameter integrate chat server with Friendlist table in your user databas.

$addFriendSql: The SQL sentence will add a friend.

$removeFriendSql: The SQL sentence will remove a friend.

$queryFriendSql: The SQL sentence will get "username" friendlist.

$opQueryFriendSql: The SQL sentence will get list that whose friend included "username".

$checkRowSql: The SQL sentence will check the existence of the username and destusername record in friend table.

$userNameRowField:The user name field in your user table.

$user->setDb($db): $db will be your database link.

Related links:

Chat Client Parameters

Avatar Chat Parameters

Data API


Home HomePre page Server API | Introduction Next page

Products Chat Software
3rd Party Chat Plug-in & Chat Modules
Dating Software About Us
Flash Chat Software
Web Messenger Software
Live Help Chat Software
Flash Forum
PHP Chat Scripts
Facebook Messenger
Online Webcam Chat Software
Site Messenger Software
Java Chat Server
Online Chat Software
Free Video Chat Rooms
WordPress Chat Plugin
phpBB Chat Module
SMF Chat Module
Joomla Chat Module
Mambo Chat Module
IPB Chat Module
TypePad Chat Widget
vBulletin Chat Module
DotNetNuke Chat Module
Drupal Chat Module
Moodle Chat Module
e107 Chat Module
SkaDate Chat Addon
Datingpro Chat Module
Dolphin Chat Module
phpFoX Chat Module
JomSocial Chat
Contact us
Company Blog
Partnership
Affiliate
Forum

Share 123 Flash Chat:

Copyright © TopCMM Software Corp. 2001-2012 All Rights Reserved. Privacy policy | Terms of Use | SiteMap | Links