hey guys,
i installed captcha/textimage module so i can make sure my anon commenters aren't spambots. i wanted to customize my copy so that anon commenters would be invited to register. my issue was when I changed the copy to something like, "Type what you see above. Registration removes this step so join!"- that it also appeared in the captcha in the registration page which was redundant.
I ended up doing this to get around it: in captcha.module, I added a new arg, $candidate_trigger, when the captcha_type is being called:
in capcha.module
call_user_func_array($captcha_type.'_captchachallenge', array(&$form, &$_SESSION['captcha'],$candidate_trigger));
then in textimage.module, i edited the textimage_captchachellenge function to recieve and check the value of the arg like this:
in textimage.module
function textimage_captchachallenge(&$form,&$sessionStuff,&$whereAreWe) {
if($whereAreWe=="user_register_anonymous_user_captcha")
{
...customize #title and #description for anon commenters ...
} else {
...use generic settings...
}
the one BIG question i had is in the first snippet above has argument, &$_SESSION.. being passed to textimage_captchachallenge as an arg but in textimage.module, the function didn't specify the arg. Why is that??? in order to get it to work, i had to create a &$sessionStuff arg that does nothing. Everything seems to work but i don't get it?