function campaignmonitor_admin in Campaign Monitor 5.2
Same name and namespace in other branches
- 5 campaignmonitor.module \campaignmonitor_admin()
- 6 campaignmonitor.module \campaignmonitor_admin()
- 6.2 campaignmonitor.module \campaignmonitor_admin()
1 string reference to 'campaignmonitor_admin'
- campaignmonitor_menu in ./
campaignmonitor.module - Implementation of hook_menu()
File
- ./
campaignmonitor.module, line 136
Code
function campaignmonitor_admin() {
$form['campaignmonitor_api_key'] = array(
'#type' => 'textfield',
'#title' => t('API Key'),
'#default_value' => variable_get('campaignmonitor_api_key', ''),
'#required' => TRUE,
'#size' => 50,
'#maxlength' => 200,
'#description' => t("Your Campaign Monitor API Key."),
);
$form['campaignmonitor_client_id'] = array(
'#type' => 'textfield',
'#title' => t('Client ID'),
'#default_value' => variable_get('campaignmonitor_client_id', ''),
'#required' => TRUE,
'#size' => 50,
'#maxlength' => 200,
'#description' => t("Your Campaign Monitor Client ID."),
);
$form['campaignmonitor_list_id'] = array(
'#type' => 'textfield',
'#title' => t('List ID'),
'#default_value' => variable_get('campaignmonitor_list_id', ''),
'#required' => TRUE,
'#size' => 50,
'#maxlength' => 200,
'#description' => t("Your Campaign Monitor List ID."),
);
$form['campaignmonitor_display_on'] = array(
'#type' => 'checkboxes',
'#title' => t('Display on Options'),
'#default_value' => variable_get('campaignmonitor_display_on', array()),
'#options' => array(
'contact' => t('Contact Page'),
'registration' => t('Registration Page'),
),
'#description' => t('Choose which forms you want to display the Join Newsletter checkbox.'),
);
$form['campaignmonitor_checkboxdisplaytext'] = array(
'#type' => 'textfield',
'#title' => t('Display Text for Checkbox'),
'#default_value' => variable_get('campaignmonitor_checkboxdisplaytext', 'Join our Newsletter?'),
'#description' => t("This text will display next to the checkbox on the selected forms."),
);
$form['campaignmonitor_userpagedisplaytext'] = array(
'#type' => 'textfield',
'#title' => t('Display Text for User Page'),
'#default_value' => variable_get('campaignmonitor_userpagedisplaytext', 'Newsletter'),
'#description' => t("This text will display next to the checkbox on the user profile page."),
);
$form['campaignmonitor_pastcampaignurl'] = array(
'#type' => 'textfield',
'#title' => t('Past Campaign URL'),
'#default_value' => variable_get('campaignmonitor_pastcampaignurl', ''),
'#size' => 100,
'#maxlength' => 100,
'#description' => t("This is required if you want to use the page that displays past campaigns. You can find this value if you go to Manage Clients, click on the client, go to the link that tells you how to display past campaigns, then copy the URL ONLY from the html given. The URL is in between the src=\"\" value."),
);
$form['campaignmonitor_connection_timeout'] = array(
'#type' => 'textfield',
'#title' => t('Connection timeout'),
'#default_value' => variable_get('campaignmonitor_connection_timeout', 15),
'#size' => 10,
'#maxlength' => 10,
'#description' => t("If your server can't get through to the API, or the API server is down, this is the amount of time until the connection times out in seconds. Default is 15 seconds."),
);
return system_settings_form($form);
}