Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 15

G_Mericgillettelucmcu_hqsandino +10 guests

Embedding

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

  • Posts: 30
    Warming Up



    Seems to be working, no?
  • Posts: 48
    On my V2 install I tried embedding vimeo with no luck.
  • Posts: 48
    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
  • Posts: 4,883
    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.
  • Posts: 4,883
    Also for your comment - the overlap problem will go away soon. We implemented edit-in-place and will push it out next week.
  • Posts: 48
    Ok thanks Mark. I'll take a look at HtmlPurifier.
  • Posts: 2,610
    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 :(
  • Posts: 48
    That video was great though, brings back so many memories :)
  • Posts: 819
    http://vanillaforums.org/discussion/comment/101194/#Comment_101194

    Might be useful for embedding related stuff (ie my comment)
  • Posts: 2,610
    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 :)
  • Posts: 48
    @garymardell success! Thank you for pointing that out.
    This works with vimeo, youtube, hulu...
    :)
  • Posts: 58
    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&quot; alt="MSBG ISTOCK EMBEDDED VIDEO" title="MSBG ISTOCK EMBEDDED VIDEO">

    <param name="movie" value="http://www.istockphoto.com/video_player_wide.swf"&gt;
    <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&quot; 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.