Made of Everything You're Not

No, not the flute playing Eric Lamb; the guitar playing, PHP programmer Eric Lamb. The better Eric Lamb.
  • Home
  • Projects
  • Portfolio
  • Resume

iTunes Data

NOTE THAT THIS IS UNSUPPORTED!

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

Download iTunes Data Widget

Requirements

Requires at least: 2.7
Tested up to: 2.7stable
Stable tag: 2.7

Screenshots

Widget

Widget

Upload File

Upload File

Stats

Stats

Widget Manager

Widget Manager

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

  1. Create backup.
  2. Upload the zip file to the `/wp-content/plugins/` directory
  3. Unzip
  4. Activate the plugin through the ‘Plugins’ menu in WordPress

Please let me know any bugs, improvements, comments, suggestions.

Download iTunes Data Widget

Bookmark and Share

19 Comments

  1. Valentin says:
    March 16, 2009 at 9:15 am

    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 ? =)

    • Eric Lamb says:
      March 16, 2009 at 9:27 am

      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 :)

      • Sean says:
        July 17, 2009 at 9:21 pm

        I’d very be interested in it being its own page.

  2. Rick says:
    March 28, 2009 at 3:13 pm

    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!

    • Eric Lamb says:
      March 28, 2009 at 3:27 pm

      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.

  3. Scott says:
    April 18, 2009 at 8:51 pm

    I would like to be able to post data to a page as well.

    Awesome job!

  4. Michael says:
    May 11, 2009 at 4:29 pm

    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.

  5. Eric Lamb says:
    May 11, 2009 at 4:45 pm

    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

  6. Michael says:
    May 15, 2009 at 4:33 pm

    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

  7. Robert Wallis says:
    September 23, 2009 at 12:41 am

    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.

    :)

  8. Andrew says:
    May 2, 2010 at 12:16 pm

    I’d be interested in displaying it in a page to.

  9. Mike says:
    July 12, 2010 at 11:09 am

    I’m being asked to make sure the itunes data directory is writable – does this mean world writable?

    Thanks.

    Next update could you have a simple “button” on the plugin page to configure the permissions?

    =)

    Thanks!

    • Eric Lamb says:
      July 24, 2010 at 6:12 pm

      Hi Mike,

      Sorry for the delay man; iTunes Data just isn’t on my radar anymore…

      Yes, you have to make the directory world writable unless your php installation is running as suphp (where the owner of the files is the same user that php runs at; I think…)

      Eric

  10. Mike says:
    July 12, 2010 at 11:39 am

    I feel stupid but:
    Seems I have to set the tmp directory as world readable? Is this true?
    Also, while I get a success message while uploading a zip file, no data populates the plugin.
    Is there a step by step config document for this plugin?

    Thanks!

    • Eric Lamb says:
      July 24, 2010 at 6:13 pm

      Yes, this is because of permissions more than likely.

      Eric

  11. Mike says:
    July 23, 2010 at 11:29 am

    Eric,

    Are you watching this anymore?

    • Eric Lamb says:
      July 24, 2010 at 6:13 pm

      Honestly, Mike, I’m not…

      iTunes Data started out as a proof of concept for hacking up wordpress that morphed into a semi-useful plugin for a very small amount of people.

      I apologize for the delay; I’ll try and be more available in the future :)

      Eric

      • Mike says:
        July 24, 2010 at 6:43 pm

        No sweat! You got me inspired to write up my own. I’ve got it working (sort of) on my site.

        Thanks for the inspiration!

        Mike

  12. Аboutalcoru says:
    May 11, 2011 at 3:53 pm

    А чё? больше не чего лучшего разве нет? мне и так понятно

  • Subscribe: Entries | Comments
  • About Me

    Email Email
    Twitter Twitter
    310.739.3322
  • Categories

    • Brain Dump
    • Business
    • Code
    • IT
    • Programming
    • Rant
    • Servers
  • Archives

    • October 2011
    • August 2011
    • July 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008

Copyright © 2008 - 2012 Eric Lamb - All rights reserved