<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>LINICKX.com</title><link>https://www.linickx.com/</link><description></description><lastBuildDate>Tue, 16 Dec 2008 12:31:00 +0000</lastBuildDate><item><title>Bad Behaviour and Akismet Blocked Counters for WordPress</title><link>https://www.linickx.com/bad-behaviour-and-akismet-blocked-counters-for-wordpress</link><description>&lt;p&gt;The Bad Behaviour plug-in for WordPress comes with a weekly counter in
the admin dashboard, but do you want a wicked footer like mine?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;106,386 dodgy geezas have been blocked by Bad Behaviour and 36,926
spams were eaten by Akismet.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://akismet.com"&gt;Akismet&lt;/a&gt;comes with a counter you can use in
themes/plugins...&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$akcount = get_option('akismet_spam_count'); $akcount = number_format($akcount); echo $akcount;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;But with &lt;a href="http://www.bad-behavior.ioerror.us"&gt;Bad Behaviour&lt;/a&gt; you have to
do a little more work. To start with you need to get BB to record in the
database each time it blocks someone, this is done by adding a function
to &lt;code&gt;~/wp-content/plugins/bad-behavior/bad-behavior-wordpress.php&lt;/code&gt; , add
the following code.....&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Bad Behavior callback functions.
function  bb2_banned_callback() {

        $counter = get_option('bad_behavior_spam_count');
        $counter = $counter + 1;
        update_option( 'bad_behavior_spam_count', $counter );

}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now BB will store an incrementing number in the WP database for you to
use in your theme..&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$bbcount = get_option('bad_behavior_spam_count'); $bbcount = number_format($bbcount); echo $bbcount;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now you can track how many inter-twats your blocking!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Tue, 16 Dec 2008 12:31:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2008-12-16:bad-behaviour-and-akismet-blocked-counters-for-wordpress</guid><category>akismet</category><category>bad-behavior</category><category>PHP</category><category>plugin</category><category>WordPress</category></item><item><title>Delicious's Bad Behavior</title><link>https://www.linickx.com/delicious-bad-behavior</link><description>&lt;p&gt;Recently I've been having &lt;a href="http://wordpress.org/support/topic/212397"&gt;this
problem&lt;/a&gt; with my
&lt;a href="http://wordpress.org"&gt;WordPress&lt;/a&gt;+ &lt;a href="http://www.bad-behavior.ioerror.us/"&gt;Bad
Behavior&lt;/a&gt; +
&lt;a href="http://delicious.com"&gt;Delicious&lt;/a&gt; blog posting combo, in a nut shell,
delicious was showing an error:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[10/22/08 05:00:03 AM -0700] Creating blog post at http://correct_url.com/xmlrpc.php ...ERROR: Failed due to General Exception: Curl returned non 200 HTTP code: 417. Response body:&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And I couldn't work out why, after some digging/googling, I thought to
look in my bad behaviour logs, and found a match for my apache log...&lt;/p&gt;
&lt;p&gt;&lt;code&gt;76.13.6.189 - - [19/Oct/2008:23:00:29 +0100] "POST /xmlrpc.php HTTP/1.1" 417 796 "-" "PEAR_XML_RCP2/0.0.x"&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I've contacted both yahoo (&lt;em&gt;who now own delicious&lt;/em&gt;)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hello Nick,&lt;/p&gt;
&lt;p&gt;Thank you for writing to del.icio.us Customer Care.&lt;/p&gt;
&lt;p&gt;I understand that the Delicious blog posting feature is not working&lt;br /&gt;
 properly for you. I apologize for any inconvenience.&lt;/p&gt;
&lt;p&gt;Our engineers are aware of this issue and are investigating possible&lt;br /&gt;
 solutions, but since this is not and "official" feature, we do not
have&lt;br /&gt;
 any specific time frame when this will be fixed.&lt;/p&gt;
&lt;p&gt;Please let me know if you have any further questions or concerns.&lt;/p&gt;
&lt;p&gt;Thank you again for contacting del.icio.us Customer Care.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;
 Alessandra&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and Michael Hampton (&lt;em&gt;Bad Behavior Developer&lt;/em&gt;)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Looks like they are sending an unexpected Expect: header and they are&lt;br /&gt;
 failing to retry the request without Expect:. You should report this
to&lt;br /&gt;
 them so they can fix it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;as you can see they have confirmed that there is indeed a problem .....
But as you may have noticed &lt;a href="https://www.linickx.com/archives/629/links-for-2008-10-24"&gt;delicious posted on my
blog&lt;/a&gt;, no the
problem hasn't been fixed, but there is a work around.&lt;/p&gt;
&lt;p&gt;In \~/wp-content/plugins/bad-behavior/bad-behavior/whitelist.inc.php you
can add delicious's IP address, it's not a perfect solution as it'll be
overwritten everytime BB is updated, but it'll do for now :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: I've had many requests for this...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OLD&lt;/strong&gt;: whitelist.inc.php&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// IP address ranges use the CIDR format.

        // Includes four examples of whitelisting by IP address and netblock.
        $bb2_whitelist_ip_ranges = array(
                "64.191.203.34",        // Digg whitelisted as of 2.0.12
                "208.67.217.130",       // Digg whitelisted as of 2.0.12
                "10.0.0.0/8",
                "172.16.0.0/12",
                "192.168.0.0/16",
//              "127.0.0.1",
        );
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;NEW&lt;/strong&gt;: whitelist.inc.php&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// IP address ranges use the CIDR format.

        // Includes four examples of whitelisting by IP address and netblock.
       $bb2_whitelist_ip_ranges = array(
                "64.191.203.34",        // Digg whitelisted as of 2.0.12
                "208.67.217.130",       // Digg whitelisted as of 2.0.12
                "76.13.6.189",          // Delicious
                "10.0.0.0/8",
                "172.16.0.0/12",
                "192.168.0.0/16",
//              "127.0.0.1",
        );
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Sun, 26 Oct 2008 11:00:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2008-10-26:delicious-bad-behavior</guid><category>bad-behavior</category><category>Blog</category><category>del.icio.us</category><category>error</category><category>WordPress</category></item></channel></rss>