Recaptcha as MAgritte component

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Recaptcha as MAgritte component

dtrussardi@tiscali.it
Hi,
 
On Wed, 2009-06-17 at 12:22 -0300, Sebastian Van Lacke wrote:

>> Hi, I need to generate some graphics dinamically for my application
>> and Gemstone doesn't provide draw classes.
>> Specifically I want to implement a Captcha validation in a form, with
>> a distorted text.
>>
>> How can I do it?
>>
> If you don't need to do it on your own you can use the recaptcha
> service (http://www.recaptcha.net). Fortunately I wrote a component
> for this last week. This is available at
>
>
http://selfish.org/software/recaptcha
>
> It runs in Glass-dkh.231. If you have problems using it I'm happy
> to help out.
>
> Norbert
Now i use Recaptcha and it work well.

But i,m interesting to use it as Magritte  component ( only for simply use with other MADescription ) and i have do:

1) I copy the RSRecaptchaComponent to MARSRecaptchaComponent  ( as subclass
of  MAElementComponent ).

2) I create MARSRecaptchaComponentDescription with:
     defaultComponentClass ->  MARSRecaptchaComponent
     kind -> RSRecaptcha

3) Now when rendering a component with a description based on
MARSRecaptchaComponentDescription :

        task call:  ( collectionOfDescription asComponentOn: model )
                adValidateForm;
                addMessage: 'testo';
                yourself.

    The rendering work well ( i see MARSRecaptchaComponent right )

    But when test the hasValidateResponse with :

        validateSpecific: anObject
            super validateSpecific: anObject.
            anObject hasValidateResponse ifTrue:[  ] .


    the requestBody  ( RSRecaptcha method ) go in error:

     The anRSRecaptcha   parameters dictionary have :
        'challenge' ->nil
        'response' -> nil.

I think registerCallbacksOn: html d'ont work well.

Thank for any consideration.

    Dario


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki