Hi,
This extension changes the captchas from graphic words to definable questions and answers. The settings allow you to create up to 8 simple questions and answers that will be randomly chosen in place of the captcha. So, for example, you could have:
Question: What is missing: North, South, East? Answer: West
Question: 2+2 is equal to? Answer: 4
Question: An … a day keeps the doctor away. What word is missing? Answer: apple
The captcha will then be replaced by one of these questions. The answer is case insensitive so for question 1 ‘West’ and ‘west’ will validate.
There is an additional setting: Answer hinting, that places text showing the number of characters required to complete the answer after the question. The hint will be wrapped in a span with the class ‘captcha-hints’ like so:
What is missing: North, South, East? <span class="captcha-hints">4 character(s) required</span>
Note that no other HTML tags are output so you can use whatever you wish to wrap and style the captcha question. The input is cleaned and processed by the existing form code.
Werner Gusset has kindly provided a German language file for this extension. You can download it from his site.
I hope that you find this useful. Let me know what you think of it and whether you think it could be improved.
Information can be found on our site here. The latest files will now be available on Bitbucket here.
Cheers
Dry
P.S. You will probably want to edit the lang.core.php file to change the error messages associated with either no captcha submitted or an incorrect one. The keys are ‘captcha_required’ and ‘captcha_incorrect’ on about lines 98 and 101 respectively. These changes are not required in the 2.x version.
Hey Dry.
I’m not sure if this is doable with extensions as I’m wholly unfamiliar with how they work, but I was wondering if it would be possible to dynamically add more than 5 Q&A pairs. I guess I’m just worried that if, after a while, the same questions keep repeating all the bots will catch on eventually.
Am I being overly paranoid?
Hey Dry. I’m not sure if this is doable with extensions as I’m wholly unfamiliar with how they work, but I was wondering if it would be possible to dynamically add more than 5 Q&A pairs. I guess I’m just worried that if, after a while, the same questions keep repeating all the bots will catch on eventually. Am I being overly paranoid?
Hi Crimson,
I am not sure that is easily doable. I can certainly add more Q&A fields and you don’t have to fill them all in for the extension work correctly.
Of course, it’s easy to change the questions on an infrequent basis and that is going to be completely transparent to your site users.
Cheers
Dry
There is an additional setting: Answer hinting, that places text showing the number of characters required to complete the answer after the question. The hint will be wrapped in a span with the class ‘captcha-hints’ like so:What is missing: North, South, East? <span class="captcha-hints">4 character(s) required</span>
Dry
Another little suggestion: could you wrap the hint in brackets () like
What is missing: North, South, East? <span class="captcha-hints">(4 character(s) required)</span>
otherwise we would need to add them in the extension file by hand
Thanks
There is an additional setting: Answer hinting, that places text showing the number of characters required to complete the answer after the question. The hint will be wrapped in a span with the class ‘captcha-hints’ like so:Dry Another little suggestion: could you wrap the hint in brackets () likeWhat is missing: North, South, East? <span class="captcha-hints">4 character(s) required</span>
otherwise we would need to add them in the extension file by hand ThanksWhat is missing: North, South, East? <span class="captcha-hints">(4 character(s) required)</span>
Oops,
Sorry Werner I didn’t see your additional request. You know, I wondered about adding that the first time around but figured that it would be better to leave it as clean as possible.
Lemme see if I can come up with something in the settings to let you choose whether to have them or not.
Cheers
Dry
Dry
That’s very good. I love this ext. Many thanks.
A new suggestion: what about an option to put the Hint on a new line? Would be handy sometime. And if you do this, give it a seperate CSS class. This way one could have the question bold and the hint normal.
If you want you can have the little lang file in German to include.
Hi Werner,
Yeah, that’d be great. Send it over and I’ll update zip. Or, if you’d prefer just send me the link to your site download and I’ll update the first post.
Dry A new suggestion: what about an option to put the Hint on a new line? Would be handy sometime. And if you do this, give it a seperate CSS class. This way one could have the question bold and the hint normal.
You can already do this because the hints appear at the end of the question. All you have to do is make the hint span a block level element (in CSS) and style whatever tag you’ve wrapped around the captcha appropriately. In fact, I’ve done something like this:
Template
{captcha}
CSS
.captcha {
font-weight: 900;
}
.captcha-hints {
display: block;
font-style: italic;
font-weight: 400;
}
Cheers
Dry
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.