Recent Topics

1 Dec 19, 2005 17:19    

It looks like the html checker in 1.6 (alpha) still rejects the object tag. Here's the code I'm trying to post:

<div style="text-align:center"><object type="application/x-shockwave-flash" style="width:425px; height:350px" data="http://www.youtube.com/v/DyKFztw6Oow"><param name="movie" value="http://www.youtube.com/v/DyKFztw6Oow"></param></object></div>

I believe that's valid xhtml code. I've hacked up my 0.9.1 _formatting.php file to accept this and I can do the same when I move to 1.6, but I'm also working on a plugin to make it easier to post videos from youtube.com. If this code won't post on a stock b2evolution installation, then is there a way for a plugin to alter the html checker to make this work?

2 Dec 19, 2005 17:54

That is valid xhtml trans code.
Oh but IE doesnt like valid xhtml code so it will fall over:
Here is an attachment of what i had to do to make flash valid and work in both firefox and ie:

	<?php if(strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 6')){ ?>
		<object id="Flash8Detect" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1" height="1">
		  <param name="movie" value="<?=$Layouts->URL?>images/flash8.swf" />
		  <embed src="<?=$Layouts->URL?>images/flash8.swf" name="Flash8Detect" width="1" height="1" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
		  </embed>
		</object>
	<?php }else{ ?>
		<object id="Flash8Detect" data="<?=$Layouts->URL?>images/flash8.swf" width="1" height="1">
		  <param name="movie" value="<?=$Layouts->URL?>images/flash8.swf">
		</object>
	<?php } ?>

But i can see y the object tag would be banned.
It is a huge security threat, even larger than <script> tags.

Most probably not with a plugin, mayb include a install.php file that will find the file that needs modifying read it, apply changes, and saves it.

That's the aproach i have used for various administration hacks that i have created.

3 Dec 20, 2005 01:33

is there a way for a plugin to alter the html checker to make this work?

Renderers ;)

¥

4 Dec 20, 2005 02:06

I thought about using a renderer to get around this. Mayb I could store the code in the post as [youtube]YouTubeIDHere[/youtube], then use a renderer to replace that with the object tag. Is that what you mean?

5 Dec 20, 2005 05:26

mmm.. the code I use for flash on my blog doesnt break with ie, and it's valid ...

6 Dec 20, 2005 05:33

On your wordpress blog or your b2evo blog? If you've got some code for inserting flash that gets past the stock html checker in b2evolution, I'd like to see what it looks like.

7 Dec 20, 2005 09:35

personman wrote:

I thought about using a renderer to get around this. Mayb I could store the code in the post as [youtube]YouTubeIDHere[/youtube], then use a renderer to replace that with the object tag. Is that what you mean?

Spot on. No need to mess with _formatting.php ;)

¥

8 Dec 20, 2005 15:09

Brilliant as usual, YaBBa. Making a renderer works great. And it's much easier than I thought it would be.


Form is loading...