Skip to content

Instantly share code, notes, and snippets.

@Morse-Code
Created April 24, 2012 03:09
Show Gist options
  • Save Morse-Code/2475937 to your computer and use it in GitHub Desktop.
Save Morse-Code/2475937 to your computer and use it in GitHub Desktop.
Expression engine Itunes RSS feed
{exp:channel:entries channel="podcast" status="open"}
///***********************************************************************************
// This if statement doesn't work. content is shown for everyone no matter what
//*************************************************************************************
{if (group_id == "1" OR group_id == "7") && subscription_podcast != ""}
<item>
<title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
<itunes:author>Lex and Terry</itunes:author>
<itunes:summary>{exp:xml_encode}{description}{/exp:xml_encode}</itunes:summary>
<itunes:image href="{site_url}system/images/podcast-cover-lexandterry.jpg" />
<enclosure url="http://75.126.73.132/{group_id}-{current_time}-{sub_file_size}-p-{subscription_podcast}" length="{exp:xml_encode}{sub_file_size}{/exp:xml_encode}" type="audio/mpeg" />
<itunes:duration>{sub_play_time}</itunes:duration>
<link>{permalink}</link>
<pubDate>{entry_date format="%r"}</pubDate>
<guid>{permalink}#When:{gmt_entry_date format="%H:%i:%s"}</guid>
<description><![CDATA[{exp:xml_encode}{description}{/exp:xml_encode}]]></description>
<itunes:explicit>yes</itunes:explicit>
<itunes:image href="http://www.lexandterry.com/images/uploads/podcast.jpg" />
<category>Podcasts</category>
</item>
{/if}
{/exp:channel:entries}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment