Class Trees Index phpDocumentor Project Page

Class MyTextSanitizer

(line 43)

Located in File: Program_Root/class/module.textsanitizer.php


Class to "clean up" text for various uses

Singleton


Class Variable Summary

$censorConf


Default Value: -><-

$smileys


Default Value: ->array()<-

Inherited Class Variable Summary


Method Summary

void

constructor MyTextSanitizer ( )


string

&addSlashes ( $text )


Add slashes to the text if magic_quotes_gpc is turned off.
string

&censorString ( &$text )


Replaces banned words in a string with their replacements
string

&displayTarea ( &$text, [$html = 0], [$smiley = 1], [$xcode = 1], [$image = 1], [$br = 1] )


Filters textarea form data in DB for display
object

&getInstance ( )


Access the only instance of this class
array

getSmileys ( )


Get the smileys
void

&htmlSpecialChars ( $text )


string

&makeClickable ( &$text )


Make links in the text clickable
void

makeTareaData4Edit ( $text )


void

makeTareaData4InsideQuotes ( $text )


void

&makeTareaData4Preview ( &$text, [$html = 1], [$smiley = 1], [$xcode = 1] )


void

makeTareaData4PreviewInForm ( $text )


void

makeTareaData4Save ( $text )


void

&makeTareaData4Show ( &$text, [$html = 1], [$smiley = 1], [$xcode = 1] )


void

makeTboxData4Edit ( $text )


void

makeTboxData4Preview ( $text, [$smiley = 0] )


void

makeTboxData4PreviewInForm ( $text )


void

makeTboxData4Save ( $text )


void

makeTboxData4Show ( $text, [$smiley = 0] )


string

&nl2Br ( $text )


Convert linebreaks to
tags
void

&oopsAddSlashes ( $text )


void

&oopsHtmlSpecialChars ( $text )


void

&oopsNl2Br ( $text )


void

&oopsStripSlashesGPC ( $text )


void

&oopsStripSlashesRT ( $text )


string

&previewTarea ( &$text, [$html = 0], [$smiley = 1], [$xcode = 1], [$image = 1], [$br = 1] )


Filters textarea form data submitted for preview
void

sanitizeForDisplay ( $text, [$allowhtml = 0], [$smiley = 1], [$bbcode = 1] )


void

sanitizeForPreview ( $text, [$allowhtml = 0], [$smiley = 1], [$bbcode = 1] )


string

&smiley ( $message )


Replace emoticons in the message with smiley images
void

&stripSlashesGPC ( $text )


string

&undoHtmlSpecialChars ( &$text )


Reverses htmlSpecialChars()
string

&xoopsCodeDecode ( &$text, [$allowimage = 1] )


Replace XoopsCodes with their equivalent HTML formatting

Inherited Method Summary


Method Detail

Constructor MyTextSanitizer (line 66)

void

MyTextSanitizer( )


Function Info:

[ Top ]


addSlashes (line 213)

string

&addSlashes( string $text)

Add slashes to the text if magic_quotes_gpc is turned off.
Function Parameters:
- string $text:
Function Info:

[ Top ]


censorString (line 344)

string

&censorString( mixed &$text, string $text)

Replaces banned words in a string with their replacements
Function Parameters:
- string $text:
Function Info:
deprecated -

[ Top ]


displayTarea (line 270)

string

&displayTarea( mixed &$text, bool $html, [bool $smiley = 1], [bool $xcode = 1], [bool $image = 1], [bool $br = 1], string $text)

Filters textarea form data in DB for display
Function Parameters:
- string $text:
- bool $html: allow html?
- bool $smiley: allow smileys?
- bool $xcode: allow xoopscode?
- bool $image: allow inline images?
- bool $br: convert linebreaks?
Function Info:

[ Top ]


getInstance (line 79)

object

&getInstance( )

Access the only instance of this class
Function Info:
staticvar - object $instance:
static -

[ Top ]


getSmileys (line 93)

array

getSmileys( )

Get the smileys
Function Info:

[ Top ]


htmlSpecialChars (line 242)

void

&htmlSpecialChars( mixed $text)


Function Info:

[ Top ]


makeClickable (line 129)

string

&makeClickable( mixed &$text, string $text)

Make links in the text clickable
Function Parameters:
- string $text:
Function Info:

[ Top ]


makeTareaData4Edit (line 455)

void

makeTareaData4Edit( mixed $text)


Function Info:
deprecated -

[ Top ]


makeTareaData4InsideQuotes (line 472)

void

