mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-07 16:15:22 +02:00
color and size tags
git-svn-id: file:///svn/phpbb/trunk@1092 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
58e830807a
commit
33d7444cc4
@ -58,7 +58,15 @@ function bbencode_second_pass($text, $uid)
|
|||||||
$text = str_replace("[/list:u:$uid]", '</ul>', $text);
|
$text = str_replace("[/list:u:$uid]", '</ul>', $text);
|
||||||
$text = str_replace("[/list:o:$uid]", '</ol>', $text);
|
$text = str_replace("[/list:o:$uid]", '</ol>', $text);
|
||||||
// Ordered lists
|
// Ordered lists
|
||||||
$text = preg_replace("/\[list=([a1]):$uid\]/si", '<ol type="\1">', $text);
|
$text = preg_replace("/\[list=([a1]):$uid\]/si", '<ol type="\1">', $text);
|
||||||
|
|
||||||
|
// colours
|
||||||
|
$text = preg_replace("/\[color=(\#[0-9A-F]{6}|[a-z]+):$uid\]/si", '<font color="\1">', $text);
|
||||||
|
$text = str_replace("[/color:$uid]", "</font>", $text);
|
||||||
|
|
||||||
|
// size
|
||||||
|
$text = preg_replace("/\[size=([\-\+]?[1-3]):$uid\]/si", '<font size="\1">', $text);
|
||||||
|
$text = str_replace("[/size:$uid]", "</font>", $text);
|
||||||
|
|
||||||
// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff.
|
// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff.
|
||||||
$text = str_replace("[quote:$uid]", '<table border="0" align="center" width="85%"><tr><td><font size="-1">' . $lang['Quote'] . '</font><hr /> </td></tr><tr><td><font size="-1"><blockquote>', $text);
|
$text = str_replace("[quote:$uid]", '<table border="0" align="center" width="85%"><tr><td><font size="-1">' . $lang['Quote'] . '</font><hr /> </td></tr><tr><td><font size="-1"><blockquote>', $text);
|
||||||
@ -147,6 +155,12 @@ function bbencode_first_pass($text, $uid)
|
|||||||
// ordered.
|
// ordered.
|
||||||
$text = bbencode_first_pass_pda($text, $uid, $open_tag, "[/list]", "[/list:o]", false, 'replace_listitems');
|
$text = bbencode_first_pass_pda($text, $uid, $open_tag, "[/list]", "[/list:o]", false, 'replace_listitems');
|
||||||
|
|
||||||
|
// [color] and [/color] for setting text color
|
||||||
|
$text = preg_replace("#\[color=(\#[0-9A-F]{6}|[a-z]+)\](.*?)\[/color\]#si", "[color=\\1:$uid]\\2[/color:$uid]", $text);
|
||||||
|
|
||||||
|
// [size] and [/size] for setting text size
|
||||||
|
$text = preg_replace("#\[size=([\-\+]?[1-3])\](.*?)\[/size\]#si", "[size=\\1:$uid]\\2[/size:$uid]", $text);
|
||||||
|
|
||||||
// [b] and [/b] for bolding text.
|
// [b] and [/b] for bolding text.
|
||||||
$text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text);
|
$text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user