Thursday, October 2, 2008

Random Thumbnails from picture library for intranet front page

MOSS comes with "This week in pictures", WSS alas does not.

I came across this free bit of code for implementing random or sorted thumbnails for my WSS 3.0 intranets front page.

http://www.codeproject.com/KB/sharepoint/WssPictureThumbnails.aspx

Download the web part http://www.codeproject.com/KB/sharepoint/WssPictureThumbnails/WssPictureThumbnails.zip

unzip it

stsadm -o addsolution -filename QuesttechSolution.wsp

Go SharePoint Central Administration/Operations/Global Configuration-Solution Management and deploy the solution to selected web applications. In the site collection where the solution is deployed, activate the Site Collection feature "Questech Systems Web Parts". After that, the Picture Thumbnails web part (listed under Questech Systems) should be available for you to add to pages.


To get it working I needed to add the three javascripts in the package in my front page , litebox-1.0.js, moo.fx.js and prototype.js (put them in seperate tages and put the contents of the two css files in with header of the masterpage for the site(looking at the article and my experience just putting the contents in core.css did not work? , think they should be put in a custom.css file later)

*** IMPORTANT: Make sure blank.gif, closelabel.gif, loading.gif, nextlabel.gif, prevlabel.gif are copied to /images for the website


***IMPORTANT, PUT CSS CLASS TO PT IN THE CSS CLASS BOX IN THE WEB PART ***


***Important: to get the thumbnails bigger look at what you are using in the picture library, e.g by default thumbnails are 160 w 160 h, if use change the CSS for PT from 80w 80 h there will be none of the thumbnail clipped off! Of course if u change value of thumbnails coming in then need to change below to match!

.PT li a{ width:160px; height:160px; border:solid 1px #fff; display:block; text-indent:-5000px; font:0/0 Arial;}

No comments: