diff -ruN notify/notify.info notify-new/notify.info
--- notify/notify.info	1969-12-31 18:00:00.000000000 -0600
+++ notify-new/notify.info	2006-12-31 15:24:35.000000000 -0600
@@ -0,0 +1,4 @@
+; $Id$
+name = Notify
+description = Notifications by e-mail
+package = Mail
diff -ruN notify/notify.module notify-new/notify.module
--- notify/notify.module	2006-12-21 16:22:12.000000000 -0600
+++ notify-new/notify.module	2006-12-31 15:28:42.000000000 -0600
@@ -12,15 +12,12 @@
       $output .= t('<p>You can</p><ul><li>set up your site to run tasks automatically at required intervals. For more information, see <a href="%admin-help-system">cron</a>.</li><li>administer notify <a href="%admin-settings-notify">administer &gt;&gt; settings &gt;&gt; notify</a>.</li></ul>', array('%admin-help-system' => url('admin/help/system'), '%admin-settings-notify' => url('admin/settings/notify')));
       $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%notify">Notify page</a>.', array('%notify' => 'http://www.drupal.org/handbook/modules/notify/')) .'</p>';
       return $output;
-    case 'admin/modules#description':
-      return t('Enables notifications by e-mail.');
   }
 }
 
 /**
- * Implementation of hook_settings().
  */
