You are here

function comment_notify_settings in Comment Notify 5

Same name and namespace in other branches
  1. 5.2 comment_notify.module \comment_notify_settings()
  2. 6 comment_notify.module \comment_notify_settings()
  3. 7 comment_notify.module \comment_notify_settings()
1 string reference to 'comment_notify_settings'
comment_notify_menu in ./comment_notify.module
Implementation of hook_menu().

File

./comment_notify.module, line 390
This module provides comment follow-up e-mail notification for anonymous and registered users.

Code

function comment_notify_settings() {
  $form['comment_notify_settings'] = array();
  $form['comment_notify_settings']['comment_notify_regged_checkbox'] = array(
    '#type' => 'checkbox',
    '#title' => t('Let registered users select notification on a node basis'),
    '#return_value' => 1,
    '#default_value' => variable_get('comment_notify_regged_checkbox', TRUE),
    '#description' => t('letting registered users select/unselect if they want to be notified. If this is disabled, this setting is propagated from their user profile, hence reducing and clutter and confusion'),
  );
  $form['comment_notify_settings']['comment_notify_default_anon_mailalert'] = array(
    '#type' => 'checkbox',
    '#title' => t('Fill checkbox for follow-up with YES by default for anonymous users, so they will get an email alert for follow-up comments if they do not uncheck it then'),
    '#return_value' => 1,
    '#default_value' => variable_get('comment_notify_default_anon_mailalert', TRUE),
    '#description' => t('This flag presets the flag for the follow-up notification on the form that anon users will see when posting a comment'),
  );
  $form['comment_notify_settings']['comment_notify_default_mailtext'] = array(
    '#type' => 'textarea',
    '#title' => t('Default mail text for sending out the notifications.'),
    '#description' => t('You can use the following variables to be replaced:
      <ul>
      <li>!commname = the username who posted the comment
      <li>!commtext = the text of the posted comment
      <li>!commsubj = the subject of the posted comment
      <li>!comment_url = the full url of the post and comment - note: if you have paging enabled, this does not work correct - set your max comments per page so that all fit on one page or reverse order them
      <li>!node_title = the title of the node that was commented on
      <li>!node_teaser = the teaser of the node that was commented on
      <li>!node_body = the body of the node that was commented on
      <li>!mission = site_mission text
      <li>!name = username receiving the alert
      <li>!site = your site
      <li>!uri = base_url of site
      <li>!uri_brief = base_url of site w/o http
      <li>!date = the current time
      <li>!login_uri  uri to login the user
      <li>!edit_uri = uri to edit user profile
      <li>!link1 the QUICKLINK to disable future follow-up otifications for the user
      </ul>'),
    '#default_value' => variable_get('comment_notify_default_mailtext', t(DEFAULT_MAILTEXT)),
    '#return_value' => 1,
    '#cols' => 80,
    '#rows' => 15,
  );
  return system_settings_form($form);
}