function biblio_pm_biblio_lookup_link in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/pubmed/biblio_pm.module \biblio_pm_biblio_lookup_link()
- 6 pubmed/biblio_pm.module \biblio_pm_biblio_lookup_link()
- 7.2 modules/pubmed/biblio_pm.module \biblio_pm_biblio_lookup_link()
1 call to biblio_pm_biblio_lookup_link()
- biblio_pm_node_view in modules/
pubmed/ biblio_pm.module
File
- modules/
pubmed/ biblio_pm.module, line 388
Code
function biblio_pm_biblio_lookup_link($node) {
$show_link = variable_get('biblio_lookup_links', array(
'pubmed' => TRUE,
));
if (!isset($show_link['pubmed']) || !$show_link['pubmed'] || !isset($node) || $node->type != 'biblio' || !isset($node->biblio_pubmed_id)) {
return array();
}
$link = 'https://www.ncbi.nlm.nih.gov/pubmed/' . $node->biblio_pubmed_id . '?dopt=Abstract';
$attrs = array(
'title' => t("Click to view the PubMed listing for this node"),
);
if (variable_get('biblio_links_target_new_window', NULL)) {
$attrs = array_merge($attrs, array(
'target' => '_blank',
));
}
return array(
'biblio_pubmed' => array(
'title' => t('PubMed'),
'href' => $link,
'attributes' => $attrs,
),
);
}