aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2014-06-24 19:34:36 +0200
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2014-06-24 19:34:36 +0200
commitb8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70 (patch)
tree718df6305bcb82c8dcb4b287a7132422e748cdfb /include/bb2diaspora.php
parentc2d520f1be115fb3cb5da2a35eb10146cecee8aa (diff)
parenta92fb0b04c3e6474ec48faf8e4cc65c382e89d66 (diff)
downloadvolse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.tar.gz
volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.tar.bz2
volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index ee070b4fe..f9ecc564f 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -1,4 +1,4 @@
-<?php
+<?php /** @file */
require_once("include/oembed.php");
require_once("include/event.php");
@@ -281,6 +281,14 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
$Text = preg_replace("/\[img\](.*?)\[\/img\]/", '![' . t('image/photo') . '](' . '$1' . ')', $Text);
$Text = preg_replace("/\[img\=(.*?)\](.*?)\[\/img\]/", '![' . t('image/photo') . '](' . '$2' . ')', $Text);
+ $Text = preg_replace("/\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '[$1]($1)', $Text);
+ $Text = preg_replace("/\#\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '[#$2]($1)', $Text);
+ $Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '[$2]($1)', $Text);
+
+
+ $Text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/", '![' . t('image/photo') . '](' . '$1' . ')', $Text);
+ $Text = preg_replace("/\[zmg\=(.*?)\](.*?)\[\/zmg\]/", '![' . t('image/photo') . '](' . '$2' . ')', $Text);
+
// Perform MAIL Search
$Text = preg_replace("(\[mail\]([$MAILSearchString]*)\[/mail\])", '[$1](mailto:$1)', $Text);
$Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '[$2](mailto:$1)', $Text);