Novell Home

Integrating GroupWise Instant Messaging in eGuide

Novell Cool Solutions: Tip
By Martin Plouffe

Digg This - Slashdot This

Posted: 4 Jan 2005
 

A reader recently had a problem getting GroupWise Instant Messaging to work in eGuide. Here's a tip sent in by Martin Plouffe that provides a solution. First, the question that prompted the tip:


"I have populated eDirectory with the instantmessagingID field and eGuide is creating two links for GW Messenger. The links work OK - for example, the nim:addContact?username=Fred link adds the user to my IM list - however, it causes a "page cannot be displayed" error in the detail window of eGuide. I could just change the link from being a target of _self to _blank but I'd still have an error page!"

And here is Martin's tip ...


This is how I did it a few months ago. Below is what I've added to my DETAIL.xsl file in order to add CHAT WITH and ADD TO CONTACT LIST icons:

DETAIL.xsl Example

<!-- GW MESSENGER CHAT -->
            <xsl:if test="detail/object/object.uid = 'USER'">
             <tr>
               <td width="20">
                 <img border="0" width="20" height="20" src="{ThemePath}messchat.gif"/>
               </td>
               <td>
                 <a href="nim:startim?username={detail/object/attribute[name='CN']/value}">
                   <xsl:value-of select="$MessengerChatLabel"/>
                 </a>
               </td>
             </tr>
            </xsl:if> 
                    
                    <xsl:if test="detail/object/object.uid = 'USER'">
                     <tr>
                       <td width="20">
                         <img border="0" width="20" height="20" src="{ThemePath}messadd.gif"/>
                       </td>
                       <td>
                         <a href="nim:addContact?username={detail/object/attribute[name='CN']/value}">
                           <xsl:value-of select="$MessengerAddContactLabel"/>
                         </a>
                       </td>
                     </tr> 
                    </xsl:if> 

Note that you will also have to define and populate your labels in the approriate files. Don't forget to include any additional languages that you are using. This means you need to declare the variables you use in the the stylesheet in the eGuideResources.xsl file. If you are using other languages, you'll need to declare them in the eGuideResources_fr.xsl file as well.

eGuideResources.xsl Example

Below is a snippet from my eGuideResources.xsl file.


<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
<!-- GLOBAL -->
 
<xsl:variable name="FrameTitleLabel">PSC Directory</xsl:variable>
<xsl:variable name="EditInformationLabel">Edit Information</xsl:variable>
<xsl:variable name="PrintFormatLabel">Print Format</xsl:variable>
<xsl:variable name="OrganizationalChartLabel">Organizational Chart</xsl:variable>
<xsl:variable name="InformationLabel">Information</xsl:variable>
<xsl:variable name="AboutLabel">About PSC Directory</xsl:variable>
<xsl:variable name="ChangePasswordLabel">Change Password</xsl:variable>
<xsl:variable name="PoweredByPrefix">powered by</xsl:variable>
<xsl:variable name="HRPMProfileLabel">HRPM Profile</xsl:variable>
<xsl:variable name="MessengerChatLabel">Chat with this Person</xsl:variable>
<xsl:variable name="MessengerAddContactLabel">Add to Contact List</xsl:variable>


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell