Digital Jedi |
01-24-2010 07:50 AM |
Quote:
Originally Posted by ericgtr
(Post 1964364)
Hi DJ,
You answered my question about embedding MP3 attachments in Geeks thread and I thought I would follow up here. Even though I am using fb 4.0 my goal is to have an attached MP3 file play inline. What I have done is taken some of what you had written and worked created a new definition that looks like this:
HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<AME3>
<def>
<providerid>6</providerid>
<tagoption>MP3</tagoption>
<provider>MP3</provider>
<url>http://www.mysitename.com</url>
<regex_url><![CDATA[([http://]*[\w]*[\.]*mysitename\.[\w/&;%-\.]+\.mp3?2?)]]></regex_url>
<regex_scrape />
<embed><![CDATA[<object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" width="250" height="20"> <param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_maxi.swf" /> <param name="bgcolor" value="#384651" /> <param name="FlashVars" value="mp3=$p1&width=250&showstop=1&showinfo=1&showvolume=1&bgcolor=384651&bgcolor1=31a2f4&bgcolor2=0b8eee&slidercolor1=ffffff&slidercolor2=CCCCCC&sliderovercolor=ffff00" /> </object>]]></embed>
<priority>0</priority>
</def>
</AME3>
However, I still can't seem to get it to play the attached file inline, it's just ignored as if it doesn't exist and I have also rebuilt my posts. I noticed you said in your statement when you released these that it's not the intent but I'm wondering if there is a way to get this to work with strictly .mp3 files.
|
Though I don't have AME 3 installed, fundamentally, it's the same process. The reason AME doesn't normally work with attachments is because attachment URLs are all the same. http://www.yoursite.com/attachment.php and some id numbers. Nothing else to tell the definition whether it's an MP3 or a PDF or a JPG file. Whatever the replacement HTML is, that's what AME is going to use every time. Not very practical when your user has posted a PDF, and AME tries to play it in an MP3 player.
If this has changed in vB4, and you have some way to distinguish file types (simply having the extension .MP3 in the URL would be enough, really) then you could get it to work. Only $p1 isn't used in AME 3. Double check one of the definitions, but I believe it's something like {vb:raw:something}. It just slips my mind at the moment.
|