FoCul has updated its Apache Open Source Visual Directory application which allows thumbnails for users to be shown in Notes views. The application is open source and is listed at OpenNTF.
We will be creating a full project for the application on OpenNTF in the near future. The original project description from 2008 is listed below :
SNTT – Visual Directory – thumbnails in the domino directory
Last year one of our clients asked us to help create a directory of staff with thumbnail images, profiles and contact details. After bouncing it about we agreed that using the Domino directory would make sense as much of the information was already there.
I am always wary of messing with the directory but in this case it was a relatively small directory ( < 200 people ) and we set out to add design elements rather than modify existing design elements. The scheme that we came up with is shown in the images above – essentially the system converts thumbnail images ( 80px x 80px ) into image resources and then displays these image resources in the view.
I doubt that this approach will scale to very large organisations but I have used it on a version of Jake Howletts test directory with 2,000 names and it works fine.
Before launching into the technical description I would like to thank the following people whose code is included in some way :
Our client who paid for some of this work and kindly agreed for it to be open sourced – it was a win – win because we obviously didn’t charge them for the open source code that we used.
Ewan Arthur, a colleague from FoCul, who worked with me on the code
Julian Robichaux – http://www.openntf.org/Projects/codebin/codebin.nsf/0/DF779ACFF30EB48886257118004D35B5
Lou Capizzoli on Openntf.org http://www.openntf.org/Projects/codebin/codebin.nsf/0/DF779ACFF30EB48886257118004D35B5
Charles Robinson http://www.cubert.net ( the my documents folder code )
Rocky Oliver / Andre Guiard http://www.lotusgeek.com/SapphireOak/LotusGeekBlog.nsf/D6Plinks/ROLR-6MBMQJ
The Scheme
A new form was used to display the persons profile. This form has an action button allowing a jpg file to be uploaded and stored in a rich text field called UserPhoto.
A background agent ( which needs unrestricted privileges ) takes the newly attached jpg files, downloads this to the hard drive on the server and then creates an image resource using DXL using code from Lou and Julian. The name of the image resource is the document unique id of the person record. The jpg file is deleted from the hard drive once the image resource has been created
A new view displays the person records and the image resources associated with each person record. The view has a form formula which forces the new profile form to be used when a document is opened from this view. The form has a form field to make sure that the default form for that record is always the original Domino Directory person form,
In the examples attached below I have left the default domino directory views in place but it is a simple matter to change the default opening view ( edit the Mainframeset ) to be the new one with the images
Note that the forms and code shown here are simplified from the production system but the key concepts still work.
The Design Elements
The only change to the existing elements of the Domino directory is the default view for the mainframeset frameset, everything else uses new design elements. These are :
Forms :
.FoCul\PersonProfile
Views :
Focul\01. Profiles\By Name)
Script Library :
.FoCul_Image_Resource_Handling_6_01
Scheduled Agent :
.FoCul\Update Image Resources ( note that this needs to be set up for your named server )
note that the agent contains a selection rule so that it only runs on records needing to be processed
Other agents :
.FoCul\Set images for all people – populates all records with test images stored in c:\temp\images ( may not be MAC friendly )
(.FoCul Remove Profile)
The Downloads
There are four downloads :
Very Small : The script library at the heart of the system
.FoCul_Image_Resource_Handling_6_01.lss
Small : A database with just the required additional design elements ( 0.5 Mb )
designelementsonly.zip
Medium : A full Domino Directory (8.0.2 ) with the original and the new design elements and 10 records ( 3 Mb )
somerecords.zip
Large : The 2000 record Domino Directory with test images ( 40 Mb )
fakenameswimages.zip
Areas for Improvement
The system probably won’t work on MAC or Linux ( clients and servers ) without some simple changes to the file paths construction
Some code is needed to remove the resource images when a thumbnail or person record is remove