plone.formwidget.recaptcha in registration form, howto?

classic Classic list List threaded Threaded
14 messages Options
Balazs Ree-2 Balazs Ree-2
Reply | Threaded
Open this post in threaded view
|

plone.formwidget.recaptcha in registration form, howto?

Hi All,

what is the easiest way to include plone.formwidget.recaptcha into the
Plone registration form? I am interested in some working code example,
or simple documentation that describes how to do this.

Alternately, if there are no such examples (because noone really uses
this widget with Plone yet), then what is the suggested product for
adding captchas to the Plone forms? I am mainly interested in a
solution that can add captcha to the registration form, and, supported
to work together with the plone.app.discussion. (captchas in anonymous
commenting)

I was using the Quintagroup captcha before, it integrated good with the
registration form, but it seems to be not supported by
plone.app.discussion. Afaik plone.formwidget.captcha and
plone.formwidget.recaptcha are supported by and working well with
plone.app.discussion, but I find zero documentation that shows you how
to integrate these captchas to the registration.

Thanks in advance,

--
Balazs Ree, Greenfinity, LLC



------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
yuri-2 yuri-2
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

An option could be replace the registration form with a ploneformgen
one, you've more options ( including captcha and better validation).
Just point the form (using the same id for input fields) to the register
script.


Il 05/09/2011 12:27, Balazs Ree ha scritto:

> Hi All,
>
> what is the easiest way to include plone.formwidget.recaptcha into the
> Plone registration form? I am interested in some working code example,
> or simple documentation that describes how to do this.
>
> Alternately, if there are no such examples (because noone really uses
> this widget with Plone yet), then what is the suggested product for
> adding captchas to the Plone forms? I am mainly interested in a
> solution that can add captcha to the registration form, and, supported
> to work together with the plone.app.discussion. (captchas in anonymous
> commenting)
>
> I was using the Quintagroup captcha before, it integrated good with the
> registration form, but it seems to be not supported by
> plone.app.discussion. Afaik plone.formwidget.captcha and
> plone.formwidget.recaptcha are supported by and working well with
> plone.app.discussion, but I find zero documentation that shows you how
> to integrate these captchas to the registration.
>
> Thanks in advance,
>
>    


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Timo Stollenwerk Timo Stollenwerk
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

In reply to this post by Balazs Ree-2
Hi Balazs,

Am 05.09.2011 12:27, schrieb Balazs Ree:
> Hi All,
>
> what is the easiest way to include plone.formwidget.recaptcha into the
> Plone registration form? I am interested in some working code example,
> or simple documentation that describes how to do this.

plone.formwidget.recaptcha is a z3c.form-based widget, while the Plone
registration form is still formlib based. Therefore you can either user
collective.recaptcha or create your own z3c.form-based registration form
and use p.f.recaptcha.

Cheers,
timo

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Gil Forcada Gil Forcada
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

In reply to this post by Balazs Ree-2
Hi,

For captchas and p.a.d see http://plone.org/products/plone.app.discussion it lists both plone.formwidget.captcha and plone.formwidget.recaptcha.

Integration on the register form should be done on http://plone.org/products/collective.examples.userdata ? I haven't had to do that but I would start looking there.

Cheers,

2011/9/5 Balazs Ree <[hidden email]>
Hi All,

what is the easiest way to include plone.formwidget.recaptcha into the
Plone registration form? I am interested in some working code example,
or simple documentation that describes how to do this.

Alternately, if there are no such examples (because noone really uses
this widget with Plone yet), then what is the suggested product for
adding captchas to the Plone forms? I am mainly interested in a
solution that can add captcha to the registration form, and, supported
to work together with the plone.app.discussion. (captchas in anonymous
commenting)

I was using the Quintagroup captcha before, it integrated good with the
registration form, but it seems to be not supported by
plone.app.discussion. Afaik plone.formwidget.captcha and
plone.formwidget.recaptcha are supported by and working well with
plone.app.discussion, but I find zero documentation that shows you how
to integrate these captchas to the registration.

Thanks in advance,

--
Balazs Ree, Greenfinity, LLC



------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users



--

Gil Forcada
C/Llacuna, 166 2n.2a (Edifici Llacuna)

telf: 93.188.88.12
- 619.65.34.92
fax: 93.320.93.97

(08018) BARCELONA

[hidden email]

www.usecm.com


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Balazs Ree-2 Balazs Ree-2
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

In reply to this post by Timo Stollenwerk
Hi Timo,

On 2011-09-05 10:46:04 +0000, Timo Stollenwerk said:

