# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: contributions/modules/wp_comments/wp_comments.module
--- contributions/modules/wp_comments/wp_comments.module Base (1.2)
+++ contributions/modules/wp_comments/wp_comments.module Locally Modified (Based On 1.2)
@@ -1,6 +1,8 @@
 <?php
 // $Id: wp_comments.module,v 1.2 2008/05/06 06:57:05 eaton Exp $
 
+define('COMMENT_ANONYMOUS_MUST_CONTACT_WITHOUT_HOMEPAGE', 3);
+
 /**
  * An implementation of hook_theme_registry_alter()
  * Substitute our own custom version of the standard 'theme_form_element' function.
@@ -26,6 +28,17 @@
  **/
 function wp_comments_form_alter(&$form, &$form_state, $form_id) {
   if ($form_id == 'comment_form') {
+    global $user;
+
+    if ($user->uid == 0) {
+      $node = node_load($form['nid']['#value']);
+      $comment_anonymous = variable_get('comment_anonymous_'  . $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT);
+      if ($comment_anonymous == COMMENT_ANONYMOUS_MUST_CONTACT_WITHOUT_HOMEPAGE) {
+        $form['name'] = array('#type' => 'textfield', '#title' => t('Your name'), '#maxlength' => 60, '#size' => 30, '#weight' => -10, '#default_value' => $edit['name'] ? $edit['name'] : variable_get('anonymous', t('Anonymous')));
+        $form['mail'] = array('#type' => 'textfield', '#title' => t('E-mail'), '#maxlength' => 64, '#size' => 30, '#weight' => -9, '#default_value' => $edit['mail'], '#description' => t('The content of this field is kept private and will not be shown publicly.'));
+      }
+    }
+    
     foreach (element_children($form) as $key) {
       if (isset($form[$key]) && isset($form[$key]['#type']) && $form[$key]['#type'] == 'textfield') {
         $form[$key]['#wp_comments_element'] = TRUE;
@@ -41,7 +54,11 @@
     $form['comment_filter']['comment']['#rows'] = 10;
     unset($form['comment_filter']['comment']['#title']);
   }
+  elseif ($form_id === 'node_type_form') {
+    $comment_anonymous = &$form['comment']['comment_anonymous'];
+    $comment_anonymous['#options'][COMMENT_ANONYMOUS_MUST_CONTACT_WITHOUT_HOMEPAGE] = t('Anonymous posters must leave their contact information without homepage field.');
 }
+}
 
 
 /**
