Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Documentation and How To's:
How-To: Create an RSS feed with streaming music
smith.kyle
CodeSmith


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

Posted: 08/09/07 23:29 
*** KYLE'S EDIT ***
This has been taken from SixString's original post in the first thread about this, but I've moved it over to a new thread because that one got into more of a discussion of RSS vs. Podcasts, and got kind of convoluted, so let it be known now that this is NOT a podcast. See this thread for more information on the two: http://www.jamroom.net/phpBB2/viewtopic.php?t=13420&start=0
*** END KYLE'S EDIT ***

And now, in the words of SixString... Wink

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


_________________
kyle[at]jamroom.net

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

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



Joined: 06 Jun 2008
Posts: 191

Posted: 07/15/09 12:01 
Hi Kyle,

I have followed your instructions step by step but I am getting the following error

XML Parsing Error: syntax error
Location: http://piknclik.biz/index.php?t=podcast
Line Number 1, Column 1:ERROR: Recursive template structure found - verify usage!
^

What could be causing this ?

Cheers
Gov

Back to top
smith.kyle
CodeSmith


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

Posted: 07/15/09 13:31 
Do your templates look exactly like the above?


_________________
kyle[at]jamroom.net

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

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



Joined: 06 Jun 2008
Posts: 191

Posted: 07/16/09 00:20 
yes , would it be caused we are using the Nova skin? on jb 4.0.13

Back to top
barkerg



Joined: 24 Dec 2007
Posts: 136

Posted: 07/16/09 12:00 
I am having the same error, I am using evolution


_________________
JBServers.net hosted
www.artistintro.com
Back to top
smith.kyle
CodeSmith


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

Posted: 07/16/09 16:11 
Ahh, you need to change this:

template=$template|default:"podcast_xml.tpl"

to this:

template="podcast_xml.tpl"

Otherwise, Jamroom picks up the t=podcast in the URL and sees that as the $template variable


_________________
kyle[at]jamroom.net

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

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



Joined: 02 Jun 2008
Posts: 326
Location: Ontario, Canada

Posted: 07/16/09 18:55 
Hi Kyle;

I followed the above instructions, including the edit for Nova, and now have the following error:


Quote:
XML Parsing Error: mismatched tag. Expected: </link>.
Location: http://www.2xtunes.com/index.php?t=podcast
Line Number 42, Column 3:
</head>
--^


Back to top
smith.kyle
CodeSmith


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

Posted: 07/16/09 21:44 
You will need to either pass in the correct radio_id for your podcast via the URL, or insert it into the podcast.tpl file.


_________________
kyle[at]jamroom.net

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

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



Joined: 06 Jun 2008
Posts: 191

Posted: 07/17/09 00:12 
Hi kyle

Your code seemed to load the rss feed and took away our first problem, but i have a second small problem, the music files wont play in itunes or nor will it open up in media player, see my link here http://www.piknclik.biz/index.php?t=podcast

I have subscribe using itunes and i can see it but it wont play.

Please advise

Cheers
Gov

Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 07/17/09 01:20 

gov:
Hi kyle

Your code seemed to load the rss feed and took away our first problem, but i have a second small problem, the music files wont play in itunes or nor will it open up in media player, see my link here http://www.piknclik.biz/index.php?t=podcast

I have subscribe using itunes and i can see it but it wont play.

Please advise

Cheers
Gov

This one plays for me in iTunes:

Quote:

For Love
Jun 4, 2:46 AM
Click To Listen! Look'n For Love - By: Eddie Mills



_________________
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
gov



Joined: 06 Jun 2008
Posts: 191

Posted: 07/17/09 01:23 
then what am i doing wrong?

Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 07/17/09 01:31 
http://www.jamroom.net/phpBB2/viewtopic.php?p=174508#174508
From your comment in this thread perhaps you have a network problem (contact your service provider), or a server that won't cope with serving html, let alone audio files (contact your hosts).


_________________
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
gov



Joined: 06 Jun 2008
Posts: 191

Posted: 07/17/09 01:34 
i'm with jbservers, so i couldnt see how that would be a problem

Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 07/17/09 01:50 
Most likely your local network, or a wider network problem.


_________________
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
gov



Joined: 06 Jun 2008
Posts: 191

Posted: 07/17/09 09:57 
rite still can get it to play songs, now another problem IE is showing this error

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

A name contained an invalid character. Error processing resource 'http://www.piknclik.biz/index.php?t=podcast'. Line 17, P...

<guid isPermaLink="false">90 grados</guid">
-----------------------------------------^

Please advise

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Documentation and How To's

12Next >
 
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.