You are here

function theme_biblio_openurl in Bibliography Module 6

Same name and namespace in other branches
  1. 5 biblio.module \theme_biblio_openurl()
  2. 6.2 includes/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

$openURL:

Return value

unknown_type

2 theme calls to theme_biblio_openurl()
theme_biblio_export_links in ./biblio_theme.inc
Creates a group of links for the various export functions
theme_biblio_long in ./biblio_theme.inc
DEPRECIATED! this was the original output format which is not to flexable it will be removed TODO: remove this function

File

./biblio_theme.inc, line 35

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;
}