Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Documentation and How To's:
RSS, Podcasts, and much, much more ;)
Douglas
Jamroom Team


Joined: 08 Oct 2004
Posts: 6639
Location: Tornado Alley!

Posted: 06/10/07 15:27 
*** KYLE'S EDIT ***
The original intention of this thread has been moved to a NEW thread to keep things a bit more separated. Please see the this thread for making an RSS feed with links to stream music:

http://www.jamroom.net/phpBB2/viewtopic.php?t=15176

I have left SixString's (edited) original post to preserve the fact that this was, in fact, his idea Wink
*** END KYLE'S EDIT ***


Ok... A BIG THANKS to Kyle and Jill, as they really deserve all the credit for getting this feed to validate.

Create a file named podcast_xml.tpl and add this:


Code
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>{$RADIO_NAME} - Top 40 Feed</title>
<description>{$RADIO_DESCRIPTION}</description>
<language>en-us</language>
<webMaster>{$return_email}</webMaster>
<link>{$JAMROOM_URL}</link>
<copyright>{$smarty.now|jr_date_format:"%Y"} {$system_name|escape:"quotes"} All rights reserved.</copyright>
<lastBuildDate>{$smarty.now|jr_date_format:"%a, %d %b %Y %T"} -0500</lastBuildDate>
<ttl>60</ttl>
{foreach from=$RADIO_SONGS key=key item=songs name=song_val}
<item>
<title>{$songs.SONG_NAME|replace:"&":"&amp;"}</title>
<description><![CDATA[<a href="{$songs.SONG_PLAY_URL}">Click To Listen!</a>&nbsp;&nbsp;{$songs.SONG_NAME|replace:"&":"&amp;"} - By: {$songs.BAND_NAME|replace:"&":"&amp;"}<br>
]]></description>
<pubDate>{$songs.SONG_TIME|date_format:"%a, %d %b %Y %T"} -0500</pubDate>
<guid isPermaLink="false">{$songs.SONG_NAME|replace:"&":"&amp;"}</guid>
</item>

{/foreach}
</channel>
</rss>


Then create a file named podcast.tpl and add this:


Code
{jr_playlist id=$id|default:"1" limit=$limit|default:"40" template=$template|default:"podcast_xml.tpl"}


Finally, create a file named podcast.tpl.php and add this:


Code
<?php
// These header calls are required to get the browser to see this as an RSS Feed
header('Expires: '. gmdate('D, d M Y H:i:s', time()) .' GMT');
header('Last-Modified: '. gmdate('D, d M Y H:i:s') .' GMT');
header('Content-Type: application/xml; charset=utf-8');
?>


Upload these files to your active skin folder, ie. skins/Cobalt3 or skins/Sage.

Then call your podcast like this:

Code

http://your.jamroom.url/index.php?t=podcast


or if you want to use an image


Code

<a href="http://your.jamroom.url/index.php?t=podcast">
<img src="http://your.image.url">
</a>


If you have more than one play list you want to turn into a podcast,just pass a different id to your url ie. index.php?t=podcast?id=2 (Thanks Kyle!)

You can name your files whatever you wish, just make sure the pre-possessor file (podcast.tpl.php) is named the same as the podcast.tpl file or it will not work.

Note: Jamroom's playlist calls are heavy hitters on your database, so I'd suggest not going too crazy with this.

Enjoy! Smile


_________________
Douglas Hackney
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center

Last edited by Douglas on 08/09/07 16:19; edited 5 times in total
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 06/10/07 15:28 
Cool stuff!


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
slotvent



Joined: 20 Oct 2005
Posts: 152

