ich hab bei einem Redaxo-Projekt einen eigenartigen Fehler:
In einem Modul habe ich die REX_MEDIALIST verwendet. Diese wird mit MP3-Dateien befüllt, die über einen Player im Frontend abgespielt werden sollen. Komischerweise werden im Frontend immer nur die ersten 5 Dateien ausgegeben (siehe Screenshot 1), obwohl in der Liste mehr als 5 Dateien eingepflegt sind (siehe Screenshot 2). Noch komischer ist, dass im Redaxo-Backend offenbar alle Files erkannt bzw. dargestellt werden (siehe Screenshot 3). Woran kann das liegen?
So sehen meine Modulscripts aus:
INPUT
Code: Alles auswählen
Songs auswählen:<br />
REX_MEDIALIST_BUTTON[1]
<br /><br />
Code: Alles auswählen
<?php
$docpath = $REX['HTDOCS_PATH'];
$filepath = $REX['HTDOCS_PATH'].'files/';
$files = explode(',', 'REX_MEDIALIST[1]');
$b = "\n";
$t1 = "\t";
$t2 = "\t\t";
$t3 = $t1 . $t2;
$t4 = $t2 . $t2;
$t5 = $t4 . $t1;
$t6 = $t4 . $t2;
$t7 = $t6 . $t1;
$t8 = $t6 . $t2;
$cont_output = '';
$cont_output .= '<img src="files/sp_player_head.png" alt="Now playing:" border="0" />' . $b . $b;
$cont_output .= $t4 . '<div id="player_controls">' . $b;
$cont_output .= $t5 . '<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">' . $b;
$cont_output .= $t5 . '<tr>' . $b;
$cont_output .= $t5 . '<td width="86" align="left" valign="top">' . $b;
$cont_output .= $t6 . '<a href="#" id="skip_rw"><img src="files/sp_player_skip_rw.png" class="controls" border="0"></a>' . $b;
$cont_output .= $t6 . '<a href="#" id="play"><img src="files/sp_player_play.png" class="controls" border="0" style="display: inline;"></a>' . $b;
$cont_output .= $t6 . '<a href="#" id="pause"><img src="files/sp_player_pause.png" class="controls" border="0" style="display: none;"></a>' . $b;
$cont_output .= $t6 . '<a href="#" id="skip_fw"><img src="files/sp_player_skip_fw.png" class="controls" border="0"></a>' . $b;
$cont_output .= $t5 . '</td>' . $b;
$cont_output .= $t5 . '<td width="180" align="left" valign="top">' . $b;
$cont_output .= $t6 . '<audio preload></audio><br />' . $b;
$cont_output .= $t6 . '<h6>##player_head##</h6>' . $b;
$cont_output .= $t5 . '</td>' . $b;
$cont_output .= $t5 . '</tr>' . $b;
$cont_output .= $t5 . '</table>' . $b;
$cont_output .= $t4 . '</div>' . $b . $b;
$cont_output .= $t4 . '<div id="player_tracks_wrapper">' . $b;
$cont_output .= $t4 . '<div id="player_tracks">' . $b;
$cont_output .= $t5 . '<ol>' . $b;
if (count($files) >= 1 && $files[0] != '') {
foreach($files as $filename) {
$title = '';
if ($file = OOMedia::getMediaByFileName($filename)) $title = $file->getTitle();
$cont_output .= $t6 . '<li><a href="#" data-src="' . $filepath . $filename . '">' . $title . '</a></li>' . $b;
}
}
$cont_output .= $t5 . '</ol>' . $b;
$cont_output .= $t4 . '</div>' . $b;
$cont_output .= $t4 . '</div>' . $b . $b;
// nur Testausgabe
$cont_output .= '<!-- ' . $files[0] . ' -->' . $b;
$cont_output .= '<!-- ' . $files[1] . ' -->' . $b;
$cont_output .= '<!-- ' . $files[2] . ' -->' . $b;
$cont_output .= '<!-- ' . $files[3] . ' -->' . $b;
$cont_output .= '<!-- ' . $files[4] . ' -->' . $b;
$cont_output .= '<!-- ' . $files[5] . ' -->' . $b;
$cont_output .= '<!-- ' . $files[6] . ' -->' . $b;
// hier wird auch nur der Inhalt von $file[0] bis $file[4] ausgegeben.
echo $cont_output;
?>
Vielen Dank für Eure Hilfe!
Gruß, Michael