I dont know of a pre-written script that randomly loads a whole gallery (4x4 thumbs, of whatever), put its quite simple to mash something together using a little cunning and manipulation.
First, here's a php snippet that loads lines randomly from a text file - save on your web page where you want the gallery/random content to appear;
PHP Code:
<?php
$random_content="path/to/random_content.txt";
$display=rand(0, sizeof($random_content)-1);
echo $random_content[$display];
?>
And in random_content.txt, you'd have the content that loads randomly (a new piece of content per line). This could be anything. It could be lines of text;
Code:
<p>This is a random line of text.</p>
<p>Refresh the page to see me change.</p>
<p>One, two, buckle my shoe.</p>
<p>Are you getting dizzy yet?</p>
It could be images;
Code:
<img src="pic-1.jpg" height="100px" width="200px" alt="Random">
<img src="pic-2.jpg" height="100px" width="200px" alt="Random">
<img src="pic-3.jpg" height="100px" width="200px" alt="Random">
<img src="pic-4.jpg" height="100px" width="200px" alt="Random">
Or even links to different javascripts;
Code:
<script type="text/javascript" src="path/to/js/gallery1.js"></script>
<script type="text/javascript" src="path/to/js/gallery2.js"></script>
<script type="text/javascript" src="path/to/js/gallery3.js"></script>
<script type="text/javascript" src="path/to/js/gallery4.js"></script>
As long as each bit of new data falls on a news line in the text file, it will work.
You can also use php includes in the random_content.txt file to insert bigger blocks of HTML, etc;
PHP Code:
<?php include('path/to/gallery_1.html');?>
<?php include('path/to/gallery_2.html');?>
<?php include('path/to/gallery_3.html');?>
<?php include('path/to/gallery_4.html');?>
Now in all of the gallery_?.html files that are used as includes you could manually code a grid of images in HTML (different in each one).
Its probably not the sleekest approach but its a simple solution to your problem and a method that can be used for lots of random loading things.
I hope it helps.
Bookmarks