iframes
This commit is contained in:
parent
cee63c7a0d
commit
7601ce7de7
|
@ -97,6 +97,7 @@ function bbcode($Text,$preserve_nl = false) {
|
||||||
|
|
||||||
$Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text);
|
$Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text);
|
||||||
|
|
||||||
|
$Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/", '<iframe src="$1" width="425" height="350"><a href="$1">$1</a></iframe>', $Text);
|
||||||
|
|
||||||
// [img=widthxheight]image source[/img]
|
// [img=widthxheight]image source[/img]
|
||||||
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/", '<img src="$3" style="height:{$2}px; width:{$1}px;" >', $Text);
|
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/", '<img src="$3" style="height:{$2}px; width:{$1}px;" >', $Text);
|
||||||
|
|
|
@ -35,6 +35,7 @@ function html2bbcode($s) {
|
||||||
'/\<blockquote\>(.*?)\<\/blockquote\>/is',
|
'/\<blockquote\>(.*?)\<\/blockquote\>/is',
|
||||||
'/\<video(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/video\>/is',
|
'/\<video(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/video\>/is',
|
||||||
'/\<audio(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/audio\>/is',
|
'/\<audio(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/audio\>/is',
|
||||||
|
'/\<iframe(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/iframe\>/is',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -60,6 +61,7 @@ function html2bbcode($s) {
|
||||||
'[quote]$1[/quote]',
|
'[quote]$1[/quote]',
|
||||||
'[video]$1[/video]',
|
'[video]$1[/video]',
|
||||||
'[audio]$1[/audio]',
|
'[audio]$1[/audio]',
|
||||||
|
'[iframe]$1[/iframe]',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Replace $htmltags in $text with $bbtags
|
// Replace $htmltags in $text with $bbtags
|
||||||
|
|
Loading…
Reference in a new issue