abuse_admin_settings()
abuse/abuse.module, line 147
Abuse module main configuration page form
<?php
function abuse_admin_settings() {
$form = array();
$form['general_settings'] = array(
'#type' => 'fieldset',
'#title' => t('General settings'),
'#description' => t('These settings apply to all content that is allowed to be flagged into the abuse administration system'),
'#collapsible' => TRUE,
);
$form['general_settings']['abuse_edit_unflag'] = array(
'#type' => 'checkbox',
'#title' => t('Updating content resets abuse status'),
'#description' => t('Allow content already approved by a moderator to be flagged again if the content is updated.'),
'#default_value' => variable_get('abuse_edit_unflag', 1),
);
$form['general_settings']['abuse_threshold'] = array(
'#type' => 'textfield',
'#title' => t('Abuse reporting threshold'),
'#description' => t('Set the number of times a content item can be reported as abuse before it becomes automatically unpublished. <b>Note</b>: this threshold value does not apply to the site administrator or users with the \'direct flag\' user permission.'),
'#default_value' => variable_get('abuse_threshold', 3),
'#size' => 6,
'#maxlength' => 6,
'#required' => TRUE,
);
$form['warning_email'] = array(
'#type' => 'fieldset',
'#title' => t('Abuse warning email configuration'),
'#collapsible' => TRUE,
);
$form['warning_email']['abuse_warn_subject'] = array(
'#type' => 'textfield',
'#title' => t('Abuse email warning subject'),
'#default_value' => variable_get('abuse_warn_subject', ''),
'#required' => TRUE,
);
$form['warning_email']['abuse_warn_bcc'] = array(
'#type' => 'textfield',
'#title' => t('Abuse email warning BCC address'),
'#description' => t('If you wish to receive a copy of every abuse warning email sent, enter an email address here. Leave the field blank if you do not want include a BCC.'),
'#default_value' => variable_get('abuse_warn_bcc', ''),
'#size' => 40,
);
$form['warning_email']['abuse_warn_body'] = array(
'#type' => 'textarea',
'#title' => t('Abuse email warning body'),
'#default_value' => variable_get('abuse_warn_body', ''),
'#rows' => 10,
);
$form['general_settings']['abuse_form_pre'] = array(
'#type' => 'textarea',
'#title' => t('Report abuse form introductory text'),
'#description' => t('The text in the form above will be shown at the top of the abuse reporting page when a user submits content as abuse.'),
'#default_value' => variable_get('abuse_form_pre', ''),
'#rows' => 10,
'#weight' => -10,
);
$form['nodetypes'] = array(
'#type' => 'fieldset',
'#title' => t('Enable flagging for these content types'),
);
foreach (node_get_types() as $type => $name) {
$form['nodetypes'][ABUSE_CONTENT_NODE_TYPE . $type] = array(
'#type' => 'checkbox',
'#title' => $name->name,
'#return_value' => 1,
'#default_value' => variable_get(ABUSE_CONTENT_NODE_TYPE . $type, 0),
);
}
return system_settings_form($form);
}
?>