bug #346 - add oembed maxwidth to oembed request
This commit is contained in:
parent
3ae43c2448
commit
d06ddeb1cc
|
@ -38,7 +38,8 @@ function oembed_fetch_url($embedurl){
|
||||||
$entries = $xpath->query("//link[@type='application/json+oembed']");
|
$entries = $xpath->query("//link[@type='application/json+oembed']");
|
||||||
foreach($entries as $e){
|
foreach($entries as $e){
|
||||||
$href = $e->getAttributeNode("href")->nodeValue;
|
$href = $e->getAttributeNode("href")->nodeValue;
|
||||||
$txt = fetch_url($href);
|
$txt = fetch_url($href . '&maxwidth=425');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +47,7 @@ function oembed_fetch_url($embedurl){
|
||||||
|
|
||||||
if ($txt==false || $txt==""){
|
if ($txt==false || $txt==""){
|
||||||
// try oohembed service
|
// try oohembed service
|
||||||
$ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl);
|
$ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl).'&maxwidth=425';
|
||||||
$txt = fetch_url($ourl);
|
$txt = fetch_url($ourl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue