Help?

Podcasting with Textpattern

From Textpattern CMS User Documentation

Contents

Overview

This solution is a way to properly distribute and feed mp3 files, format them so that they go out with the Artist – Track for their name and Id3 tag

What you will need

  • You need to install this plugin: plugin-jnm-audio
  • You need to set up custom fields in admin/ advanced prefs for your mp3 items
    • Artist
    • Track Name
    • Mp3 url

The Process

  • Set up a new page template named Podcast under Presentation/Pages with a valid XML RSS Namespace, like so:
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">

  <channel>

    <title>Through It All Podcast</title>
    <description>ThroughItAll.net</description>
    <link>http://www.throughitall.net</link>
    <language>en-us</language>
    <copyright>Copyright 2006</copyright>
    <lastBuildDate>Sat, 27 May 2006 11:30:00 -0500</lastBuildDate>
    <pubDate>Sat, 27 May 2006 11:30:00 -0500</pubDate>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <webMaster>matt@thetrc.net</webMaster>

    <itunes:author>matt @ throughitall.net</itunes:author>

    <itunes:summary>ThroughItAll.net is a music blog about hardcore, indie, rock, and metal</itunes:summary>

    <itunes:owner>
           <itunes:name>Matt</itunes:name>
           <itunes:email>matt@thetrc.net</itunes:email>
    </itunes:owner>

<itunes:explicit>No</itunes:explicit>

<itunes:image href="http://throughitall.net/podcast.jpg"/>

<txp:article_custom  form="podcast" sortby="Posted"  sortdir="desc" limit="9" />
	
</channel>

</rss>
  • Next create an article form named podcast, where the custom fields get your podcast data, like so:
<txp:if_custom_field name="Mp3" val=""><txp:else /><item>
<title><txp:custom_field name="Artist" /> - <txp:custom_field name="Track" /></title>
<link>http://throughitall.net</link>
<guid><txp:custom_field name="Mp3" /></guid>
<description><txp:custom_field name="Artist" /> - <txp:custom_field name="Track" /> - <txp:custom_field name="Official" /></description>
<enclosure url="<txp:custom_field name="Mp3" />" length="11779397" type="audio/mpeg"/>
<category>Podcasts</category>
<pubDate><txp:posted format=”%a, %d %b %Y %I:%m:%S” /> GMT</pubDate>
</item>
</txp:if_custom_field>
  • Refine your page template further to taste. If you want to use an excerpt for your feed description tag, the following workaround was suggested on the forum, to get rid of the p tags, that would invalidate the feed.
<description>
<txp:php>
$text = excerpt ( array () );
echo strip_tags($text);
echo "\n";
</txp:php>
</description>
  • Check to see, if your feeds validate. You should be able now to post mp3 articles. For valid mp3 URL's, the following format was suggested instead of http:
itms://

Resources

Translations [?]