Hi. I'm not sure if this is the right place to do this but I'll give it a try. In the past few days I've been developing a patch to integrate mollom module with simplenews subscription block form following the API instructions, with no success. I successfully managed to get mollom module to take simplenews block forms in account (admin), but after I configure them it still doesn't show the captcha image or any other kind of verification and simply allows the form to be submitted without any kind of protection.
I don't know if there's someone currently working on this feature, but even if there's not I'd like to get some guidance regarding this feature in order to complete my patch.
So far I included simplenews_mollom_form_list(), simplenews_mollom_form_info() and simplenews_mollom_form_info_alter() functions. I even read the test function code included in mollom module to try to figure out what I'm missing, but my only guessing is that it fails because I'm dealing with a block form and not a "normal" form per se.
Thanks in advance for any information and/or help you can give me in this matter!

Comments

Hi again! Well it turned out that the problem was that the form id of the block was saved using hyphen instead of underscores into the db, and that's why mollom module couldn't find it!! After fixing that, it took me a while to figure out I had to empty mollom module's cache, but at the end I did and the captcha image was finally rendered into the block :D. Now the problem is that when I submit the form, it gives me Call to undefined function simplenews_block_form_validate(), and when I print $form and $form_state it shows nothing. From all the code reading I've done so far, I got that mollom module works for node-based forms, but if I'm putting all the information required in my block form it should work, right? Seriously isn't there anyone who can help me?

If you wanna add some spam protection to simplenews input.form-text field (for anonymous users) you could use Botcha http://drupal.org/project/botcha. It lets you add the form id as you describe above

Title:Mollom module integration with simplenewsSimplenews integration/support
Version:7.x-2.3» 7.x-2.x-dev
Status:Active» Postponed (maintainer needs more info)

Isn't Simplenews based on nodes?

All node types can be protected by Mollom already.

Hi! Something happened and I failed to get email notification of your answers, sorry about that. I was trying to add mollom support to a simplenews block form, not to a node per se. When I tried to do so, the blocks I hade on my site didn't even show up in mollom's settings page.
Regarding miccelito's comment, I'll definitely give botcha a try! thanks :D!

Definitely didn't make it. I added the form id and saved it, but the captcha doesn't show. I'm still checking botcha settings hoping I missed something, but I'm starting to think you just can't protect forms contained in blocks. Nevertheless I'm still not giving up since in botcha's default settings, user block form appears listed as protected, so there may still be hope for those poor block-embbeded forms!

Neh, I'm giving up on this, any new ideas are totally welcomed, I'm feeling really frustrated here...

Install Botcha https://drupal.org/project/botcha i.e Botcha 7.x-3.2.
Enable the module.
Go to admin/config/people/botcha/form.
Click 'Add BOTCHA protection to form' link.
Add the simplenews block form id (would be something like 'simplenews_block_form_**' where ** is the number rendered for the current simplenews block).
Your block should now be protected.

Unfortunately, it's unclear what questions are unresolved here. The last stated error was:

Call to undefined function simplenews_block_form_validate()

However, that is not relevant to the Mollom integration. The error message indicates that the form constructor registered a form validation callback simplenews_block_form_validate(), but in the request that actually invokes the form validation, the function is not loaded and thus unknown to the system.

Most often, this is caused by form constructors that are dynamically loading additional code from other PHP include files, whereas the form constructor function is not necessarily re-executed when a form is validated. In turn, the form validation callback function is registered, but not loaded.

I am using simplenews, I am not a coder ... have always used mollom, which has always faithfully blocked submissions, including a recent onslaught of 0ver 24000 attempted submissions on a single day, for what is apparently a small site.

I would very much want to include simplenews forms, but none appears on the form addition page.
Could you please consider adding it to the forms it protects? I am sure many folks would profit from this as simplenews is widely used.

Thank you ...

Issue summary:View changes

It is necessary for mollom to also work on forms in blocks, as the simplenews subscribe block.

Is this in the roadmap?

Simplenews uses either a block of a form to allow people to subscribe. For some reason the form does not appear in the list of forms that Mollom can protect. I think having protection on the block would be nice. Adding the subscription form to the list that Molom identifies is at least a first step.