aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2014-05-22 19:39:28 +0100
committerThomas Willingham <founder@kakste.com>2014-05-22 19:39:28 +0100
commit292601728430469f21b81d7055cd485a0efb491c (patch)
tree4d35371f101a26b69eb8dc6dc15c3be4a884258e /include/bbcode.php
parentb06fd69da84626c1e8c1d8b5dbda6f181027a782 (diff)
parent8e2771cbd409d56917e7d249d80a2c422609f540 (diff)
downloadvolse-hubzilla-292601728430469f21b81d7055cd485a0efb491c.tar.gz
volse-hubzilla-292601728430469f21b81d7055cd485a0efb491c.tar.bz2
volse-hubzilla-292601728430469f21b81d7055cd485a0efb491c.zip
Merge branch 'master' of https://github.com/friendica/red
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);