Captcha limit characters (ENGLISH pls.)

Phoca Guestbook - creating guestbooks in Joomla! CMS
Tentaurus
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 23 Sep 2010, 12:32

Captcha limit characters (ENGLISH pls.)

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48739
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Captcha limit characters (ENGLISH pls.)

Post 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
If you find Phoca extensions useful, please support the project
Tentaurus
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 23 Sep 2010, 12:32

Re: Captcha limit characters (ENGLISH pls.)

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48739
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Captcha limit characters (ENGLISH pls.)

Post 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
If you find Phoca extensions useful, please support the project
Tentaurus
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 23 Sep 2010, 12:32

Re: Captcha limit characters (ENGLISH pls.)

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48739
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Captcha limit characters (ENGLISH pls.)

Post 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
If you find Phoca extensions useful, please support the project
granedoy
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 22 Feb 2011, 02:53

Re: Captcha limit characters (ENGLISH pls.)

Post 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 :)
Post Reply