Thursday, July 07, 2005

MSN IM Status in Sharepoint

"Just drag and drop a Content Editor web part on a SharePoint site, open the tool pane and click the Source Editor button. In the text entry window type following HTML:

My presence information:
<span>
<img border="0" height="12" width="12" src="/_layouts/images/blank.gif" onload="IMNRC('email@address.com')" id="IMID1" ShowOfflinePawn=1> Jan Tielens
</span>

The result (the menu showed above pops up when you hover over the image) is:



The magic happens in the IMNRC client-side Javascript function that’s called when the OnLoad event of the image is triggered. This function can be found in the /_layouts/1033/owsbrows.js file. Make sure your put span tags around image and the text, otherwise you’ll end up with some unexpected (but funny) behavior. Also remember that you need to generate a unique id value for each presence information block. Finally, if you don’t want the offline image to show when the user isn’t online, you can omit the ShowOffLinePawn tag. "


Leached in full so I can find it in the future.

This is a cool SharePoint hack that allows you to display MSN IM presence information in a Web Part. You even get the cool IM "actions" as you hover over your name. (Send IM, Email, etc, etc).

This works great for me since internally our Presence stuff isn't setup (and I'm not in a position where I can do anything about it). So I've created a Part with the personal MSN IM contacts for my friends/co-workers...

Nice.

Update #1:
Fixed the actual code...
Doesn't help when I cut-n-paste the HTML into the post and Blogger actually thinks it's real HTML. Damn Blogger, do what I mean, not what I actually do... LOL.

9 comments:

Anonymous said...

Weres the code? :)

Greg said...

LOL.. DOGH.

Fixing it now

pad said...

Neat.
Is there any way of hacing this feature without Sharepoint - i.e. on an ordinary web page with Office Communicator as the Presence and Messaging tool?

Greg said...

I'm not sure, but I'd guess so.

I don't have access to Office Communicator so I can't really say for sure or not.
(Heck I don't have much access to SharePoint either, beyond a normal user, so I don't have easy access to the owsbrows.js file either...)

I wish I could have been of more help,
Greg

Anonymous said...

Really cool!!!


Thanks a lot!

Anonymous said...

The standard Contact Details web part also displays job title information...

I think it is better if we don't have to hand type the job titles for every user. Especially if we have alot of them to enter, or in the event you want your job titles to match whatever your HR department enters, or in the event that you want your web part to automatically display the correct information each time the HR department updates someones job title.

How can we modify your example so that it also displays an auto updating job title?

Vladimir Korotenko said...

Hi. I'm create solution for MOSS relative you post.
http://imfield.codeplex.com/

Vladimir Korotenko said...

Hi. I'm create solution for MOSS relative you post.
http://imfield.codeplex.com/

vinna said...

Hi Greg,

Nice post your code rock but i have a question , its working only for mouse over,but my requirement is, its should work for onload not on mouseover.

Thanks,
vinay.