makeTareaData4InsideQuotes( mixed $text)


Function Info:
deprecated -

[ Top ]


makeTareaData4Preview (line 460)

void

&makeTareaData4Preview( mixed &$text, [mixed $html = 1], [mixed $smiley = 1], [mixed $xcode = 1])


Function Info:
deprecated -

[ Top ]


makeTareaData4PreviewInForm (line 465)

void

makeTareaData4PreviewInForm( mixed $text)


Function Info:
deprecated -

[ Top ]


makeTareaData4Save (line 445)

void

makeTareaData4Save( mixed $text)


Function Info:
deprecated -

[ Top ]


makeTareaData4Show (line 450)

void

&makeTareaData4Show( mixed &$text, [mixed $html = 1], [mixed $smiley = 1], [mixed $xcode = 1])


Function Info:
deprecated -

[ Top ]


makeTboxData4Edit (line 427)

void

makeTboxData4Edit( mixed $text)


Function Info:
deprecated -

[ Top ]


makeTboxData4Preview (line 432)

void

makeTboxData4Preview( mixed $text, mixed $smiley)


Function Info:
deprecated -

[ Top ]


makeTboxData4PreviewInForm (line 439)

void

makeTboxData4PreviewInForm( mixed $text)


Function Info:
deprecated -

[ Top ]


makeTboxData4Save (line 415)

void

makeTboxData4Save( mixed $text)


Function Info:
deprecated -

[ Top ]


makeTboxData4Show (line 421)

void

makeTboxData4Show( mixed $text, mixed $smiley)


Function Info:
deprecated -

[ Top ]


nl2Br (line 202)

string

&nl2Br( string $text)

Convert linebreaks to
tags

Function Parameters:
- string $text:
Function Info:

[ Top ]


oopsAddSlashes (line 490)

void

&oopsAddSlashes( mixed $text)


Function Info:
deprecated -

[ Top ]


oopsHtmlSpecialChars (line 495)

void

&oopsHtmlSpecialChars( mixed $text)


Function Info:
deprecated -

[ Top ]


oopsNl2Br (line 500)

void

&oopsNl2Br( mixed $text)


Function Info:
deprecated -

[ Top ]


oopsStripSlashesGPC (line 477)

void

&oopsStripSlashesGPC( mixed $text)


Function Info:
deprecated -

[ Top ]


oopsStripSlashesRT (line 482)

void

&oopsStripSlashesRT( mixed $text)


Function Info:
deprecated -

[ Top ]


previewTarea (line 308)

string

&previewTarea( mixed &$text, bool $html, [bool $smiley = 1], [bool $xcode = 1], [bool $image = 1], [bool $br = 1], string $text)

Filters textarea form data submitted for preview
Function Parameters:
- string $text:
- bool $html: allow html?
- bool $smiley: allow smileys?
- bool $xcode: allow xoopscode?
- bool $image: allow inline images?
- bool $br: convert linebreaks?
Function Info:

[ Top ]


sanitizeForDisplay (line 374)

void

sanitizeForDisplay( mixed $text, mixed $allowhtml, [mixed $smiley = 1], [mixed $bbcode = 1])


Function Info:
deprecated -

[ Top ]


sanitizeForPreview (line 394)

void

sanitizeForPreview( mixed $text, mixed $allowhtml, [mixed $smiley = 1], [mixed $bbcode = 1])


Function Info:
deprecated -

[ Top ]


smiley (line 105)

string

&smiley( string $message)

Replace emoticons in the message with smiley images
Function Parameters:
- string $message:
Function Info:

[ Top ]


stripSlashesGPC (line 227)

void

&stripSlashesGPC( mixed $text)


Function Info:

[ Top ]


undoHtmlSpecialChars (line 254)

string

&undoHtmlSpecialChars( mixed &$text, string $text)

Reverses htmlSpecialChars()
Function Parameters:
- string $text:
Function Info:

[ Top ]


xoopsCodeDecode (line 144)

string

&xoopsCodeDecode( mixed &$text, [bool $allowimage = 1], string $text)

Replace XoopsCodes with their equivalent HTML formatting
Function Parameters:
- string $text:
- bool $allowimage: Allow images in the text? On FALSE, uses links to images.
Function Info:

[ Top ]



Variable Detail

$censorConf

(line 53)
Data type: mixed


$smileys

(line 48)
Data type: array




Documention generated on Fri, 21 Feb 2003 02:07:47 +0100 by phpDocumentor 1.2.0rc1
proudly hosted at
SourceForge.net Logo