function biblio_admin_settings in Bibliography Module 6
Same name and namespace in other branches
- 6.2 includes/biblio.admin.inc \biblio_admin_settings()
- 7 includes/biblio.admin.inc \biblio_admin_settings()
- 7.2 includes/biblio.admin.inc \biblio_admin_settings()
Implementation of hook_settings().
1 string reference to 'biblio_admin_settings'
- biblio_menu in ./
biblio.module - Implementation of hook_menu().
File
- ./
biblio.admin.inc, line 34
Code
function biblio_admin_settings() {
$version = '$Name$ $Date$';
$version = str_replace('$', '', $version);
$form['biblio_rev'] = array(
'#value' => $version,
);
$form['biblio_base'] = array(
'#type' => 'textfield',
'#title' => t('Base URL'),
'#size' => 20,
'#default_value' => variable_get('biblio_base', 'biblio'),
'#description' => t('This sets the base URL used to access the biblio module (e.g. /biblio ).'),
);
$form['biblio_base_title'] = array(
'#type' => 'textfield',
'#title' => t('Biblio page title'),
'#size' => 20,
'#default_value' => variable_get('biblio_base_title', 'Biblio'),
'#description' => t('The page title shown on the base URL.'),
);
$form['biblio_rowsperpage'] = array(
'#type' => 'textfield',
'#title' => t('Number of results per page'),
'#default_value' => variable_get('biblio_rowsperpage', 25),
'#size' => 6,
'#maxlength' => 6,
'#description' => t('This sets the number of results that will be displayed per page.'),
);
$form['biblio_view_only_own'] = array(
'#type' => 'checkbox',
'#title' => t('Restrict users such that they can only view their own biblio entries'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_view_only_own', 0),
'#description' => t('This option restricts the users capability to view biblio entries. They will only be able to see the entries which they have created and own.'),
);
$form['authors'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Authors'),
'#description' => '',
);
$form['authors']['orphans'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#title' => t('Orphaned Authors'),
'#description' => '',
);
$form['authors']['orphans']['biblio_auto_orphaned_author_delete'] = array(
'#type' => 'checkbox',
'#title' => t('Automatically delete orphaned authors'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_auto_orphaned_author_delete', 0),
'#description' => t('Orphaned authors are those which are no longer linked to any entries as the result of a biblio update or delete. This requires a functioning "cron" process.'),
);
$form['authors']['orphans']['biblio_orphan_clean_interval'] = array(
'#type' => 'radios',
'#title' => t('Orphaned author cleaning frequency'),
'#default_value' => variable_get('biblio_orphan_clean_interval', 24 * 60 * 60),
'#options' => array(
0 => t('Every CRON run'),
3600 => t('Hourly'),
86400 => t('Daily'),
604800 => t('Weeekly'),
),
'#description' => t('How frequently should we check for and delete orphans.'),
);
$form['authors']['biblio_init_auth_count'] = array(
'#type' => 'textfield',
'#title' => t('Number of contributor fields to initially display on the input form'),
'#size' => 2,
'#maxlength' => 2,
'#default_value' => variable_get('biblio_init_auth_count', 4),
'#description' => t('Increasing this value will increase the number of input fields displayed in the contributors section of the input form'),
);
$form['bibtex'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('BibTex settings'),
'#description' => '',
);
$form['bibtex']['biblio_hide_bibtex_braces'] = array(
'#type' => 'checkbox',
'#title' => t('Retain bibtex\'s {Protected} capitalization in the title string, but hide the braces on display'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_hide_bibtex_braces', 0),
'#description' => '',
);
$form['block'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Block settings'),
'#description' => '',
);
$form['block']['biblio_rowsperblock'] = array(
'#type' => 'textfield',
'#title' => t('Number of results in the "New Publications" block'),
'#default_value' => variable_get('biblio_rowsperblock', 4),
'#size' => 2,
'#maxlength' => 2,
'#description' => t('This sets the number of results that will be displayed in the "New Publications" block.'),
);
$form['block']['biblio_block_order'] = array(
'#type' => 'radios',
'#title' => t('Order by'),
'#default_value' => variable_get('biblio_block_order', 'n.created'),
'#options' => array(
'n.created' => t('Date Created'),
'b.biblio_year' => t('Year Published'),
),
);
$result = db_query("SELECT b.name, bftd.title FROM {biblio_fields} b\n INNER JOIN {biblio_field_type} bt ON bt.fid=b.fid\n INNER JOIN {biblio_field_type_data} bftd ON bftd.ftdid=bt.ftdid\n WHERE bt.tid=0 ORDER by bftd.title ASC ");
$schema = drupal_get_schema('biblio');
$keys = array_keys($schema['fields']);
$options = array();
$options['nid'] = t('Node ID');
while ($row = db_fetch_array($result)) {
$options[$row['name']] = check_plain($row['title']);
}
$form['citekey'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Citekey'),
'#description' => t('You can alter citekey related settings here.'),
);
$form['citekey']['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('This will output the citekey as the first item in the citation string'),
);
$form['citekey']['biblio_auto_citekey'] = array(
'#type' => 'checkbox',
'#title' => t('Auto generate citekeys if not given'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_auto_citekey', 1),
'#description' => t('This option will cause "citekey" entries to be automatically generated if a value is not provided.'),
);
$form['citekey']['biblio_citekey_prefix'] = array(
'#type' => 'textfield',
'#title' => t('Citekey prefix'),
'#default_value' => variable_get('biblio_citekey_prefix', ''),
'#size' => 10,
'#maxlength' => 10,
'#description' => t('This text will be combined with the field choosen below to form the auto generated citekey.'),
);
$form['citekey']['biblio_citekey_field1'] = array(
'#type' => 'select',
'#title' => t('Primary Citekey field'),
'#default_value' => variable_get('biblio_citekey_field1', 'nid'),
'#options' => $options,
'#description' => t('Select the field to be used when generating citekeys.'),
);
$form['citekey']['biblio_citekey_field2'] = array(
'#type' => 'select',
'#title' => t('Secondary Citekey field'),
'#default_value' => variable_get('biblio_citekey_field2', 'nid'),
'#options' => $options,
'#description' => t('If the field above has no value this field will be used.'),
);
// Allow only users to modify PHP code which have PHP block visibility permissions
if (user_access('use PHP for block visibility')) {
$form['citekey']['biblio_citekey_phpcode'] = array(
'#type' => 'textarea',
'#title' => t('PHP code for citekey generation'),
'#default_value' => variable_get('biblio_citekey_phpcode', ''),
'#description' => t('Advanced usage only: PHP code that returns the citekey. Should not include <?php ?> delimiters.'),
);
}
$form['biblio_crossref'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('CrossRef Login Information'),
);
$link_attrs = array(
'attributes' => array(
'target' => '_blank',
),
'absolue' => TRUE,
);
$form['biblio_crossref']['biblio_show_crossref_profile_form'] = array(
'#type' => 'checkbox',
'#title' => t('Allow users to override these settings on their "My account" page'),
'#return_value' => 1,
'#description' => t('If this is selected, a form similar to this section will be available to the user when they edit their own account information. This will allow them to override the global preferences set here.'),
'#default_value' => variable_get('biblio_show_crossref_profile_form', '1'),
);
$form['biblio_crossref']['biblio_crossref_pid'] = array(
'#type' => 'textfield',
'#title' => t('CrossRef OpenURL Account ID'),
'#default_value' => variable_get('biblio_crossref_pid', ''),
'#description' => t('Enter your complimentary CrossRef OpenURL account ID which you can obtain here ') . l('OpenURL Account Request Form', 'http://www.crossref.org/requestaccount/', $link_attrs) . t(', OR enter your full CrossRef (colon separated) account:password combination.'),
);
$form['footnotes'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Footnotes'),
'#description' => t('You can integrate with the !url module here.', array(
'!url' => l('footnotes', url("http://www.drupal.org/project/footnotes", array(
'query' => NULL,
'fragment' => NULL,
'absolute' => TRUE,
))),
)),
);
if (!module_exists('footnotes')) {
$additional_text = '<div class="admin-dependencies">' . t('Depends on') . ': ' . t('Footnotes') . ' (<span class="admin-disabled">' . t('disabled') . '</span>)</div>';
$disabled = TRUE;
variable_set('biblio_footnotes_integration', 0);
}
else {
$additional_text = '<div class="admin-dependencies">' . t('Depends on') . ': ' . t('Footnotes') . ' (<span class="admin-enabled">' . t('enabled') . '</span>)</div>';
$disabled = FALSE;
}
$form['footnotes']['biblio_footnotes_integration'] = array(
'#type' => 'checkbox',
'#title' => t('Integration with the footnotes module') . $additional_text,
'#disabled' => $disabled,
'#return_value' => 1,
'#default_value' => variable_get('biblio_footnotes_integration', 0),
'#description' => t('This will convert <bib> tags into <fn> tags. This will cause intermingled <bib> and <fn> tags to be sequentially numbered. For this to work, you must put the <bib> filter ahead of the <fn> filter in the filter chain. If this option is not set, <bib> and <fn> tags will be handled separately.'),
);
$form['isi_wok'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('ISI Web of Knowledge'),
'#description' => '',
);
$form['isi_wok']['biblio_fix_isi_links'] = array(
'#type' => 'checkbox',
'#title' => t('Automatically replace "Go to ISI" links with the URL below'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_fix_isi_links', 0),
'#description' => t('This option automatically replaces any fake "Go to ISI" links with the supplied URL to ISI Web of Knowledge. Note a subscription with ISI is required for these links to function.'),
);
$form['isi_wok']['biblio_isi_url'] = array(
'#type' => 'textfield',
'#title' => t('ISI Web of Knowledge URL'),
'#size' => 128,
'#maxlength' => 512,
'#default_value' => variable_get('biblio_isi_url', 'http://apps.isiknowledge.com/InboundService.do?Func=Frame&product=WOS&action=retrieve&SrcApp=EndNote&Init=Yes&SrcAuth=ResearchSoft&mode=FullRecord&UT='),
'#description' => t('Enter the URL which will replace the "Go to ISI" fake links imported from EndNote'),
);
$form['keywords'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Keywords'),
'#description' => '',
);
$form['keywords']['biblio_keyword_sep'] = array(
'#type' => 'textfield',
'#title' => t('Keyword separator'),
'#size' => 2,
'#default_value' => variable_get('biblio_keyword_sep', ','),
'#description' => t('Enter the character which will be used to separate multiple keywords in the keyword field'),
);
$form['keywords']['biblio_keyword_orphan_autoclean'] = array(
'#type' => 'checkbox',
'#title' => t('Automatically remove orphaned keywords'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_keyword_orphan_autoclean', 1),
'#description' => t('This option automatically deletes keywords which are no longer associated with any publications (primarily due to the due to the removal of a publication or editing a keyword).'),
);
$taxo_mesg = '<div class="admin-dependencies">' . t('Depends on') . ': ' . t('Taxonomy') . ' (<span class="admin-disabled">' . t('disabled') . '</span>)</div>';
$form['keywords']['biblio_copy_taxo_terms_to_keywords'] = array(
'#type' => 'checkbox',
'#title' => t('Copy any selected taxonomy terms to the biblio keyword database'),
'#return_value' => 1,
'#default_value' => module_exists('taxonomy') ? variable_get('biblio_copy_taxo_terms_to_keywords', 0) : 0,
'#disabled' => !module_exists('taxonomy'),
'#description' => module_exists('taxonomy') ? t('If this option is selected, the selected taxonomy terms will be copied to the @biblio_title keyword database and be displayed as keywords (as well as taxonomy terms) for this entry.', array(
'@biblio_title' => variable_get('biblio_base_title', 'Biblio'),
)) : $taxo_mesg,
);
$form['keywords']['biblio_keyword_freetagging'] = array(
'#type' => 'checkbox',
'#title' => t('Use keywords from biblio entries as taxonomy "free tags"'),
'#return_value' => 1,
'#default_value' => module_exists('taxonomy') ? variable_get('biblio_keyword_freetagging', 0) : 0,
'#disabled' => !module_exists('taxonomy'),
'#description' => module_exists('taxonomy') ? t('This option allows user to add keywords (free tags) to describe their documents. These keywords will be registered as taxonomy.') : $taxo_mesg,
);
$vocabularies = module_invoke('taxonomy', 'get_vocabularies');
// ... and print a form to select the terms in each of them
$taxo_options = array();
$taxo_options[0] = '<' . t('none') . '>';
if (count($vocabularies)) {
foreach ($vocabularies as $voc) {
$taxo_options[$voc->vid] = $voc->name;
}
$form['keywords']['biblio_keyword_vocabulary'] = array(
'#type' => 'select',
'#title' => t('Vocabulary'),
'#default_value' => variable_get('biblio_keyword_vocabulary', 0),
'#options' => $taxo_options,
'#description' => t('Select vocabulary (category) to use for free tags.'),
'#multiple' => FALSE,
// '#disabled' => (!variable_get('biblio_keyword_freetagging', 0)),
// '#size' => $multiple ? min(9, count($taxo_options)) : 0,
'#weight' => 15,
);
}
$form['links'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Links'),
);
$form['links']['export'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#title' => t('Export Links'),
);
$form['links']['export']['biblio_export_links'] = array(
'#type' => 'checkboxes',
'#title' => t('Show export links'),
'#default_value' => variable_get('biblio_export_links', array(
'rtf',
'tagged',
'xml',
'bibtex',
)),
'#options' => array(
'rtf' => t('Rich Text Format'),
'tagged' => t('EndNote Tagged'),
'xml' => t('EndNote XML'),
'bibtex' => t('BibTex'),
),
'#description' => t('You can select which export links to display here.'),
);
if (module_exists('biblio_pm')) {
$form['links']['export']['biblio_export_links']['#options'] += biblio_pm_biblio_lookup_link_settings();
}
$form['links']['google'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#title' => t('Google Scholar Link'),
);
$form['links']['google']['biblio_google_link'] = array(
'#type' => 'checkbox',
'#title' => t('Show Google Scholar links'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_google_link', 1),
'#description' => t('Selecting this option will display a link to Google Scholar beside each entry. Clicking this link searches Google Scholar using the title and first author of the current biblio entry.'),
);
$form['links']['biblio_download_links_to_node'] = array(
'#type' => 'checkbox',
'#title' => t('Download links in "List" view link to "Node" view'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_download_links_to_node', 0),
'#description' => t('If selected, the download links in the "List" view will link to the full "Node" view rather than the file itself, the file can then be downloaded from the node view'),
);
$form['links']['biblio_links_target_new_window'] = array(
'#type' => 'checkbox',
'#title' => t('Links open in new browser'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_links_target_new_window', 0),
'#description' => t('This causes related URLs to open in a new browser window'),
);
$form['links']['biblio_inlinemode_in_links'] = array(
'#type' => 'checkbox',
'#title' => t('Carry "inline" mode through to all links'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_inlinemode_in_links', 0),
'#description' => t('This causes the "inline" mode to be applied to all links such as titles, authors and keywords'),
);
$form['links']['biblio_link_title_url'] = array(
'#type' => 'checkbox',
'#title' => t('Hyperlink titles using supplied URL if available'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_link_title_url', 0),
'#description' => t('Selecting this links the titles to the supplied URL (if available) rather than the "node" view.'),
);
$form['links']['biblio_author_links'] = array(
'#type' => 'checkbox',
'#title' => t('Hyperlink author names'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_author_links', 1),
'#description' => t('This creates a hyperlink on author names which, when clicked, will select entries which contain that author'),
);
$form['links']['biblio_author_link_profile'] = array(
'#type' => 'checkbox',
'#title' => t('Hyperlink author names to author profile page'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_author_link_profile', 0),
'#description' => t('This creates a hyperlink on author names which, when clicked, will take the user to the authors profile page'),
);
$form['openurl'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('OpenURL'),
'#description' => t('You can set an <a href="http://en.wikipedia.org/wiki/OpenURL">openurl</a> link here'),
);
$form['openurl']['biblio_show_openurl_profile_form'] = array(
'#type' => 'checkbox',
'#title' => t('Allow users to override these settings on their "My account" page'),
'#return_value' => 1,
'#description' => t('If this is selected, a form similar to this section will be available to the user when they edit their own account information. This will allow them to override the global preferences set here.'),
'#default_value' => variable_get('biblio_show_openurl_profile_form', '1'),
);
$form['openurl']['biblio_baseopenurl'] = array(
'#type' => 'textfield',
'#title' => t('OpenURL Base URL'),
'#size' => 95,
'#default_value' => variable_get('biblio_baseopenurl', ''),
'#description' => t('This sets your institution\'s base <a href="http://en.wikipedia.org/wiki/OpenURL">OpenURL</a> gateway, which is used to generate OpenURL links. To implement a "Universal" OpenURL system, try using OCLC\'s <a href="http://www.oclc.org/productworks/urlresolver.htm">OpenURL Resolver Registry</a> gateway: <a href="http://worldcatlibraries.org/registry/gateway">http://worldcatlibraries.org/registry/gateway</a>'),
);
$sid = "Biblio:" . variable_get('site_name', 'Drupal');
$form['openurl']['biblio_openurl_sid'] = array(
'#type' => 'textfield',
'#title' => t('OpenURL Site ID'),
'#size' => 95,
'#default_value' => variable_get('biblio_openurl_sid', $sid),
'#description' => t('This sets your institution\'s site name, some link resolvers will require a specific Site ID in order to process your requests.'),
);
$form['openurl']['biblio_openurlimage'] = array(
'#type' => 'textfield',
'#title' => t('OpenURL Image'),
'#size' => 95,
'#default_value' => variable_get('biblio_openurlimage', ''),
'#description' => t('Enter a path to your image here, this image will be used as button which when clicked will find the entry via the OpenURL link'),
);
// Add profile page settings... this is done in a fucntion so it can be reused elsewhere
_biblio_get_user_profile_form($form);
//
if (!module_exists('search')) {
$search_text = '<div class="admin-dependencies">' . t('Depends on') . ': ' . t('Search') . ' (<span class="admin-disabled">' . t('disabled') . '</span>)</div>';
$search_disabled = TRUE;
variable_set('biblio_footnotes_integration', 0);
}
else {
$search_text = '<div class="admin-dependencies">' . t('Depends on') . ': ' . t('Search') . ' (<span class="admin-enabled">' . t('enabled') . '</span>)</div>';
$search_disabled = FALSE;
}
$form['search'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#description' => $search_text,
'#title' => t('Search'),
);
$form['search']['biblio_search'] = array(
'#type' => 'checkbox',
'#disabled' => $search_disabled,
'#title' => t('Enable a search box on the biblio page.'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_search', 0),
'#description' => t('Shows a search box on the biblio page that returns drupal search results in the biblio style.'),
);
$form['search']['biblio_search_button_text'] = array(
'#type' => 'textfield',
'#title' => t('Search button text'),
'#disabled' => $search_disabled,
'#size' => 95,
'#default_value' => variable_get('biblio_search_button_text', t('Biblio search')),
'#description' => t('This allows you to customize the text on the search button, it defaults to "Biblio search".'),
);
$form['search']['biblio_index'] = array(
'#type' => 'checkbox',
'#disabled' => $search_disabled,
'#title' => t('Re-/Index a biblio node when creating or updating.'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_index', 0),
'#description' => t('A biblio node must be indexed for the drupal search to know its content. You need to check this option if you want to search for a biblio node that you just created or updated. Otherwise you must wait for the cron job to reindex nodes.'),
);
$form['sort'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Sorting'),
'#description' => t('You can set the default sorting and ordering for the /biblio page here.'),
);
$form['sort']['biblio_sort'] = array(
'#type' => 'radios',
'#title' => t('Sort by'),
'#default_value' => variable_get('biblio_sort', 'year'),
'#options' => array(
'author' => t('Author'),
'keyword' => t('Keyword'),
'title' => t('Title'),
'type' => t('Type'),
'year' => t('Year'),
),
);
$form['sort']['biblio_sort_tabs'] = array(
'#type' => 'checkboxes',
'#title' => t('Show sort links'),
'#default_value' => variable_get('biblio_sort_tabs', array(
'author',
'title',
'type',
'year',
)),
'#options' => array(
'author' => t('Author'),
'keyword' => t('Keyword'),
'title' => t('Title'),
'type' => t('Type'),
'year' => t('Year'),
),
'#description' => t('You turn the sorting links at the top of the /biblio page here.'),
);
$form['sort']['biblio_sort_tabs_style'] = array(
'#type' => 'checkbox',
'#title' => t('Show sort links as "tabs"'),
'#default_value' => variable_get('biblio_sort_tabs_style', 0),
'#return_value' => 1,
'#description' => t('This changes the sort links from text links to tabs'),
);
$form['sort']['biblio_order'] = array(
'#type' => 'radios',
'#title' => t('Order'),
'#default_value' => variable_get('biblio_order', 'DESC'),
'#options' => array(
'DESC' => t('Descending'),
'ASC' => t('Ascending'),
),
);
$form['style'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Styling'),
'#description' => t('You can set the default style for the /biblio page here.'),
);
$form['style']['biblio_no_year_text'] = array(
'#type' => 'textfield',
'#title' => t('Text to display if no year of publication is available'),
'#size' => 95,
'#default_value' => variable_get('biblio_no_year_text', t('Submitted')),
'#description' => t('The text that is displayed when no date of publication is given or it is deliberately set to <b>9999</b>, it defaults to "Submitted".'),
);
$form['style']['biblio_inpress_year_text'] = array(
'#type' => 'textfield',
'#title' => t('Text to display if year of publication is set to 9998'),
'#size' => 95,
'#default_value' => variable_get('biblio_inpress_year_text', t('In Press')),
'#description' => t('The text that is displayed when the date of publication is deliberately set to <b>9998</b>, it defaults to "In Press".'),
);
$form['style']['biblio_style'] = array(
'#type' => 'radios',
'#title' => t('Style'),
'#default_value' => variable_get('biblio_style', 'cse'),
'#options' => _biblio_admin_get_styles(),
'#description' => t('Set the bibliographic style of the "list" view.'),
);
$form['style']['biblio_node_layout'] = array(
'#type' => 'radios',
'#title' => t('Node Layout'),
'#default_value' => variable_get('biblio_node_layout', 'tabular'),
'#options' => array(
'orig' => t('Original'),
'ft' => t('Only Fulltext if available'),
'tabular' => t('Tabular'),
),
'#description' => t('This alters the layout of the "node" (full) view.'),
);
$form['style']['biblio_annotations'] = array(
'#type' => 'select',
'#title' => t('Annotations'),
'#default_value' => variable_get('biblio_annotations', 'none'),
'#options' => array(
'none' => t('none'),
'biblio_notes' => t('notes'),
'biblio_custom1' => t('custom1'),
'biblio_custom2' => t('custom2'),
'biblio_custom3' => t('custom3'),
'biblio_custom4' => t('custom4'),
'biblio_custom5' => t('custom5'),
'biblio_custom6' => t('custom6'),
'biblio_custom7' => t('custom7'),
),
'#description' => t('Select a field from which an annotation will be displayed below biblo entry in "short" listings'),
'#multiple' => FALSE,
'#size' => 0,
);
$form['syndication'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Syndication'),
'#description' => t('You can set the RSS defaults here.'),
);
$form['syndication']['biblio_rss'] = array(
'#type' => 'checkbox',
'#title' => t('Allow RSS feeds of new biblio entries'),
'#return_value' => 1,
'#default_value' => variable_get('biblio_rss', 0),
'#description' => t('This will create an rss feed of the 10 most recent biblio entries. It will be available at /biblio/rss.xml'),
);
$form['syndication']['biblio_rss_number_of_entries'] = array(
'#type' => 'textfield',
'#title' => t('Number of items in the RSS feed.'),
'#default_value' => variable_get('biblio_rss_number_of_entries', 10),
'#size' => 6,
'#maxlength' => 6,
'#description' => t('Limits the number of items in the /biblio/rss.xml feed to this number.'),
);
$form = system_settings_form($form);
$form['#submit'][] = 'biblio_admin_settings_form_submit';
// our submit handler is added after the call to system settings form so that it gets
// called after system_settings_form_submit, and thus the variables have been stored already
// and the menu will be rebuilt correctly.
return $form;
}