function biblio_crossref_biblio_lookup_link in Bibliography Module 7.2
Same name and namespace in other branches
- 6.2 modules/crossref/biblio_crossref.module \biblio_crossref_biblio_lookup_link()
- 7 modules/crossref/biblio_crossref.module \biblio_crossref_biblio_lookup_link()
1 call to biblio_crossref_biblio_lookup_link()
- biblio_crossref_node_view in modules/
crossref/ biblio_crossref.module
File
- modules/
crossref/ biblio_crossref.module, line 112
Code
function biblio_crossref_biblio_lookup_link($node) {
$show_link = variable_get('biblio_lookup_links', array(
'crossref' => TRUE,
));
if (empty($show_link['crossref']) || !isset($node) || !isset($node->biblio_crossref_id) && empty($node->biblio_doi)) {
return;
}
if ($node->type == 'biblio') {
$doi = isset($node->biblio_crossref_id) ? $node->biblio_crossref_id : $node->biblio_doi;
if (($doi_start = strpos($doi, '10.')) !== FALSE) {
$doi = substr($doi, $doi_start);
}
$link = 'http://dx.doi.org/' . $doi;
return array(
'biblio_crossref' => array(
'title' => t('DOI'),
'href' => $link,
'attributes' => array(
'title' => t("Click to view the CrossRef listing for this node"),
),
),
);
}
return;
}