這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Cookies for Comments

描述

This plugin adds a stylesheet or image to your blog’s html source code. When a browser loads that stylesheet or image a cookie is dropped. If that user then leaves a comment the cookie is checked. If it doesn’t exist the comment is marked as spam.
The plugin can also check how long it took a user to enter a comment. If it’s too fast it’s probably a spam bot. How fast can a legitimate user enter their name, email, web address and enter a well thought out comment?

For the adventurous, add these lines to your .htaccess and it will block spam attempts before they ever get to WordPress. Replace the Xs with the cookie that was set in your browser after viewing your blog. You can also find the cookie value by examining the page source code and looking for “css.php?k=XXXXXXXXXXXXXXXXXXX”. Make sure the lines go above the standard WordPress rules.

    RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
    RewriteRule ^wp-comments-post.php - [F,L]

If you use WordPress MU, replace wp-comments-post.php above with wp-signup.php to block spam signups.

    RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
    RewriteRule ^wp-signup.php - [F,L]

安裝

Copy into your plugins folder and activate. If you are using a caching plugin such as WP Super Cache make sure you clear the cache after enabling this plugin.

常見問題

The cookie isn’t being set by the plugin. Why?

If you use wp-minify make sure you add the Cookies for Comments CSS file to the list of CSS files that shouldn’t be minified.

評價

2020年11月18日
I'm using this plugin on several sites since years and it works like a charm. Also on a big website with thousands of daily views (using .htaccess)
2016年9月3日
There used to be 2 types of anti-spam plugins. The first one will block all comments, and also block shopping carts if you run a site where people need to pay. The second doesn't work. There is now a 3rd category, and this one not only works, but also will not block shopping carts. This anti-spam works well with Clickbank and WP eMember possibly other carts as well. Thank you so much! The last update stopped the anti-spam from Tips and Tricks HQ with their WP Security plugin, and I was inundated with 100s of spam comments per day. Now, this solution works, and everything is sent to spam, without messing with my shopping cart. Thank you so much. mmoexploiters.com
2017年2月7日
I'd been getting a dozen spams a day on two of my sites. We installed "Stop Spam Comments" on one and "Cookies for Comments" on the other. Both worked perfectly. No more spam. Thanks!
閱讀全部17個評價

貢獻者及開發者

“Cookies for Comments” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Cookies for Comments 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

0.5.5

  • Sanitize the cookie key before setting it. Props Matt Cutts and @planetzuda

0.5.4

  • Added a rejection message for when people trip over the cookie protection.
  • Plugin requires WordPress 3.1+ now.

0.5.2

  • Use an image to deliver cookie as well as stylesheet.
  • Don’t load WordPress to set the cookie. Makes pageload much faster!
  • Added “time to post comment” to comment notification emails.
  • Support for SSL sites.
  • If user is logged in don’t check for cookie.
  • Speed spammer checks to stop smarter bots and human spammers.

0.5.1

  • Generate cfc_key all the time if it’s missing, not just on serving the css html
  • Added MU signup form mod_rewrite rules to docs and admin page
  • Added Settings page link to plugins page.
  • Add explanation text to css file.
  • Add docs on how to use CFC to protect the MU signup form
  • Show htaccess rules on admin page.
  • Don’t let wp-super-cache cache this page.
  • Store cfc_key in sitemeta for WordPress MU sites
  • Added mod_rewrite rules to block spam comments before they get to WordPress