=== modified file 'drupal/sites/all/modules/mollom/mollom.admin.inc'
--- drupal/sites/all/modules/mollom/mollom.admin.inc	2010-09-17 10:51:42 +0000
+++ drupal/sites/all/modules/mollom/mollom.admin.inc	2010-09-27 21:05:21 +0000
@@ -17,19 +17,29 @@
     MOLLOM_MODE_CAPTCHA => t('CAPTCHA only'),
     MOLLOM_MODE_ANALYSIS => t('Text analysis and CAPTCHA backup'),
   );
+  $global_reputation_model = variable_get('mollom_reputation_model', MOLLOM_REPUTATION_MODEL_DEFAULT);
 
   $header = array(
     t('Form'),
     t('Protection mode'),
+    t('Reputation Model'),
     array('data' => t('Operations'), 'colspan' => 2),
   );
   $rows = array();
   $result = db_query("SELECT form_id FROM {mollom_form}");
   while ($form_id = db_result($result)) {
     $mollom_form = mollom_form_load($form_id);
+    // Figure out which reputation model will be used.
+    if ($mollom_form['reputation_model'] == MOLLOM_REPUTATION_MODEL_DEFAULT) {
+      $reputation_model = mollom_reputation_models_map($global_reputation_model);
+    }
+    else {
+      $reputation_model = mollom_reputation_models_map($mollom_form['reputation_model']);
+    }
     $rows[] = array(
       $mollom_form['title'],
       $modes[$mollom_form['mode']],
+      $reputation_model,
       l(t('Configure'), 'admin/settings/mollom/manage/' . $form_id),
       l(t('Unprotect'), 'admin/settings/mollom/unprotect/' . $form_id),
     );
@@ -196,6 +206,17 @@
           '#required' => $mollom_form['mode'] == MOLLOM_MODE_ANALYSIS,
         );
       }
+      
+      // Reputation model selection. For each form, the user can override the
+      // global default reputation model that is used when submitting the
+      // data to mollom for text analysis.
+      $form['mollom']['reputation_model'] = array(
+        '#type' => 'select',
+        '#title' => t('Reputation model'),
+        '#required' => TRUE,
+        '#default_value' => $mollom_form['reputation_model'],
+        '#options' => mollom_reputation_models_map(),
+      );
 
       $form['actions']['submit'] = array(
         '#type' => 'submit',
@@ -550,6 +571,14 @@
       '@sla-url' => 'http://mollom.com/standard-service-level-agreement',
     )),
   );
+  
+  $form['mollom_reputation_model'] = array(
+    '#type' => 'select',
+    '#title' => t('Reputation model'),
+    '#description' => t('The default custom reputation model that you wish to use.'),
+    '#options' => mollom_reputation_models_map(),
+    '#default_value' => variable_get('mollom_reputation_model', MOLLOM_REPUTATION_MODEL_DEFAULT),
+  );
 
   $form['mollom_privacy_link'] = array(
     '#type' => 'checkbox',
@@ -574,6 +603,35 @@
 }
 
 /**
+ * A simple callback for a listing of the reputation models
+ * for mollom.
+ */
+function mollom_reputation_models_map($look_up = null) {
+  static $models;
+  if(empty($models)) {    
+    $models = array(
+      'mollom'                      => t('Use Molloms Default Reputation Model'),
+      'captcha-blocking-normal'     => t('Blocking, Captcha, Normal'),
+      'captcha-blocking-relax'      => t('Blocking, Captcha, Relaxed'),
+      'captcha-blocking-strict'     => t('Blocking, Captcha, Strict'),
+      'nocaptcha-blocking-normal'   => t('Blocking, No-Captcha, Normal'),
+      'nocaptcha-blocking-relax'    => t('Blocking, No Captcha, Relaxed'),
+      'nocaptcha-blocking-strict'   => t('Blocking, No Captcha, Strict'),
+      'captcha-nonblocking-normal'  => t('Non-Blocking, Captcha, Normal'),
+      'captcha-nonblocking-relax'   => t('Non-Blocking, Captcha, Relaxed'),
+      'captcha-nonblocking-strict'  => t('Non-Blocking, Captcha, Strict'),
+      'captcha-blocking-repeated'   => t('Blocking, Captcha, Repeated'),
+    );
+  }
+  if(empty($look_up)) {
+    return $models;
+  }
+  else {
+    return $models[$look_up];
+  }
+}
+
+/**
  * Form submit handler to mass-report and unpublish or delete comments.
  */
 function mollom_comment_admin_overview_submit($form, &$form_state) {

=== modified file 'drupal/sites/all/modules/mollom/mollom.install'
--- drupal/sites/all/modules/mollom/mollom.install	2010-09-17 10:51:42 +0000
+++ drupal/sites/all/modules/mollom/mollom.install	2010-09-27 21:11:04 +0000
@@ -151,6 +151,12 @@
         'not null' => TRUE,
         'default' => 0,
       ),
