[Comoblog-commit] modules/mod_postbydate add_months_welsh.sql,NONE,1.1 index.php,NONE,1.1 mod_postby
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2005-11-27 19:58:54
|
Update of /cvsroot/comoblog/modules/mod_postbydate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9857/mod_postbydate Added Files: add_months_welsh.sql index.php mod_postbydate.php Log Message: initial add, just to make sure ive got the hang of it. mod_postbydate ,builds a select box or list of posts by month, clicking on a link in it takes you to the first date with posts in that month, Its all working for me, but feel free to provide feed back. (and thanks to all of you whole helped test it, it now supports any language via the admin area, see the welsh sql file in the root of this module if your updating Oh and it really needs its own icon I suppose - but I'm not good at that, I'm open to suggestions --- NEW FILE: add_months_welsh.sql --- /* > January / Ionawr (Jan / Ion) > February / Chwefror (Feb / Chwef) > March / Mawrth (Mar / Maw) > April / Ebrill (Apr / Ebr) > May / Mai > June / Mehefin (Jun / Meh) > July / Gorffennaf (Jul / Gor) > August / Awst (Aug / Awst) > September / Medi (Sep / Med) > October / Hydref (Oct / Hyd) > November / Tachwedd (Nov / Tach) > December / Rhagfyr (Dec / Rhag) */ insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_01', 'January / Ionawr', 'The text for month 01', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_02', 'February / Chwefror', 'The text for month 02', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_03', 'March / Mawrth', 'The text for month 03', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_04', 'April / Ebrill', 'The text for month 04', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_05', 'May / Mai', 'The text for month 05', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_06', 'June / Mehefin', 'The text for month 06', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_07', 'July / Gorffennaf', 'The text for month 07', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_08', 'August / Awst', 'The text for month 08', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_09', 'September / Medi', 'The text for month 09', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_10', 'October / Hydref', 'The text for month 10', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_11', 'November / Tachwedd', 'The text for month 11', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_12', 'December / Rhagfyr', 'The text for month 12', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; --- NEW FILE: mod_postbydate.php --- <?php if (in_array('mod_postbydate', $SIDEBAR_MODULES)) $mod_pos = 'sidebar'; else $mod_pos = 'top'; require_once (CFG_BASE_PATH.'/modules/mod_postbydate/include/mod_postbydate.inc.php'); $postbydate_items = mod_postbydate_list(); if ($postbydate_items) { $mod_postbydate_tpl = new XTemplate (CFG_BASE_PATH.'/modules/mod_postbydate/templates/'.$mod_pos.'/mod_postbydate.tpl.htm'); if (CFG_POSTBYDATE_TOPLINE) $mod_postbydate_tpl->assign('CFG_POSTBYDATE_TOPLINE', CFG_POSTBYDATE_TOPLINE ); for ($c = 0; $c < count($postbydate_items); $c++) { if ($c % 2) $tpl->assign('BGCOLOR', '#ffffff'); else $tpl->assign('BGCOLOR', '#efefef'); $mod_postbydate_tpl->assign('ITEM', $postbydate_items[$c]); $mod_postbydate_tpl->parse('main.item'); } $mod_postbydate_tpl->parse('main'); $mod_contents = $mod_postbydate_tpl->text("main"); } else $mod_contents = ''; ?> --- NEW FILE: index.php --- |