]> git.mxchange.org Git - friendica.git/commitdiff
try to use oembed on vimeo tag
authorFabio Comuni <fabrix.xm@gmail.com>
Mon, 24 Oct 2011 12:39:39 +0000 (14:39 +0200)
committerFabio Comuni <fabrix.xm@gmail.com>
Mon, 24 Oct 2011 12:39:39 +0000 (14:39 +0200)
include/bbcode.php

index 81f37ca04782aad0615084a9af9ab5564f0f2f0d..7045f196f879d3b5aea4712531feea70e9f55b09 100644 (file)
@@ -172,6 +172,9 @@ function bbcode($Text,$preserve_nl = false) {
                $Text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", '<iframe width="425" height="350" src="http://www.youtube.com/embed/$1" frameborder="0" ></iframe>', $Text);
        //}
 
+       $Text = preg_replace_callback("/\[vimeo\]https?:\/\/player.vimeo.com\/video\/([0-9]+)(.*?)\[\/vimeo\]/ism",'tryoembed',$Text); 
+       $Text = preg_replace_callback("/\[vimeo\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/vimeo\]/ism",'tryoembed',$Text); 
+
        $Text = preg_replace("/\[vimeo\]https?:\/\/player.vimeo.com\/video\/([0-9]+)(.*?)\[\/vimeo\]/ism",'[vimeo]$1[/vimeo]',$Text); 
        $Text = preg_replace("/\[vimeo\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/vimeo\]/ism",'[vimeo]$1[/vimeo]',$Text); 
        $Text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", '<iframe width="425" height="350" src="http://player.vimeo.com/video/$1" frameborder="0" ></iframe>', $Text);