MT-Keystrokesを用いてスパムコメントをブロック

なかなかこのサイト触れていなかったんですが、久々にチェックしたらものすごい数のスパムコメント。
かなり醜いので MT-Keystrokes というプラグインを用いることに。

下記のソースをみれば想像つく通り、要は人力で入力したもの以外ははじくということ。
導入方法も以下の通り。
なるべく実際にコメントをくれる方達の手を煩わせないようにスパムをはじくには「MT-Keystrokes」いいプラグインです。

MT-Keystrokesをダウンロードし、ファイルを各フォルダにアップロード。

エントリー・アーカイブを開き、下記のように3カ所を追記です。

<form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" onsubmit="if (this.bakecookie.checked) rememberMe(this)">
<$MTKeystrokes$>
<input type="hidden" name="static" value="1" />
<nput type="hidden" name="entry_id" value="<$MTEntryID$>" />

<textarea id="comment-text" name="text" rows="7" cols="50" onkeypress="keystrokes(this.form)"></textarea>

 〜

<input type="submit" accesskey="s" name="post" id="comment-post" value="投稿" onclick="keystrokes(this.form)" />

Movable type | | トラックバック(0) |
Share |

トラックバック(0)

トラックバックURL: http://www.spiral-records.com/mt/mt-tb.cgi/1025

Facebookコメントプラグイン

Powered by Movable Type 4.261

Tumblr : log long long time ago