Блогът на Росен Иванов - The personal space of Rosen Ivanov


Nazdrave-MP3

Nazdrave-MP3 is a Wordpress plugin which allows you to embed an Adobe Flash MP3-player in your blog, using simple [mp3] tags like this:

[mp3]/wp-content/uploads/malmsteen - amberdawn.mp3[/mp3]

Go get Adobe Flash Player!

This plugin supports passing tag attributes to the player, like standard HTML. Here’s an example:

[mp3 autostart=“true” repeat=“true”]song.mp3[/mp3]

A full list of all attributes accepted is available here

CREDITS

This plugin uses Jeroen Wijering’s JW MP3 PLAYER v3.99. It was heavily inspired by MP3-o-Matic!, which I tried to modify to suit my needs, but I reached a point where I have replaced almost all of the initial code, so it was actually another plugin! Currently the only thing that remains from MP3-o-Matic is the tag syntax ([mp3][/mp3]).

The plugin also makes use of Geoff Stearns’ Javascript SWFObject.

DOWNLOAD

The most current version is 1.2
Download nazdrave-mp3-1.2.zip (36.1KB)

INSTALL

Just extract the contents of this archive to the “wp-content/plugins” directory of your blog. Then go to the Plugins page of your admin screen and activate the plugin.

USE

It’s really simple - if you don’t want any fancy control over the player, just enter the URL of any MP3 file in the post/page editor, and surround it with [mp3][/mp3] tags, just like a HTML link. The only limitation is the file location - it must be a valid URL (either absolute or relative), because the player runs on the client machine and must be able to get the file via Internet. So, you can’t point to a file outside the document root. You can, however, point to a file on another site, if you specify the full URL (like http://example.com/file.mp3).

You can use the player in your posts and pages, but not in comments (I have some plans for this, watch out for the new version! :) ).

VERSION LOG

1.01:
Since I’ve lost my original source code, this is a complete rewrite of the plugin. The functionality is the same though, so I changed only the subversion code

1.02:
Updated the JW MP3 Player to version 3.99

1.1 (24/Nov/2007):
This one’s for all of you standard-freaks out there
(cheers to all of you! ;) )

The plugin is now XHTML compliant! Thanks to Geoff Stearns’ SWFObject, the plugin outputs just SPAN and SCRIPT tags, which means it conforms with pretty much every HTML/XHTML standard today. The old version produced the more common EMBED, OBJECT and PARAM tags, which made all XHTML validators go nuts :)

Another benefit from the use of SWFObject is that the IE7 users no longer need to click the player in order to use it. As you may know, some time ago Microsoft released an update to IE7 which requires the user to activate the user interfaces of ActiveX controls prior to using them. Fortunately, this applies only to static APPLET, EMBED, and OBJECT elements, but not to controls created by external scripts. By using SWFObject the plugin gets round this problem and enables the user to directly interact with the player.

1.2 (19/Jan/2008):
Happy new year with this new version, it’s a bugfix release for an issue occurring when the “Blog address” and “WordPress address” in your blog’s options are different. If you have given WordPress its own directory as described here, the previous version of the plugin wouldn’t work for you. Credit goes to Ryan for spotting this problem. Cheers, mate :)

FUTURE PLANS
- Playlists
- An options page in the admin, specifying default attributes and some other settings
- Ability to put a player in comments
- Checking for and applying updates

p.s. Nazdrave means “cheers” in Bulgarian :P

