Page 1 of 1

Captcha limit characters (ENGLISH pls.)

Posted: 23 Sep 2010, 12:35
by Tentaurus
Hi,

I would like to limit the catcha from 6 characters to 4.

I found some answers - but unfortunately not in english.

Can someone explain me how to change this?

Thx
Matthias

Re: Captcha limit characters (ENGLISH pls.)

Posted: 23 Sep 2010, 12:53
by Jan
Hi, please let me know the topic with not English explanation, I will take a look (there was some but in such topic, I think, there was not guide how to do it, only the place where the captcha class is stored)

Jan

Re: Captcha limit characters (ENGLISH pls.)

Posted: 23 Sep 2010, 15:32
by Tentaurus
Hi,
Since I can't translate I don't know if this article really describes the how-to...but the article title "seems" to be related...

Anyway: can you pls. tell me how?

Thx
Matthias

Re: Captcha limit characters (ENGLISH pls.)

Posted: 23 Sep 2010, 16:58
by Jan
I didn't such modification yet, so cannot give any advice there, but if you think some article describes it, just let me know the article, so I can see it and tell you: it describes it or not. If it will describe it and I will be able to understand it, I will translate it.

Jan

Re: Captcha limit characters (ENGLISH pls.)

Posted: 24 Sep 2010, 08:00
by Tentaurus
Ahoi Jan,

what's written in this thread?

Code: Select all

https://www.phoca.cz/forum/viewtopic.php?f=2&t=10500&p=43018&hilit=captcha+limit#p43018
I understand so far, that you have to change some code? I guessed it's only a kind of a definition (lenght)...

Matthias

Re: Captcha limit characters (ENGLISH pls.)

Posted: 24 Sep 2010, 19:48
by Jan
If you need to modify the captcha image (e.g. lenght of characters), you need to modify this file:

components/com_phocaguestbook/helpers/phocaguestbookcaptcha.php

there is a captcha class where you can change the output of the captcha.

The topic does not say how to do it. Because I didn't do such modification yet, have no experiences with this :idea: :(

So the only usefull advice is the name of the file where the captcha is located, there the number of characters needs to be modified.

Jan

Re: Captcha limit characters (ENGLISH pls.)

Posted: 17 Mar 2011, 23:06
by granedoy
I found the solution to this problem ... in

Code: Select all

components/com_phocaguestbook/helpers/phocaguestbookcaptcha.php
go to line 503
your modified the number 6

Code: Select all

$rand_char = PhocaguestbookHelperCaptcha::generateRandomChar(6);
Just that...

Im from Dominican Republic, Edgar Cotes :)