function cdn_admin_settings_form in CDN 6
Same name and namespace in other branches
- 5 cdn.module \cdn_admin_settings_form()
Form definition; settings.
1 string reference to 'cdn_admin_settings_form'
- cdn_menu in ./
cdn.module - Implementation of hook_menu().
File
- ./
cdn.admin.inc, line 15 - Settings administration UI.
Code
function cdn_admin_settings_form() {
$form[CDN_STATUS_VARIABLE] = array(
'#type' => 'radios',
'#title' => t('Status'),
'#description' => t("If you don't want to use the CDN to serve files to your visitors yet,\n but you do want to see if it's working well for your site, then enable\n debug mode.<br />It will only serve files from the CDN if they have the\n %cdn-debug-mode-permission permission.", array(
'%cdn-debug-mode-permission' => 'access files on CDN when in debug mode',
)),
'#options' => array(
CDN_DISABLED => t('Disabled'),
CDN_DEBUG => t('Debug mode'),
CDN_ENABLED => t('Enabled'),
),
'#default_value' => variable_get(CDN_STATUS_VARIABLE, CDN_DISABLED),
);
$form[CDN_MODE_VARIABLE] = array(
'#type' => 'radios',
'#title' => t('Mode'),
'#description' => t("<strong>Basic mode</strong> will simply prepend another URL to the\n complete file URL. Therefor, it only works for CDNs that support the\n Origin Pull technique.<br />\n <strong>Advanced mode</strong> uses the daemon to synchronize files and\n can be used with both Origin Pull and Push CDNs. If you've got an Origin\n Pull CDN and want to process files before they're synced to the CDN, it\n is also recommended to use this mode."),
'#options' => array(
CDN_MODE_BASIC => t('Basic'),
CDN_MODE_ADVANCED => t('Advanced'),
),
'#default_value' => variable_get(CDN_MODE_VARIABLE, CDN_MODE_BASIC),
);
$form[CDN_STATS_VARIABLE] = array(
'#type' => 'radios',
'#title' => t('Show statistics for the current page'),
'#description' => t('Shows the CDN integration statistics of the current page, to users with
the %access-per-page-statistics permission.', array(
'%access-per-page-statistics' => 'access per-page statistics',
)),
'#options' => array(
CDN_DISABLED => t('Disabled'),
CDN_ENABLED => t('Enabled'),
),
'#default_value' => variable_get(CDN_STATS_VARIABLE, CDN_DISABLED),
);
return system_settings_form($form);
}