I'm currently trying to code web parts to display a button to open a Lync chat window and also show the person's Lync presence. I have had some success using this code:

<div style="text-align: center"><a href="sip:person1@world.com"><img alt="test" src="maleicon.jpg" unlockratio="false" style="margin: 1px; width: 50px; height: 42px"/></a></div>

<div style="text-align: center"><span class="ms-imnSpan"><a class="ms-imnlink ms-spimn-presenceLink" onclick="IMNImageOnClick(event);return false;" href="#"><span class="ms-spimn-presenceWrapper ms-imnImg ms-spimn-imgSize-10x10"><img name="imnmark" title="" class="ms-spimn-img ms-spimn-presence-offline-10x10x32" id="imn_1,type=smtp" alt="Offline" src="/_layouts/15/images/spimn.png" sip="person1@world.com" showofflinepawn="1"></span></a></span><span class="ms-noWrap ms-imnSpan"><a class="ms-subtleLink" href="#"></a></span>

<div style="text-align: center"><span class="ms-rteThemeForeColor-6-0"><strong>&#160;Person1</strong></span></div>

The top line of code gives the icon and allows click to open Lync for the specific SIP - I have no issues with this part, and the 3rd line just displays the persons name under the presence indicator.

The issue lies with line 2 - the presence indicator "freezing" on a status and then never updating again and also with some people it shows the full spimn.png without selecting a specific status. Any help with this issue would be much appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.