X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Foembed.php;h=2ecb11e1f5f684d45b8f2f739476ad6c0254af97;hb=fbe664cc44d398d22ad10b644f373d5df0cd684f;hp=29d462d8f7d2252629e1cd3fb75b6508b90c04f2;hpb=64946972b2004b0b8252da670d0e990143a40b77;p=friendica.git diff --git a/include/oembed.php b/include/oembed.php index 29d462d8f7..2ecb11e1f5 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -109,6 +109,8 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){ } function oembed_format_object($j){ + require_once("mod/proxy.php"); + $a = get_app(); $embedurl = $j->embedurl; $jhtml = oembed_iframe($j->embedurl,(isset($j->width) ? $j->width : null), (isset($j->height) ? $j->height : null) ); @@ -138,8 +140,8 @@ function oembed_format_object($j){ $ret.="
"; }; break; case "photo": { - $ret.= ""; - //$ret.= ""; + $ret.= ""; + //$ret.= ""; $ret.="
"; }; break; case "link": { @@ -173,13 +175,16 @@ function oembed_format_object($j){ $embedlink .= $j->author_name; } + if (trim($embedlink) == "") + $embedlink = $embedurl; + $ret .= "$embedlink"; } //if (isset($j->author_name)) $ret.=" by ".$j->author_name; //if (isset($j->provider_name)) $ret.=" on ".$j->provider_name; } else { // add for html2bbcode conversion - $ret .= ""; + $ret .= "$embedurl"; } $ret.="
"; return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret));