I’m a newbie to MODx and WebDesign. I searched the site for how to install JW Image Rotator
http://modxcms.com/extras/package/?package=36 and found this link
http://modxcms.com/forums/index.php/topic,28337.0.html but it didn’t help me much.
This is what I tried so far without success.
I downloaded the image rotator from here
http://www.longtailvideo.com/players/jw-image-rotator/ and installed the files with FTP to this folder /assets/flash/slideshow
In
Resources - Manage Resources - Snippets I created a new Snippet which I called
AutoSlide. I inserted this code:
<?php
$file = glob($dir."/*.*");
$ext = explode(",", $extensions);
print "<"."?xml version='1.0' encoding='UTF-8'?".">\n";
print "<playlist version='1'>\n";
print" <trackList>\n";
foreach($file as $fn){
$pcs = explode(".", $fn);
if (in_array(array_pop($pcs), $ext))
{
print "<track>\n";
print "<title>slide</title>\n";
print "<location>";
print "/".$fn;
print "</location>\n";
print "</track>\n";
}
}
print" </trackList>\n";
print "</playlist>\n";
?>
?>
Then I created a slideshow.xml which I put in the folder /assets/flash/slideshow/
At last I embeded the Player into the Document Content with this code.
<script type="text/javascript"><!--
var so = new SWFObject('/assets/flash/slideshow.swf','player','500','200','7');
so.addParam("allowscriptaccess","always");
so.addParam("wmode","transparent");
so.addVariable('height','200');
so.addVariable('width','500');
so.addVariable('file','slideshow.xml');
so.addVariable('rotatetime','3');
so.addVariable('kenburns','true');
so.write('slideshow');
// --></script>
</p>
<p>[[AutoSlides? &dir=`assets/flash/slideshow` &extensions=`jpg,png,gif`]]</p>
I don’t know how snippets work so this might be completely wrong but any help to get me on the right track to configure Image rotator would be appreciated.
Regards,
Chris