From: Penny Leach Date: Sat, 24 Jun 2006 06:04:58 +0000 (+1200) Subject: added random image generator thing to smarty vars for template X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=51f44a5a1c0ccbbf76cc9cb0f52a97c31a6345c5;p=s9y.git added random image generator thing to smarty vars for template --- 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'); }