You are here

function theme_biblio_long in Bibliography Module 6.2

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

DEPRECIATED! this was the original output format which is not to flexable it will be removed TODO: remove this function

Parameters

$node:

$base:

$style:

1 theme call to theme_biblio_long()
biblio_view in ./biblio.module
Implements hook_view().

File

includes/biblio_theme.inc, line 118

Code

function theme_biblio_long($node, $base = 'biblio', $style = 'classic') {
  if (module_exists('popups')) {
    popups_add_popups();
  }
  $output .= filter_xss($node->biblio_coins, array(
    'span',
  ));
  $layout = variable_get('biblio_node_layout', 'orig');
  if (variable_get('biblio_node_layout', 'orig') == 'ft' && strlen(trim($node->body)) && user_access('view full text')) {
    $output .= '<div class="biblio-head">' . theme('biblio_style', $node, $base, $style) . '</div>';
    $annotation_field = variable_get('biblio_annotations', 'none');
    if ($annotation_field != 'none' && $node->{$annotation_field}) {
      $output .= '<div class="biblio-annotation">';
      $output .= check_markup($node->{$annotation_field}, $node->format, FALSE);
      $output .= '</div>';
    }
    $output .= check_markup($node->body, $node->format, FALSE);
    if (biblio_access('export', $node)) {
      $output .= theme('biblio_export_links', $node);
    }
    return $output;
  }
  $author_links = variable_get('biblio_author_links', 1);
  foreach ((array) $node->biblio_contributors[1] as $auth) {
    $authors[] = $author_links ? theme('biblio_author_link', $auth) : check_plain(trim($auth['name']));
  }
  $authors = implode('; ', (array) $authors);
  $output .= theme('biblio_openurl', $node);
  $output .= '<div class="biblio_type"><h3>' . t("Publication Type") . ":</h3> " . _biblio_localize_type($node->biblio_type, $node->biblio_type_name) . "</div>\n";
  $output .= '<div class="biblio_authors"><h3>' . t("Authors") . ':</h3> ' . $authors . "</div>\n";
  $output .= '<div class="biblio_source"><h3>' . t("Source") . ': </h3> ';
  $source = null;
  if ($node->biblio_secondary_title) {
    $source .= check_plain($node->biblio_secondary_title);
  }
  if ($node->biblio_publisher) {
    $source .= $source ? ", " : "";
    $source .= check_plain($node->biblio_publisher);
  }
  if ($node->biblio_volume) {
    $source .= $source ? ", " : "";
    $source .= t('Volume') . ' ' . check_plain($node->biblio_volume);
  }
  if ($node->biblio_issue) {
    $source .= $source ? ", " : "";
    $source .= t('Issue') . ' ' . check_plain($node->biblio_issue);
  }
  if ($node->biblio_number) {
    $source .= $source ? ", " : "";
    $source .= t('Number') . ' ' . check_plain($node->biblio_number);
  }
  if ($node->biblio_place_published) {
    $source .= $source ? ", " : "";
    $source .= check_plain($node->biblio_place_published);
  }
  if ($node->biblio_pages) {
    $source .= $source ? ", " : "";
    $source .= 'p.' . check_plain($node->biblio_pages);
  }
  if (isset($node->biblio_year)) {
    $node->biblio_year = _biblio_text_year($node->biblio_year);
    $source .= ' (' . check_plain($node->biblio_year) . ')';
  }
  $output .= "{$source}</div>\n";
  if ($node->biblio_isbn) {
    $output .= '<h3>' . t("ISBN") . ':</h3> ' . check_plain($node->biblio_isbn) . "\n";
  }
  if ($node->biblio_call_number) {
    $output .= '<h3>' . t("Call Number") . ':</h3> ' . check_plain($node->biblio_call_number) . "\n";
  }
  if ($node->biblio_accession_number) {
    $output .= '<h3>' . t("Accession Number") . ':</h3> ' . check_plain($node->biblio_accession_number) . "\n";
  }
  if ($node->biblio_other_number) {
    $output .= '<h3>' . t("Other Number") . ':</h3> ' . check_plain($node->biblio_other_number) . "\n";
  }
  if ($node->biblio_url) {
    $attrib = variable_get('biblio_links_target_new_window', null) ? array(
      'target' => '_blank',
    ) : array();
    $output .= '<h3>' . t("URL") . ':</h3>' . l($node->biblio_url, $node->biblio_url, $attrib) . "\n";
  }
  if ($node->biblio_doi) {
    $doi_url = '';
    $attrib = variable_get('biblio_links_target_new_window', null) ? array(
      'target' => '_blank',
    ) : array();
    if (($doi_start = strpos($node->biblio_doi, '10.')) !== FALSE) {
      $doi = substr($node->biblio_doi, $doi_start);
      $doi_url .= 'http://dx.doi.org/' . $doi;
    }
    $output .= '<h3>' . t("DOI") . ':</h3>' . l($node->biblio_doi, $doi_url, $attrib) . "\n";
  }
  if (!empty($node->biblio_keywords)) {
    $output .= '<h3>' . t("Keywords") . ':</h3> ' . _biblio_keyword_links($node->biblio_keywords, $base) . "\n";
  }
  if ($node->biblio_abst_e) {
    $output .= '<h3>' . t("Abstract") . ':</h3> ' . check_markup($node->biblio_abst_e, $node->format, FALSE) . "\n";
  }
  if ($node->biblio_abst_f) {
    $output .= '<p>' . check_markup($node->biblio_abst_f, $node->format, FALSE) . "\n";
  }
  if ($node->biblio_notes) {
    $output .= '<h3>' . t("Notes") . ': </h3>' . check_markup($node->biblio_notes, $node->format, FALSE) . "\n";
  }
  if (strlen(trim($node->body)) && user_access('view full text')) {
    $output .= '<h3>' . t('Full Text') . ':</h3>' . check_markup($node->body, $node->format, FALSE);
  }
  return $output;
}