WordPress:Combating Comment Spam

来自站长百科
Fludlen讨论 | 贡献2008年6月16日 (一) 14:20的版本
跳转至: 导航、​ 搜索


Comment spam is a fact of life if you have a blog. Using WordPress, you have not only solid built-in tools to prevent comment spam, there are also a wide range of comment spam protection and defense plugins and methods to choose from if you feel you need additional coverage and protection.

如果你有一个博客的话,评论垃圾广告是无法更改的事实。使用WordPress,你不仅有坚固的内置工具来防止评论垃圾广告,如果你觉得你还需要额外的防御和保护的话,还可以选择大量的评论垃圾广告保护和防御插件和方法,

There is no "one size fits all" method that will protect your comments; spammers use many tactics. Consider using multiple defenses. Remember spammers change the way they attack so you must keep your choices updated.

没有"万能"的一种方法来保护你的评论;spammers使用许多的策略。考虑使用多种防御措施。记住,spammers更改进攻你的方式,因此你必须要保持更新你的防御方法。

Disclaimer: The plugins and codes listed are not endorsed by anyone other than the plugin author. No responsibility is taken by WordPress for anything untoward that may occur.

不承诺:只有插件的作者才对列出的插件和编码负责。对于插件和代码可能引起的任何故障,WordPress不负有责任。

Criteria for listing: For any code to be listed here, it must have already been posted to the WordPress Support Forum OR to the Hackers mailing list, and then received an independent follow-up message of "works as expected for me without error."

罗列标准:列在这儿的任何代码,首先必须发表在WordPress 支持论坛或者Hackers mailing list杀那个,然后收到一个独立的信息,"如我期望的那样,无错误地运行。"

ANY code or links added to this page that have not satisfied the above criteria will be deleted.

这个网页上添加的任何代码或者链接,没有符合以上的标准,就会被删除。

Akismet Comment Spam Fighter

Akismet 评论垃圾广告斗士

Current versions of WordPress come with Akismet installed by default. Akismet uses a unique algorithm combined with a community-created database to "learn" which comments are comment spam and which are legitimate.

当前WordPress版本默认安装了Akismet。Akismat使用一个独特的运算法则,与团体创建的数据库,结合来"判断"哪个评论是评论垃圾广告,那个评论是合法的。

To enable Akismet on your WordPress blog, go to the Plugins panel and activate the Plugin. A menu is added to the Comments Panel and holds a list of "caught" comment spam.

要激活你的WordPress博客上的Akismet,转到插件面板并且激活插件。评论面板上添加了一个菜单,菜单上有一列"抓到的"评论垃圾广告。

If comment spam gets through Akismet's net, mark it as comment spam in your Comments Panel. Do not delete it. By marking it "comment spam", the information is sent to Akismet and added to the community-created database.

如果评论垃圾广告通过了Akismet的网,将它在你的评论面板上标记为评论垃圾广告。不要将这个垃圾广告删除。通过将它标记为"评论垃圾广告",信息就会发送到Akismet,并且会添加到WordPress团体创建的数据库中。

Frequently, check through the caught comment spam in the Akismet Panel to look for false/negatives, legitimate comment spam that has been caught by Akismet. Mark it as Not Spam and click Despam at the bottom of the page to remove these comments from the list.

要经常地在Akismet 面板上检查截获的评论垃圾广告,并且查找Akismet截取的合法的评论,false/negatives comment。并将这种评论标记为不是 垃圾广告,并且点击网页底部的非垃圾 广告来从列表中移除这些评论。

My Comments Get Caught By Akismet

我的评论被Akismet截取了

Akismet learns by those who mark comment spam as comment spam and legitimate spam is despammed. If your comments are being caught by Akismet, remove them from the Akismet Panel. It might take two or three times, but it will learn and automatically not designate your comments as spam.

将评论垃圾广告标记为评论垃圾广告,合法的评论会被取消垃圾广告的标记,Akismet从中领会。如果你的评论被Akismet抓取了,在Akismet面板上将评论移除。可能要尝试两三次才能够移除,但是Akismet会领会,并且自动地不会将你的评论标记为垃圾广告。

Commenters on your blog may have their comments caught by Akismet. If you do not regularly check your Akismet Panel, have an easy way of allowing readers to email you if their comment did not appear.

你的博客上的评论员的评论可能会被Akismet截取。如果你不是定期检查你的Akismet面板,尝试一种更加简单的方法,如果读者的评论没有出现,就让读者给你发送一封电子邮件。

With updates to the database and major changes to the software, this process may have to be repeated.

由于数据库的更新和软件发生的更改,这个过程可能需要重复。

