function _gd_image_chart_settings_page in Charts 6
Module settings page. Users can set the default filepath and setup cleaning instructions of their gd image charts.
1 string reference to '_gd_image_chart_settings_page'
- gd_image_chart_menu in gd_image_chart/
gd_image_chart.module - Implementation of hook_menu().
File
- gd_image_chart/
gd_image_chart.admin.inc, line 14 - @author Mads Peter Henderson http://drupal.org/user/421971
Code
function _gd_image_chart_settings_page() {
$form = array();
$form['path'] = array(
'#default_value' => variable_get('gd_image_chart_path', 'gd_image_chart'),
'#description' => t('The path to store temporary chart images in relativ to the site default file path (#defpath/)', array(
'#defpath' => file_directory_path(),
)),
'#required' => TRUE,
'#size' => 50,
'#type' => 'textfield',
'#title' => t('Image path'),
);
$options['1'] = t('One second');
$options['3600'] = t('One hour');
$options['86400'] = t('24 hours');
$options['604800'] = t('One week');
$options['2592000'] = t('One month');
$options['15768000'] = t('Six month');
$options['-1'] = t('Keep forever (not recomended)');
$form['keep_files'] = array(
'#title' => t('Delete generated chart images after'),
'#description' => t('When cron runs all images in the image path will be deleted if they are older than the selected value'),
'#type' => 'radios',
'#options' => $options,
'#default_value' => variable_get('gd_image_chart_keep_files', '86400'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save settings'),
);
return $form;
}