SpaceMonkey~ Like a monkey ready to be shot into space~ SpaceMonkey.

Wordpress 外掛無名MP3

November 21, 2006 on 10:31 am | tags:

看來很多人把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 則回應 »

RSS feed for comments on this post. TrackBack URI

  1. Blog標題的字體換了嗎?蠻好看的。

    Comment by Leo Anderson — November 21, 2006 #

  2. 沒呀

    Comment by alexw — November 21, 2006 #

  3. 是我搞錯了。那張海邊跑步的標頭的字體很好看,我還以為那個字體是獨立的,看了別的之後才知道那是圖檔。

    Comment by Leo Anderson — November 22, 2006 #

  4. [...] http://blog.alexw.net/ http://blog.alexw.net/archives/2006/11/21/590.php [...]

    Pingback by Feng WORLD » Blog Archive » link — January 4, 2007 #

請給予回應

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Blog出版系統WordPress 版面配置修改自 Pool theme .
Entries and comments feeds.
本網誌由 王彥博[AlexW] 撰寫/攝影/維護. ^Top^
本網誌圖文皆以cc(by-nc-nd)授權