123 Web Messenger Server Software
User Manual
Home
  • Introduction
  • Installation and Upgrade
  • Admin Panel
  • Website Integration
  • Publish Client on Your Website
  • Database Integration
  • Auth-URL Integration
  • User Profile Integration
  • FriendList Integration
  • 3rd Party Instant Messenging Module

Home HomePre page Website Integration | Database Integration Next page

Publish Client on Your Website



After Install 123 Web Messenger Successfully, you could publish 123 Web Messenger to your website with following ways.

1. Web Based Application

For best performance, you could copy <123 webmessenger installed directory>/client folder to your web server document root directory,
for example, http://<your domain>/webmessenger_client/, Please replace it with your real 123 Web Messenger client in the code below.

1.1 Facebook Messenger Style Web Chat Bar

1.1.1 Insert Code

Copy the following code between the HTML tags <body> and </body> in any page you need to embed the facebook messenger style web chat bar.

<!-- For 123 Web Messenger Code Begin -->
<script language="javascript" src="http://<your domain>/webmessenger_client/js/config.js"></script>
<script language="javascript">
var webpath="http://<your domain>/webmessenger_client/";
var username_123webmessenger = "";
var password_123webmessenger = "";
</script>
<script language="javascript" src="http://<your domain>/webmessenger_client/js/123webmessenger_fb.js"></script>
<!-- For 123 Web Messenger Code End -->

1.1.2 How to make user auto login

There are two variables of the above code used to make user auto login.
The username_123webmessenger and password_123webmessenger defines the auto login user's username and password.
You could get username and password from session or cookie.
For example: (PHP)

var username_123webmessenger=<? php echo $_SESSION['username'];?>;
var password_123webmessenger=<? php echo $_SESSION['password'];?>;

1.2 Friend List

1.2.1 Insert Code

Copy the following code in any page you need to add the friendlist hyper link.

<!-- For 123 Web Messenger Code Begin -->
<a href="http://www.123flashchat.com" onclick='window.open("http://<your domain>/webmessenger_client/123webmessenger_friendlist.html","123webmessenger_friendlist",
"height=461,width=260,toolbar=no,menubar=no,
alwaysRaised=yes,
scrollbars=no,resizable=yes,location=no,status=no,alwaysRaised=yes,directories=no,titlebar=no");
return false;'>123 Web Messenger Friend List</a>
<!-- For 123 Web Messenger Code End -->

1.2.2 How to make user auto login

There are two parameters could make user auto login.
The init_user and init_password defines the auto login user's username and password.
You should add these two parameters after 123webmessenger_friendlist.html.
You could get username and password from session or cookie.
For example: (PHP)

123webmessenger_friendlist.html?init_user=<? php echo $_SESSION['username'];?>&init_password=<? php echo $_SESSION['password'];?>

1.3 Web Invitation

Following sample code explains how the invitation is activated and fullfilled with the code of the demo page. So you may add custom code to your website to install 123 Web Messenger.

<html>
<head>
<title>123WebMessenger</title>
</head>
<body>

//It defines the user name and password to login; you can get them on the fly from session or cookie. For example:
//(PHP):
//var init_user=<? php echo $_SESSION['username'];?>;
<script>
var init_user="tom";
var init_password="tom";
</script>
//Embed the following code between the HTML tags <body> and </body> and the username and password definition must //be embedded before this.

<script language="javascript" src="js/123webmessenger.js"></script>
<script language="javascript" src="js/config.js"></script>
<script language="javascript" src="js/cookies.js"></script>
<script language="javascript" src="js/fly.js"></script>
<script language="javascript" src="js/dc.js"></script>
<script language="javascript">dcInit();</script>

//The code runs the invitation method when a user presses the “invite” link. You can create a custom link to replace it, but //it must call a JavaScript method named "invite" to launch the invitation, and the invited user's name must be passed as //the parameter of the invitation method.

//The invited person will see a small invitation window scroll down from the top left of the webpage which contains the web //messenger code.

<a href="javascript:FC_invite_1to1_chat('Jack')">Invite Jack</a>
</body>

2. Windows Desktop Application

Copy the following code in any page to make your users could download it.

<!-- For 123 Web Messenger Code Begin -->
<a href="http://<your domain>/webmessenger_client/123webmessenger_client.zip">123 Web Messenger Windows Desktop Application</a>
<!-- For 123 Web Messenger Code End -->

Related links:

Website Integration


Home HomePre page Website Integration | Database Integration Next page

Copyright @2001-2010 TopCMM Software Corp.