This little patch creates 2 actions. These are basically a copy of the submit function in the comment moderation form in an actions format. This is very useful for Views Bulk Operations compatibility and in use in a comment moderation view.

  • mollom_unpublish_comment
  • mollom_delete_comment

Cheers,
Neil

Files: 
CommentFileSizeAuthor
#38 mollom.actions.38.patch8.08 KBeshta
PASSED: [[SimpleTest]]: [MySQL] 7,248 pass(es).
[ View ]
#33 mollom.actions.33.patch7.67 KBeshta
PASSED: [[SimpleTest]]: [MySQL] 7,244 pass(es).
[ View ]
#31 mollom.actions.31.patch4.76 KBeshta
PASSED: [[SimpleTest]]: [MySQL] 7,244 pass(es).
[ View ]
#30 mollom.actions.30.patch2.17 KBeshta
PASSED: [[SimpleTest]]: [MySQL] 7,244 pass(es).
[ View ]
#22 mollom-actions-d7-655846-22.patch2.17 KBttkaminski
PASSED: [[SimpleTest]]: [MySQL] 6,836 pass(es).
[ View ]
#17 0001-Issue-655846-by-gordon-indytechcook-Added-Mollom-Act.patch2.75 KBgordon
PASSED: [[SimpleTest]]: [MySQL] 2,389 pass(es).
[ View ]
#16 spam-buster-5000.txt12.51 KBgordon
#15 0001-Issue-655846-by-gordon-indytechcook-Added-Mollom-Act.patch2.81 KBgordon
PASSED: [[SimpleTest]]: [MySQL] 2,393 pass(es).
[ View ]
#12 0001-Issue-655846-by-indytechcook-gordon-Added-Mollom-Act.patch2.81 KBgordon
FAILED: [[SimpleTest]]: [MySQL] 2,400 pass(es), 0 fail(s), and 94 exception(s).
[ View ]
mollom-action.patch2.91 KBindytechcook
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch mollom-action.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

Also see #152603: Revise comment admin interface like content admin, add hook_comment_operations() since the Mollom module technically already provides these actions, but has to hack them into the current comment listing interface.

Status:Needs review» Needs work

Taking into account #717212: Remove "report to Mollom" links and integrate with entity delete confirmation forms instead, we should only provide actions to report a post.

Although I'm not sure how useful such an action is.

Status:Needs work» Closed (duplicate)

Thanks for taking the time to report this issue.

However, marking as duplicate of #245689: Integrate actions with reporting functionality on delete confirmation forms.
You can follow up on that issue to track its status instead. If any information from this issue is missing in the other issue, please make sure you provide it over there.

Status:Closed (duplicate)» Needs work

I don't agree with marking this as a dupe. This is a small, useful feature that can be used in Views Bulk Operations and elsewhere. Making it dependant on a confirm form issue is needlessly blocking it. It has already blocked for months. If the admins disagree, feel free to set this back to dupe.

Instead of a drupal_set_message(), a watchdog() would be more consistent with core. See the action below from core. The drupal_set_message calls would look upgly after deleting a hundred spams using views bulk operations.

I'll make the above change if the committers think this patch can proceed.

subscribing.

I agree this is a great idea to add. I agree holding it back based on a relatively unrelated issue is unfortunate.

Ultimately this means that mollom.com will get less information about spam comments. I'm building a view to delete a few hundred spam comments on g.d.o and now instead of reporting them to mollom I will simply delete them. That is valuable information that mollom.com loses out on.

Is there anything that can be done to hurry this along to a conclusion? I could test the patch if that helps (although - 2009? - is this going to work with the current dev release?).

I'm not sure how much longer I can use Mollom if I can't integrate it into Views Bulk Actions and Rules. Viewing individual comments and reporting them is just too time-consuming, so, like greggles, I often find my only option is to delete them and deny mollom.com the spam information.

Subscribe

subscribe

Priority:Normal» Major

I'm going to bump the priority here. Otherwise, what can I do to help :) ?

I was so surprised to find that mollom doesn't support a link in views to mark as spam or a views bulk operation!

StatusFileSize
new2.81 KB
FAILED: [[SimpleTest]]: [MySQL] 2,400 pass(es), 0 fail(s), and 94 exception(s).
[ View ]

Updated patch for the latest version of Mollom

Status:Needs work» Needs review

Status:Needs review» Needs work

