diff --git a/checkin_notes b/checkin_notes index d82eabf332..9c783701f5 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4657,3 +4657,12 @@ David 9 May 2007 sched/ sched_send.C server_types.h + +Rytis 9 May 2007 + - Update BBCode to allow easy linking to Trac tickets, wiki and changesets. + + html/ + user/ + bbcode.php + inc/ + text_transform.inc diff --git a/html/inc/text_transform.inc b/html/inc/text_transform.inc index 05026129a7..a64a1a5f18 100644 --- a/html/inc/text_transform.inc +++ b/html/inc/text_transform.inc @@ -117,73 +117,77 @@ function get_transform_settings_from_user($user, $options = '') { * Converts bbcode to proper HTML **/ function bb2html($text) { - $urlregex = "(?:\"?)(?:(http\:\/\/)?)([^\[\"<\ ]+)(?:\"?)"; - $httpsregex = "(?:\"?)https\:\/\/([^\[\"<\ ]+)(?:\"?)"; - // List of allowable tags - $bbtags = array ( - "@\[b\](.*?)\[/b\]@is", - "@\[i\](.*?)\[/i\]@is", - "@\[u\](.*?)\[/u\]@is", - "@\[url=$httpsregex\](.*?)\[/url\]@i", - "@\[url\]$httpsregex\[/url\]@i", - "@\[link=$urlregex\](.*?)\[/link\]@i", - "@\[link\]$urlregex\[/link\]@i", - "@\[url=$urlregex\](.*?)\[/url\]@i", - "@\[url\]$urlregex\[/url\]@i", - "@\[quote=(.*?)\](.*?)\[/quote\]@is", - "@\[quote\](.*?)\[/quote\]@is", - "@\[font=(.*?)\](.*?)\[/font\]@is", + $urlregex = "(?:\"?)(?:(http\:\/\/)?)([^\[\"<\ ]+)(?:\"?)"; + $httpsregex = "(?:\"?)https\:\/\/([^\[\"<\ ]+)(?:\"?)"; + // List of allowable tags + $bbtags = array ( + "@\[b\](.*?)\[/b\]@is", + "@\[i\](.*?)\[/i\]@is", + "@\[u\](.*?)\[/u\]@is", + "@\[url=$httpsregex\](.*?)\[/url\]@i", + "@\[url\]$httpsregex\[/url\]@i", + "@\[link=$urlregex\](.*?)\[/link\]@i", + "@\[link\]$urlregex\[/link\]@i", + "@\[url=$urlregex\](.*?)\[/url\]@i", + "@\[url\]$urlregex\[/url\]@i", + "@\[quote=(.*?)\](.*?)\[/quote\]@is", + "@\[quote\](.*?)\[/quote\]@is", "@\[list\](.*?)\[/list\]@is", "@\[list=1\](.*?)\[/list\]@is", - "@\[pre\](.*?)\[/pre\]@is", - "@\[img\]$urlregex\[/img\]@is", - "@\[color=(?:\"?)(.{3,8})(?:\"?)\](.*?)\[/color\]@is", - "@((?:
\\2", "
\\1", - "\\2", - "
", - "
", - "
\\1", - "", - "\\2", - "\\1
", + "
", + "
\\1", + "", + "\\2", + "\\1
+echo "
BBCode tags let you format text in your profile and message-board postings. -It's similar to HTML, but simpler. -The tags start with a [ (where you would have used < in HTML) -and end with ] -(where you would have used > in HTML).
-Examples:
-Lists are also possible:
[list]
*Item 1
*Item 2
[/list] to:
+It's similar to HTML, but simpler. The tags start with a [ (where you would +have used < in HTML) and end with ] (where you would have used > in +HTML).
"; + +start_table(); +row1("Examples"); +row2_plain("[b]Bold[/b]", "Bold"); +row2_plain("[i]Italic[/i]", "Italic"); +row2_plain("[u]Underline[/u]", "Underline"); +row2_plain("[size=15]Big text[/size]", "Big text"); +row2_plain("[color=red]Red text[/color]", "Red text"); +row2_plain("[url=http://google.com/]Google[/url]", "Google"); +row2_plain("[quote]Quoted[/quoted]", "use for quoted blocks of text"); +row2_plain("[img]http://example.com/pic.jpg[/img]", "use to display an image"); +row2_plain("[code]Code snippet here[/code]", "use to display some code"); +row2_plain("[pre]Pre-formatted text here[/pre]", "use to display pre-formatted (usually monospaced) text"); +row2_plain("[list]If you don't close a tag or don't specify a parameter correctly, the raw tag itself will display instead of the formatted text.
"; diff --git a/html/user/forum_pm.php b/html/user/forum_pm.php index 3b383ef607..513329b984 100644 --- a/html/user/forum_pm.php +++ b/html/user/forum_pm.php @@ -1,5 +1,5 @@