Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privacy/README.txt,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 README.txt
--- README.txt	31 Jan 2009 12:51:59 -0000	1.1.2.1
+++ README.txt	31 Aug 2010 03:43:40 -0000
@@ -15,6 +15,7 @@ Follow these steps:
 3. Create your content types and additional fields with the cck module
 5. Go to admin/content/privacy and enable the fields which should be able to
 keep private (only users with 'administer privacy' rights are able to do this)
+and, optionally, assign the default value of the checkbox ('on' or 'off').
 6. When a user creates a node, he can check if a field should be private or
 not.
 
Index: privacy.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privacy/privacy.admin.inc,v
retrieving revision 1.1
diff -u -p -r1.1 privacy.admin.inc
--- privacy.admin.inc	28 Jan 2009 23:38:34 -0000	1.1
+++ privacy.admin.inc	31 Aug 2010 03:43:40 -0000
@@ -47,6 +47,13 @@ function privacy_settings() {
         '#default_value' => variable_get('privacy_'. $type['type'], array()),
         '#options' => $fields,
       );
+      $form[$fieldset]['privacy_'. $type['type'] .'_defaults'] = array(
+        '#type' => 'checkboxes',
+        '#title' => t('Field defaults'),
+        '#default_value' => variable_get('privacy_'. $type['type'] .'_defaults', array()),
+        '#options' => $fields,
+        '#description' => t('By default all checkboxes will be off, meaning that they will be viewable by everyone.  This allows individual fields to be set to default to on, i.e. private.'),
+      );
     }
   }
 
Index: privacy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privacy/privacy.module,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 privacy.module
--- privacy.module	31 Jan 2009 12:35:49 -0000	1.1.2.1
+++ privacy.module	31 Aug 2010 03:43:40 -0000
@@ -154,16 +154,45 @@ function privacy_get_active_fields($type
 }
 
 function privacy_is_private($field, $nid) {
+  // Default to FALSE, i.e. not private.
+  $is_private = FALSE;
+
+  // If no $nid is present then this should be a node/add/* page.
   if ( $nid == 0 ) {
-    return FALSE;
+    if (arg(0) == 'node' && arg(1) == 'add') {
+      $type = arg(2);
+      if (!empty($type)) {
+        // Get the defaults for this content type.
+        $defaults = variable_get('privacy_'. check_plain(arg(2)) .'_defaults', array());
+    
+        // If the default value was set, return it.
+        if (is_array($defaults) && array_key_exists($field, $defaults)) {
+          $is_private = (bool) $defaults[$field];
+        }
+      }
+    }
   }
   else {
+    // Look for an existing setting, that the user assigned checked the box.
     $result = db_result(db_query("SELECT nid FROM {privacy} WHERE nid = %d AND field_name = '%s' ", $nid, $field));
+    
+    // If a value is found then the box was checked.
     if ( $result ) {
-      return TRUE;
+      $is_private = TRUE;
     }
     else {
-      return FALSE;
+      // This should be a free operation.
+      $node = node_load($nid);
+      
+      // Get the defaults for this content type.
+      $defaults = variable_get('privacy_'. $node->type .'_defaults', array());
+      
+      // If the default value was set, return it.
+      if (is_array($defaults) && array_key_exists($field, $defaults)) {
+        $is_private = (bool) $defaults[$field];
+      }
     }
   }
+  
+  return $is_private;
 }
