]> git.mxchange.org Git - friendica.git/commitdiff
vier: With IE there are no borders around images anymore
authorMichael Vogel <icarus@dabo.de>
Fri, 28 Dec 2012 10:31:30 +0000 (11:31 +0100)
committerMichael Vogel <icarus@dabo.de>
Fri, 28 Dec 2012 10:31:30 +0000 (11:31 +0100)
bbcode: Multiple new lines are now reduced

include/bbcode.php
view/theme/vier/style.css

index 384fd5ebd90a8aa1b156908143cc5e720705858a..08edc193403d044f5c2837c5243e125cca13451f 100644 (file)
@@ -310,6 +310,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
 
        // remove some newlines before the general conversion
        $Text = preg_replace("/\s?\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","[share$1]$2[/share]",$Text);
+       $Text = preg_replace("/\s?\[quote(.*?)\]\s?(.*?)\s?\[\/quote\]\s?/ism","[quote$1]$2[/quote]",$Text);
 
        // when the content is meant exporting to other systems then remove the avatar picture since this doesn't really look good on these systems
        if (!$tryoembed)
@@ -324,6 +325,15 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
 
        $Text = trim($Text);
        $Text = str_replace("\r\n","\n", $Text);
+
+       // removing multiplicated newlines
+       $search = array("\n\n\n", "\n ", " \n", "[/quote]\n\n", "\n[/quote]");
+       $replace = array("\n\n", "\n", "\n", "[/quote]\n", "[/quote]");
+       do {
+               $oldtext = $Text;
+               $Text = str_replace($search, $replace, $Text);
+       } while ($oldtext != $Text);
+
        $Text = str_replace(array("\r","\n"), array('<br />','<br />'), $Text);
 
        if($preserve_nl)
index 9524c73caba948a591a9f348e3fe7b5ae2c2c162..1701e8ac4c81f0fb60f12de0ac03ab194b0509ff 100644 (file)
@@ -7,6 +7,10 @@
 @import url("css/font-awesome.css") all;
 @import url("css/font2.css") all;
 
+img { 
+  border: 0px;
+}
+
 /* ========= */
 /* = Admin = */
 /* ========= */