From 9281d0cdd7279b5e0e1d60c75bc38c2ae41c247a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 9 Feb 2003 17:39:40 +0000 Subject: - Applied Alastair's date patch. - Removed all instances of '$user->nodes'. - Committed Moshe's taxonomy patch - minus the node_compact_list() bit. It needs a bit more thought/work. This patch changes the links of taxonomy pages/feeds so update your custom code and themes accordingly! Themes should now use "taxonomy_link("taxonomy terms", $node)" to get an array of taxonomy term links. The old construct is deprecated and should be changed. // old theme blob: if (function_exists("taxonomy_node_get_terms")) { foreach (taxonomy_node_get_terms($node->nid) as $term) { $terms[] = l($term->name, NULL, array(), "or=$term->tid"); } } // new theme blob: if (module_exist("taxonomy")) { $terms = taxonomy_link("taxonomy terms", $node); } // old URL: http://foo.com/index.php?or=1,2 // new URL: http://foo.com/?q=taxonomy/page/or/1,2 --- modules/system/system.module | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'modules/system') diff --git a/modules/system/system.module b/modules/system/system.module index 480d5ac95..27412d890 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -74,8 +74,34 @@ function system_view_modules() { $output .= "
\n"; // date settings: - $output .= "

" . t("Date format setting") . "

\n"; - $output .= form_select(t("Date format"), "date_format", variable_get("date_format", "m/d/Y - H:i"), array("m/d/Y - H:i" => "m/d/Y - H:i", "d/m/Y - H:i" => "d/m/Y - H:i", "Y/m/d - H:i" => "Y/m/d - H:i"), t("The format in which dates are displayed")); + $output .= "

" . t("Date format settings") . "

\n"; + + // date settings: possible date formats + $dateshort = array("m/d/Y - H:i", "d/m/Y - H:i", "Y/m/d - H:i", + "m/d/Y - g:ia", "d/m/Y - g:ia", "Y/m/d - g:ia", + "M j Y - H:i", "j M Y - H:i", "Y M j - H:i", + "M j Y - g:ia", "j M Y - g:ia", "Y M j - g:ia"); + $datemedium = array("D, m/d/Y - H:i", "D, d/m/Y - H:i", "D, Y/m/d - H:i", + "F j, Y - H:i", "j F, Y - H:i", "Y, F j - H:i", + "D, m/d/Y - g:ia", "D, d/m/Y - g:ia", "D, Y/m/d - g:ia", + "F j, Y - g:ia", "j F, Y - g:ia", "Y, F j - g:ia"); + $datelong = array("l, F j, Y - H:i", "l, j F, Y - H:i", "l, Y, F j - H:i", + "l, F j, Y - g:ia", "l, j F, Y - g:ia", "l, Y, F j - g:ia"); + + // date settings: construct choices for user + foreach ($dateshort as $f) { + $dateshortchoices[$f] = format_date(time(),"custom",$f); + } + foreach ($datemedium as $f) { + $datemediumchoices[$f] = format_date(time(),"custom",$f); + } + foreach ($datelong as $f) { + $datelongchoices[$f] = format_date(time(),"custom",$f); + } + + $output .= form_select(t("Date format (short)"), "date_format_short", variable_get("date_format_short", $dateshort[0]), $dateshortchoices, t("The short format of date display.")); + $output .= form_select(t("Date format (medium)"), "date_format_medium", variable_get("date_format_medium", $datemedium[0]), $datemediumchoices,t("The medium sized date display.")); + $output .= form_select(t("Date format (long)"), "date_format_long", variable_get("date_format_long", $datelong[0]), $datelongchoices, t("Longer date format used for detailed display.")); $output .= "
\n"; // layout settings: -- cgit v1.2.3