You are here

function theme_aggregator_feed in Drupal 4

Same name and namespace in other branches
  1. 5 modules/aggregator/aggregator.module \theme_aggregator_feed()

Format a news feed.

Related topics

1 theme call to theme_aggregator_feed()
aggregator_page_source in modules/aggregator.module
Menu callback; displays all the items captured from a particular feed.

File

modules/aggregator.module, line 1286
Used to aggregate syndicated content (RSS, RDF, and Atom).

Code

function theme_aggregator_feed($feed) {
  $output = '<div class="feed-source">';
  $output .= theme('feed_icon', $feed->url) . "\n";
  $output .= $feed->image;
  $output .= '<div class="feed-description">' . aggregator_filter_xss($feed->description) . "</div>\n";
  $output .= '<div class="feed-url"><em>' . t('URL:') . '</em> ' . l($feed->link, $feed->link, array(), NULL, NULL, TRUE) . "</div>\n";
  if ($feed->checked) {
    $updated = t('%time ago', array(
      '%time' => format_interval(time() - $feed->checked),
    ));
  }
  else {
    $updated = t('never');
  }
  if (user_access('administer news feeds')) {
    $updated = l($updated, 'admin/aggregator');
  }
  $output .= '<div class="feed-updated"><em>' . t('Updated:') . "</em> {$updated}</div>";
  $output .= "</div>\n";
  return $output;
}