]> git.mxchange.org Git - friendica.git/commitdiff
import image sizes from html source
authorFriendika <info@friendika.com>
Tue, 13 Sep 2011 11:53:17 +0000 (04:53 -0700)
committerFriendika <info@friendika.com>
Tue, 13 Sep 2011 11:53:17 +0000 (04:53 -0700)
include/html2bbcode.php

index d4e8cce6661cf84ebba4bac9ea9c819dba62c292..8025c336bc9ca5b3aa7cf7ce6044af7bd90108e7 100644 (file)
@@ -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',
@@ -50,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",