The last submitted patch, 0001-Issue-655846-by-indytechcook-gordon-Added-Mollom-Act.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new2.81 KB
PASSED: [[SimpleTest]]: [MySQL] 2,393 pass(es).
[ View ]

Fix up issue in mollom_action_info().

StatusFileSize
new12.51 KB

Here is a view which I use with great success to remove spam quickly from a site.

StatusFileSize
new2.75 KB
PASSED: [[SimpleTest]]: [MySQL] 2,389 pass(es).
[ View ]

Found a small bug when going to 2.x

Version:6.x-1.x-dev» 6.x-2.x-dev

Fix up version

I did a quick query to find the most followed, open issues for mollom module:

Count | Nid | Title
       45 | http://drupal.org/node/353588            | Your submission has triggered the installed spam filter and will not be accepted.
|       23 | http://drupal.org/node/869782            | Appeal!: Explain what a user should do if "Your submission has triggered the spam filter and will not be accepted."
|       17 | http://drupal.org/node/245364            | Provide API to programmatically validate content (integration with Trackback module)
|       17 | http://drupal.org/node/655846            | Mollom Actions
|       17 | http://drupal.org/node/364575            | Support alternative spam rejection methods than a CAPTCHA (e.g. unpublishing)
|       16 | http://drupal.org/node/921772            | Report to Mollom 'registered spam users accounts' and delete account                                                             |

So, the first two are basically just people who need support and are confused by the module. The next 3 are tied for most important meaning that this issue is tied for the most followed open issue in the mollom queue.

Further - #655846: Mollom Actions and #921772: Report to Mollom 'registered spam users accounts' and delete account are pretty similar since 921772 is just chaining together two actions (if the code were organized as actions). So, 2 out of the top 4 issues are pretty related.

It's interesting to note that this issue has 12 commenters but 17 followers.

Status:Needs review» Needs work

Here is a bit of patch review - Damn, just realised the patch was for drupal 6, which explains the bugs I had.

So just nit-picky stuff here now.

