Thursday, February 26, 2009

Random Image Web Part

Focal3Random Image Web Part displays randomly chosen Image. The Web Part takes as parameters URL of the Image Library containing images you would like to display. It is also possible to input multiple URL's separated by comma. Additional parameters you can set are: image width and height, in-line CSS style (like border, etc.), image link (you can make image point to the library where all the images are being shown) and the alternate text.

Click this link to download the dll for Focal3RandomImage web part

GAC it the Focal3RandomImage .dll and paste the following code in tag your web.config file

< SafeControl Assembly="Focal3RandomImage, Version=, Culture=neutral, PublicKeyToken=fd89fa4a8c9d5760" Namespace="Focal3RandomImage.SharePoint.WebParts" TypeName="*" Safe="True" />

Replace the XXXXXXXXXXXXXX with publickeyToken value from GAC.

Import the Webpart From Home Site-->Site Settings-->Modify All Site Settings--> Web Parts -->New

Choose the Focal3RandomImage Web part and Populate it .

Add the Web Part in the Page From Web Part Gallery

Set The Picture Library Name with full Path(Example and click Ok then Publish

The Web Part Will look like the following Image

While Refreshing or reloading the page the images will change randomly based on the picture library.

No comments:

Post a Comment