If you continue to have problems with Akismet catching your comments or too many of your readers' comments, contact Akismet for more assistance.

如果Akismet仍然抓取了你的评论或抓取了太多的你的读者的评论,联系Akismet得到更多的帮助。

Combating Comment Spam FAQ

抗击评论垃圾广告 常见问题解答


Default Comment Spam Tools

默认评论垃圾广告工具

The following are the default comment spam tools that come with every installation of WordPress, in addition to the Akismet WordPress Plugin.

下面是每次安装WordPress时,所拥有的默认评论垃圾广告工具,此外还有Akismet WordPress插件。

Number of Links in Posts

文章中链接的数目

To change the number of links in comment posts, which may help stop comment spammers who include dozens of links in their comment posts, you can change the setting for the number of links permitted in a comment.

更改评论文章中链接的数目,会帮助组织评论spammers发送垃圾广告,这些spammers在他们的评论文章中包含了几十个链接,你可以更改一个评论中允许的链接的数目。

  • In the section which covers the number of links in a post, it is set to 2 by default. You could lower to one.
  • 在规定一篇文章中有多少链接的部分,这个链接数目默认设置为2。你可以将这个数字降低为1。

NOTE: Do not set this to zero or leave the field blank. It will send every comment to moderation -- not the desired effect.

注:不要将这个值设置为0或这个不填任何值。因为这样就会将每个评论都发送去审核—这并不是想要的结果。

Spam Words

垃圾广告词

If you encounter a word or phrase that is not in the Spam Words list, you can add it. You can also add the spam words found on the WordPress:Spam Words list to the list that comes with your WordPress installation.

如果你遇到了一个词或者短语不在垃圾广告词列表上,你可以添加上去。你也可以将垃圾广告词列表上的垃圾广告词添加到你的WordPress安装时附带的列表上。

  • 垃圾广告词文本区框中,你可以添加额外的垃圾广告词
  • Added words are to be on a single line with a single line break after them with no spaces in between the words. If you include a blank line, every single comment will be moderated.
  • 添加的词之间没有空格,是在一行之中,词的后面有一行将其与其它内容分开。如果你包含了一个空白的一行,每个单一的评论都要得到审核。
  • When a comment contains any of these words in its content, name, URI, e-mail, or IP, WordPress will hold it in the moderation queue.
  • 如果评论内容中包含有名称,URI,电子邮件或者IP中的任何一个单词,WordPress就会将评论设置到审核队列中。

Comment Blacklist

评论黑名单

Included on your Options > Discussion panel is a section called the Comment Blacklist. This is a list of words completely blacklisted from your blog.

在你的选项 > 讨论面板上包含一个称为评论黑名单的部分。这是你的博客上完全不能出现的一列词。

Be very careful what you add here. If a comment matches something here it will be completely nuked and there will be no notification. These "nuked" comments will not appear on your blog, but they will remain in your database marked as [spam]. Comments that are marked as [spam] are held in your database to educate "intelligent" anti-spam plugins, such as Akismet.

要非常注意你在这个黑名单中添加了什么内容。如果一个评论匹配了这个名单中的什么内容,那么这个评论就会在你没有得到任何通知的情况下,被删除。"删除的"评论不会出现在你的博客上,但是评论会仍然保存在你的数据库中,标记为[垃圾广告]。标记为[垃圾广告]的评论会被放到你的数据库中来提醒"聪明的"抗击垃圾广告插件,例如Akismet

Choose your blacklist words wisely!

明智地为你的黑名单选词!

Remember that partial words can match, so if there is any chance something here might match it would be better to put it in the moderation box. Blacklisting a word such as tramadol will automatically delete any comments containing tramadol, tramadols, bigtramadol, etc. But, blacklisting a word such as ass will automatically delete comments containing ass, asses, assistance, passionate, assumption, etc.

要记住也可以部分匹配,因此如果评论中有什么内容与黑名单中的词匹配,最好将这个评论放到审核框中。将一个例如tramadol的词归入黑名单,会自动地删除任何包含tramadol, tramadols, bigtramadol,等等的评论。但是,将一个如ass的词归入评论,会自动地删除含有ass, asses, assistance, passionate, assumption,等的词。

Moderate All Comments

审核所有的评论

Depending upon the amount of comments and control you want over comments on your WordPress site, you may want to moderate all comments on your site.

根据你希望你的WordPress站点上有多少个评论,以及你对评论的控制度,你可能想要审核你的站点上的所有评论。

In the Options > Discussion panel, check the box next to An administrator must approve the comment (regardless of any matches below). 在选项 > 讨论面板上,选中一个管理员必须批准评论(不管下面有什么匹配)旁边的框。

