diff options
author | friendica <info@friendica.com> | 2015-03-11 19:35:23 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-03-11 19:35:23 -0700 |
commit | 64ae17aa6a1bdbc3933422272a391d4e3662f59b (patch) | |
tree | b87f4c0866d9ecfa832d43b7e622e3100386a408 /include/bbcode.php | |
parent | a40c19d19d31bba3fe037a9778c521461e2b0290 (diff) | |
parent | b3a9a6c802170a15cc58fd3af966b35f81c50818 (diff) | |
download | volse-hubzilla-64ae17aa6a1bdbc3933422272a391d4e3662f59b.tar.gz volse-hubzilla-64ae17aa6a1bdbc3933422272a391d4e3662f59b.tar.bz2 volse-hubzilla-64ae17aa6a1bdbc3933422272a391d4e3662f59b.zip |
Merge branch 'master' into openid
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index aa6641ca2..32e5d014f 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -756,11 +756,17 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // html5 video and audio if (strpos($Text,'[/video]') !== false) { - $Text = preg_replace_callback("/\[video\](.*?\.(ogg|ogv|oga|ogm|webm|mp4))\[\/video\]/ism", 'tryzrlvideo', $Text); + $Text = preg_replace_callback("/\[video\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mpeg|mpg))\[\/video\]/ism", 'tryzrlvideo', $Text); } if (strpos($Text,'[/audio]') !== false) { $Text = preg_replace_callback("/\[audio\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mp3|opus))\[\/audio\]/ism", 'tryzrlaudio', $Text); } + if (strpos($Text,'[/zvideo]') !== false) { + $Text = preg_replace_callback("/\[zvideo\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mpeg|mpg))\[\/zvideo\]/ism", 'tryzrlvideo', $Text); + } + if (strpos($Text,'[/zaudio]') !== false) { + $Text = preg_replace_callback("/\[zaudio\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mp3|opus))\[\/zaudio\]/ism", 'tryzrlaudio', $Text); + } // Try to Oembed if ($tryoembed) { @@ -771,6 +777,13 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { if (strpos($Text,'[/audio]') !== false) { $Text = preg_replace_callback("/\[audio\](.*?)\[\/audio\]/ism", 'tryoembed', $Text); } + + if (strpos($Text,'[/zvideo]') !== false) { + $Text = preg_replace_callback("/\[zvideo\](.*?)\[\/zvideo\]/ism", 'tryoembed', $Text); + } + if (strpos($Text,'[/zaudio]') !== false) { + $Text = preg_replace_callback("/\[zaudio\](.*?)\[\/zaudio\]/ism", 'tryoembed', $Text); + } } // if video couldn't be embedded, link to it instead. @@ -781,6 +794,13 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<a href="$1">$1</a>', $Text); } + if (strpos($Text,'[/zvideo]') !== false) { + $Text = preg_replace("/\[zvideo\](.*?)\[\/zvideo\]/", '<a class="zid" href="$1">$1</a>', $Text); + } + if (strpos($Text,'[/zaudio]') !== false) { + $Text = preg_replace("/\[zaudio\](.*?)\[\/zaudio\]/", '<a class="zid" href="$1">$1</a>', $Text); + } + |