WordPress 外掛無名MP3

看來很多人把MP3丟在無名,然後在blog上放歌,
不過如果想要在自己的Wordpress(或是其他BSP)上面插入無名那邊的MP3倒是會發生許多小問題(尤其是FireFox+無名MP3=全掛),不過~

原來只要用Flash去把mp3掛進來
就可以完美的播放,而且 IE/FireFox 皆可用

請先去下載jeroenwijering寫的Flash_MP3_Player(還有open fla出來的說)

下載之後把 ufo.js , mp3player.swf 丟進你的 WordPress 上面,路徑隨你放, 只要找的到就好

因為wp在發表文章會把內容的東西重新格式過一次,所以javascript會被濾掉

因此在PO文章前還得在裝個plugin: wp-inline-js

最後 還要在妳的theme中header樣版的head中裡面補上一行

<script type=”text/javascript” src=”PATH/ufo.js”></script>

萬事具備後,就開始PO文章了

在內文中插入(記得是在HTML模式下)

<p id=”player1″><a href=”http://www.macromedia.com/go/getflashplayer”>Get the Flash Player</a> to see this player.</p>

<code>
<script type=”text/javascript”>
var FO =
{movie:”PATH/mp3player.swf“,
width:”300″,height:”20″,majorversion:”7″,build:”0″,bgcolor:”#FFFFFF”,
flashvars:”file=http://CHANGE.ME.mp3&showdigits=true&autostart=false”};
UFO.create(FO,”player1″);
</script>
</code>

.mp3後面&接的參數可以自己設定(請參照原下載檔案的readme.html)

這樣子就有漂漂亮亮又IE/FireFox通吃的 mp3 player

4 thoughts on “WordPress 外掛無名MP3”

Leave a Reply to Leo Anderson Cancel reply