Pre-approve Comments from Old Commenters

老评论员先前批准的评论

You can also set your Options > Discussion panel options to allow previously approved comments to avoid moderation. Check Comment author must have a previously approved comment.

你也可以将你的选项 > 讨论面板设置来允许先前批准的评论,避免审核这样的评论。选中评论作者必须有一个先前批准过的评论

Restrict Comments to Registered Users

限制登录的用户发表查看评论

If you allow only registered users to comment, you can restrict comments to only registered users.

如果你只允许登录的用户来发表评论,你可以限制只有登录的用户才可以查看评论。

  • Under Membership:, select Users must be registered and logged in to comment.
  • 成员资格:下面,选择用户必须注册并且登录到评论

Inform Users When Comments are Moderated

当评论在审核的时候,通知用户

When people submit comments, they expect them to appear on your blog immediately. Implementing comment moderation and not telling people will almost certainly result in some people repeatedly submitting the same comment as they think it has disappeared. To prevent this from happening, and to avoid disgruntled and confused readers, inform people that their comment is under review by doing the following:

当人们递交评论的时候,他们希望评论能够立马出现在你的博客上。审核评论但是不通知,就会导致有的人不断地发送同一个评论,因为他们认为他们发送的评论消失了。要阻止这种情况的发生,就要避免产生有不满情绪或者困惑的读者,可以通过执行以下的步骤来通知人们,他们的评论正在等待审核:

If you use popup comments, edit comments-popup.php and if you do not, edit comments.php.

如果你使用弹出评论,编辑comments-popup.php,如果你不使用弹出评论,编辑comments.php

Look for the following code:

查找以下的代码:

<p>
<input name="submit" type="submit" tabindex="5" value="<?php _e("Say it!"); ?>" />
</p>
<p>
<input name="submit" type="submit" tabindex="5" value="<?php _e("Say it!"); ?>" />
</p>


Change that to the following, adding your own customization: 将上述的代码,更改,添加你自己的自定义内容:


<p>
<blockquote>


Comment moderation is in use. Please do not submit your comment twice -- it will appear shortly.

正在审核评论。请不要再次地提交你的评论—你的评论不久就会在站点上出现。

</blockquote>
<input name="submit" type="submit" tabindex="5" value="<?php _e("Say it!"); ?>" />
</p>

Spam Plugins

垃圾广告插件

There are many plugin options to choose from to add to WordPress' built-in comment spam protection and found in the Official WordPress Plugin Directory and WordPress Plugin Database.

有许多关于的WordPress内置的评论垃圾广告防御的插件,可以在官方 WordPress 插件目录WordPress 插件数据库中找到。

Comment Spam Hacks

评论垃圾广告 Hacks

The following are not recommended for average users. They involve editing WordPress core files. BACKUP your files first.

以下的是建议一般的用户来执行。这些包括编辑WordPress核心文件。首先备份你的文件。

Delete wp-comments-post.php
The ultimate end-all solution to your comment spam troubles. This will effectively disable comments and is good for stopping comment spam floods. No one will be able to comment on your WordPress site.

;删除wp-comments-post.php :这是解决你的评论垃圾广告问题的最后解决方案。这个方法会有效地消除评论并阻止泛滥的评论垃圾广告。没有人能够在你的WordPress站点上评论。

Delete wp-trackback.php
The ultimate end-all solution to your trackback spam troubles. This will effectively disable trackbacks and is good for stopping trackback spam floods. This will mean that no one will be able to trackback your posts, so do this after consideration.

;删除wp-trackback.php :解决你的trackback垃圾广告的最后方法。这个会有效地消除trackbacks同时有利于阻止trackback垃圾广告的泛滥,因此考虑后再执行这个步骤。

Denying access with .htaccess
While drastic, you can make modifications in your .htaccess file if you are using an Apache server. Check the Internet and Apache for more information.

;用.htaccess来否定权限:虽然非常激烈,如果你是用一个Apache服务器,你仍然可以更改你的.htaccess文件。更多的信息,请查看网络和Apache

Use nofollow
The nofollow attribute is another method used to strip spammers of their page ranks. According to Google, "when Google sees the attribute (rel="nofollow") on hyperlinks, those links won't get any credit when we rank websites in our search results." Under WordPress v1.5, the nofollow attribute is automatically added to all links in the comments section.

;使用nofollow: nofollow属性是另一种方法,用来阻止spammers的网页的排名。根据Google,"当Google在hyperlinks上看到了属性 (rel="nofollow") 的时候, 当我们在我们的搜索结果中排名网站的时候,这些链接不会得到资格和信任。"

See Also

也看看

External Resources

外部资源