You are here

function biblio_openURL in Bibliography Module 6

Same name and namespace in other branches
  1. 5 biblio.module \biblio_openURL()
  2. 6.2 includes/biblio_theme.inc \biblio_openURL()
  3. 7 includes/biblio_theme.inc \biblio_openurl()
  4. 7.2 includes/biblio.theme.inc \biblio_openurl()

Parameters

$node:

Return value

unknown_type

1 call to biblio_openURL()
theme_biblio_openurl in ./biblio_theme.inc

File

./biblio_theme.inc, line 81

Code

function biblio_openURL($node) {
  $query = array();

  // Copyright:          Matthias Steffens <mailto:refbase@extracts.de> and the file's
  //                     original author.
  // Original Author:    Richard Karnesky <mailto:karnesky@gmail.com>  //
  // Adapted for biblio: Ron Jerome
  //  global $openURLResolver; // these variables are defined in 'ini.inc.php'
  //  global $hostInstitutionAbbrevName;
  $co = biblio_contextObject($node);
  $query["ctx_ver"] = "Z39.88-2004";
  foreach ($co as $coKey => $coValue) {
    $coKey = ereg_replace("rft.", "", $coKey);
    $coKey = ereg_replace("au[0-9]*", "au", $coKey);
    $query[$coKey] = rawurlencode($coValue);
  }
  $sid = "biblio:" . variable_get('site_name', 'Drupal');
  $user_sid = !empty($user->biblio_openurl_sid) ? $user->biblio_openurl_sid : '';
  $query["sid"] = !empty($user_sid) ? check_plain($user_sid) : check_plain(variable_get('biblio_openurl_sid', $sid));
  return $query;
}