From f0867798905b0b68e8924e45631c11db913fa7f8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 15 Jul 2001 11:32:46 +0000 Subject: - import.module: + added new "tab" to import.module called "news sources". + improvement to import.module navigation. - theme.inc: + renamed 'your contributions' to 'your submissions'. --- modules/aggregator.module | 48 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) (limited to 'modules/aggregator.module') diff --git a/modules/aggregator.module b/modules/aggregator.module index 447f84a43..81a391f10 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -433,6 +433,17 @@ function import_admin() { } } +function import_page_info() { + global $theme; + + $links[] = "". t("latest news") .""; + $links[] = "". t("news by source") .""; + $links[] = "". t("news by topic") .""; + $links[] = "". t("news sources") .""; + + return "
". $theme->links($links) ."
"; +} + function import_page_last() { global $theme; @@ -442,11 +453,9 @@ function import_page_last() { while ($item = db_fetch_object($result)) { $links[] = "iid\">". t("blog") .""; $links[] = "fid\">". t("feed") .""; - $links[] = "". t("by topic") .""; - $links[] = "". t("by source") .""; if ($item->link) { - $output .= "". format_url($item->link, $item->title) ." · fid\">$item->ftitle". $theme->links($links) ."\n"; + $output .= "". format_url($item->link, $item->title) ." · fid\">$item->ftitle". $theme->links($links) ."\n"; } if ($item->description) { $output .= "
". check_output($item->description) ."

"; @@ -457,6 +466,7 @@ function import_page_last() { $output .= "\n"; $theme->header(); + $theme->box(t("News feeds"), import_page_info()); $theme->box(t("Latest news"), $output); $theme->footer(); } @@ -478,7 +488,7 @@ function import_page_feed($fid) { $links[] = "link\">". t("visit") .""; if ($item->link) { - $output .= "". format_url($item->link, $item->title) ."". $theme->links($links) ."\n"; + $output .= "". format_url($item->link, $item->title) ."". $theme->links($links) ."\n"; } if ($item->description) { $output .= "
". check_output($item->description) ."

"; @@ -514,7 +524,7 @@ function import_page_bundle($bid) { $links[] = "link\">". t("visit") .""; if ($item->link) { - $output .= "". format_url($item->link, $item->title) ." · fid\">$item->ftitle". $theme->links($links) ."\n"; + $output .= "". format_url($item->link, $item->title) ." · fid\">$item->ftitle". $theme->links($links) ."\n"; } if ($item->description) { $output .= "
". check_output($item->description) ."

"; @@ -531,6 +541,23 @@ function import_page_bundle($bid) { } +function import_page_sources() { + global $theme; + + $result = db_query("SELECT * FROM feed ORDER BY title"); + + while ($feed = db_fetch_object($result)) { + $output .= "url\">image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />\n"; + $output .= format_url("module.php?mod=import&op=feed&id=$feed->fid", $feed->title); + $output .= "

". check_output($feed->description) ."

"; + } + + $theme->header(); + $theme->box(t("News feeds"), import_page_info()); + $theme->box(t("News sources"), $output); + $theme->footer(); +} + function import_page_bundles() { import_page_blocks(import_get_bundles()); } @@ -550,6 +577,7 @@ function import_page_blocks($blocks) { $i = 0; $theme->header(); + $theme->box(t("News feeds"), import_page_info()); print "\n"; print " \n"; print "
\n"; @@ -571,20 +599,20 @@ function import_page() { if (user_access("access news feeds")) { switch($op) { - case "all": - import_page_last(); - break; case "feed": import_page_feed($id); break; case "bundle": import_page_bundle($id); break; + case "feeds": + import_page_feeds(); + break; case "bundles": import_page_bundles(); break; - case "feeds": - import_page_feeds(); + case "sources": + import_page_sources(); break; default: import_page_last(); -- cgit v1.2.3