GetSimple Support Forum

Full Version: Mp3 Player 1.0 (Beta)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
Plugin Name: Mp3 Plugin
Description: Replace links to mp3 files with a flash player inside of page contents
Version: 1.0

Simple plugin that replace anchors to mp3 files with an mp3 player

On my site works well, but it needs some tests Smile


bye bye


Code:
TODO:

- add admin tab for customize the player settings
Any instructions?

Thanks.

homershines
Unzip it to your plugin folder and you should be good.
Got it.

Thanks.

Homer
Don't work for me !
Hi there.. hope you dont mind, I update the one part of your code to allow for whitespace characters that breaks the plugin

changed
Code:
$str = '/<a(.*)(href|src)(\"|\'|\=\"|\=\')(.*'.$str.')(.*)\/a>/i';

To be as follows
Code:
$str = '/<a(.*)(href|src)(\"|\'|\=\"|\=\')(.*'.$str.')(.*[ \t\r\n]*)(.*<\/a>)/i';

Now if link looks like this

Code:
<a href="123wq.mp3">
  Test me please    </a>

then it wont break. as it required the links text to be as follows

Code:
<a href="123wq.mp3">  Test me please    </a>

Hope it helps.. Thanks for the plugin.

cheers

Johannes
Also, extra note, what I noticed is that the mp3 files must not have spaces in its name for example
my mp3 music file.mp3

it seems the flash plugin does not like that, must rather be linked, I did mine as

my_mp3_music_file.mp3

then it works..

tx
how much there is that line?
Sorry dont really understand what you are asking (English is not my native language)

Thanks