aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-12-16 15:50:20 -0800
committerfriendica <info@friendica.com>2014-12-16 15:50:20 -0800
commit789e025eab00a8feeba9644b7541119daea6b078 (patch)
tree5cb0e788cffd2bd01b514940e8bf4d49677381ac /include/bbcode.php
parent4d5f28f07a4405e468851413e56057dc2acfb585 (diff)
downloadvolse-hubzilla-789e025eab00a8feeba9644b7541119daea6b078.tar.gz
volse-hubzilla-789e025eab00a8feeba9644b7541119daea6b078.tar.bz2
volse-hubzilla-789e025eab00a8feeba9644b7541119daea6b078.zip
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.
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php8
1 files changed, 8 insertions, 0 deletions
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\]/", '<a href="mailto:$1">$1</a>', $Text);
$Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1">$2</a>', $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\]/", '<div class="map"></div>', $Text);
+ }
+
// Check for bold text
if (strpos($Text,'[b]') !== false) {
$Text = preg_replace("(\[b\](.*?)\[\/b\])ism",'<strong>$1</strong>',$Text);