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: github.com/jopsen/pluckplayer.
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.
Greets,
Ellie Rouwenhorst
Comment by Ellie Rouwenhorst — December 29, 2009 @ 9:37 am
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:
http://code.google.com/p/spyc/
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
You forget about two things:
http://www.pluck-cms.org/docs/dev:modules:security
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
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
Okay, I’ve fixed the bugs and released the source on http://github.com/jopsen/pluckplayer
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
hi,
i want test your modules on this demo webpage:
http://pluck.ath.cx
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.
Giuseppe
Comment by giux — January 8, 2011 @ 11:52 am
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:
http://lacymorrow.com/projects/jukebox/xspfdoc.html
and
https://github.com/jopsen/pluckplayer/blob/master/player/vars.php
Comment by Jonas Finnemann Jensen — January 8, 2011 @ 12:32 pm
hi, i’ve correct the bug
if you want i can send you a patch.
Giuseppe
Comment by giux — January 8, 2011 @ 5:09 pm
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:
http://pluck.ath.cx
Excusme for my very bad english, i understand but i don’t able to write fine:(
….
//$variables = “data/modules/pluckplayer/player/vars.php”;
$variables=”&activeDownload=”.m_v_bool_out($settings[“activeDownload”]).”&alphabetize=”.m_v_bool_out($settings[“alphabetize”]);
$variables=$variables.”&autoload=”.m_v_bool_out($settings[“autoload”]).”&autoplay=”.m_v_bool_out($settings[“autoplay”]).”&repeat=”.m_v_bool_out($settings[“repeat”]);
$variables=$variables.”&repeat_playlist=”.m_v_bool_out($settings[“repeat_playlist”]).”&shuffle=”.m_v_bool_out($settings[“shuffle”]).”&crossFade=”.m_v_bool_out($settings[“crossFade”]);
$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=” />
<embed
src="?playlist_url=&skin_url=&loadurl=”
….
bie
Comment by giux — January 9, 2011 @ 1:02 am
perhaps i can send you code because in the textarea i cannot paste it correctly?
Comment by giux — January 9, 2011 @ 1:04 am
Hmm… Acoording to [1] it’s possible to load the variables like this:
xspf_jukebox.swf?autoplay=true&playlist_url=playlist.xml&…
Or this:
xspf_jukebox.swf?loadurl=var.txt&playlist_url=playlist.xml
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 jopsen@gmail.com
(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…
[1] http://lacymorrow.com/projects/jukebox/xspfdoc.html
Comment by Jonas Finnemann Jensen — January 9, 2011 @ 2:21 am