From: Michael Vogel <icarus@dabo.de> Date: Wed, 9 Jul 2014 19:28:42 +0000 (+0200) Subject: Plaintext: The function now returns images from video links as well. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fe71272e1e86b1e692b499c2daa0ef525fba26ff;p=friendica.git Plaintext: The function now returns images from video links as well. --- diff --git a/include/plaintext.php b/include/plaintext.php index 3d30a3299c..4bbca636ce 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -95,6 +95,12 @@ function get_attached_data($body) { $post["type"] = "text"; $post["text"] = trim($body); } + } elseif (isset($post["url"]) AND ($post["type"] == "video")) { + require_once("mod/parse_url.php"); + $data = parseurl_getsiteinfo($post["url"], true); + + if (isset($data["images"][0])) + $post["image"] = $data["images"][0]["src"]; } return($post);