The often random thoughts of an Eclectic Architect, Enterprise Technologist, Coffee Addict & Social Media Junkie

One thing that our Connections users have asked it that they would like to include a reference to a specific persons profile from a blog posting.  This is possible to do, although it’s not completely straight forward.  I’ve shown two solutions to this problem.

In both cases, you’ll need the persons “profile key” which looks like this /profiles/html/profileView.do?key=91f00240-1f17-4b18-a767-9c813a2def4c&lang=en.  You’ll also find it easiest to use two browser sessions (or two browser tabs) to do this, one for your blog post, the other for searching and finding the information you need.  To find the profile key, open profiles, search for the person you want to find then right-click on their name and open the link in a new window.  The address in the browser URL bar should be the profile key.  When you need the key, you’ll copy everything after the name of the connections server (everything from /profiles to the end of the URL) and you are ready to edit

There are two types of links you can create.  The first is a simple HTML link which will take you to the persons profile. For example clicking on the name below will take you to my profile (well it would if the profile server existed!).

Tim Bull

To do this, simply copy the following and paste it in HTML mode (click on the <H> on the edit menu bar while in edit mode).  Paste the profile link / key as described in the paragraph above to replace the profile key in the example, then change the name of the person (in this case replace “Tim Bull” with who ever you are linking to).  I’ve bolded what you’ll need to change.

<a href=”/profiles/html/profileView.do?key=91f00240-1f17-4b18-a767-9c813a2def4c&amp;lang=en“>Tim Bull</a>

The second linking option is slightly more complicated.  In this case we are going to include a link that enables the person card popup as well.  This requires pasting a small amount of Java Script in to the HTML.  It will give a link as follows.  Note this doesn’t work in here (because this is wordpress), but if you’re familiar with Connections you’ll know exactly what I mean - I should include a picture but I’m a bit time pressed at the moment - in connections, howevering over the name will show a link to “Click here to view the business card”:

Tim Bull

To do this, copy the code below, as before, paste it into your blog posting in HTML mode and edit the HREF (profiles key), the text of the name and the e-mail address of the person.

<span class=”vcard”><a class=”fn person lotusPerson” href=”/profiles/html/profileView.do?key=91f00240-1f17-4b18-a767-9c813a2def4c&lang=en“>Tim Bull</a><span
class=”email” style=”display: none;”>tim.bull@fake.email.com</span></span>

One last note, this will ONLY work within Connections.  It is possible to do the same thing and link from any other web site, but there are a number of java libraries that need to be loaded to give the business card popup that I haven’t referenced as these are already loaded within the context of the Connections Blog.  The other trick is that this may not work with your Connections site if the rich embedding functionality is turned off (which it is by default to prevent x-site scripting issues).  The IBM reference with samples for doing this from other web-sites is here.

The other thing you’ll notice is my HREF examples link to the profile of the user, if you look at the links in Connections, you’ll see the pop-up is implemented in a variety of ways which you can emulate, for example, within the context of Blogs, clicking on the persons name will take you to their blog, in DogEar, to their bookmarks etc.  The principles are exactly the same, this should be all you need to get started.

One Response to “Lotus Connections: Embedding a person card lookup in a blog post”

  1. luis benitez Says:

    Hi Tim,

    You can also use this HREF:

    /profiles/html/simpleSearch.do?searchBy=email&searchFor=tim%40fakeemail.com&lang=en

    That way, you don’t have to fetch the key before creating the HTML for the biz card.

Leave a Reply