From 51f44a5a1c0ccbbf76cc9cb0f52a97c31a6345c5 Mon Sep 17 00:00:00 2001
From: Penny Leach <mjollnir@titania.local>
Date: Sat, 24 Jun 2006 18:04:58 +1200
Subject: [PATCH] added random image generator thing to smarty vars for
 template

---
 include/genpage.inc.php | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/genpage.inc.php b/include/genpage.inc.php
index 95306ef..b5105bf 100644
--- a/include/genpage.inc.php
+++ b/include/genpage.inc.php
@@ -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');
 }
 
-- 
2.39.5