From 789e025eab00a8feeba9644b7541119daea6b078 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 16 Dec 2014 15:50:20 -0800 Subject: Add [ map ] element to bbcode, no closing tag. Requires a map generator plugin (like openstreetmap which was just updated) and also requires that the author has browser location enabled. --- include/bbcode.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index 5b7451a6b..254674172 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -492,6 +492,14 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '$1', $Text); $Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '$2', $Text); } + + // leave open the posibility of [map=something] + // this is replaced in prepare_body() which has knowledge of the item location + + if (strpos($Text,'[map]') !== false) { + $Text = preg_replace("/\[map\]/", '
', $Text); + } + // Check for bold text if (strpos($Text,'[b]') !== false) { $Text = preg_replace("(\[b\](.*?)\[\/b\])ism",'$1',$Text); -- cgit v1.2.3