You are here

function _answers_notify_settings in Answers 6.2

Same name and namespace in other branches
  1. 6 includes/answers.notify.inc \_answers_notify_settings()
  2. 7 includes/answers.notify.inc \_answers_notify_settings()
  3. 7.2 includes/answers.notify.inc \_answers_notify_settings()

Pseudo implementation of hook_settings().

See also

answers_settings()

1 call to _answers_notify_settings()
answers_settings in ./answers.module
Answer administer settings form definition.

File

includes/answers.notify.inc, line 32
Notification functionality for 'Answers' to inform users of answers.

Code

function _answers_notify_settings() {
  $form = array();
  $form['answers_notification'] = array(
    '#type' => 'fieldset',
    '#description' => t('Settings for the email which is sent to notify a question asker when a new answer is posted (if the asker asks for notification).'),
    '#title' => t('Notification Email Settings'),
  );
  $form['answers_notification']['answers_new_answer_notice_allow_p'] = array(
    '#type' => 'checkbox',
    '#title' => t('Give users the option to be notified'),
    '#default_value' => variable_get('answers_new_answer_notice_allow_p', TRUE),
    '#description' => t('If disabled, users will not be offered the option to receive notifications. Also, any new answers to questions will not trigger notifications, even if their authors had previously requested notification. '),
  );
  $form['answers_notification']['answers_answer_notification_subject'] = array(
    '#type' => 'textfield',
    '#title' => t('Subject line'),
    '#default_value' => variable_get('answers_answer_notification_subject', ANSWERS_DEFAULT_NEW_ANSWER_NOTICE_SUBJECT),
    '#description' => t('Dynamic variables available: !question_user_name, !answer_user_name, !question_title, !question_url, and !site'),
    '#required' => TRUE,
  );
  $form['answers_notification']['answers_answer_notification_body'] = array(
    '#type' => 'textarea',
    '#title' => t('Body'),
    '#default_value' => variable_get('answers_answer_notification_body', ANSWERS_DEFAULT_NEW_ANSWER_NOTICE_BODY),
    '#description' => t('Dynamic variables available: !question_user_name, !answer_user_name, !question_title, !question_url, and !site.'),
    '#required' => TRUE,
  );
  return $form;
}