Q: If the user is logged into the site, can we pass the user credentials to 123 Live Help, so that the user does not have to log into the support software separately.
A: Basically there are two steps to do so,
- Database integration.
- auto-login.
1.Database integration:
123 Live Help itself doesn't have database, but it can integrate most sorts of database, such as mysql, mssql, access, oracle and every other database which communicate with application via ODBC or JDBC. There are two methods for integrating 123 Live Help with database: direct method and auth-url.
1). Integrate chat with existing database directly:
(1) Configure default.xml.
The modes of IntegratedOtherDatabase in default.xml include:
None - does not use an integrated database to authorize users
Mysql - uses a mysql database
Oracle - uses an oracle database
Common - uses all kinds of databases, advanced setting.
ODBC - uses an ODBC to connect to any database you want.
Default setting is None, that means your 123 Live Help don't use any database.
(2) Configure the database xml file.
It could be:
a) Mysql.xml
Parameter |
Type |
Description |
database-host |
string |
The hostname of the database server. |
database-name |
string |
The database name you are using. |
database-user |
string |
The user name which is required to connect to the database. |
database-password |
string |
The password which is required to connect to the database. |
user-table |
string |
The table to store the user information. |
username-field |
string |
The column of names of the user names in the user-table. |
password-field |
string |
The column of names of passwords in the user- table. |
enable-md5 |
string |
It defines whether the password is encrypted with MD5.
On - encoded.
Off - not encoded.
Passwords in many
portal systems and
forum systems like php-
nuke, post-nuke or
phpBB, etc. are
encrypted with
MD5, thus you will need
to set this value to "On". |
b) Oracle.xml
Parameter |
Type |
Description |
mode |
string |
It could be "thin" or"oci" only. It indicates the way to access the
database. The default value is "thin". If you choose "oci", then your server must have installed an racle
client. |
database-host |
string |
The hostname of the database server. |
database-port |
number |
The port of the database. |
database-sid |
string |
The sid of the database server. |
service-name |
string |
The service name to connect to oracle. It doesn't take effect
unless you choose the mode "oci". |
database-user |
string |
The user name which is required to connect to the database. |
password-field |
string |
The column of names of passwords in the user- table. |
database-password |
string |
The password which is required to connect to the database. |
username-field |
string |
The column name of user names in the user- table. |
password-field |
string |
The column name of passwords in the user- table. |
enable-md5 |
string |
It defines whether the password is encrypted with MD5.
On - encoded.
Off - not encoded .
Passwords in many
portal systems and
forum systems such as
php-nuke, post-nuke or
phpBB, etc. are
encrypted with MD5,
thus you will need to set
this value to "On" . |
c) CommonDB.xml
Parameter |
Type |
Description |
jdbc-driver |
string |
The name of the jdbc driver. |
jdbc-url |
string |
The complete jdbc URL.
If the user name and password are required when the database is accessed, they must also be included. |
user-table |
string |
The table to store the user information. |
username-field |
string |
The column name of the user names in the user- table. |
password-field |
string |
The column name of passwords in the user- table. |
enable-md5 |
string |
The user name which is required to connect to the database. |
password-field |
string |
The column of names of passwords in the user- table. |
database-password |
string |
The password which is required to connect to the database. |
username-field |
string |
The column name of user names in the user- table. |
password-field |
string |
The column name of passwords in the user- table. |
enable-md5 |
string |
It defines whether the password is encrypted with MD5.
On - encoded.
Off - not encoded .
Passwords in many portal systems and forum systems such as php-nuke, post-nuke or phpBB, etc. are encrypted with MD5, thus you will need to set this value to "On". |
(3) After configuration, please restart your chat server to make it activated. If failed, please recheck your integrating database configuration.
2). Integrate chat with existing database via auth-url
URL - uses a web URL to authorize a user's login information.
(1) configure login_livehelp.php/asp
You can authorize a users' log in information by using a dynamic web application(we provide this application, php or asp).
php version(login_livehelp.php):
Open login_livehelp.php, you need to configure following parameters.
Parameter |
Type |
Description |
$dbhost |
string |
The hostname of the database server. |
$dbuser |
string |
The user name which is required to connect to the database. |
$dbpasswd |
string |
The password which is required to connect to the database. |
$dbname |
string |
The database name which is required to connect to the database |
$usertable |
string |
The usertable name in the database |
$username_field |
string |
The column name of user names in the user- table. |
$password_field |
string |
The column name of passwords in the user- table. |
$dbms |
string |
Your database type, support Database type: mysql , mysql4 db2, msaccess, mssql-odbc, oracle, postgres7.when you decide to use certain, please include such file with login_livehelp.php, for example, if you try to use mysql4. Please include mysql4.php to the Same folder with login_livehlep.php |
asp version:
Open login_livehelp.asp, you will need to make sure to uncomment one of the strConnString lines and edit it so that it points to where your database is!
If you decide to use certain type database integration method, just remove "'" at the beginning of this sentence.
test if this login script working well
copy login_livehlep.php/asp to anywhere which you can visit on internet.and try to open this url on browser:
http://www.yourhost.com/login_chat.php(asp)?username=%username%&password=%password%
%username% means certain user's name in database,%password% means certain user's password in database. For example:
http://www.yourhost.com/login_chat.php(asp)?username=test%&password=test123 .
Page will respond a value which has different meaning.
Parameter |
Description |
0 |
successfully login as ordinary user; |
1 |
wrong password ; |
2 |
the username can't be used ; |
3 |
login error, e.g. error in connecting database, please check your database configuration ; |
4 |
username does not exist; |
5 |
successfully login as the administrator; |
6 |
guest login not allowed |
(2) configure login_livehelp.php/asp
Please set <integrated-other-database> to URL, and set <auth-url>
to http://www.yourhost.com/login_chat.asp?username=%username%&password=%password%
Like: <integrated-other-database>URL</integrated-other-database>
<auth-url> http://www.yourhost.com/login_chat.asp?username=%username%&password=%password%</auth-url >
Then please restart your chat server to activate it.
2. auto-login configuration:
1) init_user and init_password
With these two parameters your users do not have to re-enter their names and passwords to access the chat room list page as their usernames and passwords are already attached. The "login" button has already been activated.
This provides an effective method for auto-login.
You should be able to encrypt your user's passwords with MD5 to make them secure.
For example :
If the user name = myusername, password = my password, the code you should add into your html will be as follows:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="634" HEIGHT="476">
<PARAM NAME=movie VALUE=" <span class="style2">client.swf?init_user=myusername&init_password=mypassword</span> ">
<PARAM NAME=quality VALUE="high">
<PARAM NAME="menu" value="false">
<EMBED src="client.swf?init_user=myusername&init_password=mypassword" quality=high menu=false WIDTH="634" HEIGHT="476" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
2) Get auto-login username and password in advance
You can get auto-login username and password via session and cookie, it depends on what type of CMS or Forum are you using.
For example in php,You can get auto-login like this:
<?
$username=$_COOKIE['username'];
$password=$_COOKIE['password'];
?>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="634" HEIGHT="476">
<PARAM NAME=movie VALUE=" <span class="style2">client.swf?init_user= <?echo $username;?> &init_password= <?echo $password;?> </span> ">
<PARAM NAME=quality VALUE="high">
<PARAM NAME="menu" value="false">
<EMBED src="client.swf? init_user= <?echo $username;?> &init_password= <?echo $password;?> " quality=high menu=false WIDTH="634" HEIGHT="476" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
You can insert code above to an page or just create a page including them (for example: 123client.php)
Then visit this page, you will see an swf will be displayed and your client doesn't need input username and password themselves, they will auto-login on chat successfully when their accounts are valid. |