DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: MathGuard

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2009-05-26T09:54:53
Author:Dev-Team Typoheads
Email:rf@typoheads.at
Info 3:
Info 4:

EXT: MathGuard

Extension Key: mathguard

Copyright 2009, Dev-Team Typoheads, <rf@typoheads.at>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: MathGuard 1

Introduction 1

What does it do? 1

Screenshots 1

Users manual 2

Installation 2

Calling the Captcha from your extension 2

Configuration 2

TypoScript Configuration 2

Introduction

What does it do?

Integrates the captcha script MathGuard (http://freshmeat.net/projects/mathguard/) to be used by TYPO3 extensions.

MathGuard is a PHP class that inserts a small piece of HTML code into your HTML form which requires the user to evaluate an expression consisting of two random numbers. When user submits the form with the answer, the answer is hashed and compared to the security code that has been submitted as well. This way you can easily protect your forms from spambots. [ `http://freshmeat.net/projects/mathguard/ <http://freshmeat.net/projects/mathguard/>`_ ]

Users manual

Installation

Install the extension via the extension manager.

Calling the Captcha from your extension

Get the captcha code:

require_once(t3lib_extMgm::extPath('mathguard') . 'class.tx_mathguard.php');

$captcha = t3lib_div::makeInstance('tx_mathguard');
$captchaCode = $captcha->getCaptcha();

Validate the captcha:

require_once(t3lib_extMgm::extPath('mathguard') . 'class.tx_mathguard.php');

$captcha = t3lib_div::makeInstance('tx_mathguard');
$valid = $captcha->validateCaptcha();

Configuration

TypoScript Configuration

plugin.tx_mathguard: TS configuration.

Settings:

a

Settings:

b

Property:

a

Property:

b

Data type:

Description

Description:

Default

Default

question

a

question

b

String

Description

Enter a custom string to be shown before the captcha.

This string will get concatenated with the link to the MathGuard website.

Example:

TypoScript:

plugin.tx_mathguard.question = question. Please enter the result into the according field.

Output:

MathGuard question. Please enter the result into the according field.

Default

“security question. Please solve:” (plus translations)

color

a

color

b

String

Description

Change the color of the output of MathGuard.

You can enter anything that's a valid color in CSS.

Examples:

plugin.tx_mathguard.color = maroon

plugin.tx_mathguard.color = #CDCDCD

plugin.tx_mathguard.color = #222

plugin.tx_mathguard.color = rgb(123,123,123)

Default

red

img-2 EXT: MathGuard - 2