Configuring Wimpy Player

8 posts by 2 authors in: Forums > CMS Builder
Last Post: January 15, 2010   (RSS)

Re: [drewh01] Configuring Wimpy Player

By Chris - January 14, 2010

Hi drewh01,

The request for http://www.sedonaeliteproperties.com/skin_itunes.xml is coming back with a 404, could that be causing a problem?
All the best,
Chris

Re: [chris] Configuring Wimpy Player

By drewh01 - January 14, 2010

Oy - I think I have been staring at monitors too long today.

Yes, correcting that skin xml path helped to solve issue #2

Now I just need to see why the tracklist is not loading.

Re: [drewh01] Configuring Wimpy Player

By drewh01 - January 15, 2010

I removed a "where" line in the header and I can now get the first mp3 to appear and play in the player but I cannot for the life of me figure out what I am doing wrong as the other 3 mp3 files are not appearing.

http://www.sedonaeliteproperties.com/audio/playlist.xml.php

<?php header('Content-type: application/xml; charset=utf-8'); ?><?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>

<?php

require_once "/home/sedonael/public_html/cmsAdmin/lib/viewer_functions.php";

list($audioRecords, $audioMetaData) = getRecords(array(
'tableName' => 'audio',
'limit' => '1',
));
$audioRecord = @$audioRecords[0]; // get first record

?>

<playlist>
<?php foreach ($audioRecord['audio_upload'] as $upload): ?>
<item>
<filename>/audio/<?php echo $upload['filename'] ?></filename>
<title><?php echo $upload['info1'] ?></title>
</item>
<?php endforeach ?>

</playlist>

Re: [drewh01] Configuring Wimpy Player

By Chris - January 15, 2010

Hi drewh01,

'limit' => '1',

This line will limit the number of records returned by getRecords() to 1. Try removing it?
All the best,
Chris

Re: [chris] Configuring Wimpy Player

By drewh01 - January 15, 2010

yes, I removed it but am still only getting the first mp3. in the admin I have 12 uploaded.



<?php header('Content-type: application/xml; charset=utf-8'); ?><?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>

<?php

require_once "/home/sedonael/public_html/cmsAdmin/lib/viewer_functions.php";

list($audioRecords, $audioMetaData) = getRecords(array(
'tableName' => 'audio',
));
$audioRecord = @$audioRecords[0]; // get first record

?>

<playlist>
<?php foreach ($audioRecord['audio_upload'] as $upload): ?>
<item>
<filename>/audio/<?php echo $upload['filename'] ?></filename>
<title><?php echo $upload['info1'] ?></title>
</item>
<?php endforeach ?>
</playlist>

Re: [drewh01] Configuring Wimpy Player

By Chris - January 15, 2010

Wait, are your 12 mp3s uploaded into one record? Are you sure you're getting the correct record? The code you have will grab the first record and list all the uploads within it.

If you instead want to list all uploads in all your records, you can do something like this:

<?php header('Content-type: application/xml; charset=utf-8'); ?><?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>

<?php

require_once "/home/sedonael/public_html/cmsAdmin/lib/viewer_functions.php";

list($audioRecords, $audioMetaData) = getRecords(array(
'tableName' => 'audio',
));

?>

<playlist>
<?php foreach ($audioRecords as $record): ?>
<?php foreach ($record['audio_upload'] as $upload): ?>
<item>
<filename>/audio/<?php echo $upload['filename'] ?></filename>
<title><?php echo $upload['info1'] ?></title>
</item>
<?php endforeach ?>
<?php endforeach ?>
</playlist>


Does that help? Please let me if you have any questions.
All the best,
Chris

Re: [chris] Configuring Wimpy Player

By drewh01 - January 15, 2010

Yep! That was it!

thanks!!!