In this video we'll take a look at the more advanced, and user-friendly form of protection known as "Text Analysis". This is my preferred method of protection as it doesn't require users to complete and annoying CAPTHCA. We'll take a look at what happens when the analysis indicates spam and ham (not spam), as well as what happens when Mollom is unsure whether the content is spam or ham.
Protecting comment fields with Text Analysis
Now, let’s create an article, so that we can protect the comment field of articles and see how text analysis works. First though, let’s allow Anonymous users to post comments.
- Go to “People => Permissions” (admin/people/permissions)
- For the Anonymous User role
- Post comments [x]
- Skip comment approval [x]
- (Save permissions)
Depending on your situation, you might not want to allow anonymous users to skip the comment approval. Mollom is going to protect the form for both anonymous and authenticated users, so if a comment is classified as spam, it will never be seen. If it is classified as a legitimate post, then it will respect the permissions set here. So, if you choose not to allow anonymous users to skip approval, the only comments you approve will have already been deemed legitimate. Which means you’re dealing with significantly less junk than if you weren’t using Mollom.
Now, let’s go ahead and create some test content so that we have something to comment on. I’m going to use the Devel Generate module to quickly create some test content.
Now, I’ll switch over to Safari and click on the first article. You’ll see at the bottom that we can comment even though we are anonymous, but right now, the form is not being protected by Mollom. Let’s set that up now.
- Go to “Configuration => Content authoring => Mollom content moderation” (admin/config/content/mollom)
- Click “Add form”
- Select “Comment: Article comment form”
- Protection mode: Text analysis (since comments have a text area, we have something that we can analyze.)
- Text analysis checks: (This is where you select what type of inappropriate content to check for)
- [x] Spam
- [x] Profanity
- Text fields to analyze (Select which fields you’d like to have Mollom analyze. Keep in mind that this information is transferred to the Mollom servers, and they can only analyze text. So, omit non-text fields, and sensitive information such as credit card numbers)
- [x] Subject
- [x] Comment
- Text analysis accuracy: Normal (I'm really not sure how this affects the analysis. I searched on it, but couldn't find anything. I always leave this set to "Normal", and haven't had any issues, so that's what I'd recommend.)
- When text analysis is unsure: Show a CAPTCHA (One of the huge benefits of Mollom over other spam protection systems, is that it has an “Unsure” option. This setting lets you choose what to do with a post that returns an “unsure” result. You can “Show a CAPTCHA”, “Retain the post for manual moderation”, or “Accept the post”.)
- When text analysis identifies spam: Discard the post (If you’re worried about losing legitimate posts, you can choose “Retain the post for manual moderation”, but I’ve found that it’s much more of a hassle than it’s worth, as Mollom is very good at what it does.)
- [ ] Allow content to be moderated from the hosted Mollom moderation system (Here we can choose if this form will be moderated locally, or on the mollom site. Update: This is now out of beta! Checkout Acquia’s introduction video at http://mollom.com/blog/new-mollom-content-moderation-platform-launched)
Test the form
When I fill out the form, and enter "spam" in either the "Subject" or “Comment” field and click “Preview”, I get the notification: "Your submission has triggered the spam filter and will not be accepted.” So it works!
This time I'll enter "unsure". This time, because Mollom is unsure whether or not I've entered spam content, it asks me to complete a captcha to verify that I am a human. When I successfully complete the form, the submission is accepted.
This time I'll enter "ham". (Which is just Mollom's clever way of indicating content that is not spam). This time the form goes through on the first try because Mollom has determined that the submission is legitimate.