Anonymous
Domino 2.0 Rich Internet Applications with IBM Lotus Notes/Domino
You are here: Today » PicLens for Domino
« Adding and controlling Flickr badges
Domino 2.0 now with Google Analytics »

PicLens for Domino

PicLens is a web widget to show image galleries as a slideshow or a 3d wall. It is available as a plug-in for all common browsers. PicLens is used by big ones like Google, Picasa, Flickr and Facebook, but you can also add it to your own site. PicLens requires an RSS feed in a specific format.

Making the image gallery

I took some sample photos from Vista and made them into a gallery with PhotoShop > Automate > Web Photo Gallery. This gives me two folders: the images and the thumbnails. Each image and the corresponding thumbnail have the same name.

Putting the images in Domino

The thumbnails are added to a 'FileSet' document. The images to a 'Gallery' document. On the gallery, there's also a field pointing to the corresponding thumbnail set. Then I use two views: the 'pub' view to open the gallery with form '.html' and the 'inc' view to open the same gallery document as an rss feed (form: '.rss'). I get the thumbnails via the 'inc' view as well.

The formulas

In the formulas, 'FileNames' is the list of attachment names, 'PostName' and 'Thumbnails' the reference to the gallery and the fileset document with the images.

To build a quick thumbnail list:

a:=@ReplaceSubstring(FileNames; " "; "%20");
b:="<a href=\"/"+@WebDbName+"/pub/"+PostName+"/$file/"+a+"\"><img src=\"/"+@WebDbName+"/inc/"+thumbnails+"/$file/"+a+"\" alt=\"\"></a>";
@Implode(b; @NewLine)

The RSS feed:

a:=@ReplaceSubstring(FileNames; " "; "%20");
b:="/"+@WebDbName+"/inc/"+ThumbNails+"/$file/";
c:="/"+@WebDbName+"/pub/"+PostName+"/$file/";
d:=@Text(@DocumentUniqueID);

zz:="<item><title>"+a+"</title><link>"+c+a+"</link><media:thumbnail url=\""+b+a+"\"/><media:content url=\""+c+a+"\"/><guid isPermaLink=\"false\">"+d+@Left(a; ".")+"</guid></item>";

@Implode(zz; @NewLine)

The result

On mouseover of each thumbnail, a button is shown to start the PicLens slideshow/3d wall. To see this in action, you have to install PicLens. Then you might try and see how Piclens comes into action on Google, Flickr or Facebook. And finally have a look at my demo page served from Domino. Please note that this demo page will probably be there only for a limited time: I often have to re-purpose my online databases. Have a download. Important: PicLens works only with live RSS feeds, so putting the database on a local test server probably won't work.

Download

piclens.zip (2197 kB)

Star rating

0%

Comments

To add a comment, log in or register as new user. It's free and safe.