Have you ever gone to your Akismet plug-in in Wordpress and NOT had spam to clear out?你有没有去你的Akismet插件在WordPress的,并没有垃圾清除? Even seeing it there can be depressing and a strain on your servers resources.即使看到它就不会有压抑和紧张的服务器资源。 Why even let spam bots eat up your processor with extra SQL queries!为什么甚至让垃圾邮件僵尸吃掉你的处理器额外SQL查询! I’ve come up with a spam defense lineup where 99% of my spam stops bots before they even get logged as spam!我来了一个垃圾邮件的防御阵容,其中99 %的垃圾站我面前,他们的bot甚至登录为垃圾邮件!

Defense Line 1: Number CAPTCHA 防线1 :数CAPTCHA
Two months ago I posted a series of 5 Spam Blocking Posts .两个月前,我张贴了一系列5垃圾邮件拦截员额 In one of those, I introduced my Enhanced Number Equation method.在其中的一个,我介绍了我加强数方程的方法。 I have essentially refitted that code for Wordpress use!我已经基本上改装,代码为WordPress的使用! I actively use this on several of my own sites.我积极利用这个几个我自己的网站上。 Navigate to a comments section in a content page on one of my custom coded sites: mmorpgexposed.com .浏览到的意见节在内容上我的一个自定义编码的网站: mmorpgexposed.com It has worked wonders for me!它创造奇迹的我!

Here’s the steps on how to implement it.这里的步骤,就如何贯彻落实。 Note I’m using Wordpress 2.6.请注意我使用WordPress的2.6 。 If you’re using an earlier or later version it should work, but make sure you BAKCUP before you edit anything.如果您使用此之前或之后的版本应该工作,但一定要BAKCUP之前,先修改任何东西。 Also make a note somewhere that you’ve edited this file so you can carry over the changes in the future.也使地方说明您编辑此文件,因此您可以结转的变化,未来。

  1. <?php
  2. //FILE: /wp-content/themes/YOURTHEME/comments.php - where YOURTHEME is the name of the theme you’re currently using
  3. //FIND: <textarea name="comment" id="comment" rows="10" cols="35" wrap="virtual" tabindex="4"></textarea>
  4. //AFTER any closing tags for your paragraphs or label setup, add:
  5. function numbercapcha ( ) {
  6. $firstnum = rand ( 5 , 8 ) ;
  7. $secondnum = rand ( 1 , 4 ) ;
  8. $coinflip = rand ( 1 , 2 ) % 2 ;
  9. if ( $coinflip == 0 ) {
  10. $math = $firstnum $secondnum ;
  11. $operators = array ( " " , "Added To" , "Plus" ) ;
  12. $operatorschoice = rand ( 1 , 3 ) % 3 ;
  13. } else {
  14. $math = $firstnum - $secondnum ;
  15. $operators = array ( "-" , "Minus" ) ;
  16. $operatorschoice = rand ( 1 , 2 ) % 2 ;
  17. }
  18. echo $firstnum . " " . $operators [ $operatorschoice ] . " " . $secondnum . " = <input type= \" text \" name= \" number \" maxlength= \" 2 \" size= \" 5 \" id= \" numcapcha \" style= \" width: 25px; \" >" ;
  19. return $math ;
  20. }
  21. // Contiue with your theme and use this snippit of PHP to generate the input field:
  22. // <? $_SESSION['capcha'] = numbercapcha(); ?>
  23. // Example usage shown below:
  24. ?>
  25. < p >< label for = "security" > Security </ label >< ? $_SESSION [ ‘capcha’ ] = numbercapcha ( ) ; ? ></ p >
  26. <?php
  27. //FILE: /wp-comments-post.php (in the root directory)
  28. //FIND: $comment_type = ”;
  29. //This should be on like 63 in Wordpress 2.6
  30. //AFTER ADD:
  31. if ( is_numeric ( $numcheck ) && $sessioncapcha == $numcheck ) {
  32. //This should be left blank unless you want to do something else if the number was answered correctly
  33. } else {
  34. //Number wasnt answered correctly - Show Error
  35. wp_die ( __ ( ‘Error: You did not answer the security question correctly.’ ) ) ;
  36. }
  37. ?>

The above code may differ slightly with the HTML only.上面的代码可能会略有不同同的HTML只。 You may want to tidy it up to suit your theme.您可能要整洁它以适合您的主题。 I also use CSS to modify the display which I have not provided here.我还使用CSS来修改显示我在这里没有提供。 That goes a bit beyond the goal for today.这一点不用超出了今天的目标。

Here’sa very quick howto for some CSS styling to get you started, though it doesn’t have to be all that incredibly fancy right away:下面如何非常快一些的CSS风格让您轻松上路,但不一定是所有难以置信的幻想马上:

