A blog by Jonas Finnemann Jensen

October 17, 2009
Musicplayer module for pluck
Filed under: Computer,English by jonasfj at 6:41 am

I’ve been working a bit on a website for a friend, not computer literate, so I took a look around for a simple, easy to use, content management system without a million useless  features and found pluck. It’s simple and yet supports modules to extend the functionality, though within limits…

Anyway, I needed a MusicPlayer module that would make it easy to publish music in Flash based music player, so I wrote one. The documentation for pluck is fairly good, php on the other hand is horrible (it took me a while to figure out I had to enable error reporting). Nevertheless, the result allows the user to upload mp3s, choose player skin and settings. For playback I used Xspf Jukebox which has 20 skins included some of which are fairly good looking…

You can download the module here… It’s for pluck 4.6, tested with 4.6.3.

Update: This plugin is now hosted at github:


  1. I tried to use your Music Player module. I installed the module. But I do not understand what to do now.
    Look at the website under the button: Muziek. What did I do wrong.

    Ellie Rouwenhorst

    Comment by Ellie Rouwenhorst — December 29, 2009 @ 9:37 am

  2. Music Player module uses spyc (an YAML reader) for it’s configuration file… The spyc.php files included module requires php5…

    So my guess is that you’re running php4, from the error message it looks like a problem parsing a php5 class…

    If you’re on php4, you may try to replace spyc.php with a the version for php4, it’s in the same zip, available from:
    Note: From the spyc changelog, it appears the php4 version have been generated using the 5-to-4 tool. So I have no idea if it’ll work…

    Comment by jonasfj — December 29, 2009 @ 11:09 am

  3. You forget about two things:

    And second – you cant mkdir with a dir and subdir with one operation. Thats why Musicplayer module cant be install in pluck.

    Comment by A_Bach — January 3, 2010 @ 11:08 am

  4. I think I have the security thing in order… at least on the pages_admin/playlist.php file… Don’t know if it should be anywhere else… 🙂

    And yeah, I probably need to make the mkdir call recursive… Thanks… will fix it as soon as a get a test install up and running… 🙂

    Comment by jonasfj — January 3, 2010 @ 11:37 am

  5. Okay, I’ve fixed the bugs and released the source on

    Enjoy… If you find any bugs or similar feel free to contact me or create an issue at github…

    Comment by jonasfj — February 7, 2010 @ 12:28 pm

  6. hi,
    i want test your modules on this demo webpage:

    but i’ve some problem with it. The player work fine if i want listen one song, but don’t start next song. For me is a bug. You can help me?
    Excusme for my bad english
    Thank you in advance.

    Comment by giux — January 8, 2011 @ 11:52 am

  7. Have you tried to change the settings?
    If that doesn’t work try out another theme, some of them can be broken… Else you can take a look into the source, it’s not that complicated. You can set extra variables for XSPF Jukebox in player/vars.php
    Take a look at:

    Comment by Jonas Finnemann Jensen — January 8, 2011 @ 12:32 pm

  8. hi, i’ve correct the bug
    if you want i can send you a patch.

    Comment by giux — January 8, 2011 @ 5:09 pm

  9. hi,
    the problem was in pluckplayer/pages_site/player.php, when it build the url to pass loadurl parameter to player use vars.php.
    I don’t know reason, but if i pass url in loadurl the player don’t work fine, but if i print parameter the player work.
    You can see this on:

    Excusme for my very bad english, i understand but i don’t able to write fine:(

    //$variables = “data/modules/pluckplayer/player/vars.php”;

    $p_w = $settings[“width”];
    $p_h = $settings[“height”];

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="” height=”” id=”flashObject” align=”middle”>
    <param name="movie"
    value="?playlist_url=&skin_url=&loadurl=” />


    Comment by giux — January 9, 2011 @ 1:02 am

  10. perhaps i can send you code because in the textarea i cannot paste it correctly?

    Comment by giux — January 9, 2011 @ 1:04 am

  11. Hmm… Acoording to [1] it’s possible to load the variables like this:
    Or this:
    where var.txt contains the variables…

    What you’re doing is obviously the first approach, and if that works better than the second then why not use it…

    You can mail me the patch my email is
    (If you know how to use git format-patch that’s probably the easiest, otherwise just send me a list of changes).
    Or you can create a fork of the project on github, push you changes there and send a pull-request…

    Thanks for fixing this bug…


    Comment by Jonas Finnemann Jensen — January 9, 2011 @ 2:21 am

Leave a comment