diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2012-02-12 16:18:58 -0800 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2012-02-12 16:18:58 -0800 |
commit | 10e66d293df695e37be05200ab130f1fc988880b (patch) | |
tree | f25f38b613a803d1a5b26ac1beb96b7f6e7f84fc /include/bbcode.php | |
parent | 3a07973ffae4e0f9c576d343eafee30401d92449 (diff) | |
download | volse-hubzilla-10e66d293df695e37be05200ab130f1fc988880b.tar.gz volse-hubzilla-10e66d293df695e37be05200ab130f1fc988880b.tar.bz2 volse-hubzilla-10e66d293df695e37be05200ab130f1fc988880b.zip |
Added [quote=Name] bbcode support.
Diffstat (limited to 'include/bbcode.php')
-rwxr-xr-x | include/bbcode.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 20418f940..5eacb256b 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -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); |