
Download Challenge 1.1 Now!
Introduction
Welcome to the Challenge plugin documentation page. Challenge is a WordPress plugin based on and improved over Steve Herod’s “Did you pass math?” plugin, Challenge restricts comment spam by throwing the commenter a challenge. The default challenge is an addition and multiplication math question. The challenge and the answer can also be user-defined. They can be of anything including PHP-evaluatable expressions. The positions of the challenge and the answer are also customizable via the plugin’s own ‘Options’ page in the Wordpress Admin page. This plugin can also be used to ensure the commenter’s basic intelligence before he/she/it leaves a comment.
The current version of Challenge is version 1.1 (see history below). Download is available in zip format. Please leave a comment in the original post for bug report and additional support.
Challenge is under GPL and is available for free. You can download, use, modify, or keep in the back of your plugins directory in total disregard for eternity.
Features
- Its own Options panel under “Options,” to ease setup and changing of settings
- Ready to use right after installation with its default challenge and answer:
- Three random numbers
- Random selection between two equations: A + B x C or A x B +C
- Customizable position of the challenge question wrt. to the answer box.
- Customizable position of the answer box in the comment area.
- User-definable challenge question (including PHP-evaluatable expressions)
- User-definable answer to the challenge (including PHP-evaluable expressions)
- Multiple answers can be specified.
- Challenge will be automatically disabled if the commenter has an account and is logged on.
Installation
- Get the plugin
- Drop it in your plugins folder (/wp-content/plugins)
- In your Wordpress admin panel, click Plugins, and click ‘activate’ for Challenge.
- That’s it. The plugin is ready to use right out of the box. Go to you comment page as a non-user and you will see the default challenge in its default position.
- To customize, fill out the relevant information in the Challenge Option Panel (accessed by going to the Wordpress Admin Panel, Clicking Options, then Clicking Challenge).
Customization
The power (and fun) of Challenge is in its highly flexible customization. Instructions are available right on the option page. Below is mostly the same information:
- Challenge Question
You can type in any question. HTML code may be used. For a math question, insert an expression in the question within [] brackets. The [] expression must be in the format %variable=expression, where expression must be PHP-evaluatable . For example, specifyingWhat is the sum of [%R1=rand(0,10)] and [%R2=rand(0,10)]?
will produce: “What is the sum of 3 and 4?”, “…0 and 10?”, “…5 and 2?”, etc, and the variables %R1 and %R2 will be remembered (for use in matching the answer, see below).
- Question Position
You can select where the challenge question will appear beside the answer box (left, right, above, below). - Answer
If you specify a question of your own, you must also specify the answer here. Answer is not restricted in langauge or to a single word, and multiple answers can also be specified. For example, when below is specified:yes maybe yeah of course I guess so yup 是的 沒問題 はい もちろん
any sequential match of the above words will have answered the challenge. For answer to a math question, type in a PHP-evaluatable expression containing the variables defined in the question. For example, the answer to the above example can be written as:
%R1 + %R2
and the result of will be matched with the answer given by the user. Answer matching is always case-insensitive.
- Answer Position
You can select where the answer box will appear before or after the comment box. - Wrong Answer
This is the response given to the commenter if the challenge is failed. Default is “You have failed the challenge!” - No Answer
This is the response given to the commenter if challenge is not answered. Default is “Answer the challenge!”
Known Issues
- Causes conflict with the “WP-PostRatings” plugin, and possiblely with other plugins that also use javascript to insert elements into the post and comment areas. When both plugins are activated, the challenge box will disappear from the comment area, and you will not be able to submit your comment successfully.
Version History
- Version 1.1
- Fixed “Wrong Answer” & “No Answer” always showing default message.
- Fixed question and answer positions not being initialized in a new installation.
- Version 1.0
- First release
Bugs and Additional Support
Please leave a comment in the original post for bug report and additional support.




