]> git.mjollnir.org Git - s9y.git/commitdiff
added random image generator thing to smarty vars for template
authorPenny Leach <mjollnir@titania.local>
Sat, 24 Jun 2006 06:04:58 +0000 (18:04 +1200)
committerPenny Leach <mjollnir@titania.local>
Sat, 24 Jun 2006 06:04:58 +0000 (18:04 +1200)
include/genpage.inc.php

index 95306efa650cfdc0908622c05a2e101943a9db12..b5105bf6aec00239da608f92509be2ee0346a50d 100644 (file)
@@ -107,6 +107,14 @@ if ($serendipity['smarty_raw_mode']) {
             break;
     }
 
+    
+    $images = array('fingers' => 'Penny\'s fingers',
+                    'lying' => 'Lying in the grass',
+                    'silhouette' => 'Photograph of self in mirror with kitten against window');
+    $entry = array_rand($images);
+    $serendipity['smarty']->assign(array('headerimage' => $entry,
+                                         'headerimagealt' => $images[$entry]));
+
     serendipity_smarty_fetch('CONTENT', 'content.tpl');
 }