// Simple Image Displaying Script # // With optional random image script # // ################################### // Use with mybloggie 2.1.3 # // By Matthew Adam # //RANDOM IMAGE CONFIGURATION #$image= 'bird.gif'; $random = 1; // Random image on (1) or off (0) $src = "../xpwg/galleries/gif-animati/"; //folder with the images //SINGLE IMAGE CONFIGURATION $imgsrc = 'bird.gif'; //Put the link to your picture here if ($random == 1) { $dir=opendir("$src"); $directory=("$src"); $pattern="\.(GIF|JPG|gif|jpg|jpeg|png|bmp|swf)$"; if(!$dir) { die("Failed to read directory"); } $s=readdir($dir); $count="0"; $image=''; while($s) { if(mb_ereg($pattern, $s)) { $image[$count]=$s; $count++; } $s=readdir($dir); } closedir($dir); //Spit it out // esempio percentuale WIDTH="96%" $limit=count($image); $limit--; $randNum=mt_rand(0,$limit); echo "