move oohembed service to addon

This commit is contained in:
friendica 2013-06-03 16:53:53 -07:00
parent 25a55219ec
commit 1f94429b2c

View File

@ -51,12 +51,17 @@ function oembed_fetch_url($embedurl){
} }
} }
if ($txt==false || $txt==""){ if ($txt==false || $txt=="") {
$x = array('url' => $embedurl,'videowidth' => $a->videowidth);
call_hooks('oembed_probe',$x);
if(array_key_exists('embed',$x))
$txt = $x['embed'];
// try oohembed service // try oohembed service
$ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl).'&maxwidth=' . $a->videowidth; // $ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl).'&maxwidth=' . $a->videowidth;
$result = z_fetch_url($ourl); // $result = z_fetch_url($ourl);
if($result['success']) // if($result['success'])
$txt = $result['body']; // $txt = $result['body'];
} }
$txt=trim($txt); $txt=trim($txt);