Vitor Pereira

RSS Feeds

BlogSphere LotusGeek Custom Button Custom Button

« Note to self | Main| Impossible is nothing »

Adding Sametime integration to your blog - Revisited

Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 

Yesterday as I was reading eknori.de I found that Ulrich Krause was using stlinks on his blog pointing to the BleedYellow sametime server and decided to have a go at it myself. Before I did I checked with Chris Whisonant who also pointed me to a blog entry by Daniele Vistalli which I had somehow missed before. Using stlinks is pretty straight forward (specially if you are using someone else's sametime server and don't have to setup your own), like Daniele explained you just have to include a couple of lines in the <head> section of your pages and some more wherever you want the link on your page.

This goes in the <head> section:

<!-- 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('side:notes','',false);
</script>
<!-- Sametime BY - integration -->


And this goes wherever you want to place your link:

<script type="text/javascript">
writeSametimeLink('CN=Vitor Pereira,O=BleedYellow', 'Vitor Pereira', false, 'icon:yes;');
</script>


I did change something from Daniele's example, instead of passing "side:notes" as a parameter in the call to writeSametimeLink which would have a person chatting with me identified as 'side:notes/Guest' I am using getCookie("BlogSphereAuthor") as a parameter. "getCookie" is a function included in the Blogsphere template that gets the author name if the person ever commented on this blog and checked the "Remember me" box, if not the sametime server will automatically generate a user name. You can further refine this by checking if the function returns anything and if it doesn't you can provide something else as a parameter instead of having the server generate a name.

This is what I'm using:
writeSTLinksApplet(getCookie("BlogSphereAuthor"),'',false);

If you're using the DominoBlog template or any other blog engine I'm sure there is also an easy way to get to a cookie storing the comment author's name.

If you decide to use stlinks on your blog be advised that it does have some impact loading your pages and there are also some issues with firefox.