You are here

function biblio_node_view in Bibliography Module 7

Same name and namespace in other branches
  1. 7.2 biblio.module \biblio_node_view()

File

./biblio.module, line 1211
Bibliography Module for Drupal.

Code

function biblio_node_view($node, $view_mode) {
  if ($node->type == 'biblio') {
    switch ($view_mode) {
      case 'full':
        if (variable_get('biblio_hide_bibtex_braces', 0) && !empty($a4)) {
          drupal_set_title(filter_xss($node->title, biblio_get_allowed_tags()));
        }

      // Fall through.
      case 'teaser':
        $show_link = variable_get('biblio_lookup_links', array(
          'google' => TRUE,
        ));
        if (!empty($show_link['google'])) {
          $node->content['links']['biblio_google_scholar'] = array(
            '#links' => array(
              theme('google_scholar_link', array(
                'node' => $node,
              )),
            ),
            '#attributes' => array(
              'class' => array(
                'links',
                'inline',
              ),
            ),
          );
        }
    }
  }
}