Anybody modified rss20.template for iTunes?

Anybody modified rss20.template for iTunes?

Postby emasters on Fri Feb 17, 2006 1:07 pm

Before I spend a few hours on this, has anyone modified templates/rss/rss20.templates to incorporate the iTunes tags needed to register feeds with the iTunes store? I've got a couple of podcasters on http://www.classcaster.org who've decided they want to be world famous:) If nobody's done this I'll finish it up over the weekend and share.

Thanks,
Elmer
emasters
 
Posts: 21
Joined: Fri Jul 08, 2005 2:21 pm
Location: Atlanta, USA

Postby phunkphorce on Fri Feb 17, 2006 1:33 pm

No, or at least, not that I am aware of.

What sort of extra tags are needed?
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby emasters on Fri Feb 17, 2006 1:50 pm

Specs are here: http://www.apple.com/itunes/podcasts/techspecs.html. It looks pretty straight forward to make the necessary changes to the template. Other aggregators will just ignore the iTunes tags. I'll work on it this afternoon.

Thanks,
Elmer
emasters
 
Posts: 21
Joined: Fri Jul 08, 2005 2:21 pm
Location: Atlanta, USA

Postby emasters on Fri Feb 17, 2006 7:28 pm

Here's a first pass. Not much change, but should be the bare minimum to get accepted by Apple. It even validates...

Code: Select all
<?xml version="1.0" encoding="{$locale->getCharset()}"?>
<?xml-stylesheet href="{$url->getUrl("/styles/rss.css")}" type="text/css"?>
<rss version="2.0"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
>
{$locale->setLocale("en_UK")}
<channel>
  {assign var="blogAuthor" value=$blog->getOwnerInfo()}
  <ttl>60</ttl>
  <title>{$blog->getBlog()|escape}</title>
  <link>{$url->blogLink()}</link>
  <language>en-us</language>
  <description>{$blog->getAbout()|escape}</description>
  <pubDate>{$locale->formatDate($now, "%a, %d %b %Y %H:%M:%S %O")}</pubDate>
  <managingEditor>{$blogAuthor->getEmail()}</managingEditor>
  <itunes:explicit>no</itunes:explicit>
  <itunes:category text="Education">
     <itunes:category text="Higher Education" />
  </itunes:category>
  <itunes:keywords>Classcaster, podcast, legal education, {$blogAuthor->getFullName()}</itunes:keywords>
  <itunes:author>{$blogAuthor->getFullName()}</itunes:author>
  <itunes:owner>
    <itunes:name>{$blogAuthor->getFullName()}</itunes:name>
    <itunes:email>{$blogAuthor->getEmail()}</itunes:email>
  </itunes:owner>
  <generator>http://www.lifetype.net</generator>
  {foreach from=$posts item=post}
  <item>
   <title>{$post->getTopic()|escape}</title>
   <description>
    {$post->getText()|escape}
   </description>
   <link>{$url->postPermalink($post)}</link>
   <comments>{$url->postPermalink($post)}</comments>
   <guid>{$url->postPermalink($post)}</guid>
   {assign var="postOwner" value=$post->getUserInfo()}
   <dc:creator>{$postOwner->getUsername()|escape}</dc:creator>
   {foreach from=$post->getCategories() item=category}   
    <category>{$category->getName()|escape}</category>
   {/foreach}
   {assign var="postDate" value=$post->getDateObject()}
   <pubDate>{$locale->formatDate($postDate, "%a, %d %b %Y %H:%M:%S %O")}</pubDate>
   <source url="{$url->rssLink("rss20")}">{$blog->getBlog()|escape}</source>
   {foreach from=$post->getArticleResources() item=resource}
    {** please uncomment the line below if you'd like to server everything but images, instead of
        only audio and video **}
    {** if !$resource->isImage() **}
    {if $resource->isSound() || $resource->isVideo()}
     <enclosure type="{$resource->getMimeType()}" length="{$resource->getFileSize()}" url="{$url->resourceDownloadLink($resource)}" />
    {/if}
   {/foreach}
  </item>
  {/foreach}
</channel>
</rss>



emasters
 
Posts: 21
Joined: Fri Jul 08, 2005 2:21 pm
Location: Atlanta, USA

Postby emasters on Tue Feb 28, 2006 11:42 pm

Just an update. The changes I made and posted above work. If you use the changed template it generates the right itunes extensions for RSS2. If you search itunes for Classcaster you can see the podcasts from our Lifetype install.
emasters
 
Posts: 21
Joined: Fri Jul 08, 2005 2:21 pm
Location: Atlanta, USA


Return to Templates