Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
add a mp3 player on all the mp3 link
hello this is not a real extention (with instalation) and to use it you need to edit the page with your ftp prog
to add a player on all the mp3 link (only the clickable) just add this
$Head->AddString('<script type="text/javascript" src="http://googlepage.googlepages.com/player.js"></script>');
on your page
for exemple on /yourvanilladirectory/comments.php
in the
Define properties of the page controls that are specific to this page
(near line 37)
then it's look like :
// Define properties of the page controls that are specific to this page
$Head->BodyId = 'CommentsPage';
$Head->AddString('<script type="text/javascript" src="http://googlepage.googlepages.com/player.js"></script>');
$Menu->CurrentTab = "discussions";
$Panel->CssClass = "CommentPanel";
$Panel->BodyCssClass = "Comments";
$Context->PageTitle = $CommentGrid->Discussion->Name;
0
This discussion has been closed.
Comments
However, I tried to get this working as an extension but no luck.
It seems this is failing...
if(o.href.match(/\.mp3$/i)) {
The link to the sound.mp3 file never gets replaced by the icon.
Posted: Wednesday, 28 February 2007 at 3:50PM (AEDT)
Posted: Thursday, 1 March 2007 at 7:44AM (AEDT)
It worked when I added the player.js file manually to the page_end.php file.
I think the extension adds it too early in the load order for it to work.
Is there a way to add it later in the page load order using an extension?
Posted: Thursday, 1 March 2007 at 12:52PM (AEDT)
The script replaces href tags ending in .mp3 with an image.
Maybe if it loads before the page does, there are no such tags yet?
Can an extension add a link to the bottom of a page?
To use it as an extension try wrapping whatever's necessary (probably just an echo '';) in a function, and using:
$Context->AddToDelegate('PageEnd', 'PreRender', 'functionname');
I have even added a new button for the Quicktags extension to make it so easy to use.
It's great that the usually huge .mp3 files are stored elsewhere on the web too!
Unfortunately my attempt to make it into an extension failed due to the reasons outlined above so I had to install the script manually.
Posted: Tuesday, 6 March 2007 at 2:39PM (AEDT)
Posted: Tuesday, 6 March 2007 at 3:49PM (AEDT)
How dangerous is a link to an .mp3 file?
All the script does is replace all <a> tags ending in .mp3 with an image and uses a hidden Flash gadget to play the sound file.
If the .mp3 file is not valid, it simply fails elegantly, that is, the Flash gadget can't run malignant code if that's what the worry is.
Posted: Tuesday, 6 March 2007 at 5:17PM (AEDT)
Testing in Safari and Mac/Firefox now.
Stay tuned, it should be in the add-ons section soon, it will be called: Dplayer.
Posted: Wednesday, 7 March 2007 at 11:29AM (AEDT)
It's up now.
Edited: Wednesday, 7 March 2007 at 12:40PM (AEDT)
i don't mind turning HTML on, but i can't seem to add it to the BBInsertBar in a way that will provide the correct formatting in both HTML and BBCode. i would really like to use this extension, if anyone has any suggestions as to how i could do it, please share!