From 5090ec15009b50c7ca1a1e93547172db82744b54 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 1 Jun 2016 16:04:31 +0200 Subject: [PATCH 1/3] Mentions are now having an own class --- include/bbcode.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/bbcode.php b/include/bbcode.php index bc30767770..3833c55401 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -809,7 +809,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $Text); - + elseif (!$simplehtml) + $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", + '$1$3', + $Text); // Bookmarks in red - will be converted to bookmarks in friendica $Text = preg_replace("/#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '[bookmark=$1]$1[/bookmark]', $Text); From 85f42ad26d50ebb5847784cdda0256b40da59dd0 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 1 Jun 2016 16:19:53 +0200 Subject: [PATCH 2/3] Tags are now supported as well --- include/bbcode.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/bbcode.php b/include/bbcode.php index 3833c55401..39f04aa692 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -854,6 +854,9 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal if ($tryoembed) $Text = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism",'tryoembed',$Text); + $Text = preg_replace("/([#])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", + '$1$3', $Text); + $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '$1', $Text); $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$2', $Text); //$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '$2', $Text); From 0b766b86ba7d92c0800f8ac9049112def6b182da Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 1 Jun 2016 17:10:43 +0200 Subject: [PATCH 3/3] By setting the "userinfo" class the hovercard in frio works with mentions --- include/bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bbcode.php b/include/bbcode.php index 39f04aa692..99295aee02 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -811,7 +811,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal $Text); elseif (!$simplehtml) $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", - '$1$3', + '$1$3', $Text); // Bookmarks in red - will be converted to bookmarks in friendica