\BBCODE

Miscellaneous BBCode elements

Summary

Methods
Properties
Constants
__construct()
stripBBCode()
bbCodeToHtml()
codeCallback()
bbencode_list()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() : 

BBCODE class

Returns

stripBBCode()

stripBBCode(  string) : 

Strip all BBCode tags

Parameters

string

Returns

bbCodeToHtml()

bbCodeToHtml(  string) : 

replace [x]...[/x] BBcode with HTML code

Used for display back from DB table

Parameters

string

Returns

codeCallback()

codeCallback(mixed||string|int  matches) : 

Callback function for [code]...[/code] which cannot have other BBCode within it

Parameters

mixed||string|int matches

Returns

bbencode_list()

bbencode_list(  message) : 

Decode [list]...[/list] and [list=xx]...[/list]

This has been shamelessly pinched from PHP Bulletin Board code with a little debugging.... Nathan Codding - Jan. 12, 2001. Performs [list][/list] and [list=?][/list] bbencoding on the given string, and returns the results. Any unmatched "[list]" or "[/list]" token will just be left alone. This works fine with both having more than one list in a message, and with nested lists. Since that is not a regular language, this is actually a PDA and uses a stack. Great fun.

Note: This function assumes the first character of $message is a space, which is added by bbencode().

Parameters

message

Returns