Tuesday, May 04, 2004 4:37 PM Jan Tielens

Showing Presence Information In SharePoint Web Parts

If you’ve visited a SharePoint site, you’ve probably noticed the Messenger-style icons in front of people’s names corresponding the IM status. When you hover the mouse pointer over that icon a lot of additional Messenger and Outlook functionality becomes available: you can send an email to that person, plan a meeting, … Isn’t the SharePoint – Office integration great? A nice example is the Members web part:

Patrick Tisseghem showed already in a demo during the Belgian Dev&IT-Pro Days, how you can use this functionality in your own web parts. but I couldn’t find any information on the net that showed how to do this. Well in fact is quite simple to accomplish this and you can easily test this in a SharePoint site. 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:<br>
<span>
<img border="0" height="12" width="12" src="/_layouts/images/blank.gif" onload="IMNRC(
'themail@address.com')" id="IMID1" ShowOfflinePawn=1>&nbsp;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) behaviour. 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. Filed under:

Comments

# re: Showing Presence Information In SharePoint Web Parts

Tuesday, May 04, 2004 6:14 PM by Phil

Ahhh, this gives me a HUGE clue as to issues I've been seeing with the out of box web parts! I have many questions as to why pawns aren't shown sometimes for offline users. Sounds like ShowOfflinePawn is dropped every so often.

# re: Showing Presence Information In SharePoint Web Parts

Wednesday, May 05, 2004 9:37 AM by RoudyBob

Great post, Jan! Just to clarify - this still requires that the end user have Office 2003 installed to get the presence information, right?

# re: Showing Presence Information In SharePoint Web Parts

Wednesday, May 05, 2004 9:59 AM by Jan

Yep, as well as Messenger.

# re: Showing Presence Information In SharePoint Web Parts

Wednesday, May 05, 2004 11:22 AM by Tim Meadowcroft


I saw this in the HTML and have been experimenting using it in my non-Sharepoint webpages too (i.e. intranet webpages that know about user identities), as long as I load the appropriate JS pages in the HTML header (owsbrows.js, ows.js, menu.js and ie55up.js) then I can use this from any webpage.

I don't know what the MS situation is with doing this tho - the licensing position is not obvious, so I haven't actually put it into production yet, but the wow factor is impressive. The next stage, I know, is to replace those webpages with Sharepoint, but this is a quick win.

Anyone know what the legal position is on calling this code from non-Sharepoint generated pages ??

# re: Showing Presence Information In SharePoint Web Parts

Friday, May 14, 2004 12:46 AM by Jim Duncan

Very cool!

# re: Showing Presence Information In SharePoint Web Parts

Tuesday, May 18, 2004 12:28 PM by Jeffrey Smith

I'm a beginner to all this, so maybe this is a stupid question, but when I do this, there is no presence icon until you mouseover? Is there a way to have the presence inciator there regardless?

# re: Showing Presence Information In SharePoint Web Parts

Wednesday, June 23, 2004 11:22 AM by Rick

Brilliant!

# re: Showing Presence Information In SharePoint Web Parts

Tuesday, August 01, 2006 4:49 AM by MrCrool

Great!

I have been looking for ANY information regarding this for a while.

Now, my next question is, what is the best way for utilizing this in my own custom webpart?

I am using the CreateChildControls() method to output the content in my webpart. Can I use this to output the presence information of the users my webpart handles? If so, how? Or do I need to do some combination with the Render() method?

Any clarifiaction will be greatly appreciated :-)

# re: Showing Presence Information In SharePoint Web Parts

Thursday, August 03, 2006 3:45 AM by MrCrool

To clarify my last question:

I need to do this programatically (in code-behind) as my webparts that will use this handles everything i code.

Currently I am experimenting with using TemplateColumn and trying to put the html for the presence of a user dynamically into each row of a datagrid. My I seem to come up short of a good solution.

Please help!

# re: Showing Presence Information In SharePoint Web Parts

Sunday, August 20, 2006 8:58 AM by Hillary

# re: Showing Presence Information In SharePoint Web Parts

Friday, September 15, 2006 6:25 PM by Edison Munoz Recuay

this is an excellent  Help, i coud implement that, but i dont know how i can put a SPAN roud a cell in a dataGrid, sorry, excuseme, could you said how can i do that

thanks

# re: Showing Presence Information In SharePoint Web Parts

Friday, December 15, 2006 10:38 AM by Alisson

Why the members webpart shows several users that are online, and do have Office 2003, as offline? I have a wss site with a members webpart and several users that are showing online on Communicator, appears as offline in the webpart.

# re: Showing Presence Information In SharePoint Web Parts

Monday, January 22, 2007 4:10 AM by [3!]fiva,[3!]fiva

Really amazing! interesting site. keep up the good work. Thanks!,Really amazing! interesting site. keep up the good work. Thanks!

# re: Showing Presence Information In SharePoint Web Parts

Wednesday, March 14, 2007 6:47 AM by businesthd,businesthd,businesthd

# re: Showing Presence Information In SharePoint Web Parts

Saturday, March 17, 2007 11:15 PM by Rick

<a href="http://cigarsworld.net/Fonseca-cigars.php">Fonseca cigars</a> is one of the most exquisite cigar brands in Cuba. Reviews describe this brand as

offering to the consumers all the necessary ingredients for making the experience of enjoying this type of cigar, as unique and special as possible.

# re: Showing Presence Information In SharePoint Web Parts

Thursday, March 22, 2007 7:12 PM by oviaybkxq,oviaybkxq

