You are here

function theme_biblio_long in Bibliography Module 7.2

Same name and namespace in other branches
  1. 5 biblio.module \theme_biblio_long()
  2. 6.2 includes/biblio_theme.inc \theme_biblio_long()
  3. 6 biblio_theme.inc \theme_biblio_long()
  4. 7 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:

Return value

unknown_type

1 theme call to theme_biblio_long()
biblio_page_view in ./biblio.module
Displays a biblio; Hands data off to the Field API

File

includes/biblio.theme.inc, line 75

Code

function theme_biblio_long($variables) {
  $output = '';
  $node = $variables['node'];
  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', $variables) . '</div>';
    $annotation_field = variable_get('biblio_annotations', 'none');
    if ($annotation_field != 'none' && $node->{$annotation_field}) {
      $output .= '<div class="biblio-annotation">';
      $output .= filter_xss($node->{$annotation_field}, biblio_get_allowed_tags());
      $output .= '</div>';
    }
    $output .= check_markup($node->body);
    if (biblio_access('export', $node)) {
      $output .= theme('biblio_export_links', array(
        'node' => $node,
      ));
    }
    return $output;
  }
  foreach ((array) $node->biblio_contributors as $auth) {
    if ($auth['auth_category'] == 1) {
      $authors[] = theme('biblio_author_link', array(
        'author' => $auth,
      ));
    }
  }
  $authors = implode('; ', (array) $authors);
  $openurl_base = variable_get('biblio_baseopenurl', '');
  if ($openurl_base) {
    $output .= theme('biblio_openurl', array(
      'openURL' => biblio_openurl($node),
    ));
  }
  $output .= '<div class="biblio_type"><h3>' . t("Publication Type") . ":</h3> {$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', FALSE) ? array(
      'target' => '_blank',
    ) : array();
    $output .= '<h3>' . t("URL") . ':</h3>' . l($node->biblio_url, $node->biblio_url, $attrib) . "\n";
  }
  if (!empty($node->biblio_keywords)) {
    $output .= '<h3>' . t("Keywords") . ':</h3> ' . _biblio_keyword_links($node->biblio_keywords) . "\n";
  }
  if ($node->biblio_abst_e) {
    $output .= '<h3>' . t("Abstract") . ':</h3> ' . check_markup($node->biblio_abst_e) . "\n";
  }
  if ($node->biblio_abst_f) {
    $output .= '<p>' . check_markup($node->biblio_abst_f) . "\n";
  }
  if ($node->biblio_notes) {
    $output .= '<h3>' . t("Notes") . ': </h3>' . check_markup($node->biblio_notes) . "\n";
  }
  if (!empty($node->body) && user_access('view full text')) {
    $output .= drupal_render(field_view_field('node', $node, 'body'));
  }
  return $output;
}