function simplenews_block_configure in Simplenews 7
Same name and namespace in other branches
- 7.2 simplenews.module \simplenews_block_configure()
Implements hook_block_configure().
File
- ./
simplenews.module, line 1111 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_block_configure($delta = '') {
// Special block for multi
if ($delta == 0) {
$form['simplenews_block_multiple']['simplenews_block_m_multiple'] = array(
'#type' => 'textfield',
'#title' => t('Block message'),
'#size' => 60,
'#maxlength' => 255,
// @todo: clean localization / i18n needed
'#default_value' => variable_get('simplenews_block_m_multiple', t('Select the newsletter(s) to which you want to subscribe or unsubscribe.')),
);
}
else {
$form['simplenews_block_' . $delta]['simplenews_block_m_' . $delta] = array(
'#type' => 'textfield',
'#title' => t('Block message'),
'#size' => 60,
'#maxlength' => 255,
'#default_value' => variable_get('simplenews_block_m_' . $delta, t('Stay informed on our latest news!')),
);
$form['simplenews_block_' . $delta]['simplenews_block_f_' . $delta] = array(
'#type' => 'radios',
'#title' => t('Subscription interface'),
'#options' => array(
'1' => t('Subscription form'),
'0' => t('Link to form'),
),
'#description' => t("Note: this requires permission 'subscribe to newsletters'."),
'#default_value' => variable_get('simplenews_block_f_' . $delta, 1),
);
$form['simplenews_block_' . $delta]['simplenews_block_l_' . $delta] = array(
'#type' => 'checkbox',
'#title' => t('Display link to previous issues'),
'#return_value' => 1,
'#default_value' => variable_get('simplenews_block_l_' . $delta, 1),
);
$form['simplenews_block_' . $delta]['simplenews_block_i_status_' . $delta] = array(
'#type' => 'checkbox',
'#title' => t('Display previous issues'),
'#return_value' => 1,
'#default_value' => variable_get('simplenews_block_i_status_' . $delta, 0),
);
$form['simplenews_block_' . $delta]['simplenews_block_i_' . $delta] = array(
'#type' => 'select',
'#title' => t('Number of issues to display'),
'#options' => drupal_map_assoc(array(
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
)),
'#default_value' => variable_get('simplenews_block_i_' . $delta, 5),
);
$form['simplenews_block_' . $delta]['simplenews_block_r_' . $delta] = array(
'#type' => 'checkbox',
'#title' => t('Display RSS-feed icon'),
'#return_value' => 1,
'#default_value' => variable_get('simplenews_block_r_' . $delta, 1),
);
}
return $form;
}