You are here

function exif_admin_settings_form in Exif 6

Same name and namespace in other branches
  1. 5 exif.module \exif_admin_settings_form()
  2. 7 exif.admin.inc \exif_admin_settings_form()

The form definition for the admin settings

Return value

array form definition

1 string reference to 'exif_admin_settings_form'
exif_menu in ./exif.module
@author: Raphael Schär - www.rapsli.ch

File

./exif.admin.inc, line 61

Code

function exif_admin_settings_form() {
  $forms = array();

  /*$forms['exif_granularity'] = array(
      '#type' => 'select',
      '#title' => t('Granularity'),
      '#options' => array(0 => t('Default'), 1 => ('Day')),
      '#default_value' => variable_get('exif_granularity', 0),
      '#description' => t('If a timestamp is select (for example the date the picture was taken), you can specify here how granular the timestamp should be. If you select default it will just take whatever is available in the picture. If you select Day, the Date saved will look something like 13-12-2008. This can be useful if you want to use some kind of grouping on the data.'),
    );*/
  $all_nodetypes = node_get_types();
  $all_nt = array();
  foreach ($all_nodetypes as $item) {
    $all_nt[$item->type] = $item->name;
  }
  $forms['exif_nodetypes'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Nodetypes'),
    '#options' => $all_nt,
    '#default_value' => variable_get('exif_nodetypes', array()),
    '#description' => t('Select nodetypes which should be checked for exif data. Incase the nodetypes contains more than one filefield, make sure that the imagefield is the first one!!!!'),
  );
  $forms['exif_update'] = array(
    '#type' => 'checkbox',
    '#title' => t('Refresh on node update'),
    '#default_value' => variable_get('exif_update', TRUE),
    '#description' => t('If you enable this option, Exif data is being updated when the node is being updated.'),
  );
  $forms['exif_empty_values'] = array(
    '#type' => 'checkbox',
    '#title' => t('Write empty image data?'),
    '#default_value' => variable_get('exif_empty_values', TRUE),
    '#description' => t("If checked all values will be written. So for example if you want to read the creation date from EXIF, but it's not available, it will just write an empty string. If unchecked, empty strings will not be written. This might be the desired behavior, if you have a default value for the CCK field."),
  );
  return system_settings_form($forms);
}