From 1f94429b2cbfd5f86074c671f5293d09bddb7eaa Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 3 Jun 2013 16:53:53 -0700 Subject: move oohembed service to addon --- include/oembed.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/include/oembed.php b/include/oembed.php index 7f8e4ca7d..04a40f6ee 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -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 - $ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl).'&maxwidth=' . $a->videowidth; - $result = z_fetch_url($ourl); - if($result['success']) - $txt = $result['body']; +// $ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl).'&maxwidth=' . $a->videowidth; +// $result = z_fetch_url($ourl); +// if($result['success']) +// $txt = $result['body']; } $txt=trim($txt); -- cgit v1.2.3