Joey Robichaud

code and thoughts

SSWC and jQuery Image Rotator on CodePlex

Knowing that we had made a commitment and wanting our efforts to be utilized, we put in some extra hours to get an inital release together. John Tolar emailed us his Social Share Bar widget and some screenshots for inclusion in the project. However, there were a few issues we felt must be resolved before we could release the widgets to the world.

First, the jQuery plugin issue we found on Day 3 of GiveCamp.┬áIt took a good bit of trial and error, but David came up with something a little less disgusting than what we had. RegisterScriptInclude had consistently loaded the script references too early in the page, and they were subject the Sitefinity issue linked above. Using the ClientScriptManager’s RegisterStartupScript, however, pushed the script reference to the bottom of page and avoided the redefinition of jQuery. With our scripts now being included once a piece in a fairly sensible location, we closed this issue.

The other two issues were fairly trivial. First, we ensured that the generated HTML elements got unique ids. We had been generating facebookImageRotator, flickrImageRotator, etc., but if you threw two Facebook rotators on the page you’d get a duplicate. We used the user ids, album names, etc. to make it a bit more unique. The last issue was having our widgets include prettyPhoto automatically instead of relying on documentation to guide the user.

We polished up the documentation for Sitefinity developers interested in using the controls in their sites as well as those wanting to contribute to the project. David also started a separate CodePlex for hosting the fully independant jQuery rotator plugin.

Feel free to download the controls and please provide some feedback.

This post originally appeared on The DevStop.