Bob's Guides

Why Subscribe?

As a Subscriber, you will receive access to certain parts
of the site that are hidden from others. You'll also get
email updates when new content is available
on the site or existing content is updated.

When logged in, you'll no longer see this request to
subscribe.

As an added incentive to subscribe, I have a bunch
of new and updated MODX extras I plan to release
as soon as I have a significant number of subscribers
to notify.

Privacy Policy

I'm too lazy to collect any information about you other
than the data you submit when you subscribe, which I will
never intentionally share with anyone.

As usual, Google and other entities may also collect
information about you during your visit.

Captcha Plugin Tutorial

I could tell you how many hours it takes to develop a MODX extra Transport Package complete with a build script, properties, multiple MODX elements, internationalized strings, error checks, and then fully test it, but you wouldn't believe me. If you use this extra and like it, please consider donating. The suggested donation for this extra is $5.00, but any amount you want to give is fine (really). For a one-time donation of $50.00 you can use all of my non-commercial extras with a clear conscience.

This utility provides CAPTCHA verification in the MODx
Manager login and elsewhere.

Captcha uses the following System Settings:

Setting

Usage

captcha.enabled

If set, CAPTCHA is used for Manager login (off when installed)

captcha.use_mathstring

If set, the image is a simple equation for the user to solve (on when installed)

captcha.words

Selection of words used for the image if captcha_use_mathstring is off

captcha.height

Height of image (default: 80)

captcha.width

Width of image (default: 200)

captcha.words

Words to use in CAPTCHA challenge

I recommend leaving the captcha.use_mathstring setting on. Bots have broken regular CAPTCHA images and they are no longer very secure. The mathstring option is much more difficult for them to get through.

You may add or delete fonts from the core/components/captcha/fonts directory
as long as there is at least one .ttf file there.

You may add or delete images from the core/components/captcha/noise directory
as long as there is at least one file there.

Captcha can also be used in other forms that require captcha.

You can roll your own function by placing the code below where you want the CAPTCHA image to appear and then, when processing the form, comparing the user's input to the $_SESSION['veriword'] variable.