]> git.mxchange.org Git - friendica.git/commitdiff
bbcode: two new bbcode elements (style, class) for CSS
authorMichael Vogel <icarus@dabo.de>
Wed, 1 Aug 2012 22:13:37 +0000 (00:13 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 1 Aug 2012 22:13:37 +0000 (00:13 +0200)
include/bbcode.php
view/theme/diabook/style-profile.css
view/theme/diabook/style.css

index 9ece3c3deca1c23fae7e7c6ab7df1c1354915450..d83cd35814a9f582c8b117d3b097f4026fe228d5 100644 (file)
@@ -224,6 +224,12 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
        // Check for list text
        $Text = str_replace("[*]", "<li>", $Text);
 
+       // Check for style sheet commands
+       $Text = preg_replace("(\[style=(.*?)\](.*?)\[\/style\])ism","<span style=\"$1;\">$2</span>",$Text);
+
+       // Check for CSS classes
+       $Text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism","<span class=\"$1\">$2</span>",$Text);
+
        // handle nested lists
        $endlessloop = 0;
 
index 63b2eb544a4121e675aae1ab559fefd0453e798b..927549fa33f7bd48a53cd1c106eafcf1cdb1fb45 100644 (file)
@@ -2549,4 +2549,9 @@ list-style-type: disc;
 #photos-upload-newalbum-div {
         float: left;
         width: 175px;
-}
\ No newline at end of file
+}
+
+.item-image-preview {
+  float: left;
+  margin-right: 10px;
+}
index 68bfd5d3a9213a0750b8b37460c941898497ab06..286559b859b9906a3fefc177bee882fe5da0c498 100644 (file)
@@ -2906,4 +2906,4 @@ list-style-type: disc;
 #photos-upload-newalbum-div {
         float: left;
         width: 175px;
-}
\ No newline at end of file
+}