Wednesday, August 23 in 2017
Module Frontpage Slideshow
LEPTON CMS
Pageviews 46,122
Currently online: 8
Modul: Random Image
Author: John Maats, Sgt.Nops (last)
Nick: pcwacht
Contact: info@pcwacht.nl
Version: 0.12
State: Stable
License: GNU-GPL
Platform: 2.7 and 2.8
Last info: 2010-10-12
Rating:
60.0
411 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).
TagCloud