<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>[LINICKX].com &#187; bad-behavior</title>
	<atom:link href="http://www.linickx.com/tag/bad-behavior/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linickx.com</link>
	<description>Moments of Genius followed by Trash.</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:06:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Bad Behaviour and Akismet Blocked Counters for WordPress</title>
		<link>http://www.linickx.com/679/bad-behaviour-and-akismet-blocked-counters-for-wordpress</link>
		<comments>http://www.linickx.com/679/bad-behaviour-and-akismet-blocked-counters-for-wordpress#comments</comments>
		<pubDate>Tue, 16 Dec 2008 12:31:43 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[akismet]]></category>
		<category><![CDATA[bad-behavior]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.linickx.com/?p=679</guid>
		<description><![CDATA[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? 106,386 dodgy geezas have been blocked by Bad Behaviour and 36,926 spams were eaten by Akismet. &#8230; <a href="http://www.linickx.com/679/bad-behaviour-and-akismet-blocked-counters-for-wordpress">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>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?</p>
<blockquote><p>106,386 dodgy geezas have been blocked by Bad Behaviour and 36,926 spams were eaten by Akismet.</p></blockquote>
<p><a href="http://akismet.com">Akismet </a>comes with a counter you can use in themes/plugins&#8230;</p>
<p><code><br />
$akcount = get_option('akismet_spam_count');<br />
$akcount = number_format($akcount);<br />
echo $akcount;<br />
</code></p>
<p>But with <a href="http://www.bad-behavior.ioerror.us">Bad Behaviour</a> 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 <code>~/wp-content/plugins/bad-behavior/bad-behavior-wordpress.php</code> , add the following code&#8230;..</p>
<pre>
// 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 );

}
</pre>
<p>Now BB will store an incrementing number in the WP database for you to use in your theme..</p>
<p><code><br />
$bbcount = get_option('bad_behavior_spam_count');<br />
$bbcount = number_format($bbcount);<br />
echo $bbcount;<br />
</code></p>
<p>Now you can track how many inter-twats your blocking!</p>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/679/bad-behaviour-and-akismet-blocked-counters-for-wordpress/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Delicious&#8217;s Bad Behavior</title>
		<link>http://www.linickx.com/630/delicious-bad-behavior</link>
		<comments>http://www.linickx.com/630/delicious-bad-behavior#comments</comments>
		<pubDate>Sun, 26 Oct 2008 11:00:21 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[bad-behavior]]></category>
		<category><![CDATA[del.icio.us]]></category>
		<category><![CDATA[error]]></category>

		<guid isPermaLink="false">http://www.linickx.com/?p=630</guid>
		<description><![CDATA[Recently I&#8217;ve been having this problem with my WordPress + Bad Behavior + Delicious blog posting combo, in a nut shell, delicious was showing an error: [10/22/08 05:00:03 AM -0700] Creating blog post at http://correct_url.com/xmlrpc.php ...ERROR: Failed due to General &#8230; <a href="http://www.linickx.com/630/delicious-bad-behavior">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been having <a href="http://wordpress.org/support/topic/212397">this problem</a> with my <a href="http://wordpress.org">WordPress </a>+ <a href="http://www.bad-behavior.ioerror.us/">Bad Behavior</a> + <a href="http://delicious.com">Delicious</a> blog posting combo, in a nut shell, delicious was showing an error:</p>
<p><code>[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: </code></p>
<p>And I couldn&#8217;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&#8230;</p>
<p><code><br />
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"</code></p>
<p>I&#8217;ve contacted both yahoo (<em>who now own delicious</em>) </p>
<blockquote><p>Hello Nick,</p>
<p>Thank you for writing to del.icio.us Customer Care.</p>
<p>I understand that the Delicious blog posting feature is not working<br />
properly for you. I apologize for any inconvenience.</p>
<p>Our engineers are aware of this issue and are investigating possible<br />
solutions, but since this is not and &#8220;official&#8221; feature, we do not have<br />
any specific time frame when this will be fixed.</p>
<p>Please let me know if you have any further questions or concerns.</p>
<p>Thank you again for contacting del.icio.us Customer Care.</p>
<p>Regards,<br />
Alessandra
</p></blockquote>
<p>and Michael Hampton (<em>Bad Behavior Developer</em>) </p>
<blockquote><p>
Looks like they are sending an unexpected Expect: header and they are<br />
failing to retry the request without Expect:. You should report this to<br />
them so they can fix it.</p></blockquote>
<p>as you can see they have confirmed that there is indeed a problem &#8230;.. But as you may have noticed <a href="http://www.linickx.com/archives/629/links-for-2008-10-24">delicious posted on my blog</a>, no the problem hasn&#8217;t been fixed, but there is a work around.</p>
<p>In ~/wp-content/plugins/bad-behavior/bad-behavior/whitelist.inc.php you can add delicious&#8217;s IP address, it&#8217;s not a perfect solution as it&#8217;ll be overwritten everytime BB is updated, but it&#8217;ll do for now <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>UPDATE</strong>: I&#8217;ve had many requests for this&#8230;</p>
<p><strong>OLD</strong>: whitelist.inc.php</p>
<pre>
// 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",
        );
</pre>
<p><strong>NEW</strong>: whitelist.inc.php</p>
<pre>
// 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",
        );
</pre>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/630/delicious-bad-behavior/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

