Wednesday, August 5, 2009

Picturing SharePoint Lists

For one of my recent SharePoint projects, I have been asked to create lists where an image could be included to illustrate the content of each list entry. As each entry will have a picture attached to it, the picture upload process had to be quite straightforward and user-friendly.

I had first pointed my thoughts toward a picture library but soon discovered that it did not correspond totally to my needs. After some more googling, I found the Enhanced picture custome type on CodePlex. Here then comes the necessary complete instructions to install and parametize this nice add-on.

1/ As prerequisite, you need to install ASP.NET AJAX on your SharePoint (MOSS 2007 or WSS 3.0). This operation is made extremely easy thanks to the detailed instructions on Mike Ammerlaan's blog post regarding Installing ASP.NET AJAX on SharePoint. Ultimately, it all comes down to downloading an EXE file, running it, then copying/pasting XML from the blog post into the web.config file of your SharePoint and finishing with an iisreset command.

2/ Once AJAX has been installed, download the Enhanced picture custome type WSP file and install it using the following commands:
stsadm -o addsolution -filename .wsp
stsadm -o deploysolution -name .wsp -allowgacdeployment -url http://sitename -immediate -force

(The -force attribute is necessary if some elements are already installed on your SharePoint.)

3/ Go to your site settings and then under site collection features, activate the ImageEnhancer feature.

4/ Go to your custom list, and add another field of the newly available type Enhanced Image.

5/ On your site, create a picture library. It will be used to store the pictures but you do not need to manage it or create any specific fields for it.

6/ Go back to your list and under the general settings, click on Enhanced Image Picture Library. Select the picture library you created before and click ok.

7/ That's it, you're ready to upload picture inside your custom list with maximal effects and minimal efforts.

No comments: