Here is how I did it.
Step one: If you haven't already, create a file named kpconfig.php and put it in the root of your kplaylist install directory. This will make your life much easier in general for upgrades if you keep up on the dev releases.
Step two: Upload the player you want to use to the kplaylist install directory. For Lacy's, I made a folder called "morrow/", though you could also make one just called "players/" if you want to test several. That would keep things neat and tidy.
Step three: Open up kpconfig.php and add a line for the player-
- Code: Select all
$cfg['xspf_url'] = 'morrow/xspf_jukebox.swf';
Step four: We want to create a new config variable that we can use to set things like skins or other variables for whatever player you want to use. So, add a new line and put in -
- Code: Select all
$cfg['xspf_opt'] = 'skin_url=morrow/iTunes/&no_continue=false&';
Note the trailing & in the value. If you don't want to set any options, you can set this to null and/or leave the value out of step six.
Step five (optional): Add any other customized settings to this file. window_x and window_y are good ones. I also created two more that are xspf_x and xspf_y that are set to window_x and window_y minus 20 respectively to control the flash player and popup window sizes. My total kpconfig.php looks like this -
- Code: Select all
<?php
$cfg['frontbulletinchars'] = 120;
$cfg['enablegetid3'] = 1;
$cfg['uploadselections'] = 24;
$cfg['numberlogins'] = 1;
$cfg['livestreamajax'] = true;
$cfg['window_x'] = 420;
$cfg['window_y'] = 220;
$cfg['xspf_x'] = $cfg['window_x'] - 20;
$cfg['xspf_y'] = $cfg['window_y'] - 20;
$cfg['xspf_url'] = 'morrow/xspf_jukebox.swf';
$cfg['xspf_opt'] = 'skin_url=morrow/iTunes/&no_continue=false&';
$cfg['xspf_enable'] = true;
?>
Step six: Open up your kplaylist file and look near line 14123 for the function flashhtml(). Change -
- Code: Select all
$link = $cfg['xspf_url'].'?autoplay=true&autoload=true&playlist_url='.urlencode($playlist);
to
- Code: Select all
$link = $cfg['xspf_url'].'?'.$cfg['xspf_opt'].'autoplay=true&autoload=true&playlist_url='.urlencode($playlist);
Step seven (optional): On lines 14126 and 14131 you can change the height and width values to be -
- Code: Select all
height="<?php echo $cfg['xspf_y']; ?>" width="<?php echo $cfg['xspf_x']; ?>"
That should do it, I think. I always note the changes I make to the file in a separate mods.php file, so that after I upgrade, I can add the modifications back real easily.