[Comoblog-commit] modules/mod_fortune_db index.php,NONE,1.1 mod_fortune_db.php,NONE,1.1
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2006-02-01 17:29:10
|
Update of /cvsroot/comoblog/modules/mod_fortune_db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30358/mod_fortune_db Added Files: index.php mod_fortune_db.php Log Message: like mod fortune, but i wanted a db based one - warning slight bug in this commit. will fix in the next 24 hours . --- NEW FILE: index.php --- --- NEW FILE: mod_fortune_db.php --- <?php if (in_array('mod_fortune_db', $SIDEBAR_MODULES)) $mod_pos = 'sidebar'; else $mod_pos = 'top'; require_once (CFG_BASE_PATH.'/modules/mod_fortune_db/include/mod_fortune_db.inc.php'); $fortune_db_items = mod_fortune_db(); if ($fortune_db_items) { $mod_fortune_db_tpl = new XTemplate (CFG_BASE_PATH.'/modules/mod_fortune_db/templates/'.$mod_pos.'/mod_fortune_db.tpl.htm'); for ($c = 0; $c < count($fortune_db_items); $c++) { $mod_fortune_db_tpl->assign('ITEM', $fortune_db_items[$c]); $mod_fortune_db_tpl->parse('main.item'); } $mod_fortune_db_tpl->parse('main'); $mod_contents = $mod_fortune_db_tpl->text("main"); } else $mod_contents = 'no thumb'; ?> |