Ohh p nice site! eiyvnm

<a href= http://www.7oms.at/logs/hp-laptop-pavilion-zv5000.html >hp laptop pavilion zv5000</a> [url=http://www.7oms.at/logs/hp-laptop-pavilion-zv5000.html]hp laptop pavilion zv5000[/url] <a href= http://inversionesalternativas.net/stats/logs/car-finance-loan.html >car finance loan</a> [url=http://inversionesalternativas.net/stats/logs/car-finance-loan.html]car finance loan[/url] <a href= http://bor.org.ro/logs/hospital-job-listing.html >hospital job listing</a> [url=http://bor.org.ro/logs/hospital-job-listing.html]hospital job listing[/url] <a href= http://inversionesalternativas.net/stats/logs/houston-new-car-loan.html >houston new car loan</a> [url=http://inversionesalternativas.net/stats/logs/houston-new-car-loan.html]houston new car loan[/url] <a href= http://www.werkskapelle-traisen.at/logs/camera-digital-pc-review-world.html >camera digital pc review world</a> [url=http://www.werkskapelle-traisen.at/logs/camera-digital-pc-review-world.html]camera digital pc review world[/url] <a href= http://bor.org.ro/logs/los-angeles-times-jobs.html >los angeles times jobs</a> [url=http://bor.org.ro/logs/los-angeles-times-jobs.html]los angeles times jobs[/url] <a href= http://inversionesalternativas.net/stats/logs/commercial-loan-sba.html >commercial loan sba</a> [url=http://inversionesalternativas.net/stats/logs/commercial-loan-sba.html]commercial loan sba[/url] <a href= http://www.werkskapelle-traisen.at/logs/olympus-digital-camera-memory.html >olympus digital camera memory</a> [url=http://www.werkskapelle-traisen.at/logs/olympus-digital-camera-memory.html]olympus digital camera memory[/url]

Good pi Luck Mate!

# re: Showing Presence Information In SharePoint Web Parts

Friday, March 23, 2007 9:58 AM by Lucy! Please call me,Jonny

Lucy! Please call me,Lucy! Please call me

# re: Showing Presence Information In SharePoint Web Parts

Thursday, April 05, 2007 9:41 PM by Wried

Very nice! I have some sites with news, check this out:

<a href= http://kreolikko.livejournal.com >Politics news</a>

<a href= http://icefroggg.livejournal.com >Lastest news</a>

<a href= http://icyiceman.livejournal.com >Lifestyle news</a>

# re: Showing Presence Information In SharePoint Web Parts

Friday, April 20, 2007 7:15 PM by Bobdqal

You Have a great web site!

<a href= http://buyviagrae.jubiiblog.de/ >viagra</a>   <a href= http://buyviagraonline.jubiiblog.de/ >buy viagra online</a>   <a href= http://cheapviagra.jubiiblog.de/ >cheap viagra</a>   <a href= http://buygenericviagra.jubiiblog.de/ >buy generic viagra</a>   <a href= http://buycialisw.jubiiblog.de/ >buy cialis</a>   <a href= http://buycialisonline.jubiiblog.de/ >buy cialis online</a>   <a href= http://buygenericcialis.jubiiblog.de/ >buy generic cialis</a>   <a href= http://buylevitraq.jubiiblog.de/ >buy levitra</a>   <a href= http://buylevitraonline.jubiiblog.de/ >buy levitra online</a>   <a href= http://buygenericlevitra.jubiiblog.de/ >buy generic levitra</a>  

# re: Showing Presence Information In SharePoint Web Parts

Tuesday, April 24, 2007 6:08 PM by Britneyqccom

<a href= http://5.fresmeetplace.info >aaliah</a> <a href= http://3.fresmeetplace.info >a4 audi 2006</a> <a href= http://9.fresmeetfish.info >aa computer centre</a> <a href= http://4.fresmeetplace.info >aamir khans wife</a> <a href= http://8.fresthesrch.info >aa20610</a>

# re: Showing Presence Information In SharePoint Web Parts

Sunday, April 29, 2007 3:00 AM by Britneyghypo

<a href= http://www.angelfire.com/hiphop/xexiqe >a4 paper size inches</a> <a href= http://www.angelfire.com/indie/hibyji >aaron reedy</a> <a href= http://www.angelfire.com/poetry/zikede >a messy desk is a sign of productivity</a> <a href= http://www.angelfire.com/indie/wawado >aaa travel clubs</a> <a href= http://www.angelfire.com/poetry/sositi >a new car with bad credit</a>

# re: Showing Presence Information In SharePoint Web Parts

Wednesday, May 09, 2007 12:03 PM by Britneyjbgyl

<a href= http://www.angelfire.com/indie/mywyxe >affected hurricane katrina people</a> <a href= http://www.angelfire.com/droid/mizeha >return to laughter book review</a> <a href= http://www.angelfire.com/hiphop/junyzu >tableless design</a> <a href= http://www.angelfire.com/indie/gemefi >karaoke download</a> <a href= http://www.angelfire.com/indie/dyzafy >debate on school dress code</a>

# re: Showing Presence Information In SharePoint Web Parts

Thursday, May 10, 2007 11:58 PM by Britneyayeff

<a href= http://poquhe.front.ru >a company call pds parcel</a> <a href= http://fynezi.front.ru >a bird of prey jim grimsley</a> <a href= http://walala.front.ru >a muscleman</a> <a href= http://gutuxa.front.ru >a mummy shaped amulet that held farm tools</a> <a href= http://kybake.front.ru >a very good production inc.</a>