diff options
author | RedMatrix <info@friendica.com> | 2014-12-31 10:23:50 +1100 |
---|---|---|
committer | RedMatrix <info@friendica.com> | 2014-12-31 10:23:50 +1100 |
commit | ae9d08267c632cae36a4ebd34c2077fd0051e0e7 (patch) | |
tree | 15650ea1b90ab82c988185ee601886db122efa4d /mod/parse_url.php | |
parent | 009b05b3b6013a6f999e5b493df1cadc1dafb537 (diff) | |
parent | c49b5218846e67e55a5aa4362d3ed0fc548d6628 (diff) | |
download | volse-hubzilla-ae9d08267c632cae36a4ebd34c2077fd0051e0e7.tar.gz volse-hubzilla-ae9d08267c632cae36a4ebd34c2077fd0051e0e7.tar.bz2 volse-hubzilla-ae9d08267c632cae36a4ebd34c2077fd0051e0e7.zip |
Merge pull request #797 from anaqreon/imagelink
Imagelink
Diffstat (limited to 'mod/parse_url.php')
-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; |