aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-11-09 19:32:54 -0800
committerFriendika <info@friendika.com>2011-11-09 19:32:54 -0800
commit83e55cf9f43f45465fc52030d55f0ae331e7947b (patch)
tree314d835d07c7531b6ec8ab0b41c7cae928f97925
parent15f2ce5459153336dfb53abcdbb557bf9f2e51c0 (diff)
downloadvolse-hubzilla-83e55cf9f43f45465fc52030d55f0ae331e7947b.tar.gz
volse-hubzilla-83e55cf9f43f45465fc52030d55f0ae331e7947b.tar.bz2
volse-hubzilla-83e55cf9f43f45465fc52030d55f0ae331e7947b.zip
bbcode list styles
-rw-r--r--include/bbcode.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 8c565add6..06a610173 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -99,12 +99,16 @@ function bbcode($Text,$preserve_nl = false) {
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);
- $Text = preg_replace("/\[list=I\](.*?)\[\/list\]/sm", '<ul class="listupperroman">$1</ul>' ,$Text);
- $Text = preg_replace("/\[list=a\](.*?)\[\/list\]/sm", '<ul class="listloweralpha">$1</ul>' ,$Text);
- $Text = preg_replace("/\[list=A\](.*?)\[\/list\]/sm", '<ul class="listupperalpha">$1</ul>' ,$Text);
+ if(stristr($Text,'[/list]'))
+ $Text = str_replace("[*]", "<li>", $Text);
+
+ $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
+ $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '<ul class="listnone" style="list-style-type: none;">$1</ul>' ,$Text);
+ $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text);
+ $Text = preg_replace("/\[list=i\](.*?)\[\/list\]/sm",'<ul class="listlowerroman" style="list-style-type: lower-roman;">$1</ul>' ,$Text);
+ $Text = preg_replace("/\[list=I\](.*?)\[\/list\]/sm", '<ul class="listupperroman" style="list-style-type: upper-roman;">$1</ul>' ,$Text);
+ $Text = preg_replace("/\[list=a\](.*?)\[\/list\]/sm", '<ul class="listloweralpha" style="list-style-type: lower-alpha;">$1</ul>' ,$Text);
+ $Text = preg_replace("/\[list=A\](.*?)\[\/list\]/sm", '<ul class="listupperalpha" style="list-style-type: upper-alpha;">$1</ul>' ,$Text);
$Text = preg_replace("/\[li\](.*?)\[\/li\]/sm", '<li>$1</li>' ,$Text);
$Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '<td>$1</td>' ,$Text);