Skip to main content link. Accesskey S
  • Translate Page ▼
  • Anonymous
  • Log on
  • Help
  • IBM logo
  • IBM Connections wiki
  • All Wikis
  • Home
  • Community Articles
  • Product Documentation
  • Learning Center


Search

Advanced Search

Categories

Tag Cloud

  • 1.0
  • 1.0.x
  • 2.0
  • 2.0.1
  • 2.0.1.1
  • 2.0_media
  • 2.5
  • 2.5_deployment
  • 2.5_media
  • 2.5_performance
  • 3
  • 3.0
  • 3.0.1
  • 3.0.1_media
  • 3.0_media
  • 3_deployment
  • 8.1.1
  • 8.2
  • activities
  • administrators
  • api
  • best_practices
  • blogs
  • bookmarks
  • business_card
  • cluster
  • communities
  • connections
  • connections_3
  • connections_301
  • customization
  • customize
  • customizing
  • demos
  • deploying
  • deployment
  • deployments
  • developers
  • dogear
  • Domino
  • Edge server
  • education
  • error messages
  • files
  • forums
  • getting_started
  • Help
  • home
  • home_page
  • homepage
  • how-to
  • HTTP server
  • ibm
  • index
  • installation
  • integration
  • iOS
  • iphone
  • issl
  • iWidget
  • J2EE
  • javadoc
  • knowledge_transfer
  • lc3.0
  • learning
  • lotus-connections
  • mml
  • mobile
  • Notes
  • performance
  • person_card
  • Portal
  • portlet
  • portlet_factory
  • profiles
  • proxy server
  • quickr
  • Redbooks
  • rest
  • reverse proxy server
  • Sametime
  • scenarios
  • search
  • security
  • self-paced
  • SSO
  • tags
  • test_infrastructure
  • troubleshooting
  • tuning
  • video
  • VideoFest
  • videos
  • WAI
  • WAS
  • web_seminar
  • WebAppIntegrator
  • WebSphere
  • widgets
  • wikis
InformationInformation
You are currently viewing machine translated content. IBM translation might be available. Click IBM Translated Product Documentation to see what is available.X


Home > Redbooks Wiki: Customizing Lotus Connections 2.0 > 5.4 Adding additional actions
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

5.4 Adding additional actions 

expanded Abstract
collapsed Abstract
No abstract provided.
Back to main topic 5. Busines card

In this section, we provide step-by-step instructions about how to add custom actions to a Lotus Connections business card. This sample demonstrates how you can integrate with real-life applications such as LinkedIn, Facebook, Skype, and so forth.

These sample actions perform the following actions:

  • View the person's LinkedIn Profile
  • View the person's profile in Facebook
  • Call the person (using Skype or any other methods)
  • Demonstrate how to call a JavaScript function


In the sample actions that integrate with LinkedIn, Facebook, and Skype, we assume that the UID in Lotus Connections matches those in the target applications. The final sample demonstrates a call to a very simple JavaScript function. The JavaScript call sample provides a guide for situations when you cannot simply integrate with the third-party applications by making a URL call.

The following figure displays four custom actions that we added.


Custom Business Card Actions

To add additional actions in the business card, you modify the personTagUI.js file, which is located in the following directory:

    <WAS_PROFILE_ROOT
     
    /installedApps/<
    cellName
     
    /Profiles.ear/peoplepages.war/javascript/personTagUI.js


