Index: advuser.module =================================================================== RCS file: /cvs/drupal/contributions/modules/advuser/advuser.module,v retrieving revision 1.12.4.1 diff -u -p -r1.12.4.1 advuser.module --- advuser.module 10 Apr 2007 01:43:28 -0000 1.12.4.1 +++ advuser.module 3 May 2007 21:39:05 -0000 @@ -215,26 +219,6 @@ function advuser_admin_filter_form() { return $form; } -/* -** User operations -*/ -function advuser_user_operations() { - $external = array(); - $operations = array( - 'email' => array( - 'label' => t('Email users'), - 'callback' => 'advuser_multiple_email_confirm_page', - ), - ); - - advuser_module_invoke('actions', $external); - - foreach ($external as $k => $v ) { - $operations['external_'. $k] = $v; - } - - return $operations; -} /* ** AdvUser operations @@ -558,7 +542,7 @@ function theme_advuser_admin_users_form( $output .= drupal_render($form['options_sel']); if (isset($form['name']) && is_array($form['name'])) { foreach (element_children($form['name']) as $key) { - $row = array( + $rows[] = array( drupal_render($form['users'][$key]), drupal_render($form['name'][$key]), drupal_render($form['status'][$key]), @@ -680,44 +664,44 @@ function advuser_settings() { '#collapsed' => FALSE, ); + $form['advuser_mail']['variables'] = array( + '#type' => 'markup', + '#value' => '
Substitution variables available in subject and email body
%username, %site, %uri, %user_email, %google_user (search google for user email), %yahoo_user (search yahoo for user email)
' + ); + + //New User Notification $form['advuser_mail']['advuser_new_notify'] = array( '#type' => 'checkbox', '#title' => t('Send notifications on new user registration'), '#description' => t('Notify selected roles when new users register.'), '#default_value' => variable_get('advuser_new_notify', ADVUSER_DEFAULT_NEW_NOTIFY), ); - - $form['advuser_mail']['advuser_modify_notify'] = array( - '#type' => 'checkbox', - '#title' => t('Send notifications on user profile updates'), - '#description' => t('Notify selected roles when users update their profiles.'), - '#default_value' => variable_get('advuser_modify_notify', ADVUSER_DEFAULT_MODIFY_NOTIFY), - ); - - $form['advuser_mail']['variables'] = array( - '#type' => 'markup', - '#value' => '
Substitution variables available in subject and email body
%username, %site, %uri, %user_email, %google_user (search google for user email), %yahoo_user (search yahoo for user email)
' - ); - $form['advuser_mail']['advuser_new_subject'] = array( '#type' => 'textfield', '#title' => t('Mail subject'), '#description' => t('The subject of the mail that is going to be sent to the user. You may insert substitution variables within this item.'), '#default_value' => variable_get('advuser_new_subject', ADVUSER_DEFAULT_NEW_SUBJECT), ); - $form['advuser_mail']['advuser_modify_subject'] = array( - '#type' => 'textfield', - '#title' => t('Mail subject'), - '#description' => t('The subject of the mail that is going to be sent when a user modifies their profiles. You may insert substitution variables within this item.'), - '#default_value' => variable_get('advuser_modify_subject', ADVUSER_DEFAULT_MODIFY_SUBJECT), - ); - $form['advuser_mail']['advuser_new_mail'] = array( '#type' => 'textarea', '#title' => t('Mail body'), '#description' => t('The mail that is going to be sent to the selected roles. You may insert substitution variables within this item.'), '#default_value' => variable_get('advuser_new_mail', ADVUSER_DEFAULT_NEW_MAIL), ); + + //User change notification + $form['advuser_mail']['advuser_modify_notify'] = array( + '#type' => 'checkbox', + '#title' => t('Send notifications on user profile updates'), + '#description' => t('Notify selected roles when users update their profiles.'), + '#default_value' => variable_get('advuser_modify_notify', ADVUSER_DEFAULT_MODIFY_NOTIFY), + ); + $form['advuser_mail']['advuser_modify_subject'] = array( + '#type' => 'textfield', + '#title' => t('Mail subject'), + '#description' => t('The subject of the mail that is going to be sent when a user modifies their profiles. You may insert substitution variables within this item.'), + '#default_value' => variable_get('advuser_modify_subject', ADVUSER_DEFAULT_MODIFY_SUBJECT), + ); $form['advuser_mail']['advuser_modify_mail'] = array( '#type' => 'textarea', '#title' => t('Mail body'), @@ -725,6 +709,7 @@ function advuser_settings() { '#default_value' => variable_get('advuser_modify_mail', ADVUSER_DEFAULT_MODIFY_MAIL), ); + //Maximum rows in dataset to display $form['advuser_mail']['advuser_listno'] = array( '#type' => 'select', '#options' => drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200)), @@ -750,7 +735,7 @@ function advuser_settings() { } $form['advuser_mailonnew']['advuser_new_roles'] = array( '#type' => 'checkboxes', - '#title' => t('Roles'), + '#title' => t('Notification Roles'), '#description' => t('Roles that receive email notifications.'), '#options' => $roles, '#default_value' => $values /*variable_get('advuser_new_roles', ADVUSER_DEFAULT_NEW_ROLES)*/, @@ -915,4 +900,4 @@ function advuser_user($type, &$edit, &$u //print $type; } -?> \ No newline at end of file +// vim:ft=php:et:sw=2:ts=2:sts=2:ai:sta