function biblio_format_authors in Bibliography Module 6.2
Same name and namespace in other branches
- 7 includes/biblio_theme.inc \biblio_format_authors()
- 7.2 includes/biblio.theme.inc \biblio_format_authors()
Parameters
array $authors:
Return value
string
3 calls to biblio_format_authors()
- biblio_handler_field_contributor::render in views/
biblio_handler_field_contributor.inc - theme_biblio_tabular in includes/
biblio_theme.inc - _biblio_format_author in includes/
biblio.pages.inc
File
- includes/
biblio_theme.inc, line 499
Code
function biblio_format_authors($authors) {
if (module_exists('biblio_citeproc')) {
static $auth_proc;
if (!isset($auth_proc)) {
module_load_include('inc', 'biblio_citeproc', 'CSL');
$csl = '<name form="long"
name-as-sort-order="all"
sort-separator=", "
initialize-with=""
delimiter=", "
/>';
$csl_doc = new DOMDocument();
$csl_doc
->loadXML($csl);
$auth_proc = new csl_rendering_element($csl_doc);
}
$output = $auth_proc
->render($authors);
}
else {
$style_name = biblio_get_style();
$style_function = "biblio_style_{$style_name}" . "_author_options";
if (!function_exists($style_function)) {
module_load_include('inc', 'biblio', "styles/biblio_style_{$style_name}");
}
$author_options = $style_function();
// Set to really high value so we will see all authors.
$author_options['numberOfAuthorsTriggeringEtAl'] = 100;
$output = theme('biblio_format_authors', $authors, $author_options);
}
return $output;
}