例如,我在一般的phpbb2發文時,將某段php程式碼(或tpl原始碼)使用
代碼: 選擇全部
[code]
代碼: 選擇全部
#
#-----[ FIND ]------------------------------------------
# ~ line number 270
// [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-2]?[0-9])\](.*?)\[/size\]#si", "[size=\\1:$uid]\\2[/size:$uid]", $text);
代碼: 選擇全部
#
#-----[ FIND ]------------------------------------------
# ~ line number 270
// [color] and for setting text color
$text = preg_replace("#\{6}|[a-z\-]+)\](.*?)\[/color\]#si", "\\2[/color:$uid]", $text);
// [size] and for setting text size
$text = preg_replace("#\?[0-9])\](.*?)\[/size\]#si", "\\2[/size:$uid]", $text);