Chat Software, Flash Chat, PPV, Site Messenger, Live Chat
User Manual

Home HomePre page User Profile Integration | 3rd Party Instant Messenging Module Next page

FriendList Integration


FriendList 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, or query database.

Parameters List:

The following parameters and values should not be changed.

ParameterValueDescription
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

ActionNecessary ParameterParameter exampleReturn
0:Query FriendAction, 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 FriendAction, 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 FriendAction, username, destusernameAction=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 FriendAction, username, destusername, friendgroupAction=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 <123webmessenger 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" if the one who is not on "username" friend list.

$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:

Website Integration


Home HomePre page User Profile Integration | 3rd Party Instant Messenging Module Next page

Products Chat Software
3rd Party Chat Plug-in & Chat Modules
Dating Software About Us
Flash Chat Software
PPV Chat Software
Web Messenger Software
Live Help Chat Software
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 Limited 2001-2013 All Rights Reserved. Privacy policy | Terms of Use | SiteMap | Links