[TYPO3-dev] captcha for core
Franz Koch
typo.removeformessage at fx-graefix.de
Mon Jan 14 09:37:13 CET 2008
Hi Masi,
>> yes, there has to be a abstraction layer in the service controller.
>> Just have a look at lib/div for inspiration - there is already a
>> captcha controller present.
>
> Two questions:
>
> Do you think it can be turned into a TYPO3 service?
sorry, I'm not familiar with the generation of services.
> And are there any extensions around that couple an external captcha code
> with this controller?
as far as I know, unfortunately not. In my case I always used the
default 'calculation question' captcha as it is more userfriendly in my
eyes.
> Bonus question:
>
> Are you talking about the TER version or the SVN version of lib/div?
TER:
(http://typo3.org/extensions/repository/view/lib/0.1.0/info/class.tx_lib_captcha.php/);
I just noticed, that the captcha class is no controller - sorry for the
wrong information - it's been a while since I had a look at that file
itself and had it wrong in my mind. But in the class you see, that there
are only 2 methods for communication with the calling object
(createTest() and ok(), which should better be called isOk() or something).
You now might say - hmmm, looks a bit clean, not much configuration
options - but as I see it, the methods don't need any further
configuration. The label (plus label tag) of the captcha field f.e. is
something that has to be handled by the form class calling the captcha
service, and something like word length, colors etc. for graphical
captchas is something the service object itself has to care about.
The only additional parameters given to the captcha service might be the
$_POST data for the isOK() method and probably a 'prefix' for the
captcha fieldname, which is handled a bit different in lib/div and
therefore didn't have to be passed.
I'm not sure, but probably Elmar already has improved the captcha class
for his new SPL and whatever driven framework 'cool' - but I haven't
followed the development of that. Probably somebody should ask him.
Hope that helps.
--
Greetings,
Franz
More information about the TYPO3-dev
mailing list