You are here

function _biblio_citekey_print in Bibliography Module 5

Same name and namespace in other branches
  1. 6.2 biblio.module \_biblio_citekey_print()
  2. 6 biblio.module \_biblio_citekey_print()
  3. 7 biblio.module \_biblio_citekey_print()
  4. 7.2 biblio.module \_biblio_citekey_print()
2 calls to _biblio_citekey_print()
_biblio_filter_footnote_callback in ./biblio.module
_biblio_filter_replace_callback in ./biblio.module
Helper function called from preg_replace_callback() above

File

./biblio.module, line 3472

Code

function _biblio_citekey_print($citekey) {
  $nid = db_fetch_object(db_query("SELECT nid FROM {biblio} WHERE biblio_citekey = '%s' ORDER BY vid DESC", $citekey));
  if ($nid->nid > 0) {
    $style = variable_get('biblio_style', 'classic');
    $base = variable_get('biblio_base', 'biblio');
    $node = node_load($nid->nid);
    return theme('biblio_short', $node, $base, $style);
  }
  else {
    return t("Citekey @cite not found", array(
      '@cite' => $citekey,
    ));
  }
}