<?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>Dammit Jim! &#187; lose</title>
	<atom:link href="http://scott.sherrillmix.com/blog/tag/lose/feed/" rel="self" type="application/rss+xml" />
	<link>http://scott.sherrillmix.com/blog</link>
	<description>I'm a biologist not a...</description>
	<lastBuildDate>Mon, 06 Feb 2012 05:19:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>WP_PingPreserver</title>
		<link>http://scott.sherrillmix.com/blog/blogger/wp_pingpreserver/</link>
		<comments>http://scott.sherrillmix.com/blog/blogger/wp_pingpreserver/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 19:45:05 +0000</pubDate>
		<dc:creator>ScottS-M</dc:creator>
				<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Programmer]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[lose]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[preserve]]></category>
		<category><![CDATA[trackback]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/programmer/web/wp_pingpreserver/</guid>
		<description><![CDATA[For a while, I&#8217;ve been a bit annoyed with WordPress losing pings (those automatic links on your blog when someone links to you) that should be coming to my posts. I noticed that when I or an external blog link to more than one of my posts only one ping would register in my comments. [...]]]></description>
			<content:encoded><![CDATA[<p>For a while, I&#8217;ve been a bit annoyed with WordPress losing pings (those automatic links on your blog when someone links to you) that should be coming to my posts. I noticed that when I or an external blog link to more than one of my posts only one ping would register in my comments. For example, if someone writes that:</p>
<blockquote><p>Scott has written WordPress plugins to <a href="http://scott.sherrillmix.com/blog/programmer/web/wp_codeshield/">make it easier to write about code</a>, <a href="http://scott.sherrillmix.com/blog/programmer/web/wp_monsterid/">generate monster avatars</a> and <a href="http://scott.sherrillmix.com/blog/programmer/web/wp_identicon/">generate unique geometric shapes for each commentor</a>.</p></blockquote> 
<p>I would want a ping to appear on each of those linked posts, both to thank the linking blog for writing about me and to provide useful information to the reader (and to increase my comment counts). Yet WordPress only puts a ping on the first linked page.</p>

<p>It took me a little while to figure out why WordPress kept losing my pings since I wasn&#8217;t even sure if it was a problem on the sending or receiving end but it turns out WordPress is filtering pings because it thinks the comments are coming too fast. I&#8217;ll put the details below but if you just want to make sure all the pings intended for your blog actually reach it then here is the plugin for you.</p>



<h3>Current Version:</h3> <p><a href="http://downloads.wordpress.org/plugin/wp-pingpreserver.zip">WP_PingPreserver v0.4</a></p>

<h3>Installation instructions:</h3> <p>Unzip <code>wp_pingpreserver.zip</code>. Upload <code>wp_pingpreserver.php</code> to <code>wp-content/plugins/</code> and active in the Plugin Control Panel. Your blog will now allow up to 5 pings within 75 seconds.</p>

<h3>Technical Details</h3>
<p>The average user won&#8217;t need to read this but I thought I would post the details of the problem in case anyone wanted to fix it in the core WordPress files. It turns out that the function <code>wp_throttle_comment_flood</code> from <code>wp-include/comment.php</code> is automatically added as a default filter (in <code>/wp-includes/default-filters.php</code>). This function checks if the last comment from the commentor&#8217;s IP address was within 15 seconds and if so rejects the comment. This is obviously a problem with pings when 2 or 3 comments will be coming from the same IP within seconds.</p>
<p>Unfortunately, the <code>comment_flood_filter</code> passes in very little information (only the time of the current and previous comment) and the function <code>wp_throttle_comment_flood</code> does not allow plugins to signal that a comment <em>should</em> be accepted. So for this plugin to work it has to <code>remove_action</code> <code>wp_throttle_comment_flood</code> and replace it with it&#8217;s own function. Also since no information about the comment is available in the scope of the function (that I could find), I had to resort to checking to see if the <code>$_SERVER[&amp;#039;PHP_SELF&amp;#039;]</code> variable contained the string &#8220;xmlrpc.php&#8221;.</p>
<p>Anyway it&#8217;s a bit of a hack but it seems to be working. Please let me know if you have any problems or suggestions.</p>


<h3>Change Log:</h3>
<ul>
<li><a href="/res/wp_pingpreserver_v0.4.zip">v0.4</a> 1-21-2008:
<ul>
<li>Checked if this is still a problem in WordPress (it is)</li>
<li>Updated time limit to 75 seconds to be in line with WordPress&#8217;s 1 comment/15 seconds</li>
</ul>
</li>
<li><a href="/res/wp_pingpreserver_v0.3.zip">v0.3</a> 8-8-2007:
<ul>
<li>Switched from checking $POST to $_SERVER</li>
</ul>
</li>
<li><a href="/res/wp_pingpreserver_v0.2.zip">v0.2</a> 8-8-2007:
<ul>
<li>Allows ping if &lt;5 pings within 15 seconds</li>
</ul>
</li>
<li>v0.1 8-2-2007:
<ul>
<li>First attempt</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://scott.sherrillmix.com/blog/blogger/wp_pingpreserver/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