Posted: 08/02/07 04:02 
This feed does not validate ;(



Critical Errors :

* CRITICAL Channel doesn't contain any enclosures (code: 2000)

Warnings :

* WARNING Encoding in XML DTD should be"UTF-8" (data: Line 1 ) (code: 5001)
* WARNING Channel has missing or invalid itunes:owner tag. (code: 6610)
* WARNING Channel has missing or invalid itunes:keywords tag. (code: 6580)
* WARNING Channel has missing or invalid itunes:explicit tag. Assuming explicit="yes". (code: 6590)
* WARNING Channel has missing or invalid itunes:subtitle tag. (code: 6600)
* WARNING Channel has missing or invalid itunes:summary tag. (code: 6520)
* WARNING Channel has missing or invalid itunes:category tag. Please use the itunes:category format rather than the older <category> tags format. (code: 6570)
* WARNING Channel category blank after falling back to older <category> tag format. Assuming "General". To change this, claim and edit your feed after submission. (code: 6020)
* WARNING Channel has missing or invalid itunes:link tag after attempting fallback from failed itunes:image. Please use the itunes:image format and not the older itunes:link or <image> tags. (code: 6550)
* WARNING Channel has missing or invalid image tag after attempting fallback from failed itunes:link formatted image. (code: 6130)
* WARNING Item with missing or invalid opening and closing <itunes:author> tags (data: Item number 1 titled "red house", Item number 2 titled "so right", Item number 3 titled "way down here", Item number 4 titled "dancing with ghosts - feat. caroline martin", Item number 5 titled "Swagger & Strut", Item number 6 titled "low down", Item number 7 titled "JazzSet", Item number 8 titled "enigma", Item number 9 titled "V/M", Item number 10 titled "Stratlanta", Item number 11 titled "A Garden Walk", Item number 12 titled "don't wanna be (on no jerry springer show)", Item number 13 titled "The Rain Forest", Item number 14 titled "all in the name (of America)", Item number 15 titled "Hollywood's Planet", Item number 16 titled "heart of blue", Item number 17 titled "i don't need you anymore", Item number 18 titled "Ms. Elegance", Item number 19 titled "get off mine - feat. cat jefferson", Item number 20 titled "Soliliqy", Item number 21 titled "change it all", Item number 22 titled "Funkmaster", Item number 23 titled "break my heart", Item number 24 titled "my nightmare") (code: 6500)


Any suggestions to make it compatable with feed readers ?


_________________
Back to top
Douglas
Jamroom Team


Joined: 08 Oct 2004
Posts: 6639
Location: Tornado Alley!

Posted: 08/02/07 05:55 
Whats with all the iTunes?

How are you trying to use this?

Note too that this has not been tested with JR3.1, haven't had the time, but I will get around to it.


_________________
Douglas Hackney
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 08/02/07 08:48 
Note too that SixString created a general podcast RSS feed, and it is not in the format as specified by iTunes, which it looks like you are trying to get it. You will need to edit the template accordingly.


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
jp



Joined: 05 Jan 2006
Posts: 495
Location: Ohio

Posted: 08/03/07 22:37 
Perhaps I am not understanding the code, because I couldn't find the variable $SONG_PLAY_URL in the Jamroom docs, but I did find $SONG_HIFI_PLAY and that will return the streaming play link, which will not be identified by any RSS feed reader as an enclosure, because it does not link directly to a file.

I think the problem here may be the way the word "Podcast" is being used. From what I can tell from the code, this:


Code
<enclosure url="{$songs.SONG_PLAY_URL|urlencode}" length="{$songs.HIFI_SIZE}" type="{$songs.HIFI_TYPE}"/>


is attempting to create a podcast enclosure to stream a song, not to download a song. By definition, a podcast is a *downloadable* file. A stream link will not work in iTunes, because there is no downloadable file link. Hence, the error:

* CRITICAL Channel doesn't contain any enclosures (code: 2000)

I've been doing our XML for podcast feeds by hand for a couple of years (including the iTunes tags), and there has to be DIRECT link to the downloadable the file for an enclosure to be created.

For any RSS reader to read an enclosure, the direct download link (which bypasses Jamroom stats) has to be used. It also bypasses the *download options set by the artists*, unless you create an if statement to only provide the link if the download option is on.

In either case, one song being downloaded at a time is not a podcast - it's a song download, just like any other song download. Podcasts should contain additional recorded content. (This is just me on my soap box about what is and isn't a Podcast - but a streaming-only file is *never* a podcast.)

Also, if using the:


Code
<pubDate>{$smarty.now|jr_date_format:"%a, %d %b %Y %T %Z"}</pubDate>


for the publication date of a podcast, it will update the date and time the enclosure was posted every time the podcast reader accesses the feed. This means that the enclosure will be marked as new each time the reader hits the feed - this can result in some readers automatically downloading the same file each time the feed is accessed. Podcast listeners are not especially happy when this happens. (This an annoyance in a regular text feed, because the reader will think it is new content when they have already read it, but a much bigger annoyance when it results in files being downloaded over and over again).

Okay, I think I covered it. Forgive me - I am female and can blame it on a great burst of hormones. But as a podcaster who puts hours every week into the production of our shows (yeah, okay, I'm not great on production, but they don't sound like crap, I hope), I am a bit of a stickler for the definition. When a stream of any sort is called a podcast, it really muddies the water when the potential audience for podcasts already are not sure what it means. If you must be connected to the internet to listen, it is not a podcast.

SixString, I apologize if I was annoying and completely off-base about what the code does! I really am Crying or Very sad

Jill

Back to top
Douglas
Jamroom Team


Joined: 08 Oct 2004
Posts: 6639
Location: Tornado Alley!

Posted: 08/03/07 22:55 
Sent you a PM Jill Wink


