aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2014-12-31 10:23:50 +1100
committerRedMatrix <info@friendica.com>2014-12-31 10:23:50 +1100
commitae9d08267c632cae36a4ebd34c2077fd0051e0e7 (patch)
tree15650ea1b90ab82c988185ee601886db122efa4d /mod
parent009b05b3b6013a6f999e5b493df1cadc1dafb537 (diff)
parentc49b5218846e67e55a5aa4362d3ed0fc548d6628 (diff)
downloadvolse-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')
-rw-r--r--mod/parse_url.php9
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;