diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2012-02-12 15:51:17 -0800 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2012-02-12 15:51:17 -0800 |
commit | 3a07973ffae4e0f9c576d343eafee30401d92449 (patch) | |
tree | da1aba6f34a1f93416dc168cf69aea4631366d07 | |
parent | 74b529bda2fb024815299db094ac8313a9d9d809 (diff) | |
download | volse-hubzilla-3a07973ffae4e0f9c576d343eafee30401d92449.tar.gz volse-hubzilla-3a07973ffae4e0f9c576d343eafee30401d92449.tar.bz2 volse-hubzilla-3a07973ffae4e0f9c576d343eafee30401d92449.zip |
Added [center] bbcode support.
-rwxr-xr-x | include/bbcode.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index fa5b7e080..20418f940 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -142,6 +142,9 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1px;\">$2</span>",$Text); $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1;\">$2</span>",$Text); + // Check for centered text + $Text = preg_replace("(\[center\](.*?)\[\/center\])ism","<div style=\"text-align:center;\">$1</div>",$Text); + // Check for list text if(stristr($Text,'[/(list|ul|ol)]')) |