Look for the writeMoreActionsMenu function in the personTagUI.js file, and add your additional actions to integrate to external applications, as shown in the bold text in the following example.


    writeMoreActionsMenu: function(header, person, baseURL, isInline)
    {
    try{
    header.write(' <ul class="lotusActionMenu" id="'+person.key);

    if(isInline)
    header.write('Inline');

    header.write('MoreActionMenu"
     
    ');

    header.write('<li class="lotusSendMail"
     
    <a href="mailto:'+escape(person.email.internet) +'"
     
    '+generalrs.personCardSendMail+'</a></li
     
    ');
    header.write('<li id="'+person.email.internet+'ChatActionMore" style="display:none;"
     
    <a href="javascript:void(0);" onclick="SemTagPerson.sametimeStart(\'chat\', \''+person.email.internet+'\');"
     
    '+generalrs.personCardChat+'</a></li
     
    ');
    header.write('<li id="'+person.email.internet+'CallActionMore" style="display:none;"
     
    <a href="javascript:void(0);" onclick="SemTagPerson.sametimeStart(\'call\', \''+person.email.internet+'\');"
     
    '+generalrs.personCardCall+'</a></li
     
    ');
    header.write('<li class="lotusMenuSeparator"
     
    <a href="'+baseURL+'/html/wc.do?action=fr&requireAuth=true&widgetId=friends&targetKey='+person.key+'"
     
    '+generalrs. personCardAddAsColleagues+'</a></li
     
    ');
    header.write('<li class="lotusMenuSeparator"
     
    <a href="'+baseURL+'/vcard/profile.do?key='+person.key+'"
     
    '+generalrs.personCardDownloadVCard+'</a></li
     
    ');
    header.write('<li class="lotusMenuSeparator"
     
    <a href="http://www.linkedin.com/in/' + escap e(person.uid) + '"
     
    View LinkedIn Profile</a></li
     
    ');
    header.write('<li class="lotusMenuSeparator"
     
    <a href="http://www.new.facebook.com/s.php?re f=search&i nit=q&q=' + escape(person.email.internet) +'"
     
    My FaceBook</a></li
     
    ');
    header.write('<li class="lotusMenuSeparator"
     
    <a href="callto:' + escape(person.uid) +'"
     
    Call me</a></li
     
    ');
    header.write('<li class="lotusMenuSeparator"
     
    <a href="javascript:void(0);" onclick="SemTagPersonUI.customAction();"
     
    Call JS Function</a></li
     
    ');

    header.write(' </ul
     
    ');

    }catch(exception2){alert(exception2.message);}
    },

Because one of the actions added to this sample makes a call to a JavaScript function, you also need to add the JavaScript function called customAction as shown in the following example. See the attached personTagUI.js file for the complete code modifications.

    customAction: function() {
    alert('test');
    return;
    }

After you have completed these changes, you need to clear the browser cache and refresh the Web page in order to view the changes.

When you click "View LinkedIn Profile" information similar to that shown in the following figure displays.



LinkedIn

You can edit the public LinkedIn Web address so that it matches the Lotus Connections UID that is accessed using person.uid (for example, FAdams in this example). To modify the public LinkedIn Web Address, follow these steps:

    1. Go to http://www.linkedin.com.
    2. Click Accounts -& Settings -> Public Profile -> Public Profile URL.
    3. Edit the Public Profile Web address to match the Lotus Connections UID as shown in the following figure (for example, http://www.linkedin.com/in/).





Edit LinkedIn Public Profile URL

After you configure LinkedIn to use a public profile Web address, you can use the Web address that we include in the previous code example.

When you click the My Facebook action button, information similar to that shown in the following figure displays. It performs a search of the passed in parameter, which should match the searchable parameter in Facebook.



Facebook

The following figure displays how to initiate a Skype call by adding the "Call me" feature as one of the action buttons in the business card. See the previous code example that we include in this topic for details about how to add this action.



Skype

The following figure shows the result of the custom JavaScript call. This JavaScript function is very simple; however, it demonstrates the steps that are necessary to integrate with real-world Web applications.



Custom JavaScript call

(Edited by DW)


expanded Article information
collapsed Article information
Category:
Redbooks Wiki: Customizing Lotus Connections 2.0
Tags:
person_card, business_card, customize

This Version: Version 21 October 15, 2009 6:59:36 PM by Dana Liburdi  IBMer
   
expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (21)
collapsed Versions (21)
expanded Version Comparison
collapsed Version Comparison
     
Version Date Changed by               Summary of changes
This version (21) Oct 15, 2009 6:59:36 PM Dana Liburdi  
20 Dec 29, 2008 8:46:46 AM Debbie Willmschen  
19 Dec 29, 2008 8:44:41 AM Debbie Willmschen  
18 Dec 29, 2008 8:39:49 AM Debbie Willmschen  
17 Dec 23, 2008 11:03:00 AM Debbie Willmschen  
16 Sep 12, 2008 11:33:52 AM Shu Lukito  
15 Sep 8, 2008 3:03:05 PM Shu Lukito  
14 Sep 8, 2008 3:01:01 PM Shu Lukito  
13 Aug 29, 2008 3:25:45 PM Shu Lukito  
12 Aug 29, 2008 3:21:12 PM Shu Lukito  
11 Aug 14, 2008 9:10:59 AM Shu Lukito  
10 Aug 14, 2008 9:07:42 AM Shu Lukito  
9 Aug 14, 2008 8:59:31 AM Shu Lukito  
8 Aug 13, 2008 10:38:09 AM Shu Lukito  
7 Aug 13, 2008 10:23:54 AM Shu Lukito  
6 Aug 12, 2008 9:10:41 PM Shu Lukito  
5 Aug 6, 2008 4:59:30 PM Shu Lukito  
4 Aug 6, 2008 4:24:50 PM Shu Lukito  
3 Aug 6, 2008 12:09:43 PM Shu Lukito  
2 Aug 6, 2008 11:56:50 AM Shu Lukito  
1 Aug 5, 2008 2:15:28 PM Shu Lukito  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Tip: When linking to articles use the original title, not the edited title. The alias for the link can be the edited title.
Go ElsewhereStay ConnectedSubscribe to RSSHelpAbout
  • All Lotus and WebSphere Portal wikis
  • IBM developerWorks
  • IBM Software support
  • Lotus Technical Information and Education Team Blog
  • Lotus Tech Info on Twitter
  • Lotus Tech Info on Facebook
  • Lotus product forums
  • Lotus Tech Info blog
  • IBM Collaboration Solutions
  • Recently added feedRecently added
  • Recently edited feedRecently edited
  • Recently added comments feedRecently Added Comments
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Contact IBM
  • IBM Terms of use
  • Wiki terms of use
Return to English
Arabic
Chinese Simplified
Chinese Traditional
French
German
Italian
Japanese
Korean
Portuguese
Russian
Spanish