2014-07-23 15:52:50 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$opml_array = array(
|
|
|
|
'head' => array(
|
2015-02-08 18:55:48 +01:00
|
|
|
'title' => FreshRSS_Context::$system_conf->title,
|
2014-07-23 15:52:50 +02:00
|
|
|
'dateCreated' => date('D, d M Y H:i:s')
|
|
|
|
),
|
|
|
|
'body' => array()
|
|
|
|
);
|
|
|
|
|
|
|
|
foreach ($this->categories as $key => $cat) {
|
|
|
|
$opml_array['body'][$key] = array(
|
|
|
|
'text' => $cat['name'],
|
|
|
|
'@outlines' => array()
|
|
|
|
);
|
|
|
|
|
|
|
|
foreach ($cat['feeds'] as $feed) {
|
|
|
|
$opml_array['body'][$key]['@outlines'][] = array(
|
|
|
|
'text' => htmlspecialchars_decode($feed->name()),
|
|
|
|
'type' => 'rss',
|
2014-09-21 12:12:35 +02:00
|
|
|
'xmlUrl' => htmlspecialchars_decode($feed->url()),
|
|
|
|
'htmlUrl' => htmlspecialchars_decode($feed->website()),
|
|
|
|
'description' => htmlspecialchars_decode($feed->description()),
|
2014-07-23 15:52:50 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
echo libopml_render($opml_array);
|