> Hi Balazs,
>
> Am 05.09.2011 12:27, schrieb Balazs Ree:
>> Hi All,
>>
>> what is the easiest way to include plone.formwidget.recaptcha into the
>> Plone registration form? I am interested in some working code example,
>> or simple documentation that describes how to do this.
>
> plone.formwidget.recaptcha is a z3c.form-based widget, while the Plone
> registration form is still formlib based. Therefore you can either user
> collective.recaptcha or create your own z3c.form-based registration form
> and use p.f.recaptcha.

Thanks - yes I thought this would be the problem.

So then… I could "downgrade" to collective.recaptcha…, but then it
would not work with plone.app.discussion, is that correct?

--
Balazs Ree, Greenfinity, LLC



------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Timo Stollenwerk Timo Stollenwerk
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

Am 05.09.2011 13:04, schrieb Balazs Ree:
> So then… I could "downgrade" to collective.recaptcha…, but then it
> would not work with plone.app.discussion, is that correct?

No, it wouldn't. collective.recaptcha does not work with
plone.app.discussion. Have your tried to just install both (c.recaptcha
and p.f.recaptcha)?

Cheers,
timo


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
myroslav myroslav
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

In reply to this post by Balazs Ree-2
Hi Balazs,
Balazs Ree-2 wrote
I was using the Quintagroup captcha before, it integrated good with the
registration form, but it seems to be not supported by
plone.app.discussion. Afaik plone.formwidget.captcha and
plone.formwidget.recaptcha are supported by and working well with
plone.app.discussion, but I find zero documentation that shows you how
to integrate these captchas to the registration.
We have p.a.d patch to add support for quintagroup.plonecaptchas. It would be great if you'd be willing help test it.

Regards,

Myroslav Opyr
..................................................................................................... Myroslav Opyr ▪ CTO ▪ Quintagroup ▪ http://quintagroup.com ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
myroslav myroslav
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

Hi,

We've pushed quintagroup.plonecaptchas-4.1 with plone.app.discussion support and https://dev.plone.org/plone/ticket/12178 has patch attached that enables quintagroup.plonecaptchas in plone.app.discussion.

Regards,

m.
..................................................................................................... Myroslav Opyr ▪ CTO ▪ Quintagroup ▪ http://quintagroup.com ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
Balazs Ree-2 Balazs Ree-2
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

On 2011-09-05 21:00:46 +0000, myroslav said:

> Hi,
>
> We've pushed quintagroup.plonecaptchas-4.1 with plone.app.discussion support
> and https://dev.plone.org/plone/ticket/12178 has patch attached that enables
> quintagroup.plonecaptchas in plone.app.discussion.
>
> Regards,
>

Thanks: I will test if that works, and report if any problems.

However…

This part in the plone/app/discussion/browser/captcha.py:

   if self.captcha = "this":
          …
         self.form.fields['captcha'].widgetFactory = That

is the typical case that calls for named adaptation. That would enable
to plug in any more captcha widgets without requiring to patch
plone.app.discussion in the future.


--
Balazs Ree, Greenfinity, LLC



------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
myroslav myroslav
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

Hi,

I'd love to have this implemented in Adaptation way, but since plone.app.discussion didn't support Captcha plugins, we decided to implement minimal patch to make it work (like other captcha implementations did). It would be great to move out that logic out of p.a.d and implement small adapters in each of the Captcha packages.

Regards,

m.

On Tue, Sep 6, 2011 at 08:56, Balazs Ree-2 [via Plone] <[hidden email]> wrote:
On 2011-09-05 21:00:46 +0000, myroslav said:

> Hi,
>
> We've pushed quintagroup.plonecaptchas-4.1 with plone.app.discussion support
> and https://dev.plone.org/plone/ticket/12178 has patch attached that enables
> quintagroup.plonecaptchas in plone.app.discussion.
>
> Regards,
>

Thanks: I will test if that works, and report if any problems.

However…

This part in the plone/app/discussion/browser/captcha.py:

   if self.captcha = "this":
          …
         self.form.fields['captcha'].widgetFactory = That

is the typical case that calls for named adaptation. That would enable
to plug in any more captcha widgets without requiring to patch
plone.app.discussion in the future.


--
Balazs Ree, Greenfinity, LLC



------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users



If you reply to this email, your message will be added to the discussion below:
http://plone.293351.n2.nabble.com/plone-formwidget-recaptcha-in-registration-form-howto-tp6760446p6762775.html
To unsubscribe from plone.formwidget.recaptcha in registration form, howto?, click here.



