bartek24m
12-08-2009, 06:43 AM
I have gread idea to set up own mp3 player in user profile but i need some solution.
The basic script on wchich my hack will work is
"Flash Mp3 player 3.6 Jeroenwijering"
Step.1
File in attachment copy to public_html/player/
Step.2 (A few template changes to add flash player to user profile)
In template headinclude:
<script type="text/javascript" src="player/ufo.js"></script>
In template MEMBERINFO
<p id="player2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
var FU = { movie:"mp3player.swf",width:"240",height:"135",majorversion:"7",build:"0",bgcolor:"#FFFFFF",
flashvars:"file=player/playlist.xml&displayheight=0" };
UFO.create(FU,"player2");
</script>
Now what I'am trouble with....:
How to insert content of playlist.xml in some template or plugins and change the path to
flashvars:"file=player/playlist.xml&displayheight=0" };
also allow my users change in their usercp location of mp3
The new code could be
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<if condition="$userinfo[field5]">
<track>
<title>Electro</title>
<creator>Test song 1 - </creator>
<location>$userinfo[field5]</location>
</track>
</if>
<if condition="$userinfo[field6]">
<track>
<title>Fidget</title>
<creator>Test song 2 - </creator>
<location>$userinfo[field6]</location>
</track>
</if>
</trackList>
</playlist>
Demo of this player:
http://www.4clubbers.com.pl/player/player.html
The basic script on wchich my hack will work is
"Flash Mp3 player 3.6 Jeroenwijering"
Step.1
File in attachment copy to public_html/player/
Step.2 (A few template changes to add flash player to user profile)
In template headinclude:
<script type="text/javascript" src="player/ufo.js"></script>
In template MEMBERINFO
<p id="player2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
var FU = { movie:"mp3player.swf",width:"240",height:"135",majorversion:"7",build:"0",bgcolor:"#FFFFFF",
flashvars:"file=player/playlist.xml&displayheight=0" };
UFO.create(FU,"player2");
</script>
Now what I'am trouble with....:
How to insert content of playlist.xml in some template or plugins and change the path to
flashvars:"file=player/playlist.xml&displayheight=0" };
also allow my users change in their usercp location of mp3
The new code could be
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<if condition="$userinfo[field5]">
<track>
<title>Electro</title>
<creator>Test song 1 - </creator>
<location>$userinfo[field5]</location>
</track>
</if>
<if condition="$userinfo[field6]">
<track>
<title>Fidget</title>
<creator>Test song 2 - </creator>
<location>$userinfo[field6]</location>
</track>
</if>
</trackList>
</playlist>
Demo of this player:
http://www.4clubbers.com.pl/player/player.html