skip to content
Module Frontpage Slideshow
März 2010
MoDiMiDoFrSaSo
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Page views: 3,242
Login

Forgot Details?
User Group Berlin
Website Baker Tutorials
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
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).