### Eclipse Workspace Patch 1.0
#P activity
Index: contrib/nodeactivity/nodeactivity.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/activity/contrib/nodeactivity/nodeactivity.module,v
retrieving revision 1.1.2.12
diff -u -r1.1.2.12 nodeactivity.module
--- contrib/nodeactivity/nodeactivity.module	5 May 2008 14:46:55 -0000	1.1.2.12
+++ contrib/nodeactivity/nodeactivity.module	5 Nov 2008 06:28:48 -0000
@@ -53,7 +53,7 @@
   static $authors;
   if ($type == 'nodeactivity' && !empty($data)) {
     if (!isset($authors[$data['author-uid']])) {
-      $author = activity_user_load($data['author-uid']);
+      $author = db_fetch_object(db_query('SELECT uid, name FROM {users} WHERE uid = %d', $data['author-uid']));
       $authors[$data['author-uid']] = theme('username', $author);
     }
     $data['author'] = $authors[$data['author-uid']];
@@ -69,7 +69,8 @@
     case 'insert':
     case 'update':
     case 'delete':
-      if ($node->status == 1) {
+      $temp_arr = variable_get('nodeactivity_nodetype',array());
+      if ($node->status == 1 && $temp_arr[$node->type]) {
         $operation = $op == 'insert' ? t('create') : t($op);
         $type = $node->type;
 
@@ -92,8 +93,8 @@
         // The use of the role (all and author) ensures that we know later how
         // to address the person... ie "You" or "Bob".
         $target_users_roles = array(
-          ACTIVITY_ALL => 'all',
-          $node->uid => 'author'
+        ACTIVITY_ALL => 'all',
+        $node->uid => 'author'
         );
         
         activity_insert('nodeactivity', $type, $op, $data, $target_users_roles);
@@ -101,3 +102,32 @@
       break;
   }
 }
+
+function nodeactivity_menu($may_cache) {
+  if ($may_cache) {
+    $items[] = array(
+      'path' => 'admin/settings/nodeactivity',
+      'title' => t('Node Activity Settings'),
+      'description' => t('Select the nodes types for which you intend to record activity!'),
+      'callback' => 'drupal_get_form',
+      'callback arguments' => array('nodeactivity_admin_settings'),
+    );
+  }
+  return $items;
+}
+
+function nodeactivity_admin_settings(){
+  $form['nodeactivity_settings'] = array (
+      '#type' => 'fieldset',
+      '#title' => t('Nodes to record'),
+      '#collapsible' => FALSE,
+      '#description' => 'Select the node types for which you intend to record activity',
+  );
+  $form['nodeactivity_settings']['nodeactivity_nodetypes'] = array(
+   '#type' => 'checkboxes',
+   '#options' => node_get_types('names'),
+   '#default_value' => variable_get('nodeactivity_nodetypes',array()),
+  );
+
+  return system_settings_form($form);
+}
\ No newline at end of file
