function feedapi_admin_settings in FeedAPI 6
Same name and namespace in other branches
- 5 feedapi.module \feedapi_admin_settings()
Settings: allowed HTML tags, number of feeds refreshed in one round
1 string reference to 'feedapi_admin_settings'
- feedapi_menu in ./
feedapi.module - Implementation of hook_menu().
File
- ./
feedapi.admin.inc, line 66 - Administration-related functions for FeedAPI
Code
function feedapi_admin_settings() {
$form['feedapi_allowed_html_tags'] = array(
'#type' => 'textfield',
'#title' => t('Allowed HTML tags'),
'#size' => 80,
'#maxlength' => 255,
'#default_value' => variable_get('feedapi_allowed_html_tags', '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'),
'#description' => t('The list of tags which are allowed in feeds, i.e., which will not be removed by Drupal.'),
);
$form['feedapi_allow_html_all'] = array(
'#type' => 'checkbox',
'#title' => t('Allow all HTML tags'),
'#default_value' => variable_get('feedapi_allow_html_all', FALSE),
'#description' => t('In this case the module does\'t filter any HTML elements from the incoming fields. This checkbox overrides the above list of allowed tags.'),
);
if (variable_get('feedapi_allow_html_all', FALSE)) {
$form['feedapi_allowed_html_tags']['#disabled'] = TRUE;
}
// Drupal will try to overwrite this value at cron time
$max_exec = !ini_get('safe_mode') ? 240 : ini_get('max_execution_time');
$form['feedapi_cron_percentage'] = array(
'#type' => 'select',
'#title' => t('Cron time for FeedAPI [%]'),
'#options' => drupal_map_assoc(array(
15,
25,
50,
75,
)),
'#default_value' => variable_get('feedapi_cron_percentage', 15),
'#description' => t('Percentage of maximal PHP execution time (currently !exec seconds). At current settings, the FeedAPI cron process can run for up to !now seconds.', array(
"!exec" => $max_exec,
"!now" => variable_get('feedapi_cron_percentage', 15) / 100 * $max_exec,
)),
);
return system_settings_form($form);
}