function simplenews_admin_settings_newsletter in Simplenews 6
Same name and namespace in other branches
- 6.2 includes/simplenews.admin.inc \simplenews_admin_settings_newsletter()
- 7.2 includes/simplenews.admin.inc \simplenews_admin_settings_newsletter()
- 7 includes/simplenews.admin.inc \simplenews_admin_settings_newsletter()
Menu callback: Simplenews admin settings - Newsletter.
1 string reference to 'simplenews_admin_settings_newsletter'
- simplenews_menu in ./
simplenews.module - Implementation of hook_menu().
File
- ./
simplenews.admin.inc, line 800 - Newsletter admin, subscription admin, simplenews settings
Code
function simplenews_admin_settings_newsletter(&$form_state) {
$vid = variable_get('simplenews_vid', '');
$address_default = variable_get('site_mail', ini_get('sendmail_from'));
$form = array();
$form['simplenews_default_options'] = array(
'#type' => 'fieldset',
'#title' => t('Default newsletter options'),
'#collapsible' => FALSE,
'#description' => t('These options will be the defaults for new newsletters, but can be overridden in the newsletter editing form.'),
);
$description = t('Default newsletter format.');
if (!module_exists('mimemail')) {
$description .= ' ' . t('Install <a href="@mime_mail_url">Mime Mail</a> module to send newsletters in HTML format.', array(
'@mime_mail_url' => 'http://drupal.org/project/mimemail',
));
}
$form['simplenews_default_options']['simplenews_format'] = array(
'#type' => 'select',
'#title' => t('Format'),
'#options' => _simplenews_format_options(),
'#description' => $description,
'#default_value' => variable_get('simplenews_format', 'plain'),
);
$form['simplenews_default_options']['simplenews_priority'] = array(
'#type' => 'select',
'#title' => t('Priority'),
'#options' => array(
0 => t('none'),
1 => t('highest'),
2 => t('high'),
3 => t('normal'),
4 => t('low'),
5 => t('lowest'),
),
'#description' => t('Note that email priority is ignored by a lot of email programs.'),
'#default_value' => variable_get('simplenews_priority', 0),
);
$form['simplenews_default_options']['simplenews_receipt'] = array(
'#type' => 'checkbox',
'#title' => t('Request receipt'),
'#default_value' => variable_get('simplenews_receipt', 0),
'#description' => t('Request a Read Receipt from your newsletters. A lot of email programs ignore these so it is not a definitive indication of how many people have read your newsletter.'),
);
$form['simplenews_default_options']['simplenews_send'] = array(
'#type' => 'radios',
'#title' => t('Default send action'),
'#options' => array(
0 => t("Don't send now"),
2 => t('Send one test newsletter to the test address'),
1 => t('Send newsletter'),
),
'#default_value' => variable_get('simplenews_send', 0),
);
$form['simplenews_test_address'] = array(
'#type' => 'fieldset',
'#title' => t('Test addresses'),
'#collapsible' => FALSE,
'#description' => t('Supply a comma-separated list of email addresses to be used as test addresses. The override function allows to override these addresses in the newsletter editing form.'),
);
$form['simplenews_test_address']['simplenews_test_address'] = array(
'#type' => 'textfield',
'#title' => t('Email address'),
'#size' => 60,
'#maxlength' => 128,
'#default_value' => variable_get('simplenews_test_address', $address_default),
);
$form['simplenews_test_address']['simplenews_test_address_override'] = array(
'#type' => 'checkbox',
'#title' => t('Allow test address override'),
'#default_value' => variable_get('simplenews_test_address_override', 0),
);
$form['simplenews_sender_info'] = array(
'#type' => 'fieldset',
'#title' => t('Sender information'),
'#collapsible' => FALSE,
'#description' => t('Default sender address that will only be used for confirmation emails. You can specify sender information for each newsletter separately on the newsletter\'s settings page.'),
);
$form['simplenews_sender_info']['simplenews_from_name'] = array(
'#type' => 'textfield',
'#title' => t('From name'),
'#size' => 60,
'#maxlength' => 128,
'#default_value' => variable_get('simplenews_from_name', variable_get('site_name', 'Drupal')),
);
$form['simplenews_sender_info']['simplenews_from_address'] = array(
'#type' => 'textfield',
'#title' => t('From email address'),
'#size' => 60,
'#maxlength' => 128,
'#required' => TRUE,
'#default_value' => variable_get('simplenews_from_address', $address_default),
);
return system_settings_form($form);
}