Displaying random images
Last modified: August 26, 2009 - 23:08
This is made possible by a script found at www.alistapart.com called rotate.php.
Procedure:
- Create a directory under the web server's document root. I placed it under my theme's directory.
- Populate that directory with images.
- Download script and put it in a nice resting place.
- Edit script so it can find your image directory. To avoid editing you can just place the script in the same directory as the images.
- Under your theme's config, for custom logo, instead of a path to an image use the path to the script.
- You're done.

Added swfs and called from theme code
I love this code, thank you. It worked quickly & easily. I also added this line to the php to enable rotating swfs:
$extList['swf'] = 'application/x-shockwave-flash';
I called it from my theme page.tpl.php as follows:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="263" height="150" align="top" title="fluidit solutions videos">
<param name="movie" value="<?php print $front_page . $directory; ?>/videos/rotate.php">
<param name="quality" value="high"><param name="LOOP" value="false">
<embed src="<?php print $front_page . $directory; ?>/videos/rotate.php" width="263" height="150" loop="false" align="top" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>