From 538e93e5608679237a20bae3ad4fc81779f54a6c Mon Sep 17 00:00:00 2001 From: Penny Leach 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 cabdf81..da333db 100644 --- a/include/genpage.inc.php +++ b/include/genpage.inc.php @@ -124,6 +124,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'); $serendipity['smarty']->assign('ENTRIES', ''); } -- 2.39.5