You are here

function theme_biblio_openurl in Bibliography Module 6.2

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

Parameters

object $node:

3 theme calls to theme_biblio_openurl()
biblio_handler_citation::render in views/biblio_handler_citation.inc
theme_biblio_entry in includes/biblio_theme.inc
theme_biblio_long in includes/biblio_theme.inc
DEPRECIATED! this was the original output format which is not to flexable it will be removed TODO: remove this function

File

includes/biblio_theme.inc, line 29

Code

function theme_biblio_openurl($node) {
  global $user;
  $openURLResolver = '';
  if (isset($user->biblio_baseopenurl) && !empty($user->biblio_baseopenurl) && variable_get('biblio_show_openurl_profile_form', '1')) {
    $openURLResolver = $user->biblio_baseopenurl;
  }
  else {
    $openURLResolver = variable_get('biblio_baseopenurl', '');
  }
  if (!empty($openURLResolver)) {
    $openURLResolver = check_plain($openURLResolver);
    $openurl_query_options = biblio_openURL($node);
    $openurl_image = check_plain(variable_get('biblio_openurlimage', ''));
    if ($openurl_image != '') {
      return array(
        'title' => '<img border="0" src="' . $openurl_image . '" />',
        'href' => $openURLResolver,
        'html' => TRUE,
        'attributes' => array(
          'class' => 'biblio-openurl-image',
        ),
        'query' => $openurl_query_options,
      );
    }
    else {
      return array(
        'title' => t('Find It Via OpenURL!'),
        'href' => $openURLResolver,
        'attributes' => array(
          'class' => 'biblio-openurl-text',
        ),
        'query' => $openurl_query_options,
      );
    }
  }
  return;
}