Also, I have intentionally placed the error code before any other error is checked.另外,我有故意把错误代码之前,任何其他错误检查。 Checking that the CAPTCHA is correct first saves the effort of processing anything else until it is determined that the CAPTCHA has been entered correctly.检查的Captcha是正确的第一次努力节省处理别的直到它确定的Captcha已输入正确。

Defense Line 2: Akismet Or Defensio 国防部第2行: Akismet或Defensio
Akismet is your second line of defense for comments. Akismet是您的第二道防线的意见。 It used to be your first, and you’d have to sort through all that garbage!它曾经是你的第一个,而且你必须通过一种所有垃圾! You should see a big time savings here but it should still exist.您应该会看到一个大节省了时间,但是它应该依然存在。 I also posted How Akismet And Defensio Create Another Line Of Spam Defense a while back .我还张贴如何Akismet而Defensio创建另一行垃圾邮件防御而回 If you’re not already using one, try them out.如果您尚未使用,尝试他们。 Long story short, Akismet caught more spam than Defensio did… but times change, try them both.长话短说, Akismet被更多的垃圾邮件比Defensio没有...但时代的变化,尝试他们俩。

Dowload Akismet Wordpress Plug-in Or Download Defensio Anti-Spam Wordpress Plug-in 点击WordPress的Akismet插件 下载Defensio防垃圾邮件WordPress的插件

Defense Line 3: Simple Trackback Validation 防线3 :简单的引用验证
Blocking Trackback and Pingback spam has never been so easy.阻断引用和Pingback垃圾从来没有象现在这样轻松。 Wordpress users are very susceptible to being abused to this kind of spam which is becoming much more popular for a spammers choice of attack. WordPress的用户很容易被滥用,这样的垃圾邮件已成为更受欢迎的选择垃圾邮件的攻击。

This plug-in checks two things which can both be toggled on/off for customization:此插件检查的两件事都可以切换/关闭定制:

  1. Checks the IP address of the webserver sending the request and checks it against the trackback URL that’s being provided.检查的IP地址的网络服务器发送请求,并检查它的引用网址的提供。
  2. Checks that your URL is actually on the page that the referring URL is sending from.检查您的网址实际上是在网页上的网址是指由派遣。

What I love about it most, is it also marks a trackback by temporarily renaming it to “BLOCKED BY STBV” as highlighted in the example below.我很喜欢它最,它也标志着引用暂时命名为“封锁STBV ”中所强调下面的例子。 If you mark it as accepted, it will remove the titling and make it active.如果您标示为接受,它将消除所有权,使之活跃。

Download Simple Trackback Validation Plug-in . 下载简单引用验证插件 You can also go to the STBV plug-in homepage and read up about it a lot more.您还可以去STBV插件的主页 ,并宣读了关于它更多。

Other Options 其他选项
That concludes the setup that I have which is safeguarding me so well that I actually had to wait a week so that I could grab that trackback picture I used above for this post.这最后的安装,我是维护我这么好,我实际上不得不等待一个星期,这样我可以抓住的引用图片我用上面的这一职务。 However, I find it necessary to share with you additional options that I combed through in the process of setting up the redesign of this blog .然而,我认为有必要与你们分享更多的选择,我梳理的过程中,建立了重新设计的这个博客。 You might also have a earlier or later version of Wordpress in which some of these methods may not work.您可能也有较早或较晚版本的WordPress的,其中一些这些方法可能无法正常工作。 Therefore you’ll have a few more options:因此,您有更多选择:

WP-Hardened-Trackback is a lot like STBV. 可湿性粉剂硬化,引用是一个很像STBV 。 When I tried it, it didn’t work with 2.6.当我尝试了,但它并没有与2.6 。 If for whatever reason STBV doesn’t work for you because you havent upgraded yet, try this out.如果不管出于什么原因STBV并不为你工作,因为你还没有havent升级,尝试了这一点。

Math-Comment-Spam-Protection is the exact same idea as what I presented to you in Defense Line 1. 数学评论垃圾邮件保护是完全相同的想法就是我向你提出的国防1号线。 However the plug-in only works for Wordpress 1.5.2, 2.0.x and 2.1.然而插件仅适用于WordPress的1.5.2 , 2.0.x和2.1 。 I tried it out and had a lot of problems with it which is why I modified my previous solution for another site to fit into Wordpress.我尝试了,并有很多问题,它这就是为什么我修改我以前的解决方案,另一幅融入WordPress的。 Again, if you’re on an old version, maybe my hack wont work for you.同样,如果你是一个旧版本,也许我砍习惯为你工作。 So try this!所以试试这个!

