function media_browser_plus_media_settings in Media Browser Plus 7.2
Same name and namespace in other branches
- 7.3 includes/media_browser_plus.admin.inc \media_browser_plus_media_settings()
- 7 media_browser_plus.module \media_browser_plus_media_settings()
Creates the media browser plus settings form.
1 string reference to 'media_browser_plus_media_settings'
- media_browser_plus_menu in ./
media_browser_plus.module - Implements hook_menu().
File
- ./
media_browser_plus.module, line 1391 - Adds fields to the media browser forms for better UX
Code
function media_browser_plus_media_settings($form, &$form_state = array()) {
$form = array(
'media_per_page' => array(
'#type' => 'textfield',
'#title' => t('Media Items per page'),
'#description' => t('Insert a number higher than one for the amount of media items displayed per page.'),
'#default_value' => variable_get('media_media_per_page', 30),
'#maxlength' => 4,
'#required' => TRUE,
),
'grid_window_height' => array(
'#type' => 'textfield',
'#title' => t('Grind Window Height'),
'#default_value' => variable_get('media_grid_window_height', 400),
'#description' => t('Set a maximum height of pixels for the media grid view.'),
'#maxlength' => 4,
'#required' => TRUE,
),
'page_items_per_page' => array(
'#type' => 'textfield',
'#title' => t('Page Items per page'),
'#default_value' => variable_get('media_page_items_per_page'),
'#description' => t('Set how many page items you want in the paging navigation of each page.'),
'#maxlength' => 4,
'#required' => TRUE,
),
'max_filesize' => array(
'#type' => 'textfield',
'#title' => t('Upload Maximum Filesize'),
'#default_value' => media_variable_get('max_filesize'),
'#description' => t('Standard unit is bytes and therefore can be left out. Otherwise use "NUMBER UNIT"'),
'#maxlength' => 20,
'#required' => TRUE,
),
'root_folder' => array(
'#type' => 'textfield',
'#title' => t('Media Root folder'),
'#default_value' => variable_get('media_root_folder'),
'#description' => t("The root folder for files handled by the media module. <strong>Attention: Changing this will move all existing files in the file system too!</strong>"),
),
'media_browser_plus_thumbnails_as_default_browser' => array(
'#type' => 'checkbox',
'#title' => t('Use thumbnails view as default.'),
'#description' => t('If enabled the thumbnails view will displayed when accessing "admin/content/file".'),
'#default_value' => variable_get('media_browser_plus_thumbnails_as_default_browser', TRUE),
),
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save Changes'),
);
return $form;
}