Antispam datatype for eZ publish 3.6+ ************************************* 1. Introduction --------------- It's possible to let anonymous people create objects or complete forms in eZ publish. In both cases, the form is available for the general public without the need to login. With the current state of the internet in mind, it will be only a matter of time before a spambot starts submitting the form. That is where this datatype steps in. It generates the, by now, familiar characters in an image that the user needs to retype to be able to submit the form. 2. Features ----------- The characters in the image will from now on be referred to as 'challenge'. Here are the highlights of this datatype: - Configurable challenge: > Custom length > Custom characters: lowercase, uppercase, numeric and user- defined characters > Possibility to ignore certain characters, e.g. similarly looking chars: i and l, ... - Configurable image: > Easy configuration through INI file > Possibility to have several image formats > Configurable image dimensions > Configurable colors: background, border, text and line > Configurable minimum font size > Configurable angle to rotate the characters > Configurable font name > Configurable amount of noise lines - Most configurable image parameters have extra randomness added: > Font size: minimum size + random size between 0 and 8 > Angle: random value between minimum angle (ini value) and its absolute value. If you specify -20 in the ini file, the angle will be between -20 and 20. > Noise lines added to confuse image analyzers > Noise lines pick a random color from the line color setting > Text colors are picked randomly as well > The base height of the characters is a randomized value too - Information collection support (with proper validation for is_required) - Content class import & export support 3. Installation --------------- Installation is very simple. Either get your copy of the datatype from SVN or download it from eZ Contributions area. - Put the antispam extension inside the extension folder. - Open the admin interface and go to Setup -> Extensions. - Tick the box in front of 'antispam' - Click on 'Apply Changes' 4. Configuration ---------------- The following configuration scenario asumes that you have a content class "comment" available and want to add anti spam support to it. The idea is that users can comment your content without the need to login. To provide this functionality, follow these steps: 1. Step: Add attribute Add an attribute called "captch" with the datatype "Anti Spam" to the "comment" content class. Some configuration options will be displayed for the attribute. The recommended configuration is: Password length: 6 Uppercase (A-Z): Yes Lowercase (a-z): No Numeric (0-9): Yes Custom: No 2. Step: Add template Add the following template code to the edit view of your "comment" content class:
{'To prevent commentspamming, please enter the string you see in the image below in the input box beneath the image.'|i18n('design/standard/content/edit')}
{'Capital letters and numbers:'|i18n('design/standard/content/edit')}