Randomized Photo Headers

The header images are now randomized. At the moment you’ll get 1 of 26 possibilites on each page you visit. More will certainly come, I’ve barely dipped into my photo archive at this point. You can view all the headers (without refreshing a billion times) here (I’ll make this look nicer tonight).


If you’re a Kubrick user and want to do this on your site, just copy this into your index.php file just above the <style> tag:

// Gen random header img
// Images must be in [your blog url]/images/head/
// Images must be named 0001.jpg, 0002.jpg, etc.

$num_img=26; //number of images - change this!
$head_img=str_pad($rnd_num, 4, "0", STR_PAD_LEFT);

Then replace this line:

#header { background: url("< ?php echo get_settings('siteurl'); ?>/images/kubrickheader.jpg") no-repeat bottom center; }

With this:

#header { background: url("< ?php echo get_settings('siteurl'); ?>/images/head/< ?php echo $head_img?>.jpg") no-repeat bottom center; }