Thursday, September 25, 2008

How to add button to view private Dogears

View Comments

As you may know by now, Dogear is my favorite component of all the Lotus Connections services. It has even become my primary search engine over Google. For those of you who don't know, Dogear is the social bookmarking component of Lotus Connections. It lets users tag any URI, be it a HTTP URL in the intranet or in the internet (i.e. http://....), an FTP address (ftp://....), a Notes Database/View/Document (i.e. notes://...) or any other URI addressable resource.

200809230845.jpg To tag (or bookmark) a page it takes the same amount of clicks (sometimes less) than to bookmark a page locally in your own browser! As such, I've found no need to bookmark anything locally (especially since I tend to use multiple computers and it's just easier to share bookmarks between computers if they persist in a server). Dogear, of course, also provides the capability for you to bookmark pages 'privately'. In other words, only you have access to them.

And while Dogear provides a My Bookmarks view as shown, it shows all your public and private bookmarks. Recently, a colleague asked in an internal forum how to add a button to show only someone's private bookmarks. I thought I would share the answer with the general population.

To view your private bookmarks, simply add access=private as one of the parameters in the URL and voilá! So if the 'My Bookmarks' URL is: change that to:

Well, ask and you shall receive! To add a button follow these instructions:

  1. Go to <WAS_ROOT>/profiles/AppSrv01/installedApps/<cellName>/Dogear.ear/dogear.webui.war/h3/jsp/main
  2. Save a copy of bookmarks.jspf
  3. Open bookmarks.jspf with your favorite text editor
  4. Find the following section in the file
  5. Add the line in bold
  6. Save the file
<c:if test="${myBookmarks && p.totalItems > 0}">
<script src="${pageContext.request.contextPath}/script/my-bookmarks.js" type="text/javascript"> </script>
<span class="lotusBtn lotusBtnAction lotusLeft"><a href="#" onclick="displayLinkNames('notifyMultiForm', 'notifyLinksSpan');return false;"><fmt:message key="jsp.bookmarks.notify.multi"/></a></span>
<span class="lotusBtn lotusBtnAction lotusLeft"><a href="#" onclick="displayLinkNames('addtagMultiForm', 'addTagLinksSpan');return false;"><fmt:message key="jsp.bookmarks.addtag.newtag" /></a></span>
<span class="lotusBtn lotusBtnAction lotusLeft"><a href="#" onclick="displayLinkNames('retagMultiForm', 'reTagLinksSpan');return false;"><fmt:message key="jsp.bookmarks.retag.multi" /></a></span>
<span class="lotusBtn lotusBtnAction lotusLeft"> <a href="#" onclick="deleteMany();return false;"><fmt:message key="jsp.bookmarks.delete.selected" /></a> </span>
<!-- Added by Luis -->
<span class="lotusBtn lotusBtnAction lotusLeft"><a href="#" onclick="javascript:window.location.href=window.location.href+'&access=private';return false;">View Private</a></span>
<!-- End by Luis -->

<span class="lotusBtn lotusLeft"><a href="#" onclick="menuUtility.openMenu(event, 'multiEditActionsMenu');return false;"><fmt:message key="" /><img src="<c:url value="/nav/common/styles/images/btnDropDown.gif" />" alt="" /></a></span>

And the result should be:


Isn't it beautiful and awesome when you can do cool stuff like this by simply modifying 1 line of code ??

blog comments powered by Disqus