Info
- 2 posts
- 2 voices
- Started 3 years ago by csseur3
- Latest reply from 小可
- This topic is not resolved
Add mp3 player in a post
-
- Posted 3 years ago #
Holé,
i want to add the possibilty to insert a player for play mp3 songs, with that: http://www.alsacreations.fr/dewplayer
so, i have try this:
<?php /* Plugin Name: bbPress MP3 Dewplayer Description: A simple way to add a mp3 player in posts, with bbcode. Author: Frédéric Author URI: http://bbpress.org/ Version: 0.1 */ add_filter( 'bb_allowed_tags', 'allow_mp3_tag' ); function allow_mp3_tag( $tags ) {$tags['mp3']; return $tags;} ?>to have a simply "mp3" bbcode (i use BBcode Buttons Toolbar and BBcode Lite).
the html code for integrate the player is:
<object type="application/x-shockwave-flash" data="dewplayer.swf?mp3={LOCATION OF MP3}&showtime=1" width="200" height="20"><param name="wmode" value="transparent" /><param name="movie" value="dewplayer.swf?mp3={LOCATION OF MP3}&showtime=1" /></object>but how to integrate that in php code of plugin?
at the end, i want that the members can post that:
[mp3]URL OF THE MP3 FILE[/mp3]so, i have add that in bbcode-buttons.js:
function edClick(button) { switch (BBcodeButtons[button].id) { case 'ed_close': edCloseAllTags(button); break; case 'ed_link': edInsertLink(button); break; case 'ed_img': edInsertImage(button); break; case 'ed_mp3': edInsertMp3(button); break; default: edInsertTag(button); break; } }and
function edInsertMp3() { var myValue = prompt('Enter the URL of the mp3 file', 'http://'); if (myValue) { myValue = '[mp3]'+ myValue+'[/mp3]'; edInsertContent(myValue); } }but this is incomplete, what add in the bbcode-lite.php and my file plugin?
please help me to finish the plugin :p
Bye
-
- Posted 1 year ago #
no idea about that.
-
You must log in to post.