function biblio_view in Bibliography Module 6
Same name and namespace in other branches
- 5 biblio.module \biblio_view()
- 6.2 biblio.module \biblio_view()
- 7 biblio.module \biblio_view()
Implementation of hook_view().
File
- ./
biblio.module, line 1776
Code
function biblio_view(&$node, $teaser = FALSE, $page = FALSE) {
if (strlen(trim($node->body))) {
$node = node_prepare($node, $teaser);
}
$style = biblio_get_style();
$base = variable_get('biblio_base', 'biblio');
$base_title = check_plain(variable_get('biblio_base_title', 'Biblio'));
if (variable_get('biblio_fix_isi_links', 0)) {
biblio_fix_isi_links($node);
}
if ($teaser) {
$node->content['teaser']['#value'] = theme('biblio_style', $node, $base, $style);
}
else {
switch (variable_get('biblio_node_layout', '0')) {
case 'orig':
case 'ft':
$node->content['body']['#value'] = theme('biblio_long', $node, $base, $style);
break;
case 'tabular':
default:
$node->content['body']['#value'] = theme('biblio_tabular', $node, $base, $teaser);
break;
}
}
if ($page) {
drupal_set_breadcrumb(array(
l(t('Home'), NULL),
l(drupal_ucfirst($base_title), $base),
));
if (variable_get('biblio_hide_bibtex_braces', 0) && !isset($node->view)) {
$node->title = biblio_remove_brace($node->title);
drupal_set_title(filter_xss($node->title, biblio_get_allowed_tags()));
}
}
return $node;
}