You are here

function biblio_crossref_link in Bibliography Module 6.2

1 call to biblio_crossref_link()
biblio_crossref_biblio_lookup_link in modules/crossref/biblio_crossref.module

File

modules/crossref/biblio_crossref.module, line 206

Code

function biblio_crossref_link($type, $node = NULL, $teaser = FALSE) {
  $show_link = variable_get('biblio_lookup_links', array(
    'crossref' => TRUE,
  ));
  if (!$show_link['crossref']) {
    return array();
  }
  if (isset($node) && $type == 'node' && $node->type == 'biblio' && !empty($node->biblio_crossref_id)) {
    $link = 'http://dx.doi.org/' . $node->biblio_crossref_id;
    return array(
      'biblio_crossref' => array(
        'title' => t('DOI'),
        'href' => $link,
        'attributes' => array(
          'title' => t("Click to view the CrossRef listing for this node"),
        ),
      ),
    );
  }
  return;
}