Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-05-30 05:09:46
- matthewmcinerney
- Member
- Registered: 2005-12-28
- Posts: 25
[howto] A Podcasting Solution - throughitall.net
so I run an mp3 blog, ThroughItAll.net, using Textpattern, and I wanted to find a way to podcast all of the mp3s I post, and format them so that they’d go out with the Artist – Track for their name and Id3 tag, rather than the messy Id3 tags many bands post.
so here’s my solution
first I set up my blog, so that I enter Artist, Track Name, and Mp3 url as custom fields with every post
next I set up a new page called podcast, to look like XML podcast file, and in the middle used an article_custom tag where the podcast Items would go. I set the form to Podcast, which I created next.
Next I created a form that would create the podcast items, or each individual mp3. I used conditional custom tags to make sure that the Mp3 field wasn’t blank, then put input the mp3 url using custom fields into the enclosure, and used the same method for defining the artist.
next i made a section called podcast, that would use the page podcast.
so what i ended up with was throughitall.net/blog/podcast, which looked like an XML file
next, i ran that through feedburner as a podcast and came up with this http://feeds.feedburner.com/throughitallpodcast
now anytime i update my Mp3 blog with a URL in the mp3 url custom field, it will add it my podcast feed.
if anyone has any questions, let me know, but i think this is a pretty good option for creating a podcast using Textpattern, or just using a modified RSS feed.
Offline
#2 2006-05-30 05:16:24
- matthewmcinerney
- Member
- Registered: 2005-12-28
- Posts: 25
Re: [howto] A Podcasting Solution - throughitall.net
The Page:
<?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>
The form:
<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" /> -0500</pubDate>
</item>
</txp:if_custom_field>
(Edit: updated to display code properly. :) -Mary)
Last edited by Mary (2006-06-01 13:24:18)
Offline
Re: [howto] A Podcasting Solution - throughitall.net
neat. thats how i would do it too if i had to :) might come in handy at a later time…
Offline
#4 2006-05-31 08:11:52
- alexandra
- Member
- From: Cologne, Germany
- Registered: 2004-04-02
- Posts: 1,370
Re: [howto] A Podcasting Solution - throughitall.net
Hi Matthew, thanks for publishing your solution. I am not familiar with podcasting sites so my question may sound dumb: Is the flashplayer a plugin for TXP?
Offline
Re: [howto] A Podcasting Solution - throughitall.net
alexandra wrote:
Hi Matthew, thanks for publishing your solution. I am not familiar with podcasting sites so my question may sound dumb: Is the flashplayer a plugin for TXP?
Hi alex, I think that Matthew is using the <a href=“http://forum.textpattern.com/viewtopic.php?id=16191”>jnm_audio</a> plugin.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#6 2006-05-31 14:51:10
- matthewmcinerney
- Member
- Registered: 2005-12-28
- Posts: 25
Re: [howto] A Podcasting Solution - throughitall.net
alexandra wrote:
Hi Matthew, thanks for publishing your solution. I am not familiar with podcasting sites so my question may sound dumb: Is the flashplayer a plugin for TXP?
colak is correct
i am using the jnm plugin
Offline
#7 2006-05-31 22:31:06
- matthewmcinerney
- Member
- Registered: 2005-12-28
- Posts: 25
Re: [howto] A Podcasting Solution - throughitall.net
a quick update. i realized the Date was formated incorrectly. here’s the tag to use for the correct formating
<code>
<txp:posted format=”%a, %d %B %Y %I:%m:%S” />
</code>
i think i’ve got it right this time
Last edited by matthewmcinerney (2006-05-31 22:31:22)
Offline
#8 2006-06-10 19:39:01
- teaboy
- New Member
- From: Birmingham, UK
- Registered: 2006-03-02
- Posts: 8
Re: [howto] A Podcasting Solution - throughitall.net
Your site seems to have disappeared, so not sure if you’re still active on the forum.
You’re nearly there. However, the following <pubdate>
works better, according to the validator
<code>
<pubDate><txp:posted format=”%a, %d %b %Y %I:%m:%S” /> GMT</pubDate>
</code>
I was getting error messages from the feed validator for using the incorrect month format (the spec requires short months, not the full month), which the above corrects.
Now, I’m getting closer to getting it to validate. My next stumbling block is stripping <p>
tags out of the <description>
. I’ve barely touched PHP, but I’m guessing something using strip_tags will do it? But no matter what I try to do, I get an error!
What I’ve tried to do is something similar to on the php manual page for striptags
<code>
<description>
<?php
$text = ‘<txp:excerpt />’;
echo strip_tags($text);
echo “\n”;
p>’);
?>
</description>
</code>
But that isn’t working. Any ideas? Does textpattern not parse PHP in an RSS feed?
Offline
Re: [howto] A Podcasting Solution - throughitall.net
Invoke the tag handler function immediately, and use txtp:php
tags to bracket your snippet. That should work.
<description>
<txp:php>
$text = excerpt ( array () );
echo strip_tags($text);
echo "\n";
</txp:php>
</description>
Cheers,
Robert
Last edited by wet (2006-06-10 19:48:00)
Offline
#10 2006-06-10 20:05:34
- teaboy
- New Member
- From: Birmingham, UK
- Registered: 2006-03-02
- Posts: 8
Re: [howto] A Podcasting Solution - throughitall.net
Many thanks, so fast too! Much appreciated, works like a charm.
Did a quick tweak, as viewing in iTunes I noticed a space at the start of the description field which I think comes from a hack I was doing to try and get a podcast working through feedburner, so I’m left with this
<code>
<description>
<txp:php>
$text = excerpt ( array () );
$trimmed = ltrim($text);
echo strip_tags($trimmed);
</txp:php>
</description>
</code>
Seems to work, so that’s good for me :-)
Offline
Re: [howto] A Podcasting Solution - throughitall.net
Works great, except that I’d like to send a last modified header. The only problem I have is how to get it to send the timestamp of the last article.
Offline
Re: [howto] A Podcasting Solution - throughitall.net
This is nice !
What s the use of goin through feedburner ?
Offline