aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-05-18 18:21:20 -0700
committerfriendica <info@friendica.com>2014-05-18 18:21:20 -0700
commit466fe725bc056ad7ed2c3bf24783b65565293472 (patch)
tree89fa59a2450ed62ce390110b56dca091169b7c60 /include/bbcode.php
parent68ca4ef19e0617904d8557e95ec74d09af833d00 (diff)
downloadvolse-hubzilla-466fe725bc056ad7ed2c3bf24783b65565293472.tar.gz
volse-hubzilla-466fe725bc056ad7ed2c3bf24783b65565293472.tar.bz2
volse-hubzilla-466fe725bc056ad7ed2c3bf24783b65565293472.zip
start to build out the apps
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);