diff --git a/biblio.admin.inc b/biblio.admin.inc index 6fdd79f..4021353 100644 --- a/biblio.admin.inc +++ b/biblio.admin.inc @@ -431,6 +431,13 @@ function biblio_admin_settings() { '#options' => _biblio_admin_get_styles(), '#description' => t('This alters the layout of the "list" (short) view.') ); + $form['style']['biblio_display_citation_key'] = array( + '#type' => 'checkbox', + '#title' => t('Show citation key in results'), + '#return_value' => 1, + '#default_value' => variable_get('biblio_display_citation_key', 0), + '#description' => t('For IEEE style only') + ); $form['syndication'] = array( '#type' => 'fieldset', '#collapsible' => TRUE, diff --git a/biblio_style_ieee.inc b/biblio_style_ieee.inc index c52e6e9..51ab052 100644 --- a/biblio_style_ieee.inc +++ b/biblio_style_ieee.inc @@ -48,6 +48,8 @@ function biblio_style_ieee_author_options() { * The styled biblio entry */ function biblio_style_ieee($node, $base = 'biblio', $inline = false) { + if (!empty ($node->biblio_citekey)&&(variable_get('biblio_display_citation_key',0))) + $output .= '[' . check_plain($node->biblio_citekey) . '] '; $author_options = biblio_style_ieee_author_options(); $authors = theme('biblio_format_authors', $node->biblio_contributors[1], $author_options, $inline); $output .= '' . $authors . ", \n"; @@ -102,4 +104,4 @@ function _ieee_format_author($author) { $format .= !empty ($author['firstname']) ? drupal_substr($author['firstname'], 0, 1) . '.' : ''; $format .= !empty ($author['initials']) ? $author['initials'] . '.' : ''; return $format; -} \ No newline at end of file +}