_________________
Douglas Hackney
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 08/04/07 00:32 
Very enlightening Jill! Apart from knowing how to download a podcast, I really didn't know too much about them, so that was really helpful! Thanks!

Kyle

PS...do you have a link to your podcast? Wink


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 08/04/07 02:50 
Excellent info SixString and Jill, thanks!

There are quite a few posts (rather than threads) that are too informative to lose over the years. Could we have a sticky post that could be some sort of index to point to them, or maybe a flagged as useful.

Maybe it would be better to have locked threads on different subjects (audio, templates, server, etc) into which useful chunks could be added by moderators, or perhaps a small set of documentation pages into which these nuggets could be pasted.

It is really starting to take time to find things using the forum search, and something really useful posted a year or so back is less likely to be reread than something fairly useless posted 6 months ago.


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 08/04/07 03:05 
I agree! It's about 3 am here, so I'm not fully functioning to set something up just yet, but I definitely think that'd be a good idea. Something like a general information related to music on the net and Jamroom? I'll shoot Brian an e-mail or something about it if he doesn't see this thread...

If you've got some free time, trawl the forums for any threads you'd like and keep a list of them. I definitely think one of them should be about flash and audio encodings. Thanks man!


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
jp



Joined: 05 Jan 2006
Posts: 495
Location: Ohio

Posted: 08/04/07 07:54 
SixString asked if I would be able to help out with something automated to deliver streams or downloads that would work in a feed reader, and I think it might be doable (but not as a podcast because there would be no way to track downloads if you are bypassing the Jamroom stats...and also, that pesky thing I have about the definition of a podcast). I've tried this before and couldn't do it quickly, so I do have it on the back burner for when I have the time for it...which could be quite a while, actually.

If I can figure a way around the time stamping problem so that it can be delivered to a feed reader correctly, I will certainly share what I've come up with the community. My thought is that a New Songs feed is the most likely candidate because items would appear as new when a new song is posted. The SONG_DATE variable could be used for the time stamp, but I don't think any of the available variables for song creation date are in the correct format for RSS. That's where I got stuck last time.

Kyle, thank you for asking about the podcasts. If you do want to take a listen, you can find the descriptions, playlist and RSS feed/iTunes links at:

IndieHeart Podcast Page

Please ignore the butt ugly site which looks especially horrific in anything but IE, because I've got a problem with the background that I have never been able to work out in compliant browsers. I can make things function, but I am so far from being a graphic designer that I really should just pack it in! That's what I'm fighting with right now in my new site design, which is where I am putting every moment of my free time and STILL will never done. Yike!

Jill

Back to top
Douglas
Jamroom Team


Joined: 08 Oct 2004
Posts: 6639
Location: Tornado Alley!

Posted: 08/04/07 09:13 
Thanks Jill Wink

I think I'm starting to understand the difference between a podcast and feed now, and what I have posted here is obviously not a Podcast.

What does iTunes need in order for a podcast to be valid? I do not have an iTunes account to test with.


_________________
Douglas Hackney
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
jp



Joined: 05 Jan 2006
Posts: 495
Location: Ohio

Posted: 08/04/07 09:48 

Quote:
What does iTunes need in order for a podcast to be valid? I do not have an iTunes account to test with.


The best info on the RSS specifications can be found at iTunes:

http://www.apple.com/itunes/store/podcaststechspecs.html

In iTunes, the <guid> tag is used instead of a date tag to determine which episodes are marked new and would typically be the actual file download link, since that is a never-changing element. (So, that part of creating an iTunes compliant feed becomes easier, now that I think about it.)

I also find that the most valuable resource for testing the validity of a feed for both RSS compliance and iTunes compliance is:

Feed Validator

It is updated quickly whenever there are changes in the specifications and when the feed fails, you get some wonderfully helpful hints on what the problem is that lets you sort it out quickly.

I hope that helps!

Jill

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 08/04/07 09:53 
Jill -

If you are ever interested in writing any "blog" articles here on Jamroom.net, drop me an email. I think it would be really cool to get some more subject-matter-experts on areas related to Jamroom to post blog entries.

Jamroom.net averages around 25,000 page views daily, so a link to your site on the home page can help drive some traffic your way Wink

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 08/04/07 10:14 

bigguy:
Jill -

If you are ever interested in writing any "blog" articles here on Jamroom.net, drop me an email. I think it would be really cool to get some more subject-matter-experts on areas related to Jamroom to post blog entries.

Jamroom.net averages around 25,000 page views daily, so a link to your site on the home page can help drive some traffic your way Wink

Hope this helps!

- Brian


Shocked THAT'S AWESOME!


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Documentation and How To's

12345Next >
 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.