Browse Source

linkify audio/video links for non-html5 browsers (or those with unsupported codecs?)

pull/1/head
Friendika 12 years ago
parent
commit
afaacd134c
  1. 4
      include/bbcode.php

4
include/bbcode.php

@ -80,9 +80,9 @@ function bbcode($Text) {
// html5 video and audio
$Text = preg_replace("/\[video\](.+?)\[\/video\]/", '<video src="$1" controls="controls" width="425" height="350">$1</video>', $Text);
$Text = preg_replace("/\[video\](.+?)\[\/video\]/", '<video src="$1" controls="controls" width="425" height="350"><a href="$1">$1</a></video>', $Text);
$Text = preg_replace("/\[audio\](.+?)\[\/audio\]/", '<audio src="$1" controls="controls">$1</audio>', $Text);
$Text = preg_replace("/\[audio\](.+?)\[\/audio\]/", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text);
// [img=widthxheight]image source[/img]

Loading…
Cancel
Save