Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[archived] sab_NowPlaying: Display a Now Playing XML feed
Notice: This thread is archived, this plugin is no longer available.
**********************************************************
http://www.bluecamel.org/software/textpattern/sab_NowPlaying.txt
Description:
- This plugin will display songs from a Now Playing -style XML file in TextPattern.
Features:
- The most configurable Now Playing TextPattern plugin out there!</li>
- Uses a form for a template.</li>
- Will show any information available in the Now Playing XML file. [1]</li>
Usage:
<ol> <li> Install and activate plugin</li> <li> Where ever you want your list to display, add the call to the plugin. Available options are: <ul> <li> xmlfile – REQUIRED – Relative path to the XML file.</li> <li> form – OPTIONAL – the name of the form that will be used to generate a “line”. If left unspecified
<li><span class=‘artist’><txp:sab_NowPlaying_artist /></span> – <span class=‘title’><txp:sab_NowPlaying_title /></span></li>
will be used.
For example:
<txp:sab_NowPlaying xmlfile=“itunes.xml” form=“now_listening” />
</li> </ul> </li> <li> If you specified a form, create it now. Options are: <ul> <li> <txp:sab_NowPlaying_title /> – Track title <li> <txp:sab_NowPlaying_artist /> – Track artist <li> <txp:sab_NowPlaying_album /> – Track album <li> <txp:sab_NowPlaying_genre /> – Track genre <li> <txp:sab_NowPlaying_kind /> – Type of track (“MPEG Layer 3”, for example) <li> <txp:sab_NowPlaying_numtracks /> – Total number of tracks on the album <li> <txp:sab_NowPlaying_track /> – Track number <li> <txp:sab_NowPlaying_year /> – Track/Album year <li> <txp:sab_NowPlaying_comments /> – Comments embeded in the music file <li> <txp:sab_NowPlaying_time /> – Track length, time-wise <li> <txp:sab_NowPlaying_bitrate /> – Track bitrate <li> <txp:sab_NowPlaying_rating /> – Track rating in iTunes <li> <txp:sab_NowPlaying_numdiscs /> – Number of discs total in the set (if the album is from a boxed set, for example) <li> <txp:sab_NowPlaying_disc /> – Disc number (see <txp:sab_NowPlaying_numdiscs />) <li> <txp:sab_NowPlaying_playcount /> – Total number of times this track has been played <li> <txp:sab_NowPlaying_compilation /> – “Yes” or “No”, depending if the track came from a compilation album <li> <txp:sab_NowPlaying_composer /> – Track composer <li> <txp:sab_NowPlaying_grouping /> – Uhh… dunno <li> <txp:sab_NowPlaying_urlamazon>Text</txp:sab_NowPlaying_urlamazon> – make “Text” a link to your Amazon associate account. If this field is empty in the XML file, this will be ignored but “Text” will still be displayed. <li> <txp:sab_NowPlaying_urlapple>Text</txp:sab_NowPlaying_title> – make “Text” a link to your Apple associate account. If this field is empty in the XML file, this will be ignored but “Text” will still be displayed. <li> <txp:sab_NowPlaying_image /> – URL to the cover art image. If this tag is in your form, sab_NowPlaying will automatically convert the URL to an apporpriate <IMG /> tag. Available attributes are: <ul> <li> link= – “amazon”, “apple”, or “source” – This will automatically make the image a link to the appropriate associate account. For example:<txp:sab_NowPlaying_image link=“amazon” />
</li> <li> class= – This will add a class attribute to your <IMG /> tag to let you control the appearance using CSS.</li> </ul> </li> <li> <txp:sab_NowPlaying_urlsource /> – Uh, I dunno but functions the same as <txp:sab_NowPlaying_urlapple /> and <txp:sab_NowPlaying_urlamazon /></li> </ul> </li> <li>Listen to some music!</li> </ol>TODO:
- Add support for Last Modified for each track
- Add support for Last Modified for whole playlist
1 It doesn’t show everything just yet, but it’s getting there!
-Steve
P.S. I’m not even going to try and format this right. Help is available when you install the plugin or at my website
Last edited by supa (2005-02-14 22:08:06)
Offline
#2 2005-02-15 04:34:56
- davidm
- Member
- From: Paris, France
- Registered: 2004-04-27
- Posts: 719
Re: [archived] sab_NowPlaying: Display a Now Playing XML feed
Cool stuff, I’ll try it out soon, thx !!!
Just one thing : you seem to have forgotten the code tags to wrap your txp tags… (copy/paste I guess)
example : <code><txp:sab_NowPlaying_title /></code> – Track title
is displayed with ** (guess you were intending to put it in bold)
Last edited by davidm (2005-02-15 04:35:53)
.: Retired :.
Offline
Re: [archived] sab_NowPlaying: Display a Now Playing XML feed
<em> davidm wrote:
Cool stuff, I’ll try it out soon, thx !!!
Just one thing : you seem to have forgotten the code tags to wrap your txp tags… (copy/paste I guess)
example : <code><txp:sab_NowPlaying_title /></code> – Track title
is displayed with ** (guess you were intending to put it in bold)
</em>
Yeah, I know.. I’m sick of messing with formatting whenever I post something on this BBS. If you want to see it in all its glory, go to the post on my board or install the plugin and look at the help. :)
-Steve
Last edited by supa (2005-02-15 12:21:11)
Offline
#4 2005-02-15 17:50:17
- davidm
- Member
- From: Paris, France
- Registered: 2004-04-27
- Posts: 719
Re: [archived] sab_NowPlaying: Display a Now Playing XML feed
OK never mind… I did not intend to bug you with this.
I did check your website, no pb. Great work !
.: Retired :.
Offline