function biblio_recent_feed in Bibliography Module 6
Same name and namespace in other branches
- 6.2 biblio.module \biblio_recent_feed()
- 7 biblio.module \biblio_recent_feed()
- 7.2 biblio.module \biblio_recent_feed()
1 string reference to 'biblio_recent_feed'
- biblio_menu in ./
biblio.module - Implementation of hook_menu().
File
- ./
biblio.module, line 1862
Code
function biblio_recent_feed() {
$query = "SELECT *\n FROM {node} AS n\n WHERE n.type = 'biblio' AND n.status=1\n ORDER BY n.created DESC";
$numberInFeed = variable_get('biblio_rss_number_of_entries', 10);
$siteName = variable_get('site_name', 'Drupal');
$base = variable_get('biblio_base', 'biblio');
$result = db_query_range(db_rewrite_sql($query), 0, $numberInFeed);
$channel['title'] = $siteName . ' - ' . t("Recently Added Publications");
$channel['link'] = url($base, array(
'absolute' => TRUE,
));
$channel['description'] = t("This feed lists the %num most recently added publications on %site", array(
'%num' => $numberInFeed,
'%site' => $siteName,
));
$nids = array();
while ($row = db_fetch_object($result)) {
$nids[] = $row->nid;
}
node_feed($nids, $channel);
}