]> git.mxchange.org Git - friendica.git/blobdiff - include/html2bbcode.php
add remove_user hook (it looks like dreamhost changed all my file permissions, this...
[friendica.git] / include / html2bbcode.php
old mode 100644 (file)
new mode 100755 (executable)
index 734282d..8025c33
@@ -24,6 +24,10 @@ function html2bbcode($s) {
                '/\<u\>(.*?)\<\/u\>/is',
                '/\<ul\>(.*?)\<\/ul\>/is',
                '/\<li\>(.*?)\<\/li\>/is',
+               '/\<img(.*?)width: *([0-9]+)(.*?)height: *([0-9]+)(.*?)src=\"(.*?)\" (.*?)\>/is',
+               '/\<img(.*?)height: *([0-9]+)(.*?)width: *([0-9]+)(.*?)src=\"(.*?)\" (.*?)\>/is',
+               '/\<img(.*?)src=\"(.*?)\"(.*?)width: *([0-9]+)(.*?)height: *([0-9]+)(.*?)\>/is',
+               '/\<img(.*?)src=\"(.*?)\"(.*?)height: *([0-9]+)(.*?)width: *([0-9]+)(.*?)\>/is',
                '/\<img(.*?) src=\"(.*?)\" (.*?)\>/is',
                '/\<div(.*?)\>(.*?)\<\/div\>/is',
                '/\<br(.*?)\>/is',
@@ -35,6 +39,7 @@ function html2bbcode($s) {
                '/\<blockquote\>(.*?)\<\/blockquote\>/is',
                '/\<video(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/video\>/is',
                '/\<audio(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/audio\>/is',
+               '/\<iframe(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/iframe\>/is',
 
        );
 
@@ -49,6 +54,10 @@ function html2bbcode($s) {
                '[u]$1[/u]',
                '[list]$1[/list]',
                '[*]$1',
+               '[img=$2x$4]$6[/img]',
+               '[img=$4x$2]$6[/img]',
+               '[img=$4x$6]$2[/img]',
+               '[img=$6x$4]$2[/img]',
                '[img]$2[/img]',
                '$2',
                "\n",
@@ -60,6 +69,7 @@ function html2bbcode($s) {
                '[quote]$1[/quote]',
                '[video]$1[/video]',
                '[audio]$1[/audio]',
+               '[iframe]$1[/iframe]',
        );
 
        // Replace $htmltags in $text with $bbtags