Ich hab' für einen Freund ein Musicplayer Modul mittels des xspf_player_slim.swf erstellt, welches ich der Community nicht vorenthalten möchte.
Vorgehen:
1. erstellt ein XML File mit der Endung xspf, nennt es wie ihr wollt. Es muss folgende Struktur haben.
Code: Alles auswählen
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns = "http://xspf.org/ns/0/">
<trackList>
<track>
<location>http://meinedomain/meinpfad/mymusic.mp3</location>
<image>http://www.name.com/folder/picture.jpg</image>
<annotation>Musiktitel</annotation>
</track>
<track>
<location>http://meinedomain/meinpfad/mymusic.mp3</location>
<image>http://www.name.com/folder/picture.jpg</image>
<annotation>Musiktitel</annotation>
</track>
</trackList>
</playlist>
3. Berechtigung 666 zuweisen
4. Erstellt ein neues Verzeichnis namens musicplayer unter contenido\external auf eurem webspace
5. kopiert die Datei xspf_player_slim.swf in dieses neu erstellte Verzeichnis
6. erstellt ein Modul z.B. musicplayer und weist es einem template zu
INPUT:
Code: Alles auswählen
echo "<table width='100%' border='0'>
<tr>
<td><strong>Höhe in Pixel oder %:</strong></td>
<td><input name='CMS_VAR[0]' type='text' value='CMS_VALUE[0]'></td>
</tr>
<tr>
<td><strong>Breite in Pixel oder %:</strong></td>
<td><input name='CMS_VAR[1]' type='text' value='CMS_VALUE[1]'></td>
</tr>
<tr>
<td><strong>Playlist Url:</strong></td>
<td><input name='CMS_VAR[2]' type='text' value='CMS_VALUE[2]'></td>
</tr>
<tr>
<td><strong>Autoplay (true/false):</strong></td>
<td><input name='CMS_VAR[3]' type='text' value='CMS_VALUE[3]'></td>
</tr>
<tr>
<td><strong>Autoload (true/false):</strong></td>
<td><input name='CMS_VAR[4]' type='text' value='CMS_VALUE[4]'></td>
</tr>
<tr>
<td><strong>Repeat playlist (true/false):</strong></td>
<td><input name='CMS_VAR[5]' type='text' value='CMS_VALUE[5]'></td>
</tr>
<td><strong>Hintergrundfarbe:</strong></td>
<td><input name='CMS_VAR[6]' type='text' value='CMS_VALUE[6]'></td>
</tr>
</table>";
Code: Alles auswählen
<?php
echo '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/
shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="CMS_VALUE[1]" height="CMS_VALUE[0]">
<param name="allowScriptAccess" value="sameDomain"/>
<param name="movie" value="http://www.deinedomain.org/contenido/external/musicplayer/xspf_player_slim.swf?playlist_url=CMS_VALUE[2]&autoload=CMS_VALUE[4]&autoplay=CMS_VALUE[3]&repeat_playlist=CMS_VALUE[5]"/>
<param name="quality" value="high"/>
<param name="bgcolor" value="CMS_VALUE[6]"/>
<param name="info" value=""/>
<param name="player" value=""/>
<embed src=
"http://www.deinedomain.org/contenido/external/musicplayer/xspf_player_slim.swf?playlist_url=CMS_VALUE[2]&autoload=CMS_VALUE[4]autoplay=CMS_VALUE[3]&repeat_playlist=CMS_VALUE[5]" quality="high" bgcolor="CMS_VALUE[6]"
name="xspf_player" allowscriptaccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
align="center" width="CMS_VALUE[1]" height="CMS_VALUE[0]"></embed>
</object>';
?>
Weitere Infos sowie die original Flash Files zum Musicplayer findet ihr unter http://musicplayer.sourceforge.net/.
Eine Beispiel Playlist findet ihr hier: http://www.bfdesign.ch/index.php?idcat=41
Die Templatekonfig sollte dann so aussehen:
Ich übernehme keinerlei Verantwortung und kann nicht haftbar gemacht werden, für das Verwenden und öffentliche Abspielen illegal kopierter und erstellter mp3 Files.