I was unable to find any discussion on V2 embedding of media. Has anyone successfully embedded youtube, vimeo, flash etc...? Will this possibly be an option to allow all html embedding, or is there a way to bypass any filter that is blocking this?
Right now we only allow youtube for video. In order to add other video types, we need to work with HtmlPurifier (what we use for comment filtering). They don't have an out of the box way of doing that (yet). You're the first person to ask about it, so it hasn't been high on our list before now.
Comments
Seems to be working, no?
Also, just noticed that the youtube embed is layered over the Edit post window.
Eh bugger, it didn't work :P
Ah okay, I see. HTML Purifier is *really* restrictive in its implementation of YouTube embedding. Nasty :(
Might be useful for embedding related stuff (ie my comment)
FYI the code I used above was: @retoid, TA/SpringRTS is great :)
This works with vimeo, youtube, hulu...
:)
here is how I enabled embedding videos from istockphoto:
library/core/class.format.php:
after vimeo code, I added
} elseif (preg_match('#istockphoto.com\/file_closeup.php\?id=(\d+)(.+)embed#', $Url, $Matches)) {
$ID = $Matches[1];
$Width = 380;
$Height = 250;
$Result = <<<EOT
<div class="Video">
<object width="380" height="250" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" alt="MSBG ISTOCK EMBEDDED VIDEO" title="MSBG ISTOCK EMBEDDED VIDEO">
<param name="movie" value="http://www.istockphoto.com/video_player_wide.swf">
<param name="quality" value="best">
<param name="loop" value="false">
<param name="wmode" value="transparent">
<param name="FlashVars" value="videoLocation=video_passthrough.php%2F$ID%2F65%2F$ID.flv&videoFileID=$ID&bufferPercent=25&totalTime=30">
<EMBED SRC="http://www.istockphoto.com/video_player_wide.swf" LOOP="false" QUALITY="best" FlashVars="videoLocation=video_passthrough.php%2F$ID%2F65%2F$ID.flv&videoFileID=$ID&bufferPercent=25&totalTime=30" WIDTH="380" HEIGHT="250" wmode="transparent">
</object>
<a href="$Pr$Url" target="_blank" rel="nofollow">$Pr$Url</a>
</div>
EOT;
}
while this site specifically might not be of interest to public, I wanted to post this for all those of us, who want custom sites :)