<?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: Enclosures In WordPress RSS Feed</title>
	<atom:link href="http://www.bloggingpro.com/archives/2005/01/08/enclosures-in-wordpress-rss-feed/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bloggingpro.com/archives/2005/01/08/enclosures-in-wordpress-rss-feed/</link>
	<description>News, plugins and themes for blogging applications</description>
	<lastBuildDate>Fri, 10 Feb 2012 01:07:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: James E. Robinson, III</title>
		<link>http://www.bloggingpro.com/archives/2005/01/08/enclosures-in-wordpress-rss-feed/#comment-1534</link>
		<dc:creator>James E. Robinson, III</dc:creator>
		<pubDate>Mon, 10 Jan 2005 15:14:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.bloggingpro.com/archives/2005/01/08/enclosures-in-wordpress-rss-feed/#comment-1534</guid>
		<description>well, that got munged, but you get the idea.
</description>
		<content:encoded><![CDATA[<p>well, that got munged, but you get the idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James E. Robinson, III</title>
		<link>http://www.bloggingpro.com/archives/2005/01/08/enclosures-in-wordpress-rss-feed/#comment-1533</link>
		<dc:creator>James E. Robinson, III</dc:creator>
		<pubDate>Mon, 10 Jan 2005 15:13:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.bloggingpro.com/archives/2005/01/08/enclosures-in-wordpress-rss-feed/#comment-1533</guid>
		<description>Using the custom fields yields a very simple way to add the necessary info to a post.  Then a little bit of code in wp-rss2.php:

&lt;code&gt;
&lt;?php
   if ( isset($post_meta_cache[$post-&gt;ID][&#039;enclosure&#039;][0]) &amp;&amp;
        isset($post_meta_cache[$post-&gt;ID][&#039;enclosure-file&#039;][0]) ) {

      $encVal = trim($post_meta_cache[$post-&gt;ID][&#039;enclosure&#039;][0]);
      $encFile = trim($post_meta_cache[$post-&gt;ID][&#039;enclosure-file&#039;][0]);
      $encLength = filesize($encFile);

      $encType = &quot;audio/mpeg&quot;;
      if ( isset($post_meta_cache[$post-&gt;ID][&#039;enclosure-type&#039;][0]) ) {
         $encType = trim($post_meta_cache[$post-&gt;ID][&#039;enclosure-type&#039;][0]);
      }

      echo &quot;\t&quot; . &#039;&lt;enclosure url=&quot;&#039; . $encVal
         .  &#039;&quot; type=&quot;&#039; . $encType . &#039;&quot; length=&quot;&#039;
         .  $encLength . &#039;&quot; /&gt;&#039; . &quot;\n&quot;;
   }
?&gt;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Using the custom fields yields a very simple way to add the necessary info to a post.  Then a little bit of code in wp-rss2.php:</p>
<p><code><br />
< ?php<br />
   if ( isset($post_meta_cache[$post->ID]['enclosure'][0]) &#038;&#038;<br />
        isset($post_meta_cache[$post->ID]['enclosure-file'][0]) ) {</p>
<p>      $encVal = trim($post_meta_cache[$post->ID]['enclosure'][0]);<br />
      $encFile = trim($post_meta_cache[$post->ID]['enclosure-file'][0]);<br />
      $encLength = filesize($encFile);</p>
<p>      $encType = "audio/mpeg";<br />
      if ( isset($post_meta_cache[$post->ID]['enclosure-type'][0]) ) {<br />
         $encType = trim($post_meta_cache[$post->ID]['enclosure-type'][0]);<br />
      }</p>
<p>      echo "\t" . '<enclosure url="' . $encVal<br />
         .  '" type="' . $encType . '" length="'<br />
         .  $encLength . '" />' . "\n";<br />
   }<br />
?><br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

