function biblio_coins in Bibliography Module 6
Same name and namespace in other branches
- 5 biblio.module \biblio_coins()
- 6.2 includes/biblio.util.inc \biblio_coins()
- 7 includes/biblio.util.inc \biblio_coins()
- 7.2 includes/biblio.util.inc \biblio_coins()
2 calls to biblio_coins()
- biblio_coins_generate in ./
biblio.module - _biblio_prepare_submit in ./
biblio.module - Prepare a node for submit to database. Contains code common to insert and update.
2 string references to 'biblio_coins'
File
- ./
biblio.module, line 2137
Code
function biblio_coins($node) {
// 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
// fmt_info (type)
$fmt = "info:ofi/fmt:kev:mtx:";
// 'dissertation' is compatible with the 1.0 spec, but not the 0.1 spec
if ($node->biblio_type == 108) {
$fmt .= "dissertation";
}
elseif ($node->biblio_type == 102) {
$fmt .= "journal";
}
elseif ($node->biblio_type == 100 || $node->biblio_type == 101) {
$fmt .= "book";
}
else {
$fmt .= "dc";
}
$co = biblio_contextObject($node);
$coins = "ctx_ver=Z39.88-2004&rft_val_fmt=" . urlencode($fmt);
foreach ($co as $coKey => $coValue) {
// 'urlencode()' differs from 'rawurlencode() (i.e., RFC1738 encoding)
// in that spaces are encoded as plus (+) signs
$coKey = ereg_replace("au[0-9]*", "au", $coKey);
$coins .= "&" . $coKey . "=" . urlencode($coValue);
}
$coinsSpan = "<span class=\"Z3988\" title=\"" . $coins . "\"></span>";
return $coinsSpan;
}