X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fhtml2bbcode.php;h=6e9532c92f5bf462461b600facc085b5489f2e97;hb=431a4d40ebd266af892c62f05f3f5082c3a16b69;hp=985c36eaa4499e5f03acbe72dbd52bb1159947ea;hpb=2bdbdc8d8ef229946e225791801e753a7fd5c695;p=friendica.git diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 985c36eaa4..6e9532c92f 100644 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -156,12 +156,19 @@ function html2bbcode($message) //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(.+?)[,;].*/'), '[size=$1]', '[/size]'); node2bbcode($doc, 'span', array('style'=>'/.*color:\s*(.+?)[,;].*/'), '[color="$1"]', '[/color]'); + //node2bbcode($doc, 'span', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]'); //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*font-size:\s*(\d+?)pt.*/'), '[font=$1][size=$2]', '[/size][/font]'); //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*font-size:\s*(\d+?)px.*/'), '[font=$1][size=$2]', '[/size][/font]'); //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]'); + // Importing the classes - interesting for importing of posts from third party networks that were exported from friendica + // Test + //node2bbcode($doc, 'span', array('class'=>'/([\w ]+)/'), '[class=$1]', '[/class]'); + node2bbcode($doc, 'span', array('class'=>'type-link'), '[class=type-link]', '[/class]'); + node2bbcode($doc, 'span', array('class'=>'type-video'), '[class=type-video]', '[/class]'); + node2bbcode($doc, 'strong', array(), '[b]', '[/b]'); node2bbcode($doc, 'em', array(), '[i]', '[/i]'); node2bbcode($doc, 'b', array(), '[b]', '[/b]'); @@ -206,6 +213,7 @@ function html2bbcode($message) node2bbcode($doc, 'h5', array(), "\n\n[size=small][b]", "[/b][/size]\n"); node2bbcode($doc, 'h6', array(), "\n\n[size=x-small][b]", "[/b][/size]\n"); + node2bbcode($doc, 'a', array('href'=>'/mailto:(.+)/'), '[mail=$1]', '[/mail]'); node2bbcode($doc, 'a', array('href'=>'/(.+)/'), '[url=$1]', '[/url]'); node2bbcode($doc, 'img', array('src'=>'/(.+)/', 'width'=>'/(\d+)/', 'height'=>'/(\d+)/'), '[img=$2x$3]$1', '[/img]');