WP-SpamFree is a plug-in that claims to do it all. 可湿性粉剂, SpamFree是一个插件,要求做这一切。 It weeds out bots by assuming they cant use JavaScript and Cookies.它杂草了漫游的假设,他们不能使用JavaScript和Cookies 。 While this will reduce a lot of spam, I feel there is a small enough user base not using JavaScript or cookies, that this might cause a problem for users that want to comment on your form.虽然这会减少很多垃圾,我觉得有一个足够小的用户群不使用JavaScript或饼干,这可能会导致问题的用户,希望您的评论形式。 The point in using this would be so that a user doesn’t have to enter an extra CAPTCHA field.这一点在使用这将是使用户不必进入一个额外的CAPTCHA领域。 But at the end of the day, if a user cannot add or subtract single digit numbers, I don’t know if their comment would be of much use to anyone anyways.但是在一天结束时,如果用户不能添加或减去个位数的号码,我不知道如果他们的意见将是多大用处反正任何人。 Another reason you might use this is it would be somewhat less technical then copying/pasting the code I have for the CAPTCHA above.另一个原因您可以使用,这是将技术不太然后复制/粘贴代码为我的Captcha以上。 There is also ton of documentation on their WP-SpamFree’s website .也有大量的文件,其可湿性粉剂, SpamFree的网站。

Conclusions 结论
I recent read a post on Shoemoney.Com about his 60,000 comments mark .本人最近读的Shoemoney.Com后对他的意见60000大关。 He commented it with this:他评论了这:

“Its hard to imagine 60k comments.   Especially when about 80% of them are manually approved with all the spam filters we have.” “它很难想象60k的评论。尤其是当80 %左右,其中手动批准所有的垃圾邮件过滤器我们做到了。 ”

Maybe Shoemoney should implement some of these things to save some time.也许Shoemoney应执行的一些这些东西以节省时间。 :扭: If you’re in the same spot, then dont let spam waste your time!如果您在同一地点,然后不要让垃圾浪费你的时间!

This post is part of a series of posts in which I’m telling you how to modify your Wordpress theme the way I have!这个职位是一系列职位,其中我告诉你如何修改你的WordPress的主题就是我的! If you’d like to see anything in particular, comment on the RobMalon.Com Redesign post and I’ll make it part of the series!如果您想看到什么特别评论RobMalon.Com重新设计后,我会使其部分系列!


1 Trackback(s)一日引用(星期日)

  1. Aug 28, 2008: Web Discoveries : 5 Blogs About Food or Money | Axonoid 2008年8月28日网络发现: 5博客关于食品或金钱| Axonoid


2 Comment(s) On第2评论(星期日)在

"HowTo Eliminate Wordpress Trackback Comment And Pingback Spam" “如何消除WordPress的评论和引用Pingback垃圾邮件”
  1. MyAvatars 0.2 Lynn - Sep 13, 2008 林恩 -9 月1 3日, 2 008年

    Maybe I shouldn’t, but these days I just rely on my spam filter (Akismet) to catch it all.也许我不应该,但这些天我只是依靠我的垃圾邮件过滤器( Akismet )赶上这一切。 I used to use Simple Trackback Validation on a several of the blogs I have, but it stopped stuff from going directly to the spam filter and actually caused me more work when I had to delete the trackbacks.我曾经使用简单引用验证了几个博客我有,但它停止的东西去直接向垃圾邮件过滤器和实际造成我更多的工作时,我不得不删除搬场。

    I’ve finally set Akismet to delete anything older than 30 days automatically, and I almost never check the spam section of my blogs anymore.我已经最后确定Akismet删除任何超过30天的自动,我几乎从来没有检查垃圾节我的Blog了。

    I’m sure I’m running a risk of missing a good comment, but the time savings has been worth it.我肯定运行的风险失踪的一个很好的评论,但节省了时间已是值得的。 Not to mention, I’ve quit burning my eyes with some of the filth that I used to have to skim through before deleting the spam comments and trackbacks manually.更何况,我已经退出我的眼睛里燃烧的一些污物,我用脱脂必须通过之前,删除垃圾邮件的意见和搬场手动。

  2. MyAvatars 0.2 Rob - Sep 14, 2008 罗布 -9 月1 4日, 2 008年

    In that case, it still would be good to have both, but just reverse the order in which the code executes.在这种情况下,仍然将是一件好事,以都,只是反向的顺序执行的代码。 So far, I haven’t run into the problem you’ve mentioned, but I might write a howto/plugin and post on how to do what you’re asking for sometime :).到目前为止,我还没有遇到这个问题您提到的,但我会写如何/插件后如何做你要求的某个时候: ) 。



Leave A Comment:发表评论:

Comments RSS Feed 评论RSS馈送

6 Minus 2 = 负2 =

Custom Theme by Rob Malon | Content & Design © 2008 - Rob Malon [dot] Com. 自订主题罗布丙二|内容与设计© 2008 -罗布丙二[斑点]通信。 "));
"));