[Comoblog-commit] modules/mod_fortune_db mod_fortune_db.php,1.1,1.2
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2006-02-16 14:22:33
|
Update of /cvsroot/comoblog/modules/mod_fortune_db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19170 Modified Files: mod_fortune_db.php Log Message: I've added the admin sections for this, it can be seen working in the top bar of http://www.iamdecal.co.uk so it just needs some peer review before release iamdecal 2006-02-16 ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: index.php mod_fortune_db.php css/mod_fortune_db.css.php img/mod_fortune_db.gif img/mod_fortune_db_big.gif include/mod_fortune_db.inc.php install/mod_fortune_db.xml templates/sidebar/mod_fortune_db.tpl.htm templates/top/mod_fortune_db.tpl.htm ---------------------------------------------------------------------- Index: mod_fortune_db.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/mod_fortune_db.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_fortune_db.php 1 Feb 2006 17:28:59 -0000 1.1 +++ mod_fortune_db.php 16 Feb 2006 14:22:19 -0000 1.2 @@ -1,22 +1,18 @@ -<?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'; -?> \ No newline at end of file +<?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 = mod_fortune_db(); + +if ($fortune_db) { + $mod_fortune_db_tpl = new XTemplate (CFG_BASE_PATH.'/modules/mod_fortune_db/templates/'.$mod_pos.'/mod_fortune_db.tpl.htm'); + $mod_fortune_db_tpl->assign('MOD_FORTUNE_CONTENT', $fortune_db); + $mod_fortune_db_tpl->assign('MOD_FORTUNE_DB_TITLE', CFG_MOD_FORTUNE_DB_TITLE); + $mod_fortune_db_tpl->parse('main'); + $mod_contents = $mod_fortune_db_tpl->text("main"); + }else { + $mod_contents = 'no quote today'; + } +?> |