Here’s a simple example of getting this to work:
http://bigskygc.aldriena.com/index.php?id=50 (if this link is dead b/c I’ve moved from the testing sub-domain to the actual domain, try
http://bigskygc.com/index.php?id=50)
I used a javascript slideshow script found here:
http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
In the document for the slideshow, I have 3 Image template variables (for this example) in which the client can add their images that are large and have not been resized.
I followed Brett’s explanation above and it works great. Add the Slideshow JS (see link above from Dynamic Drive) to a document in MODx (change the content type to text/javascript). Then in that Javascript document, have a Ditto call which has a TPL with PHP Thumb (
http://phpthumb.sourceforge.net/) resizing the images.
[[Ditto? &startID=`50` &tpl=`slideshow`]]
the "slideshow" tpl has this:
fadeimages[0]=["assets/snippets/phpthumb/phpThumb.php?src=[(site_url)][+slideshow_img1+]&w=300&h=300&zc=1", "", ""]
fadeimages[1]=["assets/snippets/phpthumb/phpThumb.php?src=[(site_url)][+slideshow_img2+]&w=300&h=300&zc=1", "", ""]
fadeimages[2]=["assets/snippets/phpthumb/phpThumb.php?src=[(site_url)][+slideshow_img3+]&w=300&h=300&zc=1", "", ""]
Create a new document w/image T.V.’s (in this case slideshow_img1, slideshow_img2, and slideshow_img3) in which the client can add their images. On that document, have a link in the head to the JS document you just created with the PHP Thumb call in it. Create a new parent document...the document with the image T.V.’s is a child document of it. On that parent document, have the JS array:
<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 203, 187, 0, 5000, 1)
</script>
And that’s it!