You are here

function biblio_export in Bibliography Module 7.2

Same name and namespace in other branches
  1. 6.2 includes/biblio.import.export.inc \biblio_export()
  2. 6 biblio.import.export.inc \biblio_export()
  3. 7 includes/biblio.import.export.inc \biblio_export()

Export nodes in a given file format.

Parameters

$format: The file format to export the nodes in (tagged, XML, bibTEX)

$nid: If not NULL, then export only the given nodeid, else we will use the session variable which holds the most recent query. If neither $nid or the session variable are set, then nothing is exported

$version: The version of EndNote XML to use. There is one format for ver. 1-7 and a different format for versions 8 and greater.

Return value

none

1 string reference to 'biblio_export'
biblio_menu in ./biblio.module
Implements hook_menu().

File

includes/biblio.import.export.inc, line 515
Functions that are used to import and export biblio data.

Code

function biblio_export($format = "tagged", $bid = NULL, $popup = FALSE) {
  $params = array();
  $bids = array();
  $arg_list = array();
  module_load_include('inc', 'biblio', 'includes/biblio.contributors');
  if ($bid === NULL) {
    module_load_include('inc', 'biblio', 'includes/biblio.pages');
    $uri = drupal_parse_url(request_uri());
    $arg_list += $uri['query'];
    $arg_list['page_limit'] = 0;
    list($bids, , ) = biblio_build_query($arg_list);
  }
  elseif (!empty($bid)) {
    $bids[] = $bid;
  }
  elseif (!count($bids)) {
    return;
  }
  module_invoke('biblio_' . $format, 'biblio_export', $bids);
}