<?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"
	>
<channel>
	<title>Comments on: Interesting WordPress Smarty Functions</title>
	<atom:link href="http://schinckel.net/2005/10/19/interesting-wordpress-smarty-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://schinckel.net/2005/10/19/interesting-wordpress-smarty-functions/</link>
	<description>Like a fortune cookie, only without the fortune, and not a cookie.</description>
	<pubDate>Sun, 07 Sep 2008 07:31:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/10/19/interesting-wordpress-smarty-functions/#comment-457</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Sat, 22 Oct 2005 08:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/19/interesting-wordpress-smarty-functions/#comment-457</guid>
		<description>The times you want to know the difference.  The two tricks are a) it needs to be a time that is the number of seconds, and b) you cannot just use the Smarty function {the_time}, as functions cannot be nested.  You'll need to assign the result of the function to a Smarty variable first:

&lt;code&gt;{capture name=comment_time}{comment_date d="U"}{/capture}
{capture name=post_time}{the_time d="U"}{/capture}
{human_time_diff 
&#160;&#160;&#160; from=$smarty.capture.post_time   
&#160;&#160;&#160; to=$smarty.capture.comment_time}&lt;/code&gt;

(That last one can all go on the one line).

As for the Catchpa: I've written a post about it somewhere on this site.  I'm not completely happy with it, as it seems to still be letting through some Comment Spam.  I think I need to think more like a Comment Spammer before I rewrite it...</description>
		<content:encoded><![CDATA[<p>The times you want to know the difference.  The two tricks are a) it needs to be a time that is the number of seconds, and b) you cannot just use the Smarty function {the_time}, as functions cannot be nested.  You&#8217;ll need to assign the result of the function to a Smarty variable first:</p>
<p><code>{capture name=comment_time}{comment_date d="U"}{/capture}<br />
{capture name=post_time}{the_time d="U"}{/capture}<br />
{human_time_diff<br />
&nbsp;&nbsp;&nbsp; from=$smarty.capture.post_time<br />
&nbsp;&nbsp;&nbsp; to=$smarty.capture.comment_time}</code></p>
<p>(That last one can all go on the one line).</p>
<p>As for the Catchpa: I&#8217;ve written a post about it somewhere on this site.  I&#8217;m not completely happy with it, as it seems to still be letting through some Comment Spam.  I think I need to think more like a Comment Spammer before I rewrite it&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrik</title>
		<link>http://schinckel.net/2005/10/19/interesting-wordpress-smarty-functions/#comment-456</link>
		<dc:creator>Patrik</dc:creator>
		<pubDate>Sat, 22 Oct 2005 06:22:29 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/19/interesting-wordpress-smarty-functions/#comment-456</guid>
		<description>Hi!

&lt;strong&gt;Question #1:&lt;/strong&gt;
This might seem like a dumb question, but what exactly should I do to get &lt;em&gt;{human_time_diff from=n to=n}&lt;/em&gt; to work. What should i replace &lt;em&gt;'n'&lt;/em&gt; with?

&lt;strong&gt;Question #2:&lt;/strong&gt;
How did you create the "Catchpa" thing?

I would be very greatful for an answer.</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p><strong>Question #1:</strong><br />
This might seem like a dumb question, but what exactly should I do to get <em>{human_time_diff from=n to=n}</em> to work. What should i replace <em>&#8216;n&#8217;</em> with?</p>
<p><strong>Question #2:</strong><br />
How did you create the &#8220;Catchpa&#8221; thing?</p>
<p>I would be very greatful for an answer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/10/19/interesting-wordpress-smarty-functions/#comment-455</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Sat, 22 Oct 2005 03:28:18 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/19/interesting-wordpress-smarty-functions/#comment-455</guid>
		<description>Yes. ;-)</description>
		<content:encoded><![CDATA[<p>Yes. <img src='http://schinckel.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jamal</title>
		<link>http://schinckel.net/2005/10/19/interesting-wordpress-smarty-functions/#comment-453</link>
		<dc:creator>jamal</dc:creator>
		<pubDate>Sat, 22 Oct 2005 02:11:57 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/19/interesting-wordpress-smarty-functions/#comment-453</guid>
		<description>So this os the place to come for the good stuff? ;-)</description>
		<content:encoded><![CDATA[<p>So this os the place to come for the good stuff? <img src='http://schinckel.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>
