theme_aggregator_page_opml

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/aggregator/aggregator.pages.inc, строка 416

Версии
6
theme_aggregator_page_opml($feeds)

Темизирует вывод новостной ленты в формате OPML.

Параметры

$feeds Массив новостей для темизации.

Связанные темы

▾ 1 функция вызывает theme_aggregator_page_opml()

aggregator_page_opml in modules/aggregator/aggregator.pages.inc
Коллбэк меню; генерирует представление OPML из всех фидов.

Код

<?php
function theme_aggregator_page_opml($feeds) {

  drupal_set_header('Content-Type: text/xml; charset=utf-8');

  $output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
  $output .= "<opml version=\"1.1\">\n";
  $output .= "<head>\n";
  $output .= '<title>'. check_plain(variable_get('site_name', 'Drupal')) ."</title>\n";
  $output .= '<dateModified>'. gmdate('r') ."</dateModified>\n";
  $output .= "</head>\n";
  $output .= "<body>\n";
  foreach ($feeds as $feed) {
    $output .= '<outline text="'. check_plain($feed->title) .'" xmlUrl="'. check_url($feed->url) ."\" />\n";
  }
  $output .= "</body>\n";
  $output .= "</opml>\n";

  print $output;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему