Yes, it is possible.
In the last few weeks I've been working a lot with the connections & samtime web APIs (I'm beta-testing Connections 2.0) and I liked those a lot.
So, back from work I begun to think about a way to integrate the great BleedYellow infrastruacture that's made available by the BleedYellow team.
I started to work with Sametime Links API (that a great API but I think it's under-exploited, learn more here) to replace the Google Badges I was using on my blog.
I introduced a month ago the possibility for visitors of my blog to ping me and start a chat direclty from the context of my website.
Now I replaced it with my samtime links integration using the BleedYello IM infrastructure.
I asked Chris Whisonant about making this information public and he confirmed, go for it.
So here's how you can do the same and STLinks enable your site / blog.
The <HEAD>
In your page head you need to add this piece of code:
<!-- Sametime BY - integration -->
<link rel="stylesheet" href="http://im.bleedyellow.com/sametime/stlinks/stlinks.css" type="text/css" />
<script type="text/javascript" src="http://im.bleedyellow.com/sametime/stlinks/stlinks.js"></script>
<script type="text/javascript" >
setSTLinksURL('http://im.bleedyellow.com/sametime/stlinks/', 'en');
STHost = 'im.bleedyellow.com';
writeSTLinksApplet('vistalli.it','',false);
</script>
<!-- Sametime BY - integration -->
The line in red is related to stylesheets and is used to import the sametime links stylesheet you could even copy & cusomize styles into your site stylesheet but with this you have all you need.
The green section is where sametime links starts up, first, I imported the mail STLinks javascript file, than I updated the resource base (I'm using remote resources so I need to tell stlinks where to load stuff from).
I also set the STHost variable to address a missing parameter in Bleedyellow's hostinfo.js file (a sametime file that publish information on sametime connectivity).
Finally i "writeSTLinksApplet", this creates in you page the applet that will handle communication to the sametime server and event handling inside the browser.
As you can see I pass "vistalli.it" as a parameter to writeSTLinkApplet, this means that any user clicking on links at your site will be identified as vistalli.it/Guest when they start a chat session with you. To better undestand the meaning of parameters please refer to the STLinks documention. (see Resources)
The setup is done.
Linking your name
Now that your page has begun to talk to the im.bleedyellow.com server it's time to lie down you "active links".
To do this you use the writeSametimeLink api to complete the work:
<script type="text/javascript">
writeSametimeLink('CN=Daniele Vistalli,O=BleedYellow', 'Daniele Vistalli', false, 'icon:yes;');
</script>
The writeSametimeLink call has two parameters.
The first has to be your "resolved" fullname in the BleedYellow address book. As you can imagin the pattern is CN=FirstName LastName,O=BleedYellow.
The second is you "abbreviate" name but it doesn't matter since with the third parameter we're telling sametime not to reslove the username. (This is needed since the Bleedyellow server is not allowing name resolution when the requesting partner is a guest).
The last parameter allow customization of the appearance, in this case I decided to show a small icon near the user name.
What could be done
This is pretty basic and Sametime allows for a number of things to be done. For instance we could wrap the STLinks api and the new Sametime Connect WebAPI together and use the "best available" option.
Then we could build a dynamic menu around the user link or anything else.
The thing I wanted to point out is how easy is to integrate awareness using IBM Sametime Links toolkit, one of the best and less used feature of the sametime platform.
What's next
In the next post I'll show some of the magic that the SemanticTagService is bringing to IBM products. It's used in connections and it's going to be available in new products too (like Websphere Portal 6.1). I hope to see the SemanticTagService come to Domino 8.5 too. It's a powerful new way to make your pages live.
More on this very soon.
Resources:
- Sametime Links documentation: http://publibfp.boulder.ibm.com/epubs/pdf/c2359971.pdf
- A dW article on extending Sametime links: http://www.ibm.com/developerworks/lotus/library/ls-ST_popup/index.html
Comments (6)
Daniele Vistalli May 13th, 2008 20:10:38