Page 1 of 1
Flash audio buttons in posts
Posted: Sun Feb 13, 2005 12:02 am
by YaKnowGuy
Hi,
Im wanting to use flash audio buttons in posts. When I paste the HTML code in text mode, the preview shows all fine including the buttons (which work), but once I Save the post, the blog just shows a scroll box instead of the buttons.
The full path of the swf file is specified in the code...http://.....etc
Thanks,
Greg
Re: Flash audio buttons in posts
Posted: Sun Feb 13, 2005 3:51 pm
by garvinhicking
If you give us a URL to look at with that code, we may be able to help you...
Regards,
Garvin
Here is the offending code :)
Posted: Sun Feb 13, 2005 8:55 pm
by YaKnowGuy
Thanks so much for the reply Gavin. Here is the offending code.
The main part we need to look at is the <OBJECT section I think.
I have seen flash buttons being used in a MT user forum and it work. I would much rather stay with you guys!
Thanks Greg
<p align="center" style="margin-top:0; margin-bottom:0"><b><span style="background-color: #E6E6D9"><font face="Arial" size="1" color="#800000"><br>
</font><font face="Arial" size="2" color="#800000"> Click the play button below to listen <br>
to Greg's </font><font face="Arial" size="2" color="#0000FF"><i>1 minute</i></font><font face="Arial" size="2" color="#800000"> audio message </font>
</span><font face="Arial" size="2">
<br>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="
https://download.macromedia.com/pub/sho ... on=6,0,0,0"
WIDTH="130"
HEIGHT="40"
id="MiniCourseIntroFinal"
ALIGN="middle">
<PARAM NAME=movie VALUE="
http://www.sharedmemories.com.au/audio/ ... oFinal.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<PARAM NAME=wmode VALUE="transparent">
<EMBED
src="
http://www.sharedmemories.com.au/audio/ ... oFinal.swf"
quality=high
bgcolor=#FFFFFF
NAME="MiniCourseIntroFinal"
WIDTH="130"
HEIGHT="40"
ALIGN="middle"
WMODE="transparent"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="
http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
<!-- End Cut and Paste Voice File Code -->
</font></b></p>
Re: Here is the offending code :)
Posted: Mon Feb 14, 2005 9:18 am
by garvinhicking
The fix is quite easy: Either you need to remove the "nl2br markup plugin" or you need to remove the linebreaks within the <object> tag.
As it is now, your object tag will contain
Code: Select all
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"<br />
<br />codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"<br />
WIDTH="130"<br />
HEIGHT="40"<br />
id="MiniCourseIntroFinal"<br />
ALIGN="middle"><br />
Which is no valid HTML markup. Easiest thing would be to remove the redundant linebreaks, because the nl2br plugin *does* have its good uses
Regards,
Garvin
Still a problem
Posted: Tue Feb 15, 2005 9:37 pm
by YaKnowGuy
Hi Gavin,
Thanks so much for the reply. I really appreciate your time on this.
Still a problem though. Maybe I'm missing something here, but this is what I've done.
1. Removed any line breaks, so the code flowed. Nope!
2. Removed nl2br and repasted the code in WYSIWG mode (text). Nope!
I'm getting exactly the same result. Is there something I can do to help you help me. If you would like, I can create a logon for you or what ever. I feel so frustrated that something so difficult now will be so simple once I find out!
FYI the blog url is:
http://www.sharedmemories.info/blog
Thanks again Gavin,
Greg
Re: Still a problem
Posted: Wed Feb 16, 2005 11:15 am
by garvinhicking
Looking at your HTML Code, the problem is this:
You use a classid="clsid:D27CDB6E..." attribute in your object tag. Serendipity does automatic Smilie transformation, and hits you ful on the ":D" part which it tries to transform into a laughing smilie.
There are three ways you can to do solve this:
1. Turn off smilie transformations (disable plugin Markup: Emoticate)
2. Try to write the attribute as 'classid="clsid: D27CDB6E..."' by inserting a space to separete the smilie
3. Fix the regular expression that parses the smilie so it needs spacings/tabs before the smilies. That's what I have just committed to CVS. To do this open your plugins/serendipity_event_emoticate/serendipity_event_emoticate.php file and on line 133 change this line:
Code: Select all
$element = preg_replace("/([\t\ ]?)" . preg_quote($key, '/') . "([\t\ \!\.\)]?)/m",
to this:
Code: Select all
$element = preg_replace("/([\t\s]+)" . preg_quote($key, '/') . "([\t\s\!\.\)]+)/m",
HTH,
Garvin.
Posted: Wed Feb 16, 2005 9:00 pm
by YaKnowGuy
Success!!
Gavin,
The answer was the emoticon file edit. I did that 1st and bingo!
What on earth made you think of that?!? I know, being in IT 30 years I run across these *simple* probs all the time. Once you know the answer its just soooo simple.
Thanks you again for your help and patience.
Regards,
Greg
Posted: Thu Feb 17, 2005 11:13 am
by garvinhicking
You're welcome. It was just that I looked at the code, and that <img> in between made me curious.
But now you got it working: Go ahead and post, and have fun!
Regards,
Garvin