Home

 

Integrate the Profiles business card


Overview

Include the Profiles business card in your Web application so that users can access a snapshot of your profile information and contact details.

You can integrate the Profiles business card with your Web application based on one of the following:

The x-lconn-userid parameter is any unique identifier for the user defined by the administrator and originating from the corporate LDAP directory. Many LDAP directories contain users who do not have e-mail addresses and using the x-lconn-userid parameter is a way of preemptively avoiding a dependency on the e-mail address. In addition, administrators can edit configuration property settings to prevent e-mail addresses from being displayed in IBM Lotus Connections. Hiding e-mail is a way to prevent the scraping of e-mail addresses and protect the privacy of users. You can architect your Web application so that it does not rely on e-mail addresses for retrieving user data, such as the contextual business card.

Two types of business card are available to add to your Web application:

The business card used in previous releases, semanticTagService.js, has been deprecated in Lotus Connections 2.5. The semanticTagService.js file is still functional, but it is no longer officially supported, and bug fixes will not be provided. To integrate the business card that contains the latest updates, you need to point to the semanticTagService.js file.

The business card cannot be stored locally; it must be located on a server.


Integrate Profiles business card with your Web application

  1. Add the following code to the bottom of the Web page before the closing </body> tag.

      <script type="text/javascript" src="/profiles/ibm_semanticTagServlet/javascript/semanticTagService.js"></script>

    The context root is hard-coded to /profiles by default. When the base URL is anything other than the default (/profiles), configure the application requesting the business card to do one of the following before requesting the semantic script:

    • Use the override value by defining a JavaScript variable called SemTagSvc_baseUrl that contains the non-default root context.

    • Set the configuration value for the SemTagServiceConfig.baseUrl.

    For example:

      <script language="javascript" type="text/javascript"> var SemTagSvc_baseUrl = "http://example.com/zprofiles/ibm_semanticTagServlet"; </script>

  2. Use and modify one of the following code examples to render the card with your personal details.

    To add the inline card:

    Option Description
    Based on user ID

    <div class="vcard X-person-display-inline">
      <span class="fn" style="display:none;"><
          user_name>
      </span>
      <span class="x-lconn-userid" style="display: none;"><
          user_id>
      </span>
    </div>
    

    For example:

    <div class="vcard X-person-display-inline">
      <span class="fn" style="display:none;">Joe Todd</span>
      <span class="x-lconn-userid" style="display: none;">
        91ae7240-8f0a-1028-737f-db07163b51b2
      </span>
    </div>
    
    Based on e-mail address

    <div class="vcard X-person-display-inline">
      <span class="fn" 
            style="display:none;"><user_name>
      </span>
      <span class="email" 
            style="display:none;"><user_email_address>
      </span>
    </div>
    

    For example:

    <div class="vcard X-person-display-inline">
      <span class="fn" style="display:none;">
          Joe Todd
      </span>
      <span class="email" style="display:none;">
          todd@mycomp.com
      </span>
    </div>
    

    To add the pop-up card:

    Option Description
    Based on user ID

    <span class="vcard">
      <a href="javascript:void(0);"class="fn url"><user_name></a>
      <span class="x-lconn-userid" style="display: none;"><
         user_id>
      </span>
    </span>
    

    For example:

    <span class="vcard">
      <a href="javascript:void(0);"class="fn url">Joe Todd</a>
      <span class="x-lconn-userid" style="display: none;">
          91ae7240-8f0a-1028-737f-db07163b51b2
      </span>
    </span>
    
    Based on e-mail address

    <span class="vcard">
       <a href="javascript:void(0);"class="fn url"><user_name></a>
       <span class="email" style="display: none;"><
           user_email_address>
       </span>
    </span>
    

    For example:

    <span class="vcard">
       <a href="javascript:void(0);"class="fn url">Joe Todd</a>
       <span class="email" style="display: none;">
           todd@mycomp.com
       </span>
    </span>
    

  3. Optional: If you are using the standalone business card, include the following code to provide support for bidirectional languages:

      <script type="text/javascript"> var SemTagSvcConfig = { isBidiRTL: true}; </script>

  4. Optional: If you are building a Web application that constructs its user interface using Ajax, do one of the following to make the business card user interface and a person's profile data available:

    This step only applies when you are building an application that constructs its user interface using Ajax. The business card code only scans the HTML when the page is first loaded so, if you dynamically alter the page, you need to manually specify the DOM elements that the code should rescan for business card vcard class attributes. If you are developing a completely static page, you can ignore this step.

    Do one of the following:

    • For applications that construct HTML dynamically, you can add LiveName programmatically using JavaScript. Use the following API example:

      var htmlContent = 
      "<span class='vcard'>"+
         "<a href='javascript:void(0);' class='fn url'>user_name</a>"+
         "<span class='email' style='display: none;'>"+
            "user_name@company.com"+
         "</span>'+
      "</span>";
       document.getElementById("containerId").innerHTML += htmlContent;
       setTimeout("SemTagSvc.parseDom(null, 'containerId')", 500 );
      

      For example:

      var htmlContent =
      "<span class='vcard'>"+
         "<a href='javascript:void(0);' class='fn url'>Joe Todd</a>"+
         "<span class='email' style='display: none;'>"+
            "todd@mycomp.com"+
         "</span>'+
      "</span>";
       document.getElementById("containerId").innerHTML += htmlContent;
       setTimeout("SemTagSvc.parseDom(null, 'containerId')", 500 );
      

    • To make the business card user interface and a person's profile data available on your server:

      1. Verify that the following files are in...

          WAS_HOME\profiles\<WAS_Profile>\config\cells\<Host_name>\LotusConnections-config

      2. Ensure that the profile service reference in the LotusConnections-config.xml file points to a running profile server. For example:

        <sloc:serviceReference serviceName="profiles"
            href="http://localhost:9080/profiles"
            enabled="true"
            ssl_href="https://localhost:9443/profiles"
            ssl_enabled="true"
            person_card_service_url_pattern="/html/simpleSearch.do?searchFor={email}&amp;searchBy=email"
            person_card_service_name_js_eval="generalrs.label_personcard_profilelink"/>
        

      3. Deploy the peoples.javlin Web application as part of your application.


Using business cards

 

Related tasks

Integrate the community card


+

Search Tips   |   Advanced Search