function notifications_settings_form in Notifications 7
Same name and namespace in other branches
- 5 notifications.admin.inc \notifications_settings_form()
- 6.4 notifications.admin.inc \notifications_settings_form()
- 6 notifications.admin.inc \notifications_settings_form()
- 6.2 notifications.admin.inc \notifications_settings_form()
- 6.3 notifications.admin.inc \notifications_settings_form()
Admin settings
1 string reference to 'notifications_settings_form'
- notifications_menu in ./
notifications.module - Implementation of hook_menu().
File
- ./
notifications.admin.inc, line 66
Code
function notifications_settings_form() {
$form['general'] = array(
'#type' => 'fieldset',
'#title' => t('General settings'),
'#weight' => -10,
);
$form['general']['notifications_event_dispatch'] = array(
'#title' => t('Notifications events'),
'#type' => 'radios',
'#default_value' => variable_get('notifications_event_dispatch', 1),
'#options' => array(
t('Disabled'),
t('Enabled'),
),
'#description' => t('Enable notifications sending. If disabled no new notifications will be produced (though the ones queued will still be sent).'),
);
$form['general']['notifications_event_queue'] = array(
'#title' => t('Queue notifications'),
'#type' => 'radios',
'#default_value' => variable_get('notifications_event_queue', 0),
'#options' => array(
t('Disabled'),
t('Enabled'),
),
'#description' => t('Queue notifications to be sent on cron process later. Recommended for sites with a large number of users.'),
);
$form['general']['notifications_sendself'] = array(
'#type' => 'checkbox',
'#title' => t('Notify poster of own posts'),
'#default_value' => variable_get('notifications_sendself', 1),
'#description' => t("Notifies a node poster about their own posts. Useful principally during testing."),
);
$form['general']['notifications_sender'] = array(
'#title' => t('Notifications Sender'),
'#type' => 'radios',
'#options' => array(
t('No one (All notifications will appear as coming from the web site)'),
t('User name, site data (Only the user name will be used)'),
t('Full user data (User name and available user information)'),
),
'#default_value' => variable_get('notifications_sender', 0),
'#description' => t('Use the site information as the sender for notification messages or use account data from the user causing the event. WARNING: Selecting the last option (Full user data) may disclose private information to subscribers like the user e-mail address.'),
);
// Default options
$form['defaults'] = array(
'#type' => 'fieldset',
'#title' => t('Default settings'),
);
$form['defaults']['notifications_default_send_interval'] = array(
'#type' => 'select',
'#title' => t('Default send interval'),
'#options' => notifications_send_intervals(),
'#default_value' => variable_get('notifications_default_send_interval', 0),
);
return system_settings_form($form);
}