]> git.mxchange.org Git - friendica.git/commitdiff
bbcode lists
authorFriendika <info@friendika.com>
Fri, 4 Nov 2011 04:30:01 +0000 (21:30 -0700)
committerFriendika <info@friendika.com>
Fri, 4 Nov 2011 04:30:01 +0000 (21:30 -0700)
include/bbcode.php

index 4d6eafafa5f28acccef5f7285c28e7d0211aefba..8c565add6ccceff9a86da833822b9485e5716589 100644 (file)
@@ -95,6 +95,10 @@ function bbcode($Text,$preserve_nl = false) {
        $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1;\">$2</span>",$Text);
 
        // Check for list text
+
+       if(stristr($Text,'[/list]'))
+               $Text = str_replace("[*]", "<li>", $Text);
+
        $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '<ul class="listbullet">$1</ul>' ,$Text);
        $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '<ul class="listdecimal">$1</ul>' ,$Text);
        $Text = preg_replace("/\[list=i\](.*?)\[\/list\]/sm",'<ul class="listlowerroman">$1</ul>' ,$Text);
@@ -111,7 +115,6 @@ function bbcode($Text,$preserve_nl = false) {
        $Text = preg_replace("/\[table border=0\](.*?)\[\/table\]/sm", '<table border="0" >$1</table>' ,$Text);
 
        
-//     $Text = str_replace("[*]", "<li>", $Text);
 
        // Check for font change text
        $Text = preg_replace("/\[font=(.*?)\](.*?)\[\/font\]/sm","<span style=\"font-family: $1;\">$2</span>",$Text);