diff options
author | Andrew Manning <tamanning@zoho.com> | 2014-12-30 16:16:57 -0600 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2014-12-30 16:16:57 -0600 |
commit | c49b5218846e67e55a5aa4362d3ed0fc548d6628 (patch) | |
tree | 789859890537530315b722456f438a64301e223d /mod | |
parent | b78a545a1056e6db9f4b6b4f262182b0a5c56e67 (diff) | |
download | volse-hubzilla-c49b5218846e67e55a5aa4362d3ed0fc548d6628.tar.gz volse-hubzilla-c49b5218846e67e55a5aa4362d3ed0fc548d6628.tar.bz2 volse-hubzilla-c49b5218846e67e55a5aa4362d3ed0fc548d6628.zip |
Added url tag around image for inserted links
Diffstat (limited to 'mod')
-rw-r--r-- | mod/parse_url.php | 9 |
1 files changed, 8 insertions, 1 deletions
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; |