WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
$folder=opendir(WB_PATH.MEDIA_DIRECTORY.'/'.$dir.'/.'); $names = array();while ($file = readdir($folder)) { $ext=strtolower(substr($file,-4)); if ($ext==".jpg"||$ext==".gif"||$ext==".png"){ $names[count($names)] = $file; }}closedir($folder);shuffle($names);$image=$names[0]; $name=substr($image,0,-4);return '<img src="'.WB_URL.MEDIA_DIRECTORY.'/'.$dir.'/'.$image.'" alt="'.$name.'" width="'.$width.'" height="'.$height.'"/>';
for($i=0;$i < 100;$i++) { [[RandomImage?dir=logos]]'; }