function asset_admin_file_settings in Asset 5.2
Menu Callback for admin/settings/asset/file
Related topics
1 string reference to 'asset_admin_file_settings'
- asset_menu in ./
asset.module - Implementation of hook_menu().
File
- ./
asset.module, line 170 - Main module.
Code
function asset_admin_file_settings() {
$form = array();
$form['asset_file_directory_path'] = array(
'#type' => 'textfield',
'#title' => t('File system path'),
'#default_value' => variable_get('asset_file_directory_path', ''),
'#maxlength' => 255,
'#description' => t('An optional sub-directory to store file upload assets. Leave blank to use the default files directory.'),
'#after_build' => array(
'_asset_file_check_directory',
),
'#field_prefix' => file_directory_path() . '/',
);
$form['asset_ftp_dir'] = array(
'#type' => 'textfield',
'#title' => t('FTP upload path'),
'#default_value' => variable_get('asset_ftp_dir', ''),
'#maxlength' => 255,
'#description' => t('Optionally specify a directory where users can upload files directly to the server, rather than uploading through the form. Leave blank to not use this feature.'),
);
$thumbnail_options = array(
'default' => t('Default'),
);
if (module_exists('imagecache')) {
$presets = _imagecache_get_presets();
foreach ($presets as $id => $name) {
$thumbnail_options[$name] = 'imagecache: ' . $name;
}
}
$form['asset_file_image_icon'] = array(
'#type' => 'radios',
'#title' => t('Icon format for image files'),
'#default_value' => variable_get('asset_file_image_icon', 'default'),
'#options' => $thumbnail_options,
'#description' => t('Select a format for displaying thumbnail icons of images. If you have the imagecache module enabled, you will be able to choose an imagecache preset as your thumbnail format.'),
);
return system_settings_form($form);
}