Manage Learn to apply best practices and optimize your operations.

Using Sametime to chat-enable your Web site

This tip describes how to use Sametime to chat-enable your Web site.

Please let others know how useful it is via the rating scale at the end of the tip. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.


View member feedback to this tip.

I have been using Lotus Sametime for instant messaging at Convergens, the business partner I'm working with, since the product was released. We have a main office and a couple of consultants working from home, but often we also have consultants from our main office working at customer sites. We stay connected running running Sametime (Win32 client at our offices, the Java client at customers' sites).

We have recently chat-enabled our public Web site using Sametime and the Sametime Links toolkit. This means that all profiles of employees are available on the Web. When a Web user reads my profile, he will see a small dot that is color-coded to signify whether I am available, temporarily away, busy or not online at all. Clicking the dot will start a Sametime chat with me.

It's easy to implement this. Here's how:

Requirements:
To have this on a public Web site where no password is required to use the chat interface, you'll need the following:

  • Sametime 2.5 or later - I did this on release 3.
  • The Sametime server must have anonymous login enabled. You configure this in the Sametime Admin interface on the Community Services tab.
  • The Sametime server must be available on the Internet.

Disclaimer:
  • Be sure to configure and protect your servers properly when exposing them to the Internet.
  • You might not want to let Internet users use your Sametime environment anonymously. Therefore you need to do more configuring and coding than what you will see here. This would include registering the users and making Name and Password fields available on the Web site.
  • This was tested with MS Internet Explorer 5.5.


Here's the code:

<!-- BEGIN Sametime -->
<SCRIPT src="http://YOURSERVER/Sametime/stlinks/stlinks.js"></SCRIPT>
<script> setSTLinksURL("http://YOURSERVER/Sametime/stlinks")</script>
<script>
var loginName = "Web visitor";
var password = ""
</script>
<script>
writeSTLinksApplet(loginName, password, false);
</script>
<!-- now we write the dot and text to the document ->>
<script>writeSametimeLink("CN=Some Body/OU=Division/O=Company","
Chat is available if you see a green dot",false,"text:yes;icon:yes" ) </script> <!-- END Sametime -->

Where it says YOURSERVER you should put the DNS name or IP address of your Sametime server. The loginName can be anything you like, it will be displayed in the Sametime client when the Sametime user in the other end chats with the Web site user. The writeSametimeLink function is the one that writes the online dot and a text to the Web page, displaying your availability and which when clicked will start the chat session. Note that in my example I have used a canonical name (CN=), if you prefer the abbreviated format (you might have to if you are using Sametime 2.5) you should read the documentation - there is a link below.

You can do a lot more than what I have done with Sametime on your Web site, but this is the basic chat-enabling that will get you started. There is a comprehensive IBM redpiece on the available APIs - of which we have just been using the Sametime Links API - you find it here: Working with the Sametime Client Toolkits.

Jens Bruntt has been a developer and infrastructure advisor for Notes and Domino projects since 1994 and is an R6 Principal Developer working as project manager or consultant depending on the project's size and requirements. He has a Masters degree in Library- and Information Science. Jens is working at Danish Convergens as a senior consultant, primarily architecting Domino Browser based Internet, Intranet and Extranet sites.


MEMBER FEEDBACK TO THIS TIP

I think it would be good to include a "warning" with how the Sametime development kit is "interfering" with WebSphere Portal Enhance (at least 5). Adding Ssametime support to WebSphere Portal during install pre-define same "tags" as the Sametime dev kit, with strange behaviour as a result.

—Anders W.


Do you have comments on this tip? Let us know.

Dig Deeper on Lotus Sametime Instant Messaging

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close