Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Overview

Tip

modCaptacha was written by Geoff Bowers, Daemon for personal use. The code is released under Apache License 2.0.

Excerpt

modCaptcha is a FarCry plugin that adds a formtool field using the LylaCaptcha component for captcha validation. The formtool is attached to a boolean property in your content type.

Thanks to Peter J. Farrell et al for the captcha code.

Tip

modCaptacha was written by Geoff Bowers, Daemon for personal use. The code is released under Apache License 2.0. modCaptcha requires a minimum of FarCry Core 4.04

Note

Raise issues and the like at the modCaptcha Project Home

Download

You may check out a read-only working copy anonymously over HTTP:
svn checkout http://modcaptcha.googlecode.com/svn/trunk/ modcaptcha

Installation

Copy all the modCaptcha plugin files to the plugin directory:

...

Then simply reinitialise your application to make the formtool available.

How do I implement the captcha?

The formtool is used just the same as any of the formtools you may be familiar with in v4.0 – just create a boolean property and set the fttype="lylacaptcha". The captcha should be automatically created and managed.

...

Code Block
title./packages/types/farBlogComment
<cfcomponent extends="farcry.core.packages.types.types" name="blogcomment" displayname="Blog Comment" hint="blog comment">

<cfproperty ftseq="1" ftfieldset="Blog Comment" name="subject" type="string" hint="Subject of comment." required="no" default="" blabel="true" ftlabel="Subject" ftvalidation="required" />
<cfproperty ftseq="2" ftfieldset="Blog Comment" name="description" type="longchar" hint="Comment description." required="no" default="" ftlabel="Description" />
<cfproperty ftseq="3" ftfieldset="Blog Comment" name="commenthandle" type="string" hint="Name or handle of poster." required="no" default="" ftlabel="Name" />
<cfproperty ftseq="4" ftfieldset="Blog Comment" name="email" type="string" hint="Email address of poster." required="no" default="" ftlabel="Email" ftvalidation="validate-email" />
<cfproperty ftseq="5" ftfieldset="Blog Comment" name="website" type="string" hint="Website address of poster." required="no" default="" fttype="url" ftlabel="Website" />
<cfproperty ftseq="6" ftfieldset="Blog Comment" name="parentid" type="uuid" hint="Parent content object reference." required="no" ftjoin="farblogpost" ftlabel="Parent Blog Post" />

<cfproperty ftseq="7" ftfieldset="Blog Comment"
<!--- implement modCaptcha --->
<cfproperty name="bCaptcha" type="boolean" hint="Flag for lylacaptcha." default="0" required="no" fttype="lylacaptcha" ftlabel="Captcha" />

</cfcomponent>