{"id":1173,"date":"2006-07-30T01:33:57","date_gmt":"2006-07-30T04:33:57","guid":{"rendered":"http:\/\/www.hoogervorst.ca\/arthur\/?p=1173"},"modified":"2006-07-30T15:39:08","modified_gmt":"2006-07-30T18:39:08","slug":"w09","status":"publish","type":"post","link":"http:\/\/www.hoogervorst.ca\/arthur\/?p=1173","title":{"rendered":"W09"},"content":{"rendered":"<p><span class=\"dropcap\">A<\/span>fter <a id=\"p1172\" rel=\"attachment\" class=\"imagelink\" href=\"http:\/\/www.hoogervorst.ca\/arthur\/?attachment_id=1172\" title=\"Comments In Progress\"><img decoding=\"async\" class=\"alignright\" src=\"http:\/\/www.hoogervorst.ca\/arthur\/wp-content\/uploads\/2006\/07\/a_plug_in.thumbnail.jpg\" alt=\"Comments In Progress\" \/><\/a>many moons of bickering and looking around, I decided to take up the gloves and do it myself. Currently I&#8217;m using a slightly altered script that &#8216;automatically&#8217; folds and closes comments after 10 days. This generally works good and has stopped the flow of sapm directed at the comments. However, I&#8217;m lacking precise control, that is, I&#8217;d like to have some posts to keep their comments available for a longer time.\n<\/p>\n<p>You&#8217;ll find some of these plugins in the WordPress repository, but most of them make no sense and work rather <em>not really good<\/em><sup>1<\/sup>.\n<\/p>\n<p>I also noticed something funny in queries of existing plugins where in the code roundabout attempts are made to make a selection first and then pass the resultset to an &#8216;update&#8217; statement: hey rookies, the following statement is &#8216;legal&#8217; SQL:\n<\/p>\n<p><code>update wp_posts<br \/>\n  set ping_status = 'closed'<br \/>\nwhere post_date < DATE_ADD(\n       DATE_SUB(CURDATE(),\n       INTERVAL 4 month),\n       INTERVAL 1 DAY);\n<\/code><\/p>\n<p>On the other hand, using subselects in MySQL should generally be avoided. There's no real consensus around <em>which<\/em> MySQL version supports subselects. 4.xx maybe. 3.23 maybe. Who knows!\n<\/p>\n<p>On a related note, I see that there's a new WP version out.\n<\/p>\n<p><small><sup>1<\/sup> That is an understatement.<\/small>\n<\/p>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After many moons of bickering and looking around, I decided to take up the gloves and do it myself. Currently I&#8217;m using a slightly altered script that &#8216;automatically&#8217; folds and closes comments after 10 days. This generally works good and &hellip; <a href=\"http:\/\/www.hoogervorst.ca\/arthur\/?p=1173\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[15,16],"tags":[],"_links":{"self":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/1173"}],"collection":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1173"}],"version-history":[{"count":0,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/1173\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1173"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}