[Product-Developers] Integration of Captchas with existing content-types?

Martijn Pieters mj at zopatista.com
Sat May 3 20:02:40 UTC 2008


On Sat, May 3, 2008 at 7:29 PM, Andreas Jung <lists at zopyx.com> wrote:
>  what is the recommended way nowadays to extend the functionality of Plone
> 3.0/3.1 compatible content-types with a captcha? collective.captcha seems to
> be the best implementation but it seems to be bound to formlib and I see no
> direct way for integrating it with Archetypes (using at.schemaextender).

collective.captcha is basically just a view, so you can use it
anywhere you like. I developed c.c for a customer project where we
used it in a formlib form, hence the included formlib integration, but
the captcha view itself is completely separate and integration with an
Archetypes field should be exceedingly simple.

Just use the formlib widget code as an example:

  http://dev.plone.org/collective/browser/collective.captcha/trunk/collective/captcha/form/widget.py

It simply looks up the view and calls the .image_tag() and
.audio_url() methods of the view, and uses the .verify() method to
verify the user-supplied string against the captcha.

-- 
Martijn Pieters




More information about the Product-Developers mailing list