Recaptcha support for comments
|Reported by:||arteme||Owned by:||osimons|
From personal experience, comments added by AddCommentMacro are not filtered by any Trac spam filter plugins. Attached is a patch for 0.10-version of the macro to integrate the recaptcha.net support.
To use, one must explicitly turn on recaptcha feature in the ini-file:
[addcomment] recaptcha = on recaptcha_private_key = ... recaptcha_public_key = ...
When enabled, a recaptcha widget will appear below the comment input field and buttons. The default behavior is to require only anonymous users to solve the captcha. If logged in users are required to solve one as well, add
recaptcha_logged_in = on
to the aforementioned block in the ini-file.
In case if the captcha is solved correctly, pressing "Add comment" button will add the comment. If the captcha is solved incorrectly, "Add comment" will instead switch to "Preview" functionality, displaying a message that the captcha needs to be solved before the comment can be posted.