function search_file_attachments_settings_form in Search File Attachments 7
Page callback to show the settings for the attachments.
1 string reference to 'search_file_attachments_settings_form'
- search_file_attachments_menu in ./
search_file_attachments.module - Implements hook_menu().
File
- ./
search_file_attachments.admin.inc, line 13
Code
function search_file_attachments_settings_form() {
$form = array();
// Apache Tika configuration.
$form['tika'] = array(
'#type' => 'fieldset',
'#title' => t('Apache Tika'),
);
$form['tika']['search_file_attachments_tika_path'] = array(
'#type' => 'textfield',
'#title' => t('Tika directory path:'),
'#default_value' => variable_get('search_file_attachments_tika_path', ''),
'#description' => t('The full path to tika directory.'),
);
$form['tika']['search_file_attachments_tika_jar'] = array(
'#type' => 'textfield',
'#title' => t('Tika jar file:'),
'#default_value' => variable_get('search_file_attachments_tika_jar', 'tika-app-1.2.jar'),
'#description' => t('The name of the tika CLI application jar file, e.g. tika-app-1.2.jar.'),
);
if (!search_file_attachments_check_java()) {
$form['tika']['search_file_attachments_java_path'] = array(
'#type' => 'textfield',
'#title' => t('Java path:'),
'#default_value' => variable_get('search_file_attachments_java_path', ''),
'#description' => t('The full path to the Java binary. This setting is only needed if Java could not automatically detected.'),
);
}
// File settings.
$form['files'] = array(
'#type' => 'fieldset',
'#title' => t('File settings'),
);
$form['files']['search_file_attachments_include_extensions'] = array(
'#type' => 'textfield',
'#title' => t('Include file extensions or mimetypes'),
'#description' => t('A comma-separated list of file extensions or mimetypes that will be included to the file search index.'),
'#default_value' => search_file_extensions_included_extensions(),
);
// Advanced settings.
$form['advanced'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['advanced']['search_file_attachments_debug'] = array(
'#type' => 'checkbox',
'#title' => t('Activate Debugging'),
'#description' => t('Activate this option only for development and not on production sites.'),
'#default_value' => variable_get('search_file_attachments_debug', FALSE),
);
return system_settings_form($form);
}