diff options
author | Tobias Hößl <tobias@hoessl.eu> | 2012-03-11 11:27:47 +0000 |
---|---|---|
committer | Tobias Hößl <tobias@hoessl.eu> | 2012-03-11 11:27:47 +0000 |
commit | 4df08433c6dcf5c88945e064da74188c805c5d68 (patch) | |
tree | ee482f76941fbb26b77a53147def83b32c8eaa7b /include/bbcode.php | |
parent | 635958e11da2f5a0d587b66968453064c2d41f13 (diff) | |
parent | 50863a19eb9c74ca336df609dbb9dfe5a9c39a31 (diff) | |
download | volse-hubzilla-4df08433c6dcf5c88945e064da74188c805c5d68.tar.gz volse-hubzilla-4df08433c6dcf5c88945e064da74188c805c5d68.tar.bz2 volse-hubzilla-4df08433c6dcf5c88945e064da74188c805c5d68.zip |
Merge branch 'master' of git://github.com/friendica/friendica
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index cff26f5c8..d69cb263f 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -216,6 +216,9 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img src="$1" alt="' . t('Image/photo') . '" />', $Text); + $Text = preg_replace("/\[video\](.*?\.(ogg|ogv|oga|ogm|webm|mp4))\[\/video\]/ism", '<video src="$1" controls="controls" width="425" height="350"><a href="$1">$1</a></video>', $Text); + + $Text = preg_replace("/\[audio\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mp3))\[\/audio\]/ism", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text); // Try to Oembed $Text = preg_replace_callback("/\[video\](.*?)\[\/video\]/ism", 'tryoembed', $Text); @@ -224,9 +227,6 @@ function bbcode($Text,$preserve_nl = false) { // html5 video and audio - $Text = preg_replace("/\[video\](.*?)\[\/video\]/ism", '<video src="$1" controls="controls" width="425" height="350"><a href="$1">$1</a></video>', $Text); - - $Text = preg_replace("/\[audio\](.*?)\[\/audio\]/ism", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text); $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '<iframe src="$1" width="425" height="350"><a href="$1">$1</a></iframe>', $Text); |