From ef64c5187df80da2065655726b8d05a9ce6b0e0a Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Sun, 22 May 2011 23:06:47 +0200 Subject: add config [system][embed_all] to use oembed with links and youtube. Url parse fallback to default if url has not an oembed rappresentation. --- mod/parse_url.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/parse_url.php b/mod/parse_url.php index 30371e9f6..8e1684732 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -1,7 +1,7 @@ config['system']['embed_all']){ + $j = oembed_fetch_url($url); + if ($j->type!="error"){ + echo oembed_format_object($j); + killme(); + } + } + $s = fetch_url($url); - else { + } else { echo ''; killme(); } -- cgit v1.2.3 From 7c5a7a94d4d224d23f7c922b86a60a6ffe53fc9f Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 23 May 2011 10:37:09 +0200 Subject: Add oembed user option for use oembed instead of standard yotube embedding. Remove global option and parse_url use of oembed. --- mod/parse_url.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'mod') diff --git a/mod/parse_url.php b/mod/parse_url.php index 8e1684732..15a6aced0 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -1,7 +1,6 @@ config['system']['embed_all']){ - $j = oembed_fetch_url($url); - if ($j->type!="error"){ - echo oembed_format_object($j); - killme(); - } - } - $s = fetch_url($url); } else { echo ''; @@ -106,4 +96,4 @@ function parse_url_content(&$a) { echo sprintf($template,$url,$title,$text); killme(); -} \ No newline at end of file +} -- cgit v1.2.3