SNTT - Visual Directory - thumbnails in the domino directory
Sean Cull October 2 2008 23:06:02
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 removed
Unashamed Plug
Ewan and I would be very happy to help anyone who wants commercial support to implement this type of system ( or any other system ) via FoCul Ltd. We are based in the UK and have a particularly strong record in developing applications for the Manufacturing sector.
Admin Tips Dev Tips Download Show-n-Tell Thursday Lotus
2Sean Cull 8.26.2009 22:47:24 It would be simple enough hi Won, the image resource could have pretty much any name as long as it was unique and avoided special characters. I hadn't thought about the tool tip, was that there in Notes 6 ? Probably but I am not sure. Sean
3Won Lee 8.28.2009 19:43:21 imagefile name ok, thanks, Sean. I will try to work on this soon. -Won
4sheila golledge 12.11.2009 16:18:05 e mail I cannot understand why I cannot send e mails to a friend of mine who has a perfectly correct e mail address. All my e mails to her are rejected with an explanation that my e mails cannot be delivered, because her e mail address is not in the domino directory. What is this and what does it mean?
5Sean Cull 12.11.2009 16:24:01 @4 Send me some screenshots Hi Stella, can you send me some screen shots of what you are trying to send ( the email address part of the form ) and can you try sending an email from the same account to support@focul.net I'll have a look, Sean
Please leave a comment


1Won Lee 8.26.2009 22:20:41 imagefile name
hi Sean,
I like this a lot. One wish I have is if the imagefile name can be changed to something more human readable instead of the 32 bit string so that someone can go to the Image Resource list and pick out a file to work with it. It would then also show a more readable tooltip than the long string.
Do you have any suggestions, or can this not be done? Thanks,
Won