You are here

function biblio_get_title_url_info in Bibliography Module 6.2

Same name and namespace in other branches
  1. 6 biblio.module \biblio_get_title_url_info()
  2. 7 biblio.module \biblio_get_title_url_info()
  3. 7.2 biblio.module \biblio_get_title_url_info()
9 calls to biblio_get_title_url_info()
biblio_style_ama in styles/biblio_style_ama.inc
biblio_style_apa in styles/biblio_style_apa.inc
Apply a bibliographic style to the node
biblio_style_chicago in styles/biblio_style_chicago.inc
Apply a bibliographic style to the node
biblio_style_classic in styles/biblio_style_classic.inc
Apply a bibliographic style to the node
biblio_style_cse in styles/biblio_style_cse.inc

... See full list

File

./biblio.module, line 2529
Main file for Drupal module biblio.

Code

function biblio_get_title_url_info($node, $base = NULL, $inline = FALSE) {
  $new_window = NULL;
  if (!isset($base)) {
    $base = variable_get('biblio_base', 'biblio');
  }
  if (variable_get('biblio_link_title_url', 0) && !empty($node->biblio_url)) {
    $path = $node->biblio_url;
  }
  else {
    $language = isset($node->language) ? $node->language : '';
    $view_mode = $inline ? 'viewinline' : 'view';
    $node_path = 'node/' . $node->nid;
    $path = $base . '/' . $view_mode . '/' . $node->nid;
    $path_alias = drupal_get_path_alias($node_path, $language);
    $path = $path_alias != $node_path ? $path_alias : drupal_get_path_alias($path, $language);
  }
  if (variable_get('biblio_links_target_new_window', null)) {
    $new_window = array(
      'target' => '_blank',
    );
  }
  return array(
    'link' => $path,
    'options' => array(
      'attributes' => $new_window,
      'html' => TRUE,
    ),
  );
}