+++ b/mollom.module
@@ -3381,3 +3381,81 @@ function profile_mollom_form_info_alter(&$form_info, $form_id) {
+  return array(
+    // Unpublish Action
+    'mollom_unpublish_comment' => array(
+      'description' => t('Report to Mollom as spam and unpublish'),
+      'type' => 'comment',
+      'configurable' => FALSE,
+      'hooks' => array(
+        'comment' => array('insert', 'update'),
+      ),
+    ),
+    // Delete action
+    'mollom_delete_comment' => array(
+      'description' => t('Report to Mollom as spam and delete'),
+      'type' => 'comment',
+      'configurable' => FALSE,
+      'hooks' => array(
+        'comment' => array('insert', 'update'),
+      ),
+    ),
+  );

Comments should have full stops.

+++ b/mollom.module
@@ -3381,3 +3381,81 @@ function profile_mollom_form_info_alter(&$form_info, $form_id) {
+ * Preform action and send to Mollom as Spam

I assume Preform should be Perform, and it needs a full stop.

+++ b/mollom.module
@@ -3381,3 +3381,81 @@ function profile_mollom_form_info_alter(&$form_info, $form_id) {
+  // First, send the proper information to the XML-RPC server:
...
+  // Second, perform the proper operation on the comments:

These comments should probably have full stops instead of colons.

+++ b/mollom.module
@@ -3381,3 +3381,81 @@ function profile_mollom_form_info_alter(&$form_info, $form_id) {
+ */
\ No newline at end of file
--
1.7.5.4

Should not remove the newline at the end of the file.

Plus we now need a D7 version.

Version:6.x-2.x-dev» 7.x-2.5
Status:Needs work» Needs review
StatusFileSize
new2.17 KB
PASSED: [[SimpleTest]]: [MySQL] 6,836 pass(es).
[ View ]

Updated the patch to work with D7. Made some changes:

1. Enabled aggregate mode on the actions. This takes advantage of the *_multiple() functions, thus making the operation more optimal.
2. Removed the drupal_set_message(). Not needed as VBO already provides information about the results of the operation.

Priority:Major» Critical

Bump!

In light of the recent Spamming of Groups, and they Groups users VBO and actions to allow deleting of a users content. Right NOW it is only deleting the content and not notifying mollom that this is being deleted because of SPAM. This is not helping Mollom get rid of our spam. Adding this will help Mollom combat out current spam issue.

Priority:Critical» Major

Feature requests shouldn't be marked Critical, according to the policy on Priority levels of issues. So I hope it's OK for me to drop it back to Major.

I doubt that upping the Priority would speed anything up anyway. Though I wish there was something that would speed progress up as it's nearly four years since indytechcook opened the issue by posting a patch :(

++ for this feature.

I believe this is severely hampering the performance of mollom on groups.drupal.org.

Not only is this the most followed issue in the Mollom queue, it's probably also the most duplicated. Here are other issues that are ultimately duplicate issues of this one:
#1441924: Provide hook to Views Bulk Operations
#342138: Add a 'report to Mollom' action
#338510: Implement hook_node_operations() and add actions
#921772: Report to Mollom 'registered spam users accounts' and delete account

It's confusing to me that a patch is available that adds this feature and was not reviewed by a maintainer.

I'm very happy to see the recent improvements to the mollom module/service. #273964: Accessibility problems with audio CAPTCHA was a huge item to fix. This is the next big one.

Whether it's "critical" or not from a d.o issue perspective I've believe (based on the data above) that it is critical from the perspective of value to mollom users.

Hi there, greggles.

A lot of this history predates me so thank you for commenting on this and bringing it up on my radar. I'm going to take a look at the latest patch (will need a re-roll, etc.) and do some testing. It may take me a few days but we'll get this rolling again ;-)

Wonderful news. Thanks, @eshta.

Thanks @eshta++ and @greggles++

Version:7.x-2.5» 7.x-2.x-dev
Issue summary:View changes
StatusFileSize
new2.17 KB
PASSED: [[SimpleTest]]: [MySQL] 7,244 pass(es).
[ View ]

Re-rolling patch.

StatusFileSize
new4.76 KB
PASSED: [[SimpleTest]]: [MySQL] 7,244 pass(es).
[ View ]

Fixed some whitespace issues and added source for feedback reporting.

Questions:
Should we really be deleting the mollom data for an unpublish action?

I was looking at the current state of the hook_mollom_form_list for comments and it seems like we might leverage this instead of simply calling things directly.

function comment_mollom_form_list() {
  $forms = array();
  foreach (node_type_get_types() as $type) {
    $form_id = "comment_node_{$type->type}_form";
    $forms[$form_id] = array(
      'title' => t('@name comment form', array('@name' => $type->name)),
      'entity' => 'comment',
      'bundle' => 'comment_node_' . $type->type,
      'delete form' => 'comment_confirm_delete',
      'delete form file' => array(
        'name' => 'comment.admin',
      ),
      'report access' => array('administer comments'),
      'entity delete multiple callback' => 'comment_delete_multiple',
      'entity report access callback' => 'comment_mollom_entity_report_access',
    );
  }
  return $forms;
}

The specifics that came to mind were:
  1. entity delete multiple callback: we should reference this definition rather than directly implementing
  2. entity report access callback: should we be checking access to comments prior to performing these actions?

This also could use a test....

StatusFileSize
new7.67 KB
PASSED: [[SimpleTest]]: [MySQL] 7,244 pass(es).
[ View ]

Updated the patch to read delete and access callbacks from the comment form definitions so that all callbacks are called in these actions.

The last piece here is testing the actions.

FOR WATCHERS: If anyone is in need of this functionality, please test this patch :-)

It looks like this is just providing actions for comments, but not for nodes nor user accounts. On g.d.o right now the most common type of spam is nodes. Are you planning to add nodes?

We could certainly extend this to nodes pretty easily I would think using a similar approach. Probably can't get to it today but will be able to in the next day or two at most (unless you want to refactor it in before then, of course).

@greggles: Would you be able to help with testing (and perhaps a test class)?

I'm mostly an end user of mollom in my role as spam moderator on g.d.o, so unlikely to help beyond visual patch reviews/feedback.

Adding nodes is a bit more of an effort. The comment integration in place already provides delete callback handlers. Node deletion is limited to integrating with the node delete form. I'm a bit wary of just adding it in here, even with callbacks in place without lots of security checks....

I think what would be best is only having unpublish actions for nodes and comments. That is more within Mollom's area of responsibility.

Would that meet the needs?

StatusFileSize
new8.08 KB
PASSED: [[SimpleTest]]: [MySQL] 7,248 pass(es).
[ View ]

To that end - I've attached a stab at simple unpublish actions for both comments and nodes.