You are here

function biblio_filter_feed in Bibliography Module 6.2

Same name and namespace in other branches
  1. 6 biblio.module \biblio_filter_feed()
  2. 7 biblio.module \biblio_filter_feed()
  3. 7.2 biblio.module \biblio_filter_feed()

This function creates a feed from a filter type query (i.e. biblio/author/jones)

Parameters

$query: The SQL string to be used in the call to db_query.

array $terms: (optional) The terms that are used to replace any place holders in the query.

array $rss_info: (optional) Array which contains the title, link and description info for rss feed.

1 call to biblio_filter_feed()
biblio_db_search in includes/biblio.pages.inc
Page callback: Displays a listing of biblio type of content.

File

./biblio.module, line 2081
Main file for Drupal module biblio.

Code

function biblio_filter_feed($query, $terms = NULL, $rss_info = NULL) {
  $base = variable_get('biblio_base', 'biblio');
  $channel['title'] = $rss_info['title'];
  $channel['link'] = url($base . $rss_info['link'], array(
    'absolute' => TRUE,
  ));
  $channel['description'] = $rss_info['description'];
  $nids = array();
  $result = db_query($query, $terms);
  while ($row = db_fetch_object($result)) {
    $nids[] = $row->nid;
  }
  node_feed($nids, $channel);
}