You are here

function filebrowser_admin_settings in Filebrowser 5

Same name and namespace in other branches
  1. 6.2 filebrowser.admin.inc \filebrowser_admin_settings()
  2. 6 filebrowser.module \filebrowser_admin_settings()

Form for settings menu callback

1 string reference to 'filebrowser_admin_settings'
filebrowser_menu in ./filebrowser.module
Implementation of hook_menu().

File

./filebrowser.module, line 20

Code

function filebrowser_admin_settings() {
  $form = array(
    'filebrowser_root' => array(
      '#type' => 'textfield',
      '#title' => t('Root directory'),
      '#default_value' => variable_get('filebrowser_root', ''),
      '#maxlength' => '100',
      '#size' => '70',
      '#description' => t('Root directory used to present the filebrowser interface. Users will not be able to go up from this folder. Only a directory name under the Drupal root is accepted. Example: "public/files".'),
    ),
    'filebrowser_icons' => array(
      '#type' => 'textfield',
      '#title' => t('Icon directory'),
      '#default_value' => variable_get('filebrowser_icons', ''),
      '#maxlength' => '100',
      '#size' => '70',
      '#description' => t('Name of directory, where file type icons are stored. Files should be named "file-txt.png", "file-gif.png", etc. The default icon is "file-default.png".'),
    ),
    'filebrowser_hide_description_files' => array(
      '#type' => 'radios',
      '#title' => t('Display of description files'),
      '#default_value' => variable_get('filebrowser_hide_description_files', 0),
      '#options' => array(
        t('Show'),
        t('Hide'),
      ),
      '#description' => t('Whether to show or hide description files from directory listings.'),
    ),
  );
  return system_settings_form($form);
}