function file_entity_settings_form

cis7 file_entity.admin.inc file_entity_settings_form($form, &$form_state)
cle7 file_entity.admin.inc file_entity_settings_form($form, &$form_state)
elmsmedia7 file_entity.admin.inc file_entity_settings_form($form, &$form_state)
icor7 file_entity.admin.inc file_entity_settings_form($form, &$form_state)
meedjum_blog7 file_entity.admin.inc file_entity_settings_form($form, &$form_state)
mooc7 file_entity.admin.inc file_entity_settings_form($form, &$form_state)

Form callback for file_entity settings.

1 string reference to 'file_entity_settings_form'
file_entity_menu in sites/all/modules/ulmus/file_entity/file_entity.module
Implements hook_menu().

File

sites/all/modules/ulmus/file_entity/file_entity.admin.inc, line 1053
File administration and module settings UI.

Code

function file_entity_settings_form($form, &$form_state) {
  $form['file_entity_max_filesize'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum upload size'),
    '#default_value' => variable_get('file_entity_max_filesize', ''),
    '#description' => t('Enter a value like "512" (bytes), "80 KB" (kilobytes) or "50 MB" (megabytes) in order to restrict the allowed file size. If left empty the file sizes will be limited only by PHP\'s maximum post and file upload sizes (current max limit <strong>%limit</strong>).', array('%limit' => format_size(file_upload_max_size()))),
    '#size' => 10,
    '#element_validate' => array('_file_generic_settings_max_filesize'),
  );

  $form['file_entity_default_allowed_extensions'] = array(
    '#type' => 'textfield',
    '#title' => t('Default allowed file extensions'),
    '#default_value' => variable_get('file_entity_default_allowed_extensions', 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp mp3 mov mp4 m4a m4v mpeg avi ogg oga ogv weba webp webm'),
    '#description' => t('Separate extensions with a space or comma and do not include the leading dot.'),
    '#maxlength' => NULL,
  );

  $form['file_entity_alt'] = array(
    '#type' => 'textfield',
    '#title' => t('Alt attribute'),
    '#description' => t('The text to use as value for the <em>img</em> tag <em>alt</em> attribute.'),
    '#default_value' => variable_get('file_entity_alt', '[file:field_file_image_alt_text]'),
  );
  $form['file_entity_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Title attribute'),
    '#description' => t('The text to use as value for the <em>img</em> tag <em>title</em> attribute.'),
    '#default_value' => variable_get('file_entity_title', '[file:field_file_image_title_text]'),
  );

  // Provide default token values.
  if (module_exists('token')) {
    $form['token_help'] = array(
      '#theme' => 'token_tree',
      '#token_types' => array('file'),
      '#dialog' => TRUE,
    );
    $form['file_entity_alt']['#description'] .= t('This field supports tokens.');
    $form['file_entity_title']['#description'] .= t('This field supports tokens.');
  }
  $form['file_upload_wizard'] = array(
    '#type' => 'fieldset',
    '#title' => t('File upload wizard'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    '#description' => t('Configure the steps available when uploading a new file.'),
  );
  $form['file_upload_wizard']['file_entity_file_upload_wizard_skip_file_type'] = array(
    '#type' => 'checkbox',
    '#title' => t('Skip filetype selection.'),
    '#default_value' => variable_get('file_entity_file_upload_wizard_skip_file_type', FALSE),
    '#description' => t('The file type selection step is only available if the uploaded file falls into two or more file types. If this step is skipped, files with no available file type or two or more file types will not be assigned a file type.'),
  );
  $form['file_upload_wizard']['file_entity_file_upload_wizard_skip_scheme'] = array(
    '#type' => 'checkbox',
    '#title' => t('Skip scheme selection.'),
    '#default_value' => variable_get('file_entity_file_upload_wizard_skip_scheme', FALSE),
    '#description' => t('The scheme selection step is only available if two or more file destinations, such as public local files served by the webserver and private local files served by Drupal, are available. If this step is skipped, files will automatically be saved using the default download method.'),
  );
  $form['file_upload_wizard']['file_entity_file_upload_wizard_skip_fields'] = array(
    '#type' => 'checkbox',
    '#title' => t('Skip available fields.'),
    '#default_value' => variable_get('file_entity_file_upload_wizard_skip_fields', FALSE),
    '#description' => t('The field selection step is only available if the file type the file belongs to has any available fields. If this step is skipped, any fields on the file will be left blank.'),
  );

  return system_settings_form($form);
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.