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=538e93e5608679237a20bae3ad4fc81779f54a6c;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 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', ''); }