]> git.mxchange.org Git - friendica.git/commitdiff
Added [quote=Name] bbcode support.
authorAbinoam P. Marques Jr <abinoam@gmail.com>
Mon, 13 Feb 2012 00:18:58 +0000 (16:18 -0800)
committerAbinoam P. Marques Jr <abinoam@gmail.com>
Mon, 13 Feb 2012 00:18:58 +0000 (16:18 -0800)
include/bbcode.php

index 20418f940719f75d1952144a83b17e1e9369cba5..5eacb256b2775e03be561890d31c7cae9c47e984 100755 (executable)
@@ -197,7 +197,13 @@ upper-alpha;">$2</ul>' ,$Text);
        $QuoteLayout = '<blockquote>$1</blockquote>';                     
        // Check for [quote] text
        $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism","$QuoteLayout", $Text);
-         
+
+       // Check for [quote=Author] text
+        $t_wrote = t("wrote");
+       $Text = preg_replace("/\[quote=[\"\']*(.*?)[\"\']*\](.*?)\[\/quote\]/ism", 
+                             "<blockquote><strong>$1 wrote:</strong> $2</blockquote>", 
+                             $Text);         
+
        // [img=widthxheight]image source[/img]
        $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text);