"; } while( $name = $myDir->read() ) { if(substr($name,0,strlen($preInc)) == $preInc && substr($name,0,strlen($preExc)) != $preExc && $name != "." && $name != "..") { $images[] = $name; } } $myDir->close(); $randimage = rand(0,count($images)-1); return $dirn . "/" . $images[$randimage]; } function smarty_cms_help_function_random_image() { ?>

What does this do?

Grabs a random image from the image directory specified

How do I use it?

Just insert the tag into your template/page like: {random_image dir="images/albums"}

What parameters does it take?

Author: Aaron King <Ezerick@gmail.com>, based on the original Random Image tag created by Robert Campbell<rob@techcom.dyndns.org>

Version: 1.0

Change History:
Inital Release of 1.0