Wednesday 15 September 2010

Re-use don't reinvent - Lotus Connections Person Card appearing in a web page near you soon ....

One of my colleagues is seeking to have the Lotus Connections Profiles Person Card appear within Lotus Mashups, so that all references to a user's name/ID are Profiles-sensitive.

This is something I've been working on with Portal etc. as per my previous posts, and it's pretty much implicit via the Semantic Tagging service that WebSphere Portal 6.1.5 etc. include.

However, I wanted to do this outside of Portal, so dug through my bookmarks ( held in Lotus Connections Bookmarks, of course, and browsable via the rather nice little Foxear plugin that we have inside IBM ), and found Luis Benitez' post here: -

Are you ready for this? Lotus Connections person card in Sharepoint

which then took me on a trawl through developerWorks to find Luis' developerWorks article from 2008: -

Integrating IBM Lotus Connections with Microsoft technologies

from which I harvested this code: -

<html>
<head>
<script type="text/javascript" src="http://lc25.uk.ibm.com:9083/profiles/ibm_semanticTagServlet/javascript/semanticTagService.js"></script>
<link rel="stylesheet" href="http://lc25.uk.ibm.com:9083/profiles/css/styles.css" type="text/css"></script>
</head>
<body>

<div id="personCard" class="vcard">
<a href="http://lc25.uk.ibm.com:9083/profiles/html/simpleSearch.do?searchFor=padmin@uk.ibm.com&searchBy=email" class="fn url person">Portal Admin</a>
<span class="email" style="display:none;">padmin@uk.ibm.com</span>
</div>
</body>
</html>

Now this only works if you're prepared to hard code the user's email address in your web page, which is unlikely, so I'm working on the assumption that we can use a JSP and grab the logged-in user's email address and wrap the JavaScript around that.

More to follow, but many thanks to Luis and the team for his help ...

2 comments:

Luis Benitez said...

You are welcome!!! Yes, now you need to figure out how to dynamically plug in the email address (probably through some JSP call.) Let us know how it goes :D

Dave Hay said...

Note that I've since changed the CSS URL from: -

http://lc25.uk.ibm.com:9083/profiles/css/styles.css

to: -

http://lc25.uk.ibm.com:9083/profiles/help/css/styles.css

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...