I finally got around to adding SmoothGalley as a plugin for the Gallery package (for Revolution). At this point, use it at your own risk. However, it appears to be working well. So now I can move some of those Evolution sites using MaxiGallery to Revolution!
How to Install:
1) Install the Gallery 1.0.2-rc2 addon
2) Create a gallery, add some pictures, and try out the Gallery snippet to make sure everything is working.
3) Unzip the attached file in the base directory of your MODx Revo install.
WARNING - the zip file will overwrite core/components/gallery/model/gallery/plugins/galleryplugin.class.php (there is a bug in the original file that I had to fix)
4) Try some of the examples below.
(Note: SmoothGallery uses MooTools, so if you are using another JS library on the page, you will need to adjust things to avoid conflicts. If you are using jQuery, see this page:
http://docs.jquery.com/Using_jQuery_with_Other_Libraries)
Example Usage
(Use only one on any page. Multiple smoothgalleries on the same page are not supported.)
Basic:
[[!Gallery? &album=`name_of_your_album` &plugin=`SmoothGallery`]]
For nice cropping you should usually set &imageZoomCrop=`C` (which means centered)
[[!Gallery? &album=`name_of_your_album` &plugin=`SmoothGallery` &imageZoomCrop=`C`]]
Change the size:
[[!Gallery? &album=`name_of_your_album` &plugin=`SmoothGallery` &imageZoomCrop=`C` &sgImageWidth=`500` &sgImageHeight=`400`]]
Different Transition:
[[!Gallery? &album=`name_of_your_album` &plugin=`SmoothGallery` &imageZoomCrop=`C` &defaultTransition=`fadeslideleft`]]
Timed Rotation, custom delay, with arrows hidden:
[[!Gallery? &album=`name_of_your_album` &plugin=`SmoothGallery` &imageZoomCrop=`C` &timed=`true` &delay=`6000` &showArrows=`false`]]
Hide the Carousel and infopane
[[!Gallery? &album=`name_of_your_album` &plugin=`SmoothGallery` &imageZoomCrop=`C` &showCarousel=`false` &showInfopane=`false`]]
ReMooz (nice zoom in effect)--uses thumbnails for the main gallery and the larger image for the zoom. Notice the custom item template.
[[!Gallery? &album=`name_of_your_album` &plugin=`SmoothGallery` &useReMooz=`true` &showCarousel=`false` &embedLinks=`false` &sgItemTpl=`SmoothGalleryReMoozItem` &sgThumbWidth=`300` &sgThumbHeight=`200` &sgImageWidth=`600` &sgImageHeight=`600` &imageZoomCrop=`C`]]
General settings for the Gallery snippet
See
http://rtfm.modx.com/display/ADDON/Gallery.Gallery
Plugin-specific settings
&sgImageWidth=`460` (overrides &imageWidth)
&sgImageHeight=`345` (overrides &imageHeight)
&sgThumbWidth=`100` (overrides &thumbWidth)
&sgThumbHeight=`75` (overrides &thumbHeight)
&sgItemTpl=`SmoothGalleryItem` (overrides &thumbTpl)
&sgContainerTpl=`SmoothGallery` (overrides &containerTpl)
&sgJsTpl=`SmoothGalleryJS`
&sgCssTpl=`SmoothGalleryCSS`
&insertJs=`true`
(the template chunks can be found in core/components/gallery/elements/chunks and there is no need to copy them into the the manager)
SmoothGallery settings
&showArrows=`true`
&showCarousel=`true`
&showInfopane=`true`
&embedLinks=`true`
&fadeDuration=`500`
&timed=`false`
&delay=`9000`
&preloader=`true`
&preloaderImage=`true`
&preloaderErrorImage=`true`
/* Data retrieval */
&manualData=`{}` (Should set to an array, in JSON? format. Untested.)
&populateFrom=`false`
&populateData=`true`
&destroyAfterPopulate=`true`
&elementSelector=`div.imageElement`
&titleSelector=`h3`
&subtitleSelector=`p`
&linkSelector=`a.open`
&imageSelector=`img.full`
&thumbnailSelector=`img.thumbnail`
&defaultTransition=`fade` (other options: fadeslideleft, continuoushorizontal, continuousvertical. For option other than fade set &timed=`false`)
/* InfoPane options */
&slideInfoZoneOpacity=`0.7`
&slideInfoZoneSlide=`true`
/* Carousel options */
&carouselMinimizedOpacity=`0.4`
&carouselMinimizedHeight=`20`
&carouselMaximizedOpacity=`0.9`
&thumbHeight (use &sgThumbHeight instead)
&thumbWidth (use &sgThumbWidth instead)
&thumbSpacing=`10`
&thumbIdleOpacity=`0.2`
&textShowCarousel=`Pictures` (can be localized using the lexicon)
&showCarouselLabel=`true`
&thumbCloseCarousel=`true`
&useThumbGenerator=`false`
&thumbGenerator=`resizer.php` (hmm, I deleted this file...)
&useExternalCarousel=`false`
&carouselElement=`false`
&carouselHorizontal=`true`
&activateCarouselScroller=`true`
&carouselPreloader=`true`
&textPreloadingCarousel=`Loading...` (can be localized using the lexicon)
/* CSS Classes */
&baseClass=`jdGallery`
&withArrowsClass=`withArrows`
/* Plugins: HistoryManager */
&useHistoryManager=`false`
&customHistoryKey=`false`
/* Plugins: ReMooz */
&useReMooz=`false` (you should probably read the code if you are using this--it changes how some things are done)
Please Help!
Can volunteers please step up for these tasks:
1) Test!
2) Submit bug report for core/components/gallery/model/gallery/plugins/galleryplugin.class.php. The toBoolean method converts ’false’ to true.
3) Put this in GIT, fix errors reported in this topic, and send a pull request (I have signed a CLA already and SmoothGallery is GPLv3)