-function notify_settings() {
+function notify_admin_settings() {
   $period = array(
     900         => format_interval(900),
     1800        => format_interval(1800),
@@ -38,13 +35,7 @@
     1000000000  => t('Never'),
   );
 
-  $form['notify_settings'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('E-mail notification settings'),
-    '#collapsible' => TRUE,
-  );
-
-  $form['notify_settings']['notify_send'] = array(
+  $form['notify_send'] = array(
     '#type' => 'select',
     '#title' => t('Send notifications every'),
     '#default_value' => variable_get('notify_send', 86400),
@@ -52,14 +43,14 @@
     '#description' => t('Requires crontab.'),
   );
 
-  $form['notify_settings']['notify_attempts'] = array(
+  $form['notify_attempts'] = array(
     '#type' => 'select',
     '#title' => t('Number of failed sends after which notifications are disabled'),
     '#default_value' => variable_get('notify_attempts', 5),
     '#options' => array(t('Disabled'), 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20),
   );
 
-  return $form;
+  return system_settings_form($form);
 }
 
 /**
@@ -99,26 +90,32 @@
 
   if ($may_cache) {
     $items[] = array('path' => "user/$user->uid/notify",
-      'title' => t('my notify settings'),
+      'title' => t('Notification settings'),
       'callback' => 'notify_page',
       'callback arguments' => array($user->uid),
       'access' => user_access('access notify'),
       'type' => MENU_LOCAL_TASK,
     );
-    $items[] = array('path' => 'admin/user/notify',
-      'title' => t('notifications'),
-      'callback' => 'notify_admin',
+    $items[] = array('path' => "admin/settings/notify",
+      'title' => t('Notifications by email'),
+      'callback' => 'drupal_get_form',
+      'callback arguments' => 'notify_admin_settings',
       'access' => user_access('administer notify'),
-      'type' => MENU_LOCAL_TASK,
     );
   }
   else {
+    $items[] = array('path' => 'admin/user/user/notify',
+      'title' => t('Notifications'),
+      'callback' => 'notify_admin',
+      'access' => user_access('administer notify'),
+      'type' => MENU_LOCAL_TASK,
+    );
     if (arg(0) == 'user' && is_numeric(arg(1)) && arg(1) != $user->uid) {
       $account = user_load(array('uid' => arg(1)));
       if ($account->uid) {
         $items[] = array(
           'path' => 'user/'. $account->uid .'/notify',
-          'title' => t('notify settings'),
+          'title' => t('Notification settings'),
           'callback' => 'notify_page',
           'callback arguments' => array(arg(1)),
           'access' => user_access('administer notify'),
@@ -134,7 +131,7 @@
 /**
  * Menu callback; show user notification options.
  */
-function notify_page($uid = 0) {
+function notify_page_form($uid = 0) {
   global $user;
 
   $account = user_load(array('uid' => $uid));
@@ -184,13 +181,17 @@
     $form['submit'] = array('#type' => 'submit', '#value' => t('Save settings'));
   }
   else {
-    drupal_set_message(t('Your e-mail address must be specified on your <a href="%url">my account</a> page.', array('%url' => url('user/'. $notify->uid .'/edit'))), 'error');
+    drupal_set_message(t('Your e-mail address must be specified on your <a href="!url">my account</a> page.', array('%url' => url('user/'. $notify->uid .'/edit'))), 'error');
   }
 
-  return drupal_get_form('notify_page', $form);
+  return $form;
 }
 
-function notify_page_submit($form_id, $form_values) {
+function notify_page($uid = 0) {
+  return drupal_get_form('notify_page_form', $uid);
+}
+
+function notify_page_form_submit($form_id, $form_values) {
   db_query('DELETE FROM {notify} WHERE uid = %d', $form_values['uid']);
   db_query('INSERT INTO {notify} (uid, status, node, teasers, comment) VALUES (%d, %d, %d, %d, %d)', $form_values['uid'], $form_values['status'], $form_values['node'], $form_values['teasers'], $form_values['comment']);
   drupal_set_message(t('Notify settings saved.'));
@@ -199,7 +200,7 @@
 /**
  * Menu callback; show admininster user notification settings form.
  */
-function notify_admin() {
+function notify_admin_form() {
   $result = db_query('SELECT u.uid, u.name, u.mail, n.* FROM {users} u LEFT JOIN {notify} n ON u.uid = n.uid WHERE n.status = 1 AND u.status = 1 ORDER BY u.name');
 
   $form = array();
@@ -226,13 +227,17 @@
   
   $form['submit'] = array('#type' => 'submit', '#value' => t('Save settings'));
   
-  return drupal_get_form('notify_admin', $form);
+  return $form;
+}
+
+function notify_admin() {
+  return drupal_get_form('notify_admin_form');
 }
 
 /**
  * Submit for the notify_admin form.
  */
-function notify_admin_submit($form_id, $form_values) {
+function notify_admin_form_submit($form_id, $form_values) {
   if ($form_values['users']) {
     foreach ($form_values['users'] as $uid => $settings) {
       db_query('UPDATE {notify} SET node = %d, teasers = %d, comment = %d WHERE uid = %d', $settings['node'], $settings['teasers'], $settings['comment'], $uid);
@@ -246,10 +251,10 @@
     cache_clear_all('variables');
   
     if ($status['sent'] > 0) {
-      drupal_set_message(t('%count pending notification e-mails have been sent.', array('%count' => $status['sent'])));
+      drupal_set_message(t('@count pending notification e-mails have been sent.', array('@count' => $status['sent'])));
     }
     elseif ($status['failed'] > 0) {
-      drupal_set_message(t('%count notification e-mails could not be sent.', array('%count' => $status['failed'])), 'error');
+      drupal_set_message(t('@count notification e-mails could not be sent.', array('@count' => $status['failed'])), 'error');
     }
     else {
       drupal_set_message(t('No notification e-mails needed to be sent.'));
@@ -260,8 +265,8 @@
 /**
  * Theme function to theme the admin user settings form in a table format.
  */
-function theme_notify_admin($form) {
-  $output = form_render($form['info']);
+function theme_notify_admin_form($form) {
+  $output = drupal_render($form['info']);
   $header = array (t('username'), t('e-mail address'), t('content'), t('teasers'), t('comment'), t('failed attempts'));
 
   $rows = array();
@@ -270,7 +275,7 @@
     foreach (element_children($form['users'][$uid]) as $entry_key) {
       unset($form['users'][$uid][$entry_key]['#title']);
 
-      $row[] = form_render($form['users'][$uid][$entry_key]);
+      $row[] = drupal_render($form['users'][$uid][$entry_key]);
     }
     $rows[] = $row;
   }
@@ -280,7 +285,7 @@
   }
   $output .= theme('table', $header, $rows);
 
-  $output .= form_render($form);
+  $output .= drupal_render($form);
   return $output;
 }
 
@@ -377,8 +382,8 @@
         if ($node_count > 0) {
           $node_body .= $mini_separator ."\n\n";
         }
-        $node_body .= ++$node_count .'. '. t('%title', array('%title' => $node->title)) ."\n";
-        $node_body .= t('%status %type by %author', array('%status' => $status, '%type' => _node_names('name', $node), '%author' => ($node->name ? $node->name : variable_get('anonymous', 'Anonymous')))) ."\n";
+        $node_body .= ++$node_count .'. '. t('@title', array('%title' => $node->title)) ."\n";
+        $node_body .= t('@status %type by @author', array('%status' => $status, '%type' => _node_names('name', $node), '%author' => ($node->name ? $node->name : variable_get('anonymous', 'Anonymous')))) ."\n";
         $node_body .= '[ '. url('node/'. $node->nid, NULL, NULL, TRUE) ." ]\n\n";
         $node_body .= _notify_content($node, $user) ."\n";
       }
@@ -386,7 +391,7 @@
       // Prepend node e-mail header as long as user could access at least one node.
       if ($node_count > 0) {
         $node_body = $separator . "\n"
-          . t('Recent content - %count', array('%count' => format_plural(count($nodes), '1 new post', '%count new posts'))) ."\n"
+          . t('Recent content - @count', array('@count' => format_plural(count($nodes), '1 new post', '@count new posts'))) ."\n"
           . $separator ."\n\n". $node_body;
       }
     }
@@ -409,11 +414,11 @@
         if ($comment_body) {
           $comment_body .= $mini_separator ."\n\n";
         }
-        $comment_body .= t('%count attached to %type posted by %author: %title', array('%count' => format_plural(count($comment), '1 new comment', '%count new comments'), '%title' => $nodes[$nid]->title, '%type' => _node_names('name', $nodes[$nid]), '%author' => $nodes[$nid]->name ? $nodes[$nid]->name : variable_get('anonymous', 'Anonymous'))) ."\n";
+        $comment_body .= t('@count attached to %type posted by @author: %title', array('@count' => format_plural(count($comment), '1 new comment', '@count new comments'), '%title' => $nodes[$nid]->title, '%type' => _node_names('name', $nodes[$nid]), '%author' => $nodes[$nid]->name ? $nodes[$nid]->name : variable_get('anonymous', 'Anonymous'))) ."\n";
 
         $comment_count = 0;
         foreach ($comment as $c) {
-          $comment_body .= '   '. ++$comment_count .'. '. t('%title by %author', array('%title' => $c->subject, '%author' => ($c->name ? $c->name : variable_get(anonymous, 'Anonymous')))) ."\n"
+          $comment_body .= '   '. ++$comment_count .'. '. t('%title by @author', array('%title' => $c->subject, '%author' => ($c->name ? $c->name : variable_get(anonymous, 'Anonymous')))) ."\n"
             .'     '. url('node/'. $nid, NULL, 'comment-'. $c->cid, TRUE) ."\n\n";
           $total_comment_count++;
         }
@@ -421,7 +426,7 @@
 
       if ($total_comment_count > 0) {
         $comment_body = $separator . "\n"
-          . t('Recent comments - %count', array('%count' => format_plural($total_comment_count, '1 new comment', '%count new comments'))) ."\n"
+          . t('Recent comments - @count', array('@count' => format_plural($total_comment_count, '1 new comment', '@count new comments'))) ."\n"
           . $separator ."\n\n". $comment_body;
       }
     }
@@ -433,22 +438,22 @@
       // Set up initial values for e-mail.
       $from = variable_get('site_mail', ini_get('sendmail_from'));
       $from_name = mime_header_encode(variable_get('site_name', 'drupal'));
-      $subject = t('%sitename new content notification for %username', array('%username' => $user->name, '%sitename' => variable_get('site_name', 'drupal')));
+      $subject = t('@sitename new content notification for @username', array('%username' => $user->name, '%sitename' => variable_get('site_name', 'drupal')));
 
-      $body = t('Greetings %user,', array("%user" => $user->name))."\n\n$body";
+      $body = t('Greetings @user,', array("%user" => $user->name))."\n\n$body";
 
       $body .= "\n-- \n";
-      $body .= t('This is an automatic e-mail from %sitename.', array('%sitename' => variable_get('site_name', 'drupal')))."\n";
-      $body .= t('To stop receiving these e-mails, change your notification preferences at %notify-url', array('%notify-url' => url("user/$user->uid/notify" , NULL, NULL, TRUE)))."\n";
+      $body .= t('This is an automatic e-mail from @sitename.', array('%sitename' => variable_get('site_name', 'drupal')))."\n";
+      $body .= t('To stop receiving these e-mails, change your notification preferences at !notify-url', array('%notify-url' => url("user/$user->uid/notify" , NULL, NULL, TRUE)))."\n";
 
-      if (!user_mail($user->mail, $subject, wordwrap($body, 72), "From: $from_name <$from>\nReply-to: $from\nReturn-path: $from\nX-Mailer: Drupal\nErrors-to: $from\n")) {
+      if (!drupal_mail($user->mail, $subject, wordwrap($body, 72), "From: $from_name <$from>\nReply-to: $from\nReturn-path: $from\nX-Mailer: Drupal\nErrors-to: $from\n")) {
         $ret['failed']++;
         db_query('UPDATE {notify} SET attempts = attempts + 1 WHERE uid = %d', $user->uid);
-        watchdog('error', t('Notify: User %name (%mail) could not be notified. Mail error.', array('%name' => '<em>'. $user->name .'</em>', '%mail' => $user->mail)));
+        watchdog('error', t('Notify: User @name (@mail) could not be notified. Mail error.', array('%name' => '<em>'. $user->name .'</em>', '%mail' => $user->mail)));
       }
       else {
         $ret['sent']++;
-        watchdog('user', t('Notify: User %name (%mail) notified successfully.', array('%name' => '<em>'. $user->name .'</em>', '%mail' => $user->mail)));
+        watchdog('user', t('Notify: User @name (@mail) notified successfully.', array('%name' => '<em>'. $user->name .'</em>', '%mail' => $user->mail)));
       }
     }
   }
