Skip to:
Content
Pages
Categories
Search
Top
Bottom

New version of Easy Video Embed


  • silasje1
    Member

    @silasje1

    Hey.

    When i tried Easy Video Embed i had alot of problems with all IE versions.

    Now i added the new <iframe> from youtube in it. Also i updated the old code and made that for IE only, cause they dont support html5. I cant contact or add the new files so maybe sombody else wants to?

    O yeah it works on 1.0.3 of course :) here is the new code:

    <br />
    function ae_detect_ie()<br />
    {<br />
    if (isset($_SERVER['HTTP_USER_AGENT']) &&<br />
    (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))<br />
    return true;<br />
    else<br />
    return false;<br />
    }</p>
    <p>...............................(60 lines of code)</p>
    <p>if (ae_detect_ie())

    {$post_text = preg_replace('#[video]http://([a-zA-Z0-9]+.|)youtube.com/.*v=([a-zA-Z0-9_-]+).*[/video]#i', ' <object width="640" height="510"><param name="movie" value="http://www.youtube.com/v/\1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/\2" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="510"></embed></object>',$post_text); }
    else
    { $post_text = preg_replace('#[video]http://([a-zA-Z0-9]+.|)youtube.com/.*v=([a-zA-Z0-9_-]+).*[/video]#i', '<iframe title="YouTube video player" width="853" height="510" src="http://www.youtube.com/v/\2"frameborder="0" allowfullscreen></iframe>',$post_text);<br />
    } </p>
    <p>

    test it here:

    http://www.fstube.org/forums/bbpress/topic/touch-and-go

  • You must be logged in to reply to this topic.
Skip to toolbar