Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Embedding

retoidretoid New
edited April 2010 in Vanilla 2.0 - 2.8
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?

Comments

  • On my V2 install I tried embedding vimeo with no luck.
  • retoidretoid New
    edited April 2010
    I'll admit, I did start this discussion without having doing a lot of testing on my end, after not being able to embed vimeo is when I decided to ask.

    Also, just noticed that the youtube embed is layered over the Edit post window.
    Hosted by imgur.com
  • MarkMark Vanilla Staff
    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.
  • MarkMark Vanilla Staff
    Also for your comment - the overlap problem will go away soon. We implemented edit-in-place and will push it out next week.
  • Ok thanks Mark. I'll take a look at HtmlPurifier.
  • StashStash
    edited April 2010
    Just trying out some different YouTube embed code...









    Eh bugger, it didn't work :P

    Ah okay, I see. HTML Purifier is *really* restrictive in its implementation of YouTube embedding. Nasty :(
  • That video was great though, brings back so many memories :)
  • http://vanillaforums.org/discussion/comment/101194/#Comment_101194

    Might be useful for embedding related stuff (ie my comment)
  • StashStash
    edited April 2010
    Go on then! Enable Embedding please ;)

    FYI the code I used above was:
    <object width="660" height="525" style="z-index:-1;">
    <param name="movie" value="http://www.youtube.com/v/9sRUakmNksU&fs=1&fmt=18&quot; />
    <param name="wmode" value="transparent" />
    <param name="allowFullScreen" value="true" />
    <param name="allowscriptaccess" value="always" />
    <embed src="http://www.youtube.com/v/9sRUakmNksU&fs=1&fmt=18&quot; type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" allowfullscreen="true" width="660" height="525"></embed>
    </object>
    @retoid, TA/SpringRTS is great :)
  • @garymardell success! Thank you for pointing that out.
    This works with vimeo, youtube, hulu...
    :)
  • hacking new sites to enable embed for them is quite easy
    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 :)
Sign In or Register to comment.