diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-11-25 19:26:21 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-11-25 19:26:21 +0000 |
commit | c0494c0a2b2d022038baeeef33ce28bd71f35be9 (patch) | |
tree | 6538160fbe5046e15534f3fad33ec0639b363759 /modules/archive | |
parent | 2df7214a09fd2c38123d7767c29ed130b5c42052 (diff) | |
download | brdo-c0494c0a2b2d022038baeeef33ce28bd71f35be9.tar.gz brdo-c0494c0a2b2d022038baeeef33ce28bd71f35be9.tar.bz2 |
- Committed phase 4 of JonBob's menu system changes.
Diffstat (limited to 'modules/archive')
-rw-r--r-- | modules/archive/archive.module | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/modules/archive/archive.module b/modules/archive/archive.module index be2ad00f4..594e5f7b7 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -200,6 +200,12 @@ function archive_link($type) { } } + if ($type == "system") { + if (user_access("access content")) { + menu("archive", t("archives"), "archive_page", 0, 1); + } + } + return $links; } @@ -209,7 +215,7 @@ function archive_page() { $op = $_POST["op"]; $edit = $_POST["edit"]; - print theme("header"); + $output = ""; if (user_access("access content")) { if ($op == t("Show")) { @@ -236,7 +242,7 @@ function archive_page() { $start = "<div class=\"container-inline\">"; $start .= form_select("", "year", ($year ? $year : date("Y")), $years). form_select("", "month", ($month ? $month : date("m")), $months) . form_select("", "day", ($day ? $day : date("d")), $days) . form_submit(t("Show")); $start .= "</div>"; - print form($start); + $output .= form($start); /* ** Fetch nodes for the selected date, or current date if none @@ -247,15 +253,14 @@ function archive_page() { $result = db_query_range("SELECT nid FROM {node} WHERE status = '1' AND created > %d ORDER BY created", $date, 0, 20); while ($nid = db_fetch_object($result)) { - node_view(node_load(array("nid" => $nid->nid)), 1); + $output .= node_view(node_load(array("nid" => $nid->nid)), 1); } } + print theme("page", $output); } else { - message_access(); + print theme("page", message_access()); } - - print theme("footer"); } function archive_settings() { |