I've had excellent protection against comment spam with mollom. But, when it comes to anonymous node posts some low quality content and Russian language content keeps getting through. The two main differences I see between the two sources for spammers is that comments are different contextually than node inputs and that information about the user such as name, email, etc. is sent to mollom for comments.

Could we have these fields be (optionally) added to node forms by mollom to be sent back to help protect anonymous node spam in a more verbose way?

Comments

dave reid’s picture

Status: Active » Closed (works as designed)

The thing is, node forms, unlike comment forms, don't have a field for 'name' and 'email'. The function that mollom uses to fetch data from the node forms for textual analysis is:

function mollom_data_comment_form($form_state) {
  global $user;

  $data = array(
    'post_title'    => isset($form_state['subject']) ? $form_state['subject'] : NULL,
    'post_body'     => isset($form_state['comment']) ? $form_state['comment'] : NULL,
    'author_name'   => isset($form_state['name']) ? $form_state['name'] : (isset($user->name) ? $user->name : NULL),
    'author_mail'   => isset($form_state['mail']) ? $form_state['mail'] : (isset($user->mail) ? $user->mail : NULL),
    'author_url'    => isset($form_state['homepage']) ? $form_state['homepage'] : NULL,
    'author_openid' => isset($user->uid) ? _mollom_get_openid($user) : NULL,
    'author_id'     => $user->uid > 0 ? $user->uid : NULL,
    'author_ip'     => isset($form_state['cid']) ? NULL : ip_address(),
  );

  return $data;
}

The only way mollom will be able to analyze the name and e-mail address of anonymous users is if the $form_state['name'] or form_state['mail'] values are present. You could either roll your own module to add these form elements for anonymous user node forms, or maybe it could be done by adding a name and e-mail field using CCK. The latter option would probably require that we implement a solution like #412760: User interface brainstorming where we can select the fields we want included for textual analysis.

I'm going to mark this is "by design" for now, but keep an eye on #412760: User interface brainstorming.