function biblio_get_styles in Bibliography Module 6.2
Same name and namespace in other branches
- 7 biblio.module \biblio_get_styles()
- 7.2 biblio.module \biblio_get_styles()
5 calls to biblio_get_styles()
- biblio_admin_settings in includes/
biblio.admin.inc - Implements hook_settings().
- biblio_citeproc_style_manager_form in modules/
CiteProc/ biblio_citeproc.admin.inc - biblio_handler_citation::options_form in views/
biblio_handler_citation.inc - biblio_handler_field_contributor::options_form in views/
biblio_handler_field_contributor.inc - _biblio_get_user_profile_form in includes/
biblio.admin.inc
File
- ./
biblio.module, line 2469 - Main file for Drupal module biblio.
Code
function biblio_get_styles() {
$styles = array();
if (module_exists('biblio_citeproc')) {
$result = db_query("SELECT id,filename,parent,title,summary FROM {biblio_citeproc_styles} ORDER BY title ASC");
while ($style = db_fetch_object($result)) {
$styles[$style->filename] = $style->title;
}
}
else {
$dir = drupal_get_path('module', 'biblio') . '/styles';
$files = file_scan_directory($dir, 'biblio_style_..*.inc$');
foreach ($files as $file) {
include_once $file->filename;
$function = $file->name . '_info';
if (function_exists($function)) {
$styles = array_merge($styles, call_user_func($function));
//build and array of the short and long names
}
}
ksort($styles);
}
return $styles;
}