Packageindex Classtrees Modulegroups Elementlist Report XML Files

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).

AuthorsLennart Groetzbach <lennartg@web.de>
Version1.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

CopyrightLennart Groetzbach - distributed under the LGPL

 

Public Method Summary

String

encode(String $str)

Encodes the string
String

strip(String $str)

Strips all UBB tags
String

decode(String $str)

Decodes the string
void

listCodes()

Dumps the code tags

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
String $str
Returns String


strip

public String strip( String $str )

  Strips all UBB tags
Removes all ubb tags and leaves only plain text

Parameter
String $str
Returns String


decode

public String decode( String $str )

  Decodes the string
Removes the html tags and replaces them with ubb code tags

Parameter
String $str
Returns String


listCodes

public void listCodes( )

  Dumps the code tags
Displays a <pre> block with the "ubb_def" css style class

Returns void



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta