function flickrapi_admin_settings in Flickr API 6
Same name and namespace in other branches
- 5 flickrapi.module \flickrapi_admin_settings()
- 7.2 flickrapi.admin.inc \flickrapi_admin_settings()
- 7 flickrapi.admin.inc \flickrapi_admin_settings()
1 string reference to 'flickrapi_admin_settings'
- flickrapi_menu in ./
flickrapi.module - Implementation of hook_menu().
File
- ./
flickrapi.module, line 28
Code
function flickrapi_admin_settings() {
$form = array();
$form['flickrapi_api_key'] = array(
'#type' => 'textfield',
'#title' => t('API Key'),
'#required' => TRUE,
'#default_value' => variable_get('flickrapi_api_key', ''),
'#description' => t('API Key from Flickr. !link', array(
'!link' => l(t('Get one!'), 'http://www.flickr.com/services/apps/by/me'),
)),
);
$form['flickrapi_api_secret'] = array(
'#type' => 'textfield',
'#title' => t('API Shared Secret'),
'#required' => TRUE,
'#default_value' => variable_get('flickrapi_api_secret', ''),
'#description' => t("API key's secret from Flickr."),
);
$times = array(
900,
1800,
2700,
3600,
7200,
10800,
14400,
18000,
21600,
43200,
86400,
);
$ageoptions = drupal_map_assoc($times, 'format_interval');
$form['flickrapi_cache_duration'] = array(
'#type' => 'select',
'#title' => t('Update interval'),
'#options' => $ageoptions,
'#default_value' => variable_get('flickrapi_cache_duration', 3600),
'#description' => t("The refresh interval indicating how often you want to check cached Flickr API calls are up to date."),
);
$form['flickrapi_cache_path'] = array(
'#title' => t('Flickr Cache Path'),
'#required' => TRUE,
'#description' => t('Location on server file system where results of Flickr API calls can be cached.'),
'#type' => 'textfield',
'#default_value' => variable_get('flickrapi_cache_path', '/tmp'),
);
$form['#validate'][] = 'flickrapi_admin_settings_validate';
return system_settings_form($form);
}