+      'reputation_model' => array(
+        'type' => 'varchar',
+        'length' => 30,
+        'not null' => TRUE,
+        'default' => 'mollom',
+      ),
       'checks' => array(
         'description' => 'Text analyis checks to perform.',
         'type' => 'text',
@@ -492,3 +498,26 @@
 
   return $ret;
 }
+
+/**
+ * Add a reputation model field to the database.
+ */
+function mollom_update_6115() {
+  $ret = array();
+  if (!db_column_exists('mollom_form', 'reputation_model')) {
+    db_add_field($ret, 'mollom_form', 'reputation_model',
+      array(
+        'type' => 'varchar',
+        'length' => 30,
+        'not null' => TRUE,
+        'default' => 'mollom',
+      )
+    );
+  }
+  // Set the default model to "mollom".
+  $default = variable_get('mollom_reputation_model', MOLLOM_REPUTATION_MODEL_DEFAULT);
+  if($default == MOLLOM_REPUTATION_MODEL_DEFAULT) {
+    variable_set('mollom_reputation_model', MOLLOM_REPUTATION_MODEL_DEFAULT); 
+  }
+  return $ret;
+}

=== modified file 'drupal/sites/all/modules/mollom/mollom.module'
--- drupal/sites/all/modules/mollom/mollom.module	2010-09-17 10:51:42 +0000
+++ drupal/sites/all/modules/mollom/mollom.module	2010-09-27 20:43:41 +0000
@@ -47,6 +47,11 @@
 define('MOLLOM_MODE_ANALYSIS', 2);
 
 /**
+ * Default reputation model.
+ */
+define('MOLLOM_REPUTATION_MODEL_DEFAULT', 'mollom');
+
+/**
  * XML-RPC communication failure fallback mode: Block all submissions of protected forms.
  */
 define('MOLLOM_FALLBACK_BLOCK', 0);
@@ -823,6 +828,7 @@
     'elements' => array(),
     'mapping' => array(),
     'mail ids' => array(),
+    'reputation_model' => variable_get('mollom_reputation_model', MOLLOM_REPUTATION_MODEL_DEFAULT),
   );
 
   // Allow modules to alter the default form information.
@@ -854,6 +860,7 @@
     'checks' => array(),
     'elements' => array(),
     'enabled_fields' => array(),
+    'reputation_model' => variable_get('mollom_reputation_model', MOLLOM_REPUTATION_MODEL_DEFAULT),
   );
   // Enable all fields for textual analysis by default.
   if (!empty($mollom_form['elements'])) {
@@ -1089,7 +1096,7 @@
 
   // User IP.
   $data['author_ip'] = ip_address();
-
+  
   return $data;
 }
 
@@ -1437,6 +1444,17 @@
   }
   $data['session_id'] = $form_state['mollom']['response']['session_id'];
   $data['checks'] = implode(',', $form_state['mollom']['checks']);
+  // Set the reputation model if it is not the default.
+  // We check the form first to see if the global default has been
+  // overriden, and then we check the global value to see if it is
+  // not the default.
+  $reputation_model = variable_get('mollom_reputation_model', MOLLOM_REPUTATION_MODEL_DEFAULT);
+  if($form_state['mollom']['reputation_model'] != MOLLOM_REPUTATION_MODEL_DEFAULT) {
+    $data['reputation'] = $form_state['mollom']['reputation_model'];
+  }
+  else if($reputation_model != MOLLOM_REPUTATION_MODEL_DEFAULT) {
+    $data['reputation'] = $reputation_model;
+  }
   $result = mollom('mollom.checkContent', $data);
   // Use all available data properties for log messages below.
   $data += $all_data;

