Index: mollom.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.css,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 mollom.css
--- mollom.css	14 Sep 2010 20:28:45 -0000	1.1.2.4
+++ mollom.css	21 Oct 2010 15:20:28 -0000
@@ -4,6 +4,36 @@
   display: block;
 }
 
+.mollom-info-wrapper {
+  position: relative;
+}
+.mollom-info-wrapper:hover {
+  background-color: rgba(0, 0, 0, 0.05);
+}
+.mollom-info-wrapper .mollom-info {
+  display: none;
+}
+.mollom-info-wrapper:hover .mollom-info {
+  display: block;
+}
+.mollom-info {
+  line-height: 140%;
+  margin: 0;
+  padding-top: 0.5em;
+  padding-bottom: 0.5em;
+  position: absolute;
+  right: 0;
+}
+.mollom-info .form-item {
+  margin-top: 0;
+  margin-bottom: 0;
+  overflow: hidden;
+}
+.mollom-info .form-item label {
+  float: left;
+  width: 7em;
+}
+
 /* Help themes to properly display Mollom's log messages. */
 .dblog-event pre,
 #simpletest-result-form table td {
Index: mollom.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.install,v
retrieving revision 1.2.2.35
diff -u -p -r1.2.2.35 mollom.install
--- mollom.install	16 Oct 2010 18:24:54 -0000	1.2.2.35
+++ mollom.install	21 Oct 2010 14:30:50 -0000
@@ -136,6 +136,12 @@ function mollom_schema() {
         'size' => 'tiny',
         'not null' => FALSE,
       ),
+      'sentiment' => array(
+        'description' => 'Text analysis sentiment check result.',
+        'type' => 'float',
+        'size' => 'tiny',
+        'not null' => FALSE,
+      ),
       'languages' => array(
         'description' => 'Text analysis language check result.',
         'type' => 'varchar',
@@ -634,3 +640,19 @@ function mollom_update_6117() {
   }
   return $ret;
 }
+
+/**
+ * Add {mollom}.sentiment text analysis check column.
+ */
+function mollom_update_6118() {
+  $ret = array();
+  if (!db_column_exists('mollom', 'sentiment')) {
+    db_add_field($ret, 'mollom', 'sentiment', array(
+      'description' => 'Text analysis sentiment check result.',
+      'type' => 'float',
+      'size' => 'tiny',
+      'not null' => FALSE,
+    ));
+  }
+  return $ret;
+}
Index: mollom.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.module,v
retrieving revision 1.2.2.178
diff -u -p -r1.2.2.178 mollom.module
--- mollom.module	18 Oct 2010 14:04:54 -0000	1.2.2.178
+++ mollom.module	21 Oct 2010 15:16:59 -0000
@@ -2540,6 +2540,75 @@ function mollom_comment($comment, $op) {
   if ($op == 'delete') {
     mollom_data_delete('comment', $comment->cid);
   }
+  if ($op == 'view') {
+    $comment->mollom = mollom_data_load('comment', $comment->cid);
+  }
+}
+
+function mollom_preprocess_comment(&$variables) {
+  if (user_access('bypass mollom protection') && !empty($variables['comment']->mollom)) {
+    $data = $variables['comment']->mollom;
+    $labels_spam = array(
+      MOLLOM_ANALYSIS_HAM => t('Ham'),
+      MOLLOM_ANALYSIS_SPAM => t('Spam'),
+      MOLLOM_ANALYSIS_UNSURE => t('Unsure'),
+    );
+
+    $form['mollom_info'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Text analysis'),
+      '#collapsible' => FALSE,
+      '#attributes' => array('class' => 'mollom-info'),
+    );
+    $form['mollom_info']['session_id'] = array(
+      '#type' => 'item',
+      '#title' => t('Session id'),
+      '#value' => check_plain($data->session_id),
+      '#weight' => 0,
+    );
+    if (isset($data->spam)) {
+      $form['mollom_info']['spam'] = array(
+        '#type' => 'item',
+        '#title' => t('Spam'),
+        '#value' => $labels_spam[$data->spam],
+        '#weight' => 1,
+      );
+    }
+    if (isset($data->quality)) {
+      $form['mollom_info']['quality'] = array(
+        '#type' => 'item',
+        '#title' => t('Quality'),
+        '#value' => check_plain($data->quality),
+        '#weight' => 2,
+      );
+    }
+    if (isset($data->profanity)) {
+      $form['mollom_info']['profanity'] = array(
+        '#type' => 'item',
+        '#title' => t('Profanity'),
+        '#value' => check_plain($data->profanity),
+        '#weight' => 3,
+      );
+    }
+    if (isset($data->sentiment)) {
+      $form['mollom_info']['sentiment'] = array(
+        '#type' => 'item',
+        '#title' => t('Sentiment'),
+        '#value' => check_plain($data->sentiment),
+        '#weight' => 4,
+      );
+    }
+    if (isset($data->languages)) {
+      $form['mollom_info']['languages'] = array(
+        '#type' => 'item',
+        '#title' => t('Languages'),
+        '#value' => check_plain($data->languages),
+        '#weight' => 5,
+      );
+    }
+    $output = drupal_render($form);
+    $variables['content'] = '<div class="mollom-info-wrapper">' . $variables['content'] . $output . '</div>';
+  }
 }
 
 /**
