Amazon.co.jp ウィジェット

Comment Spam Stopper plugin*コメントスパムを遮断!

コメントフォームからのスパムをシャットアウトするプラグインです。

Akismetプラグインだと、日本語でもほぼスパムと判定されてしまい…。
かなりの量のスパムが来るので、もしかしたら、投稿していただいた方のコメントを削除してしまった可能性が・・・いっぱいありそうです。

すいません(o*。_。)oペコッ

そこで、新しいスパムプラグインを入れてみました。


1.以下のサイトからプラグインをダウンロードする。
WordPress Comment Spam Stopper plugin

2.解凍し、ファイルを修正する。

wp-comment-spam-stopper.phpの36行目?40行目

$this->spam_question = “質問の内容”;
$this->spam_answer = “質問の答え”;

※以下、自分の好きな箇所に記入場所を追加する場合。
※1にした場合、自動的にWEBサイトを記入するタグの上に挿入されるので、自動挿入の場合は「3」へ。

wp-comment-spam-stopper.phpの55行目

$showField = 0;

を0にする。

書き換えたら保存し、

wp-comment-spam-stopper.phpの48行目?52行目の間のコメントアウトしている箇所

<!– Required anti spam confirmation –>
<p id=”aspamquestion”>
<label for=”spamq”><small><?php $aspamq = new WPcommentSpam(); echo $aspamq->get_spam_question(); ?> (required)</small></label>
<input type=”text” name=”spamq” id=”spamq” value=”" size=”15″ maxlength=”30″ tabindex=”3″ /> <small class=”whythis” title=”This confirms you are a human user!”>- <a href=”#spamq” style=”cursor:help;”>Why ask? <span>This confirms you are a human user!</span></a></small>
</p>

をテーマファイルのcomments.php、

<p>
<textarea name=”comment” id=”comment” rows=”10″ tabindex=”4″><?php jal_comment_content($jal_comment); ?>
</textarea>
</p>

の下当たりに、追加する。

例:

<p>
<textarea name=”comment” id=”comment” rows=”10″ tabindex=”4″><?php jal_comment_content($jal_comment); ?>
</textarea>
</p>
<!– Required anti spam confirmation –>
<p id=”aspamquestion”>
<label for=”spamq”><small><?php $aspamq = new WPcommentSpam(); echo $aspamq->get_spam_question(); ?> (required)</small></label>
<input type=”text” name=”spamq” id=”spamq” value=”" size=”15″ maxlength=”30″ tabindex=”3″ /> <small class=”whythis” title=”This confirms you are a human user!”>- <a href=”#spamq” style=”cursor:help;”>Why ask? <span>This confirms you are a human user!</span></a></small>
</p>

上記の

Why ask?

This confirms you are a human user!

には、適当な文章を入れておく。
※日本語を入れる場合、comments.phpと
wp-comment-spam-stopper.phpをUTF-8Nで保存しないと文字化けの可能性あり。

3.ファイルを保存して、それぞれの場所にアップロード。

4.管理画面で、プラグインを有効にする。

5.投稿して確認して見てください。

※ブログにログインしている状態だと、表示されません。
※確認にはログアウトした状態で試してください。

予想だと、英スパムはほぼシャットアウトしてくれるんじゃないかなと期待しています。

6.追記
もし、ブログにログインした状態で、表示されないようにするなら、
comments.phpの

<p>
<input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ />
<label for=”url”><small>Website</small></label>
</p>

の下に入れるといいです。

Tags:

HOME » WordPress » プラグイン関連 » Comment Spam Stopper plugin*コメントスパムを遮断!
Page 1 of 11