# 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 @@ 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.'); } +} /**