|
|
File: ../../projects/bookmarks/ubbcode/UBBCode.php
PHPDoc -
UBBCode
UBBCode
Replaces the ubb tags with HTML tags, and vice versa.
|
public class UBBCode
Replaces the ubb tags with HTML tags, and vice versa.
Also keeps the line feeds in the text and removes slashes (good for sql queries).
Authors | Lennart Groetzbach <lennartg@web.de> |
Version | 1.1 - 2002/10/27
History / Changes
Version | Reported By | File / Function Changed | Date of Change | Commment |
1.1 | P.Gareau | encoding and decoding | 2002/10/27 | checks now for closing tags |
1.1 | - | strip() | 2002/10/27 | added function to strip the ubb tags |
|
Copyright | Lennart Groetzbach - distributed under the LGPL |
|
|
|
|
Public Method Details |
encode |
public String encode( String $str )
|
|
Encodes the string
Removes all html tags and exchanges only the ubb tags and with html tags.
|
Parameter |
|
|
Returns |
String |
|
strip |
public String strip( String $str )
|
|
Strips all UBB tags
Removes all ubb tags and leaves only plain text
|
Parameter |
|
|
Returns |
String |
|
decode |
public String decode( String $str )
|
|
Decodes the string
Removes the html tags and replaces them with ubb code tags
|
Parameter |
|
|
Returns |
String |
|
listCodes |
public void listCodes( )
|
|
Dumps the code tags
Displays a <pre> block with the "ubb_def" css style class
|
Returns |
void |
|
|
|
|
PHPDoc 1.0beta |