iTunes Data
iTunes Data is a WordPress plugin widget that allows bloggers to upload their iTunes XML file and display a randomized list of top genres, most played artists, recently added and most played albums. Hovering over the links displays further details about the entry. Bloggers can upload either a raw XML file or a zipped version.
The widget couldn’t have been built without the iTunes XML parser for PHP library written by Robert A. Wallis
Requirements
Requires at least: 2.7
Tested up to: 2.7stable
Stable tag: 2.7
Screenshots
Usage
After installation, which is best done from the WordPress plugin manager, go into the Widget manager and activate the widget. You’ll need to upload an iTunes XML file in either the raw XML, which can be quite large, or preferably, as a zip archive.
Future Releases
- None
Changelog
1.0
- Initial Release
Bugs
- None
Installation
- Create backup.
- Upload the zip file to the `/wp-content/plugins/` directory
- Unzip
- Activate the plugin through the ‘Plugins’ menu in WordPress
Please let me know any bugs, improvements, comments, suggestions.




Email

Thank you for this plugin, but is it possible to put the iTunes library in a page of his blog? In the next version? maybe ? =)
I was actually thinking about that exact functionality but I thought a feature like that would only appeal to me so I didn’t move forward with it.
I wasn’t actually planning on expanding on the widget, except for bug fix releases, but if there’s interest in additional functionality I’m into it
I’d very be interested in it being its own page.
Hey, great widget.
I wish there was an option to display a specific type of data each time. I would like to show my most often played songs, with the song name, band, and play count.
I’m fairly good with PHP and I do see you use a random to determine what displays. I haven’t messed with it yet, but I’m assuming I can just change the rand() to the number 3 and I should get that option each time?
anyway, thank you for the widget!
Thanks Rick! I’m glad you like the plugin.
You’re right about the rand() call; if you hard code the number you want to display you’re good to go.
I would like to be able to post data to a page as well.
Awesome job!
Heya~ I was successfully using this plugin, but I upgraded my webserver hardware and in the process the website was lost. I brought everything back using the SQL backups as a template for what I needed to redownload to get the site back to normal functionality for the most part, so that the only thing I wound up losing was pictures and the like. However, there are a couple plugins which still refuse to work, and this is one of them.
Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected $end in wp-content\plugins\itunes-data\itunes-data.php on line 561
This is the displayed error. Line 561 is the last line in the file however, and maybe its just from me being tired, but I don’t see anything that should result in a parse problem. Especially since this is the same version of plugin as before, which did work. Removing the SQL tables related to the plugin still does not allow it to be installed. Hoping maybe you can shed some light on this issue.
Michael,
That error is usually seen when the php parser can’t parse anymore. 9 times out of 10 it’s because the file is still uploading when execution is happening. This doesn’t seem to be the case for you though.
I didn’t see a link to your site, so I can check out the error, but if you want to send me an email I can help you troubleshoot this offline.
Eric
Eric,
Done a few things so far, made some progress but still running into a block. Sent the information via email listed on your contacts page.
Thanks for the help.
Michael
Thanks for the credit on my PHP code. A few people have complained that the script times out or runs out of memory. This is because my method (really PHP DOM’s method) was to load the entire xml file into memory, and then parse it into an array, and then return that array. A better approach would be to use a different XML parser that parses one tag at a time and calls a function when a new tag is reached. Namely xml_set_element_handler() and xml_parse(). This would be the least memory intensive. However the list could not be easily sorted.
For your WordPress plugin purposes, you could use the xml_parse() method. Just keep a list, A, of up to 10 artists, then for each artist, i, parsed in the element handler, if i is more popular than A’s least popular artist, remove A’s least popular artist and add i.
That would solve any memory issues that came about from using my code.