From 0d50d68da03fd115733ca022f67e955be8159873 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 22 Jan 2011 16:03:41 +0000 Subject: [PATCH] left/right/center tags, from r34 --- ext/bbcode/main.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php index bddda8c5..ba759c6d 100644 --- a/ext/bbcode/main.php +++ b/ext/bbcode/main.php @@ -34,6 +34,10 @@ class BBCode extends FormatterExtension { $text = preg_replace_callback("/(\[url\](?:https?|ftp|irc|mailto):\/\/.*?\[\/url\])/s", array($this, "unwrap"), $text); $text = $this->extract_code($text); + $text = preg_replace("/\[left\](.*?)\[\/left\]/s", "
\\1
", $text); + $text = preg_replace("/\[center\](.*?)\[\/center\]/s", "
\\1
", $text); + $text = preg_replace("/\[right\](.*?)\[\/right\]/s", "
\\1
", $text); + $text = preg_replace("/\[b\](.*?)\[\/b\]/s", "\\1", $text); $text = preg_replace("/\[i\](.*?)\[\/i\]/s", "\\1", $text); $text = preg_replace("/\[u\](.*?)\[\/u\]/s", "\\1", $text);