aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index a4e7560d6..674b5f45a 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -166,6 +166,15 @@ function bb_parse_crypt($match) {
}
+function bb_parse_app($match) {
+ require_once('include/apps.php');
+
+ $app = app_decode($match[1]);
+ if($app)
+ return app_render($app);
+
+}
+
function bb_qr($match) {
return '<img class="zrl" src="' . z_root() . '/photo/qr?f=&qr=' . urlencode($match[1]) . '" alt="' . t('QR code') . '" title="' . htmlspecialchars($match[1],ENT_QUOTES,'UTF-8') . '" />';
}
@@ -684,6 +693,11 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
$Text = preg_replace_callback("/\[crypt (.*?)\](.*?)\[\/crypt\]/ism", 'bb_parse_crypt', $Text);
}
+ if(strpos($Text,'[/app]') !== false) {
+ $Text = preg_replace_callback("/\[app\](.*?)\[\/app\]/ism",'bb_parse_app', $Text);
+ }
+
+
// html5 video and audio
if (strpos($Text,'[/video]') !== false) {
$Text = preg_replace_callback("/\[video\](.*?\.(ogg|ogv|oga|ogm|webm|mp4))\[\/video\]/ism", 'tryzrlvideo', $Text);