<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Trackback Validator hack</title>
	<atom:link href="http://www.boriel.com/2007/04/01/trackback-validator-hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.boriel.com/2007/04/01/trackback-validator-hack/?lang=en</link>
	<description>Hacks, science and personal rants</description>
	<lastBuildDate>Wed, 04 Jan 2012 08:19:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jon B.</title>
		<link>http://www.boriel.com/2007/04/01/trackback-validator-hack/?lang=en/comment-page-1/#comment-54853</link>
		<dc:creator>Jon B.</dc:creator>
		<pubDate>Fri, 08 Jun 2007 09:52:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.boriel.com/2007/04/01/trackback-validator-hack/#comment-54853</guid>
		<description>Thanks for the suggestion, but when I make that change, I get email again.</description>
		<content:encoded><![CDATA[<p>Thanks for the suggestion, but when I make that change, I get email again.</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-54853" src="http://www.boriel.com/blog/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('54853', 'add', 'www.boriel.com/blog/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-54853-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-54853" src="http://www.boriel.com/blog/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('54853', 'subtract', 'www.boriel.com/blog/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-54853-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Boriel</title>
		<link>http://www.boriel.com/2007/04/01/trackback-validator-hack/?lang=en/comment-page-1/#comment-54605</link>
		<dc:creator>Boriel</dc:creator>
		<pubDate>Thu, 07 Jun 2007 11:07:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.boriel.com/2007/04/01/trackback-validator-hack/#comment-54605</guid>
		<description>Jon, to me it&#039;s updating (at least with valid trackback / pingbacks). 

Try changing the line which reads:
&lt;tt&gt;wp_set_comment_status($comment_ID, &#039;delete&#039;);&lt;/tt&gt;

And put:
&lt;tt&gt;wp_set_comment_status($comment_ID, &#039;spam&#039;);&lt;/tt&gt; 
instead.</description>
		<content:encoded><![CDATA[<p>Jon, to me it&#8217;s updating (at least with valid trackback / pingbacks). </p>
<p>Try changing the line which reads:<br />
<tt>wp_set_comment_status($comment_ID, 'delete');</tt></p>
<p>And put:<br />
<tt>wp_set_comment_status($comment_ID, 'spam');</tt><br />
instead.</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-54605" src="http://www.boriel.com/blog/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('54605', 'add', 'www.boriel.com/blog/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-54605-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-54605" src="http://www.boriel.com/blog/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('54605', 'subtract', 'www.boriel.com/blog/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-54605-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jon B.</title>
		<link>http://www.boriel.com/2007/04/01/trackback-validator-hack/?lang=en/comment-page-1/#comment-54422</link>
		<dc:creator>Jon B.</dc:creator>
		<pubDate>Thu, 07 Jun 2007 03:11:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.boriel.com/2007/04/01/trackback-validator-hack/#comment-54422</guid>
		<description>I like this hack, but is there a way to eliminate the email while still allowing the &quot;trackback_graph&quot; to be updated?</description>
		<content:encoded><![CDATA[<p>I like this hack, but is there a way to eliminate the email while still allowing the &#8220;trackback_graph&#8221; to be updated?</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-54422" src="http://www.boriel.com/blog/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('54422', 'add', 'www.boriel.com/blog/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-54422-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-54422" src="http://www.boriel.com/blog/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('54422', 'subtract', 'www.boriel.com/blog/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-54422-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Boriel</title>
		<link>http://www.boriel.com/2007/04/01/trackback-validator-hack/?lang=en/comment-page-1/#comment-42417</link>
		<dc:creator>Boriel</dc:creator>
		<pubDate>Sat, 21 Apr 2007 23:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.boriel.com/2007/04/01/trackback-validator-hack/#comment-42417</guid>
		<description>Alex, here you are:
[code lang=&quot;php&quot;]
10a11
&gt;
135c136,139
&lt;
---
&gt;
&gt;   if ($tb_info[&#039;comment_type&#039;] != &#039;trackback&#039;)  // Ensure it&#039;s a trackback
&gt;       return $comment_ID;
&gt;
141c145,146
&lt;       $wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;comments SET comment_approved = &#039;1&#039; WHERE comment_ID = &#039;$comment_ID&#039;&quot;);
---
&gt;       //$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;comments SET comment_approved = &#039;1&#039; WHERE comment_ID = &#039;$comment_ID&#039;&quot;);
&gt;         wp_set_comment_status($comment_ID, &#039;approve&#039;);
143c148,150
&lt;     $wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;comments SET comment_approved = &#039;spam&#039; WHERE comment_ID = &#039;$comment_ID&#039;&quot;);
---
&gt;     //$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;comments SET comment_approved = &#039;spam&#039; WHERE comment_ID = &#039;$comment_ID&#039;&quot;);
&gt;       // wp_set_comment_status($comment_ID, &#039;spam&#039;);
&gt;       wp_set_comment_status($comment_ID, &#039;delete&#039;);
145c152
&lt;       update_comment_count($tb_info[&#039;comment_post_ID&#039;]);
---
&gt;       //update_comment_count($tb_info[&#039;comment_post_ID&#039;]);
147c154
&lt;
---
&gt;
297c304
&lt; add_action(&#039;trackback_post&#039;, &#039;tb_check&#039;,1,1);
---
&gt; add_action(&#039;comment_post&#039;, &#039;tb_check&#039;);
[/code]</description>
		<content:encoded><![CDATA[<p>Alex, here you are:</p>
<div class="hl-surround" style="height:280px;"><div class="hl-main"><pre><span class="hl-default">10a11
&gt;
135c136,139
&lt;
---
&gt;
&gt;   if ($tb_info['comment_type'] != 'trackback')  // Ensure it's a trackback
&gt;       return $comment_ID;
&gt;
141c145,146
&lt;       $wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;comments SET comment_approved = '1' WHERE comment_ID = '$comment_ID'&quot;);
---
&gt;       //$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;comments SET comment_approved = '1' WHERE comment_ID = '$comment_ID'&quot;);
&gt;         wp_set_comment_status($comment_ID, 'approve');
143c148,150
&lt;     $wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;comments SET comment_approved = 'spam' WHERE comment_ID = '$comment_ID'&quot;);
---
&gt;     //$wpdb-&gt;query(&quot;UPDATE $wpdb-&gt;comments SET comment_approved = 'spam' WHERE comment_ID = '$comment_ID'&quot;);
&gt;       // wp_set_comment_status($comment_ID, 'spam');
&gt;       wp_set_comment_status($comment_ID, 'delete');
145c152
&lt;       update_comment_count($tb_info['comment_post_ID']);
---
&gt;       //update_comment_count($tb_info['comment_post_ID']);
147c154
&lt;
---
&gt;
297c304
&lt; add_action('trackback_post', 'tb_check',1,1);
---
&gt; add_action('comment_post', 'tb_check');</span></pre></div></div>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-42417" src="http://www.boriel.com/blog/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('42417', 'add', 'www.boriel.com/blog/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-42417-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-42417" src="http://www.boriel.com/blog/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('42417', 'subtract', 'www.boriel.com/blog/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-42417-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.boriel.com/2007/04/01/trackback-validator-hack/?lang=en/comment-page-1/#comment-42308</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sat, 21 Apr 2007 08:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.boriel.com/2007/04/01/trackback-validator-hack/#comment-42308</guid>
		<description>So I just saw this link in my latest activity list. Could you post a diff from the original source? I&#039;d love to see what exactly you did to get it to work without modifying WP itself.</description>
		<content:encoded><![CDATA[<p>So I just saw this link in my latest activity list. Could you post a diff from the original source? I&#8217;d love to see what exactly you did to get it to work without modifying WP itself.</p>
<p>Like or Dislike: <img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="up-42308" src="http://www.boriel.com/blog/wp-content/plugins/comment-rating/images/1_14_up.png" alt="Thumb up" onclick="javascript:ckratingKarma('42308', 'add', 'www.boriel.com/blog/wp-content/plugins/comment-rating/', '1_14_');" title="Thumb up" /> <span id="karma-42308-up" style="font-size:12px; color:#009933;">0</span>&nbsp;<img style="padding: 0px; border: none; cursor: pointer;" onmouseover="this.width=this.width*1.3" onmouseout="this.width=this.width/1.2" id="down-42308" src="http://www.boriel.com/blog/wp-content/plugins/comment-rating/images/1_14_down.png" alt="Thumb down" onclick="javascript:ckratingKarma('42308', 'subtract', 'www.boriel.com/blog/wp-content/plugins/comment-rating/', '1_14_')" title="Thumb down" /> <span id="karma-42308-down" style="font-size:12px; color:#990033;">0</span></p>]]></content:encoded>
	</item>
</channel>
</rss>

