Some suggestion

1 view
Skip to first unread message

venomous

unread,
Jun 13, 2007, 6:10:10 PM6/13/07
to TGCaptcha
Hello,
i have saw that the code is still at revision 17.
I'm really surprised, seems that few people are interested in this
project, i'm the only one that gets about 30/40+ fake registration
every days??
Anyway i have some suggestion.
I have seen that the generated code is really difficult to read, in
addition i have seen that the verification is case sensntive.
I think that should be a good idea to insert in the tgcaptcha.cfg a
variable to swap between case-sensitive and case-insensitive check.
I did somethink like this in the configuration file:

#Performa a case sensitive or isensitive check
tgcaptcha.checkmode='insensitive

and in the validator.py i get the variable and perform the check:

if checkmode == "insensitive":
if payload.plaintext.lower() != input_val.lower():
raise Invalid(self.message('incorrect', state), field_dict,
state)
else:
if payload.plaintext != input_val:
raise Invalid(self.message('incorrect', state), field_dict,
state)

Suggestion number 2.
It would be nice to have the wdget aligned. i mean up the image and
right down the input field for the verification.
It' simple to have the widget aligned, i have added a <br /> in the
widgets.py:
template = """
<span xmlns:py="http://purl.org/kid/ns#">
<img id="${field_id}_img"
src="${controller}/image/${payload}"
alt="${alt}"/>
<br />
<input
type="text"
name="${name}"
class="${field_class}"
id="${field_id}"
py:attrs="attrs"/>
</span>
"""
But i can't figure how to build the widget with the right label. I
would call the image
verification image
and the input field:
image verification
But i don't know if is possibile to do this.
Thanks for the widget!

Patrick Lewis

unread,
Jun 13, 2007, 10:32:32 PM6/13/07
to TGCaptcha
On Jun 13, 6:10 pm, venomous <xxvenomou...@gmail.com> wrote:
> Hello,
> i have saw that the code is still at revision 17.
> I'm really surprised, seems that few people are interested in this
> project, i'm the only one that gets about 30/40+ fake registration
> every days??
> Anyway i have some suggestion.
> I have seen that the generated code is really difficult to read, in
> addition i have seen that the verification is case sensntive.
> I think that should be a good idea to insert in the tgcaptcha.cfg a
> variable to swap between case-sensitive and case-insensitive check.
> I did somethink like this in the configuration file:
>
> #Performa a case sensitive or isensitive check
> tgcaptcha.checkmode='insensitive
>
> and in the validator.py i get the variable and perform the check:
>
> if checkmode == "insensitive":
> if payload.plaintext.lower() != input_val.lower():
> raise Invalid(self.message('incorrect', state), field_dict,
> state)
> else:
> if payload.plaintext != input_val:
> raise Invalid(self.message('incorrect', state), field_dict,
> state)
>

That seems reasonable; I'll go ahead and put it in. A couple other
ideas:
- For the 'random_ascii' text generator, you can define in the config
file what letters to show. So, you could just get rid of the uppercase
letters that you don't like.
- In subversion, there is a new text generator 'fivelettername' that
only deals in lowercase letters.

As far as 'hard to read' goes, that's true. I'd like to port
http://simplecaptcha.sourceforge.net/
but haven't gotten very far yet. Also, the reCaptcha widget (in
subversion) does seem a lot more readable to me.

I didn't quite catch what problem you were running into with the <br>
addition, but I found that using CSS could get me what I wanted with
the existing code. For instance, to left align both the image and the
input box, I put in:

.captchainputfield {display: block;}

Which seems to work for me. I'd rather keep out the <br> just in case
someone else wants to format things a bit differently (center
everything on the y-axis, for instance).

venomous

unread,
Jun 13, 2007, 11:34:12 PM6/13/07
to TGCaptcha
OK for the wideget i will try with css.

> - For the 'random_ascii' text generator, you can define in the config
> file what letters to show. So, you could just get rid of the uppercase
> letters that you don't like.
> - In subversion, there is a new text generator 'fivelettername' that
> only deals in lowercase letters.

I haven't seen the latest fiveletter generator. Anyway i think that a
case sensitive check i very helpful, but maybe there are people that
desn't need a very strict check, so i think that a variable for
turning off the case sensitive check is useful.

> As far as 'hard to read' goes, that's true. I'd like to porthttp://simplecaptcha.sourceforge.net/


> but haven't gotten very far yet. Also, the reCaptcha widget (in
> subversion) does seem a lot more readable to me.

I found vanasco_dowty a very good image generation. simplecptcha has
some nice image generation, but i prefer vanasco_dowty.
Whit php i have used this captcha generation system http://captcha.ru/en/kcaptcha/
if you look on this page http://captcha.ru/en/articles/visual/ you
will se some very nice captcha. The msn captcha that is very similar
to vanasco_dowty has a rating of 4 star.
Regardig recaptcha i don't think that should be too hard write
something of similar from the scratch and include it in this widget.
If i get a bit of spare time i will research a bit.

> As far as 'hard to read' goes, that's true. I'd like to porthttp://simplecaptcha.sourceforge.net/

Reply all
Reply to author
Forward
0 new messages