--- /var/www/cobrasound.com/sites/all/modules/simplenews_register/simplenews_register.module	2008-08-21 16:26:44.000000000 -0400
+++ simplenews_register.module	2008-08-26 13:54:33.000000000 -0400
@@ -1,6 +1,93 @@
 <?php
 // $Id: simplenews_register.module,v 1.1.2.3 2008/07/14 12:58:56 moonray Exp $
 
+/* TODO db_next_id() is gone, and replaced as db_last_insert_id()
+   Since db_next_id() introduce some problems, and the use of this function
+   can be replaced by database level auto increment handling, db_next_id()
+   is now gone and replaced as db_last_insert_id() with help of serial type
+   under Schema API (check out http://drupal.org/node/149176 for more details).
+   Please refer to drupal_write_record() as demonstration. */
+
+/* TODO FormAPI image buttons are now supported.
+   FormAPI now offers the 'image_button' element type, allowing developers to
+   use icons or other custom images in place of traditional HTML submit buttons.
+
+$form['my_image_button'] = array(
+  '#type'         => 'image_button',
+  '#title'        => t('My button'),
+  '#return_value' => 'my_data',
+  '#src'          => 'my/image/path.jpg',
+); */
+
+/* TODO hook_user('view')
+   The return value of hook_user('view') has changed, to match the process that
+   nodes use for rendering. Modules should add their custom HTML to
+   $account->content element. Further, this HTML should be in the form that
+   drupal_render() recognizes. */
+
+/* TODO Node previews and adding form fields to the node form.
+   There is a subtle but important difference in the way node previews (and other
+   such operations) are carried out when adding or editing a node. With the new
+   Forms API, the node form is handled as a multi-step form. When the node form
+   is previewed, all the form values are submitted, and the form is rebuilt with
+   those form values put into $form['#node']. Thus, form elements that are added
+   to the node form will lose any user input unless they set their '#default_value'
+   elements using this embedded node object. */
+
+/* TODO New user_mail_tokens() method may be useful.
+   user.module now provides a user_mail_tokens() function to return an array
+   of the tokens available for the email notification messages it sends when
+   accounts are created, activated, blocked, etc. Contributed modules that
+   wish to make use of the same tokens for their own needs are encouraged
+   to use this function. */
+
+/* TODO
+   There is a new hook_watchdog in core. This means that contributed modules
+   can implement hook_watchdog to log Drupal events to custom destinations.
+   Two core modules are included, dblog.module (formerly known as watchdog.module),
+   and syslog.module. Other modules in contrib include an emaillog.module,
+   included in the logging_alerts module. See syslog or emaillog for an
+   example on how to implement hook_watchdog.
+function example_watchdog($log = array()) {
+  if ($log['severity'] == WATCHDOG_ALERT) {
+    mysms_send($log['user']->uid,
+      $log['type'],
+      $log['message'],
+      $log['variables'],
+      $log['severity'],
+      $log['referer'],
+      $log['ip'],
+      format_date($log['timestamp']));
+  }
+} */
+
+/* TODO Implement the hook_theme registry. Combine all theme registry entries
+   into one hook_theme function in each corresponding module file.
+function simplenews_register_theme() {
+  return array(
+    'simplenews_register_admin_settings' => array(
+      'file' => 'simplenews_register.module',
+      'arguments' => array(
+        'form' => NULL,
+      ),
+    ),
+  );
+}; */
+
+
+/* TODO
+   An argument for replacements has been added to format_plural(),
+   escaping and/or theming the values just as done with t().*/
+
+/* TODO You may want to take advantage of new form-specific alter hooks.
+   The hook_form_alter() is complemented by hook_form_$form-id_alter().
+   Optionally, modules can implement form-specific alteration functions rather
+   than a single hook_form_alter() with many conditional switch statements.
+   This is optional, and is most useful for tidying the code of modules that
+   alter many forms to customize a site's operations.
+   The new function names are built using the following format:
+   [your-module-name]_form_[$form_id]_alter. */
+
 /**
  * Fix for versions of simplenews greater than 1.2
  */
@@ -13,10 +100,30 @@ if (!function_exists('_simplenews_get_vi
 /**
  * Implementation of hook_menu().
  */
-function simplenews_register_menu($may_cache) {
+function simplenews_register_menu() {
   $items = array();
-  $administer = user_access('administer newsletters');
+  $administer = array('administer newsletters');
 
+/* TODO
+   Non menu code that was placed in hook_menu under the '!$may_cache' block
+   so that it could be run during initialization, should now be moved to hook_init.
+   Previously we called hook_init twice, once early in the bootstrap process, second
+   just after the bootstrap has finished. The first instance is now called boot
+   instead of init.
+   
+   In Drupal 6, there are now two hooks that can be used by modules to execute code
+   at the beginning of a page request. hook_boot() replaces hook_boot() in Drupal 5
+   and runs on each page request, even for cached pages. hook_boot() now only runs
+   for non-cached pages and thus can be used for code that was previously placed in
+   hook_menu() with $may_cache = FALSE:
+   
+   Dynamic menu items under a '!$may_cache' block can often be simplified
+   to remove references to arg(n) and use of '%<function-name>' to check
+   conditions. See http://drupal.org/node/103114.
+   
+   The title and description arguments should not have strings wrapped in t(),
+   because translation of these happen in a later stage in the menu system.
+*/
   if ($may_cache) {
   }
 }
@@ -24,7 +131,7 @@ function simplenews_register_menu($may_c
 /**
  * Implementation of hook_form_alter().
  */
-function simplenews_register_form_alter($form_id, &$form) {
+function simplenews_register_form_alter(&$form, &$form_state, $form_id) {
   if ($form_id == 'simplenews_admin_settings') {
     $form['buttons']['#weight'] = 10;
     
@@ -44,16 +151,19 @@ function simplenews_register_form_alter(
       );
       $form['simplenews_register_options']['simplenews_register_'. $term->tid .'_show'] = array(
         '#type' => 'checkbox',
+	'#title' => t('Show'),
         '#return_value' => 1,
         '#default_value' => variable_get('simplenews_register_'. $term->tid .'_show', TRUE),
       );
       $form['simplenews_register_options']['simplenews_register_'. $term->tid .'_optout'] = array(
         '#type' => 'checkbox',
+	'#title' => t('Opt Out'),
         '#return_value' => 1,
         '#default_value' => variable_get('simplenews_register_'. $term->tid .'_optout', FALSE),
       );
       $form['simplenews_register_options']['simplenews_register_'. $term->tid .'_confirm'] = array(
         '#type' => 'checkbox',
+	'#title' => t('Confirm'),
         '#return_value' => 1,
         '#default_value' => variable_get('simplenews_register_'. $term->tid .'_confirm', TRUE),
       );
