From c49b5218846e67e55a5aa4362d3ed0fc548d6628 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Tue, 30 Dec 2014 16:16:57 -0600 Subject: Added url tag around image for inserted links --- mod/parse_url.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'mod/parse_url.php') diff --git a/mod/parse_url.php b/mod/parse_url.php index 340e1a67e..23d608411 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -307,7 +307,14 @@ function parse_url_content(&$a) { $max_images = intval($max_images); foreach ($siteinfo["images"] as $imagedata) { - $image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]' . "\n"; + if ($url) { + $image .= sprintf('[url=%s]', $url); + } + $image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]'; + if ($url) { + $image .= '[/url]'; + } + $image .= "\n"; $total_images ++; if($max_images && $max_images >= $total_images) break; -- cgit v1.2.3