function node_gallery_api_settings_form in Node Gallery 7
Displays the form at admin/config/content/node_gallery/settings.
1 string reference to 'node_gallery_api_settings_form'
- node_gallery_api_menu in ./
node_gallery_api.module - Implements hook_menu().
File
- ./
node_gallery_api.admin.inc, line 478 - Node Gallery API admin interface.
Code
function node_gallery_api_settings_form($form, &$form_state) {
$form['node_gallery_api_plupload_settings'] = array(
'#type' => 'fieldset',
'#title' => t('plupload settings'),
'#description' => t('This area defines the settings used when integrating Node Gallery with plupload.'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['node_gallery_api_plupload_settings']['node_gallery_api_plupload_integration'] = array(
'#type' => 'checkbox',
'#weight' => 0,
'#title' => t('Use plupload module to upload images?'),
'#default_value' => variable_get('node_gallery_api_plupload_integration', TRUE),
'#description' => t('When checked, the plupload widget will be used on the "Upload Images" tab to add new images to a gallery.'),
);
$form['node_gallery_api_plupload_settings']['node_gallery_api_plupload_manage_images_integration'] = array(
'#type' => 'checkbox',
'#weight' => 1,
'#title' => t('Integrate plupload and the Manage Images tab?'),
'#default_value' => variable_get('node_gallery_api_plupload_manage_images_integration', TRUE),
'#description' => t('When checked, the first visit to the Manage Images tab after uploading new images will only show newly uploaded images.'),
);
$form['node_gallery_api_plupload_settings']['node_gallery_api_plupload_manage_images_limit'] = array(
'#type' => 'textfield',
'#maxlength' => 5,
'#size' => 5,
'#title' => t('Enter the limit on the number of images displayed after upload.'),
'#default_value' => variable_get('node_gallery_api_plupload_manage_images_limit', 100),
'#description' => t("Displaying too many images on the Manage Images tab at once will exhaust the server's memory. This setting limits the number of images listed."),
);
if (!module_exists('plupload')) {
$form['node_gallery_api_plupload_settings']['node_gallery_api_plupload_integration']['#disabled'] = TRUE;
$form['node_gallery_api_plupload_settings']['node_gallery_api_plupload_integration']['#default_value'] = FALSE;
$form['node_gallery_api_plupload_settings']['node_gallery_api_plupload_integration']['#description'] = t('You need to download and install the <a href="@plupload_url">plupload module</a> to enable this option.', array(
'@plupload_url' => url('http://drupal.org/project/plupload'),
));
}
$form['node_gallery_api_misc'] = array(
'#type' => 'fieldset',
'#title' => t('Other Settings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['node_gallery_api_misc']['node_gallery_api_keyboard_shortcuts'] = array(
'#type' => 'checkbox',
'#weight' => 0,
'#title' => t('Enable keyboard shortcuts when Item Navigator is displayed?'),
'#default_value' => variable_get('node_gallery_api_keyboard_shortcuts', FALSE),
'#description' => t('When checked, users can press the left and right arrow keys to move between gallery items.'),
);
$form['node_gallery_api_misc']['node_gallery_api_display_exif_creation_date'] = array(
'#type' => 'checkbox',
'#weight' => 3,
'#title' => t('Display creation date from EXIF data in Sort Items tab?'),
'#default_value' => variable_get('node_gallery_api_display_exif_creation_date', FALSE),
'#description' => t('When checked, you get an additional column in Sort Items tab, showing EXIF original creation date and time of the photo is available.'),
);
$form['node_gallery_api_misc']['node_gallery_api_activate_chronological_sorting_button'] = array(
'#type' => 'checkbox',
'#weight' => 4,
'#title' => t('Activate the chronological order sorting feature in Sort Items tab?'),
'#default_value' => variable_get('node_gallery_api_activate_chronological_sorting_button', FALSE),
'#description' => t('When checked, you get an additional button in Sort Items tab, allowing to set shown images in chronological order, from JPEG embeded EXIF data.'),
);
$form['node_gallery_api_misc']['node_gallery_sort_images_max'] = array(
'#type' => 'textfield',
'#maxlength' => 5,
'#size' => 5,
'#weight' => 5,
'#title' => t('Enter the limit on the number of images displayed on the Sort Items page.'),
'#default_value' => variable_get('node_gallery_sort_images_max', 750),
'#description' => t("Displaying too many images on the Sort Items page at once will exhaust the server's memory. Galleries with more images than this limit will not allow sorting with the standard interface."),
);
// TODO: Recreate wizard interface.
// $form['#submit'] = array('node_gallery_api_settings_menu_rebuild');
$form = system_settings_form($form);
return $form;
}