37 Responses to “Nazdrave-MP3”

  1. DarkGiank.com Says:

    Hi, great modification of my plugin, i have made mine in 30 minutes so it has not too much caracteristics, thanx for adding it, I see that the of your plugin is very similar to mine, you have added a flashvars parser :D nice :D I will be very happy if you put me as one of the authors in the info part of the code :D thanx in advance, great work!.

  2. SoulSmasher Says:

    Thank you i was expğecting for a plugin like this!btw i’ve a question, can we update mp3player.swf with new releases??

  3. inSInc Says:

    oooh, gg^^ me like v-much =)

  4. Pez Says:

    Do you have version 2 of your MP3 player available. The one on myflashfetish.com?Thanks!

  5. admin Says:

    @SoulSmasher: Yes, swapping the .swf file should work

  6. Jason Says:

    Is it possible to use your plugin to do playlists like you can if you embed with the Flash MP3 Player? Or can you only do one file at a time?

  7. Цветан Дичев Says:

    Поздравления. Много добър плъгин. :)

  8. david Says:

    i am interested in using an mp3 player like the link listed here:

    http://www.jonathancoulton.com/store/downloads

    would your player work in wordpress - like this?

  9. Stylius.NET » Blog Archive » “Валиден” Flash Says:

    […] дена си инсталирах един плъгин за Wordpress-а, наречен Nazdrave-MP3. Най-общо казано, това е Flash MP3 плеър, на който просто се […]

  10. Stylius Says:

    Поздравления за плъгина! Много е добър. Само едно нещо му липсваше и за това му направих малка модификация. Проблема е, че не се валидизира страницата, ако се използва този плъгин. В моя блог съм постнал една публикация какво съм направил: http://www.stylius.net/?p=39

  11. WordPress Plugins Database » Plugin Details » Nazdrave-MP3 Says:

    […] Visit […]

  12. admin Says:

    @Stylius: Поздравления и на теб! Метода с OBJECT тага е наистина добро предложение :)
    Успях да намеря и друг начин да направя плъгина съвместим със стандартите, който обаче има и друг, доста полезен страничен ефект ;) Виж описанието на версия 1.1

  13. WordPress 2.3 compatiblity Plugins | Dreamer's Blog Says:

    […] Nazdrave-Mp3 (http://blog.nazdrave.net/?page_id=13) 1.02 […]

  14. jwqlb Says:

    very nice, thank you.
    but the fake equalizer doesn’t work.
    what can i do?

    greetings
    jwqlb

  15. Pete Says:

    I keep getting “Go get Adobe Flash Player!” instead of the flash player. I know I have the latest version of Flash, and I have a valid mp3 file. What am I missing? I tested in Safari and Firefox on a Mac.

  16. Ryan Says:

    I’m getting the same result as Pete. Downloaded the Flash 9 plugin and still get the result.

  17. admin Says:

    Guys, could you please give me some more details on the Macs you’re using? The plugin seems to work fine on our iMac in the office, and I don’t have access to another one for testing.

  18. Ryan Says:

    Sorry for that. I’m on 10.4.11 running Safari 3 and FF 2.0.0.11. It was the upgrade from 1.0 that broke it for me. Thanks for the quick reply

  19. Whatever I Feel Like Blogging About » Plugins I Use Says:

    […] Nazdrav-MP3 - Simplifies the process of embedding mp3’s. […]

  20. Ryan Says:

    Got some time to debug the issue and it turns out it wasn’t finding my wp installation correctly as my blog address and wp install address are different. Changed (in mp3.php) the $url var on line 46 from get_bloginfo(’url’) to get_bloginfo(’wpurl’)

    This fixed the url issue. Then found that the $path var on line 20 was doing the same thing when finding the media file location. Changed the var in the function on line 78 from so.addVariable(”file”, “$path”); to so.addVariable(”file”, “main$path”);

    Now the player’s play and pause buttons are on top of each other. Haven’t figured this out. Hope this helps. You can see what I mean at http://ryanfitzer.com/?p=587

    I’ll post back when I figure that part out.

  21. Ryan Says:

    The player button problem was the result of trying to play an .m4a file. Once I encoded it as an .mp3 things went back to normal. Sorry for all the smiley faces up there.

  22. MaxTR.org » Blog Archive » Wordpress Mp3 Player Says:

    […] Eklenti sayfası : Buradan […]

  23. admin Says:

    Ryan, thanks about pointing out the “url” vs “wpurl” issue! You are absolutely right :)

    I’ll fix this as soon as I can

  24. ana paula Says:

    sem comentarios….

    adorei

  25. ankara nakliyat Says:

    Very nice thank you friends.

  26. Tony Says:

    Hi,

    I am having trouble I with the plugin because of a setting I have inside of Wordpress. My wordpress address (URL) is different from my Blog Address (URL) so when the swbobject goes to find the mp3player its looking for it at the Blog Address and not the wordpress address. In other words,

    http://www.mywebsite/blogaddress/postitle (Blog address) would look like this
    http://www.mywebsite/news/something-interesting

    http://www.mywebsite/wordpressaddress/postitle (wordpress address)
    http://www.mywebsite/wordpress/something-interesting

    This is what happens and the script doesnt account for the setting in wordpress to allow you the security feature of making your visible blog address different from that of your wordpress address

    Any help would be most appreciated!!

    Thanks!!!

  27. admin Says:

    Hi Tony,

    Version 1.2 fixes this issue. You should give it a try.

    Thanks for the feedback :)

  28. Cam balkon Says:

    Playlists
    - An options page in the admin, specifying default attributes and some other settings
    - Ability to put a player in comments
    - Checking for and applying updates

    p.s. Nazdrave means “cheers” in Bulgarian
    what is that

  29. s.karal Says:

    Currently the only thing that remains from MP3-o-Matic is the tag syntax.. Rightly..

  30. 3. Cadde Bahcesehir Says:

    Can you only do one file at a time?

  31. baron Says:

    hi there plugin but :

    Does anybody know if tis script is compatible with Wordpress 2.5.1?

    Thanks in advance for any help on this!

  32. Интернет маркетинг Says:

    Страшен плугин веднага го пускам в деиствие :) Благодаря отново.

  33. Finally — an mp3 player for WordPress that works out of the box | Karen Arnold Design, LLC Says:

    […] I have tried off and on over the last few months to find an mp3 player that I can embed in a post or page in a site powered by WordPress. No luck. But today my luck has changed. I found Nazdrav. […]

  34. sonix7 Says:

    A big thank you, have been looking to embed a flash mp3 player for ages, but am not technical enough to do it, and how here is Nazdrav!

  35. Volkan Says:

    I thank for the plugin. I am useing websites.

  36. KabonFootprint Says:

    Woaw, great. I think this is the plugin that I am looking for. Will try it out now. Many thanks :)

  37. Price Drop Protector Says:

    Excellent, small and streamlined - far better than alot of the bloated alternatives. Thanks.

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image