function aggregator_page_opml in Drupal 6
Same name and namespace in other branches
- 4 modules/aggregator.module \aggregator_page_opml()
- 5 modules/aggregator/aggregator.module \aggregator_page_opml()
- 7 modules/aggregator/aggregator.pages.inc \aggregator_page_opml()
Menu callback; generates an OPML representation of all feeds.
Parameters
$cid: If set, feeds are exported only from a category with this ID. Otherwise, all feeds are exported.
Return value
The output XML.
1 string reference to 'aggregator_page_opml'
- aggregator_menu in modules/
aggregator/ aggregator.module - Implementation of hook_menu().
File
- modules/
aggregator/ aggregator.pages.inc, line 393 - User page callbacks for the aggregator module.
Code
function aggregator_page_opml($cid = NULL) {
if ($cid) {
$result = db_query('SELECT f.title, f.url FROM {aggregator_feed} f LEFT JOIN {aggregator_category_feed} c on f.fid = c.fid WHERE c.cid = %d ORDER BY title', $cid);
}
else {
$result = db_query('SELECT * FROM {aggregator_feed} ORDER BY title');
}
$feeds = array();
while ($item = db_fetch_object($result)) {
$feeds[] = $item;
}
return theme('aggregator_page_opml', $feeds);
}