Search
Contribute
Navigation
- 1.0
- 1.0.x
- 2.0
- 2.0.1
- 2.0.1.1
- 6.0
- 8.1.1
- 8.2
- activities
- activities entry type
- activities files
- activities quickr integration
- activities templates
- administrators
- adoption
- api
- api dogear
- applications
- atlas4connections
- atlas_connections
- best-practice
- Blackberry
- blog
- blogs
- bookmarks
- broadcast chat
- business card
- business_card
- c11n
- cluster
- cluster 2.0
- comments
- communities
- confluence wiki lotus connections person-card integration development
- connections
- connections 2.0.1
- course
- Creating Bookmark with DogEar API
- customization
- customize
- customize
- DB2
- demos
- deployment
- deployments
- deplyment 1.0
- design rebranding customization css theme
- developers
- development
- dogear
- dogear bookmark_this
- dogear dynamic list
- domino
- Edge server
- education
- error codes
- error messages
- expertbriefing
- feature
- frontpage
- groups
- guide
- guidelines
- home
- homepage
- Homepage Tab
- how-to
- How To Configure SMTP after installation
- How to Map Lotus Connections Features to the HTTP Server
- How To Support Multiple Document Type in Blog
- HTTP server
- IBM WebSphere Portal 6.0 SSO to Lotus Connections 2.0 using LTPA
- ibm_mashup_center
- ifixes
- infrastructure
- installation
- instruction
- Integration
- issl
- iwidget
- j2ee
- JSP
- LDAP
- learning
- Learning experience. workshop
- links
- livewriter
- load balancing
- lotus
- Lotus Connections
- lotus connections 2.0.1 quickr deployment edge proxy integration 8.1.1
- Lotus Sametime
- mashup
- mashups
- membership
- Microsoft
- Migrating
- offline
- Oracle
- outlook
- overview
- people
- person card
- person_card
- pilot
- plugin
- portal
- portlet
- portlet_factory
- productivity
- profiles
- profiles connections customization
- Profiles custom fields
- Profiles TDI
- Profiles types custom fields
- Profiles widgets
- programming
- proxy server
- proxy server 1.0
- quickr
- rebrand banner footer logo
- rebrand banner footer logo tab navigator
- rebrand skin theme
- Redbooks
- redbooks wiki
- REST
- reverse proxy server
- RIM
- roles
- Sametime
- Sametime Advanced
- Sametime Integration
- sample
- scriptfire
- self-paced
- sharepoint
- single server
- siteminder
- social_networking
- software-services
- solutions catalog
- SQL Server
- step by step
- tags
- tam
- TDI assembly lines
- TDI multiple data sources
- template
- test
- test infrastructure
- tivoli access manager
- topology
- tour
- troubleshooting
- upgrade
- using
- VIC
- virtual education
- WAI
- WebAppIntegrator
- WebSphere
- WebSphere Portal
- Why my Rich Text Editor does not support Chinese Characters
- Widgets
- word
Go elsewhere
5.4 Adding additional actions
![]() |
Redbooks Wiki: Customizing Lotus Connections 2.0
person card , business card , customize |
Shu Lukito 08/05/2008 |
Dana Liburdi 01/19/2009 |
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:
- Go to http://www.linkedin.com.
- Click Accounts -& Settings -> Public Profile -> Public Profile URL.
- 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)



