Skip to main content.

Friday, August 06, 2004

In a local code repository (not in CVS yet), I'm working on better handling of errors when submitting comments, as well as on the addition of captcha images for anonymous commenting.

I've applied the changes I currently made to this blog, in order to test things a little. The captcha code is largely based on hn_captcha (GPL) from Horst Nogajski, but using a database table and generating image dynamically (created a generic CAPTCHA class for that purpose). The font I used is Dustismo (GPL) from Dustin Norlander. The captcha only shows up for users that are not logged in.

The changes to the error system are that the error is no longer displayed on a separate page, but rather above the comment form itself, with the previous values filled out in the comment form again. To do this, I had to make it possible for a page to send an action such as 'addcomment' to itself, rather than through action.php.

Let me know what you think.

Comments

Interesting... ;-)

Posted by Roel at Friday, August 06, 2004 16:59:04

What is the impact of this to plugin like CommentControl? I also working on adding comment notification in NotifyMe..... maybe I look at the code once it's in CVS. 8)

Posted by admun at Friday, August 06, 2004 17:54:07

Great! The captcha images will be wonderful! But... huh... shouldnīt it be done with a plugin?

The mentioned better comment error handling is one of the my most wanted features (http://forum.nucleuscms.org...). From a usability expert point of view(no, itīs not me :-P), itīs the right thing to do. Iīm very happy, thanks!

Posted by moraes at Friday, August 06, 2004 18:11:42

I like it, seems to be very fast in generating the image.

Is there a reason the characters are floating everywhere?

Posted by hcgtv at Friday, August 06, 2004 20:15:26

Yes. I believe this is to avoid some kind of character "scan" made by evil robots.

Posted by moraes at Friday, August 06, 2004 22:22:07

@moraes: yes, this should be a plugin :) To see some results quickly, I added it to the core at first (separate local copy; not in CVS). I'll move it into an NP_Captcha plugin soon.

Some core changes will be needed for this and similar features (e.g. the improved error handling or comment preview) to work. I'll comment on these changes later.

Posted by karma at Saturday, August 07, 2004 11:17:29

@hcgtv: captchas are (taken from captcha.net) "a program that can generate and grade tests that (1) Most humans can pass (2) Current computer programs can't pass.".

Having the characters float around makes it more difficult for software to apply OCR. I assume eventually smart enough software will pop up, but for now the captchas will do their job.

It would be even better if multiple fonts were used (the image generator can switch fonts for each character. I only found one good GPLed font)

Posted by karma at Saturday, August 07, 2004 11:24:43

@admun: it doesn't affect CommentControl in any way. The captcha check is done at the time the comment is validated

Posted by karma at Saturday, August 07, 2004 11:25:40

Now I'm running the CVS version and I wonder if the better comment error handlig is already working (CVS repository says yes). I change anything in the error skin or the commentform_notloggedin template?

The portuguese language file was updated, I will send you the CVS version after refining the translation. :-)

Posted by moraes at Monday, September 06, 2004 06:24:47

@moraes: It's in cvs and the update of commentform_notloggedin should be enough.

Two things to check when it still fails:

1. Make sure the form posts back to the same page, instead of action.php:

"<form method="post" action="#nucleus_cf">"

rather than

"<form method="post" action="<%formdata(actionurl)%>"> "

2. Make sure an <%errordiv%> is present

(the error skin is not used with the new error handling)

Posted by karma at Wednesday, September 08, 2004 18:55:22

Got it. I should have tested the new commentform_notloggedin, but I was too lazy because it is very changed from default. That's why I never update the forms folder. :-P

Thanks.

Posted by moraes at Wednesday, September 08, 2004 19:51:02

karma, this is a great plugin, and great idea :-) Wonderful!

Posted by rADo at Thursday, September 09, 2004 12:45:03

i am testing your captcha. I am trying to implement this same hn_captcha class but don't know how to combine it with another form. Here is my where I am working <a href="http://fastblogit.com/enter">work in progress</a>

Posted by Seth Russell at Friday, January 20, 2006 23:44:46

sorry let me watch that again. you can delete these if you want. http://fastblogit.com/seth/

Posted by Seth Russell at Friday, January 20, 2006 23:46:36

thanks very much, i am much less irritable since I installed the np_captcha.

Posted by paul at Saturday, January 28, 2006 15:00:59

Add Comment

This item is closed, it's not possible to add new comments to it or to vote on it