function theme_biblio_long in Bibliography Module 7
Same name and namespace in other branches
- 5 biblio.module \theme_biblio_long()
- 6.2 includes/biblio_theme.inc \theme_biblio_long()
- 6 biblio_theme.inc \theme_biblio_long()
- 7.2 includes/biblio.theme.inc \theme_biblio_long()
Theme function for biblio_long.
@todo Remove this function.
Parameters
$node:
$base:
$style:
Deprecated
This was the original output format which is not to flexable. It will be removed.
1 theme call to theme_biblio_long()
- biblio_view in ./
biblio.module - Implements hook_view().
File
- includes/
biblio_theme.inc, line 81
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');
// Check body value.
$has_body = !empty($node->body);
if (variable_get('biblio_node_layout', 'orig') == 'ft' && $has_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>';
}
$full_text = field_view_field('node', $node, 'body', array(
'label' => 'hidden',
));
$output .= drupal_render($full_text);
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) {
$options = variable_get('biblio_links_target_new_window') ? array(
'attributes' => array(
'target' => '_blank',
),
) : array();
$output .= '<h3>' . t("URL") . ':</h3>' . l($node->biblio_url, $node->biblio_url, $options) . "\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')) {
$full_text = field_view_field('node', $node, 'body');
$output .= drupal_render($full_text);
}
return $output;
}