Path

ez projects / peter's_random_anti-spam_image


Peter's Random Anti-Spam Image

UNIX name Owner Status Version Compatible with
peter's_random_anti-spam_image Peter Keung stable 1.1 eZ Publish 3.8+

Stop comment spam with this Captcha solution that generates random
anti-spam words. The GD Library is required to display the Captcha
image, and the FreeType library is needed to be able to use fonts
within the image.

Peter's Custom Anti-Spam Image for eZ Publish
Version 1.1
Compatible with eZ Publish 3.8+
Install instructions:
French instructions here:
1) Unzip the customantispam directory into the eZ Publish extension
directory.
2) Activate the extension in the eZ Publish Administration Interface by
clicking on the Setup tab, then the Extensions menu item.
3) Run the SQL query in customantispamtables.sql to insert the
necessary tables into the same database as your eZ Publish
installation.
4) Add a policy under the Anonymous Role (click the User accounts tab,
then the Roles and Policies link) to grant full access to the
customantispam module.
5) Add a new workflow. Click the Setup tab, then the Workflows menu
item. Click the New workflow group button and enter any name you want
(such as "Anti-spam").
a) In the new workflow group, click the New workflow button. Name it
"Anti-spam" and select the event "Event / Custom anti-spam", then
click the Add event button.
b) Alternatively, you can add the "Custom anti-spam" event to a
multiplexer workflow. This is useful if you have several events that
you need to run in the "content / publish / before" trigger (in step
6). In that case, select the event "Event / Multiplexer", then click
the Add event button. There are many more options in the Multiplexer
event, such as affected sections, languages, classes, versions and
users. For this workflow, you can leave all of the options as "all".
If you are using this extension to filter objects of the Comment
class, select that under the Classes to run workflow list box. In the
Workflow to run dropdown list, select the "Anti-spam" workflow. Then,
click the OK button.
6) Add a new trigger by clicking the Setup tab, then the Triggers menu
item. Under the "content" module, "publish" function and "before"
connection type, select the workflow "anti-spam" then click the Apply
changes button.
7) Find your comment template (for ezwebin, it's
extension/ezwebin/design/ezwebin/override/templates/edit/comment.tpl).
Add {set-block scope=root variable=cache_ttl}0{/set-block} at the top
of your template.
If you are putting the anti-spam protection into a different template
(such as directly in a blog post if you are using Kristof's
powercontent extension at to add a comment form directly in a
template), add cache-blocks around the sections of the page preceding
and following the anti-spam code:
{cache-block}
Start of page
{/cache-block}
anti-spam code
{cache-block}
Rest of page
{/cache-block}
However, cache-blocks are probably not necessary if you are editing the
edit/comment.tpl template.
Add the following code to the form, usually above the message text
area:

{def $antispam = custom_anti_spam()}
Anti-spam word



Screenshot

This project has no reviews yet. Be the first one to review it!

No forum messages yet.