--
.....................................................................................................
Myroslav Opyr   ▪   CTO   ▪    Quintagroup   ▪   http://quintagroup.com
˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
..................................................................................................... Myroslav Opyr ▪ CTO ▪ Quintagroup ▪ http://quintagroup.com ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
aclark aclark
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

In reply to this post by Balazs Ree-2
Hi,

FWIW:
http://blog.aclark.net/2011/08/09/plone-secrets-episode-3-collective-recaptcha-installation/

Alex



On 9/5/11 6:27 AM, Balazs Ree wrote:

> Hi All,
>
> what is the easiest way to include plone.formwidget.recaptcha into the
> Plone registration form? I am interested in some working code example,
> or simple documentation that describes how to do this.
>
> Alternately, if there are no such examples (because noone really uses
> this widget with Plone yet), then what is the suggested product for
> adding captchas to the Plone forms? I am mainly interested in a
> solution that can add captcha to the registration form, and, supported
> to work together with the plone.app.discussion. (captchas in anonymous
> commenting)
>
> I was using the Quintagroup captcha before, it integrated good with the
> registration form, but it seems to be not supported by
> plone.app.discussion. Afaik plone.formwidget.captcha and
> plone.formwidget.recaptcha are supported by and working well with
> plone.app.discussion, but I find zero documentation that shows you how
> to integrate these captchas to the registration.
>
> Thanks in advance,
>


--
Alex Clark · http://aclark.net


------------------------------------------------------------------------------
Malware Security Report: Protecting Your Business, Customers, and the
Bottom Line. Protect your business and customers by understanding the
threat from malware and how it can impact your online business.
http://www.accelacomm.com/jaw/sfnl/114/51427462/
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
serhat serhat
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

Hi,

I am a little bit confused and trying to grasp some internals. In your validate_site_feedback.vpy (for adding recaptcha), you are using

context.restrictedTraverse('@@captcha')

to access the captcha object, whereas in collective.captcha.form.widget.py I see

getMultiAdapter( (aq_inner(self.context.context), self.request), name='captcha' )

In both cases, a verify() function is called on the returned captcha object.
(un)restrictedTraverse alse uses acquisitions apparently, though looks like a complicated function.
Are these usages comparable? If so which one is preferable?
ikken-tobi is never wrong
David Glick (GW) David Glick (GW)
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?


On Feb 7, 2012, at 2:30 PM, serhat wrote:

>
> aclark wrote
>>
>> FWIW:
>> http://blog.aclark.net/2011/08/09/plone-secrets-episode-3-collective-recaptcha-installation/
>>
> Hi,
>
> I am a little bit confused and trying to grasp some internals. In your
> validate_site_feedback.vpy (for adding recaptcha), you are using
>
> context.restrictedTraverse('@@captcha')
>
> to access the captcha object, whereas in collective.captcha.form.widget.py I
> see
>
> getMultiAdapter( (aq_inner(self.context.context), self.request),
> name='captcha' )
>
> In both cases, a verify() function is called on the returned captcha object.
> (un)restrictedTraverse alse uses acquisitions apparently, though looks like
> a complicated function.
> Are these usages comparable? If so which one is preferable?

They are basically equivalent; restrictedTraverse is implemented in terms of getMultiAdapter. The implementation of "restrictedTraverse" is something like this:

1. Does the name start with '@@'? If so, fetch the view using getMultiAdapter like you showed above.
2. Otherwise, try to get the name as an attribute of the object being traversed.
3. If that fails, try to get the name as an view using getMultiAdapter
4. If that fails, try to get the name using item access (e.g. obj[name]) on the object being traversed.
5. If that fails, try to acquire the name as an attribute from parent objects.

(This is from memory, I might have 4 and 5 out of order.)

But in a restricted script like a .vpy you'll have to use restrictedTraverse because you can't import getMultiAdapter

David


----------
David Glick
 Web Developer
 [hidden email]
 206.286.1235x32

Engagement technology for social and environmental change.

http://www.groundwire.org



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
serhat serhat
Reply | Threaded
Open this post in threaded view
|

Re: plone.formwidget.recaptcha in registration form, howto?

David Glick (GW) wrote
They are basically equivalent; restrictedTraverse is implemented in terms of getMultiAdapter.
But in a restricted script like a .vpy you'll have to use restrictedTraverse because you can't import getMultiAdapter
Thanks for the explanation David. For the interested, I got collective.captcha working on author/site feedback forms with minimal changes on templates and validators. I got hints from collective.recaptcha changelogs ;)
ikken-tobi is never wrong