Thursday, September 09 in 2010
Module Frontpage Slideshow
Ecosia Search
Page views: 4,830
Currently online: 7
Modul: Random Image
Author: John Maats
WB User: pcwacht
Contact: info(at)pcwacht(dot)nl
Version: 0.11
State: Stable
License: GNU-GPL
Platform: 2.7 and 2.8
Last info: 2009-08-19
Rating:
61.0
21 votes
1 2 3 4 5
Download: here
Description: This snippet adds the new function: "RandomImage()" to Website Baker. The function displays a random image from a specified directory. As parameter the directory path starting from the WB root directory is required.

To display a random image from the subfolder '/pics' within the MEDIA directory, use:

RandomImage(MEDIA_DIRECTORY .'/pics');
Info: Note: invoke the function from the index.php file of your template or from a page/section of type code; the specified subfolder must contain at least two images (other wise you will see an error message).