iTunes Playlist Plugin for WordPress

I bring to you my first WordPress plugin: iTunes Playlist Plugin for WordPress 2.0

### About the iTunes Playlist Plugin ###
This plugin has a code base that is based on the [iTunes XML Playlist Reader](http://www.rjk-hosting.co.uk/programs/prog.php?id=9) originally authored by Richard James Kendall. He’s the brains that came up with the parsing algorithm for that big honking XML file that iTunes generates.

I got the idea for implementing it from using the [SimpleTags](http://www.broobles.com/scripts/simpletags/) plugin (thank you, Ivan). I used his algorithm to find the *playlist* tags.

So, basically, I took two works and hacked them together to make this little plugin. I hope you honor the source authors for their time and effort, and I hope you find that this plugin is useful to you. 🙂

### Installing the Plugin ###
The download has a single .php file that you’ll install in your ~/home_directory/wp_content/plugins/ directory, and then activate it in your WordPress admin system.

The way it works is very simple. You’ll configure the itunes-playlist.php file (currently inconveniently located in line 28) where you’ll set the relative path (or URL in case your server allows cross-domain fopen() ) to

$playlist_url = "your_path/to/iTunes_export_files/";

This path should be where you’ll be uploading your export files on a regular basis.

### Using the Plugin ###
Once this plugin is activated, using it is really simple. Just upload your playlist export file in XML format right from iTunes into the appropriate directory.

At the bottom of a post where you want to reference the playlist, all you need to add is a **<playlist>your_playlist.xml</playlist>** and you’ll be money.

### Known Issues ###

* Currently, if this plugin is active, you can’t edit posts. If you make it inactive, you can edit posts.

*Note: as of 0.2, I corrected namespace conflicts and this has been resolved.*

* This only supports playlists as the last item on the page.

Here’s a test, using a deliberately (note I mentioned *deliberately*) crappy playlist file entitled *InspirationalCheese.xml*:

InspirationalCheese.xml### Frequently Asked Questions ###

Please use the commenting features of this blog to ask any questions or report any problems you have.

19 replies on “iTunes Playlist Plugin for WordPress”