• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Bigger Captcha images?

Bigger Captcha images? 16 years 3 months ago #6256

  • lowlande
  • lowlande's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
RS Forms is working well, thank you. One of my clients pointed out that the Captcha images could be larger and easier to read, tho. He says many people his age are having a hard time reading the images.
Thanks,
Lowlande Web Design
The administrator has disabled public write access.

Re:Bigger Captcha images? 16 years 2 months ago #6295

Hello Lowlande.

You need to find the file /components/com_rsform/rsform.class.php

Make a backup copy of this file first! So if you do screw things up, you can simply replace it with the backup. Did I say, backup your file first?

In this file you will see the captcha generator. You can't miss it because there is a big comment line that says: /////////// CAPTCHA //////////////

First make the image box bigger:

Look for about line 640. This controls the size of the image code box - the new values you see here are the ones I'm using after tweaking the length and the height.

$imagelength = $this->Length * 25 + 26;
$imageheight = 60;
$image = imagecreate($imagelength, $imageheight);

Then look for the following at about line 657. The values you see here are the ones I use, both the font image size (30) and the random spread works for me, you might have to do some tweaking yourself until you get a happy balance.

for ($i = 0; $i < strlen($this->CaptchaString); $i++){
imagettftext($image,30, mt_rand(-15, 15), $i * 25 + 25,
mt_rand(40, 50),
$stringcolor,
$this->getRandomFont(),
$this->CaptchaString{$i});

After this I also adjusted the noise filter a little. Go to the next line down about line 665 and you will see this:

$filter->noise($image, 5);
//$filter->blur($image, 0);

I increased the filter image noise value from 2 to 5. Although you might prefer to leave it as is.

Good luck!
:)
The administrator has disabled public write access.

Re:Bigger Captcha images? 16 years 2 months ago #6375

  • sd.dan
  • sd.dan's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
wow this works great!! thank you claire, i cant put a price on your awesomeness :)
The administrator has disabled public write access.

Re:Bigger Captcha images? 15 years 11 months ago #7181

  • dominic.conrad
  • dominic.conrad's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 2
You can now increase the captcha text size within the component config screen itself. All the captcha settings are now controlled by captcha.class.php
The administrator has disabled public write access.

Re:Bigger Captcha images? 15 years 11 months ago #7203

  • epareja
  • epareja's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I've also been trying to increase the captcha size following the instructions - and found out that rsform.class.php no longer has "line 640" and that it refers to captcha.class.php. So the "old" instructions don't work now - or so it seems to me (a newbie).

But, Dominic, I'm afraid that can not find where to increse the text size in in the component config screen. Any hints? - Or, alternatively, any way to use other, clearer, captcha style - such as the one used in this board?

Thanks and greetings from sunny Madrid,
-Enrique
The administrator has disabled public write access.

Re:Bigger Captcha images? 15 years 6 months ago #8618

  • dominic.conrad
  • dominic.conrad's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 2
Enrique

Sorry to reply 5 months late!

If you're using the latest version of RSForm Pro, the figure you need to adjust is the second from bottom (Size) when you are editing the Captcha AntiSpam feature,


Hope that helps
Attachments:
Last Edit: 15 years 6 months ago by dominic.conrad.
The administrator has disabled public write access.

Re:Bigger Captcha images? 15 years 6 months ago #8645

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello,

If you are using the latest version there is no need to perform source code modifications. A configurable option has been added in the captcha field properties (if you are upgrading from an older version you will need to remove the captcha field and add it again).
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Bigger Captcha images? 13 years 10 months ago #13939

The instructions by claire.hall worked fine for me using RSForm (not pro). Thanks Claire! Just be aware the file to edit is now called forme.php, and the line numbers given are no longer correct - so just search in that file for the appropriate code.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!