]> git.mxchange.org Git - friendica.git/commitdiff
When posting to Diaspora, now the contact names are containing the link to the user...
authorMichael Vogel <icarus@dabo.de>
Sat, 4 Jul 2015 21:49:52 +0000 (23:49 +0200)
committerMichael Vogel <icarus@dabo.de>
Sat, 4 Jul 2015 21:49:52 +0000 (23:49 +0200)
include/bbcode.php

index 6c5a400ddc307a069ac67a56a57f09c0fc668017..e872d859c53bec8e599715e775ccea8d34d1d8a3 100644 (file)
@@ -887,8 +887,12 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        $MAILSearchString = $URLSearchString;
 
        // Remove all hashtag addresses
-       if ((!$tryoembed OR $simplehtml) AND ($simplehtml != 7))
+       if ((!$tryoembed OR $simplehtml) AND !in_array($simplehtml, array(3, 7)))
                $Text = preg_replace("/([#@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $Text);
+       elseif ($simplehtml == 3)
+               $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
+                       '$1<a href="$2">$3</a>',
+                       $Text);
        elseif ($simplehtml == 7)
                $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
                        '$1<span class="vcard"><a href="$2" class="url" title="$3"><span class="fn nickname mention">$3</span></a></span>',