Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-15 08:53:10

Kossatsch
Member
From: St. Wolfgang
Registered: 2004-04-01
Posts: 198
Website

[request] Antispam plug-in by answering questions

Here (e.g. here can find a kind of anti-spam measure I would like to implement in TXP.

This measure is a question (e.g. “4+5 =”, “What was the first name of John Wayne?”, “Type Hello” or “How is the name of this blog?”) that requires an answer easy to find and to enter for any rather intelligent reader.

How about basing this on the asy_captcha plug-in? Shouldn’t be too difficult, should it?

Thx in advance


txp at irox.de since spring 2004 (g1.17) & at roxomatic since 2006.

Offline

#2 2007-03-15 09:40:45

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: [request] Antispam plug-in by answering questions

When the plugin-API was deployed I offered this documented example plugin that pretty much does what you want.

http://www.sencer.de/code/txp/asy_spamexample.phps
http://www.sencer.de/code/txp/asy_spamexample.txt

Of course it’s only meant to illustrate how to use the API, so an actual useful plugin would probably go beyond that. If you really want to make it “dynamic” (different question each time), you must couple it to the comment nonce, which is what I do in asy_captcha, but it’s also documented in the wiki:
http://textbook.textpattern.net/wiki/index.php?title=Combat_Comment_Spam#Writing.2FPorting_an_Anti-Spam_Plugin

(getNextNonce()/getNextSecret() to pose a question, and the “nonce” and “secret” returned by getComment() to check an answer – see the source of asy_captcha…).

Yes, I’d welcome a few more anti-spam plugins. :)

Offline

Board footer

Powered by FluxBB