XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
Legacy_TextFilter Class Reference

The text filter for Legacy. More...

Inheritance diagram for Legacy_TextFilter:
XCube_TextFilter

Public Member Functions

 __construct ()
 Constructor.
 
 toShow ($text, $x2comat=false)
 
 toEdit ($text)
 
 toShowTarea ($text, $html=0, $smiley=1, $xcode=1, $image=1, $br=1, $x2comat=false)
 
 toPreviewTarea (string $text, int $html=0, int $smiley=1, int $xcode=1, int $image=1, int $br=1, bool $x2comat=false)
 
 purifyHtml (string $html, string $encoding=null, string $doctype=null, object $config=null)
 
 getSmileys ()
 
 smiley ($text)
 
 makeClickable ($text)
 
 makeClickableConvertTable (&$patterns, &$replacements)
 
 convertXCode ($text, $allowimage=1)
 
 makeXCodeCheckImgPatterns (&$patterns)
 
 makeXCodeConvertTable (&$patterns, &$replacements)
 
 _filterImgUrl ($matches)
 
 _checkUrlString ($text)
 
 nl2Br ($text)
 
 preConvertXCode ($text, $xcode=1)
 
 makePreXCodeConvertTable (&$patterns, &$replacements)
 
 postConvertXCode ($text, $xcode=1, $image=1)
 
 makePostXCodeConvertTable (&$patterns, &$replacements)
 
 codeSanitizer ($text, $image=1)
 
- Public Member Functions inherited from XCube_TextFilter
 toShow ( $str)
 

Static Public Member Functions

static getInstance (&$instance)
 
static sMakeClickableConvertTable (&$patterns, &$replacements)
 
static sMakeXCodeCheckImgPatterns (&$patterns)
 
static sMakeXCodeConvertTable (&$patterns, &$replacements)
 
static sMakePreXCodeConvertTable (&$patterns, &$replacements)
 
static sMakePostXCodeConvertTable (&$patterns, &$replacements)
 

Data Fields

 $mMakeXCodeConvertTable = null
 
 $mMakeXCodeCheckImgPatterns = null
 
 $mMakeClickableConvertTable = null
 
 $mMakePreXCodeConvertTable = null
 
 $mMakePostXCodeConvertTable = null
 
 $mXCodePre = null
 
 $mMakeClickablePre = null
 
 $mClickablePatterns = []
 
 $mClickableReplacements = []
 
 $mXCodePatterns = []
 
 $mXCodeReplacements = []
 
 $mXCodeCheckImgPatterns = []
 
 $mXCodeCallbacks = []
 
 $mXCodeHasCallback = []
 
 $mPreXCodePatterns = []
 
 $mPreXCodeReplacements = []
 
 $mPreXCodeCallbacks = []
 
 $mPreXCodeHasCallback = false
 
 $mPostXCodePatterns = []
 
 $mPostXCodeReplacements = []
 
 $mPostXCodeCallbacks = []
 
 $mPostXCodeHasCallback = []
 
 $mSmileys = []
 
 $mSmileysConvTable = []
 
- Data Fields inherited from XCube_TextFilter
 $mDummy
 

Static Protected Member Functions

static _sCodeToBase64Encode ($match)
 

Detailed Description

The text filter for Legacy.

Definition at line 20 of file Legacy_TextFilter.class.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Constructor.

Todo
This method keeps a deprecated delegate.

Definition at line 84 of file Legacy_TextFilter.class.php.

Member Function Documentation

◆ _checkUrlString()

_checkUrlString ( $text)

Checks if invalid strings are included in URL

Parameters
string$text
Returns
bool

Definition at line 527 of file Legacy_TextFilter.class.php.

◆ _filterImgUrl()

_filterImgUrl ( $matches)

Filters out invalid strings included in URL, if any

Parameters
array$matches
Returns
string

Definition at line 512 of file Legacy_TextFilter.class.php.

◆ _sCodeToBase64Encode()

static _sCodeToBase64Encode ( $match)
staticprotected

Definition at line 601 of file Legacy_TextFilter.class.php.

◆ codeSanitizer()

codeSanitizer ( $text,
$image = 1 )

Definition at line 712 of file Legacy_TextFilter.class.php.

◆ convertXCode()

convertXCode ( $text,
$allowimage = 1 )

Replace XoopsCodes with their equivalent HTML formatting

Parameters
string$text
int$allowimageAllow images in the text? On FALSE, uses links to images.
Returns
string

Definition at line 373 of file Legacy_TextFilter.class.php.

◆ getInstance()

static getInstance ( & $instance)
static

Reimplemented from XCube_TextFilter.

Definition at line 115 of file Legacy_TextFilter.class.php.

◆ getSmileys()

getSmileys ( )

Get the smileys

Returns
array

Definition at line 266 of file Legacy_TextFilter.class.php.

◆ makeClickable()

makeClickable ( $text)

Make links in the text clickable

Parameters
string$text
Returns
string

Definition at line 306 of file Legacy_TextFilter.class.php.

◆ makeClickableConvertTable()

makeClickableConvertTable ( & $patterns,
& $replacements )
Parameters
$patterns
$replacements
Deprecated

Definition at line 360 of file Legacy_TextFilter.class.php.

◆ makePostXCodeConvertTable()

makePostXCodeConvertTable ( & $patterns,
& $replacements )
Deprecated
Parameters
$patterns
$replacements

Definition at line 691 of file Legacy_TextFilter.class.php.

◆ makePreXCodeConvertTable()

makePreXCodeConvertTable ( & $patterns,
& $replacements )
Deprecated
Parameters
$patterns
$replacements

Definition at line 611 of file Legacy_TextFilter.class.php.

◆ makeXCodeCheckImgPatterns()

makeXCodeCheckImgPatterns ( & $patterns)
Deprecated
Parameters
$patterns

Definition at line 444 of file Legacy_TextFilter.class.php.

◆ makeXCodeConvertTable()

makeXCodeConvertTable ( & $patterns,
& $replacements )
Deprecated
Parameters
$patterns
$replacements

Definition at line 501 of file Legacy_TextFilter.class.php.

◆ nl2Br()

nl2Br ( $text)

Convert linebreaks to
tags

Parameters
string$text
Returns
string

Definition at line 544 of file Legacy_TextFilter.class.php.

◆ postConvertXCode()

postConvertXCode ( $text,
$xcode = 1,
$image = 1 )

Post XCode Convering By default, convert content about [code][/code] tags

Parameters
string$text
int$xcode
int$image
Returns
string

Definition at line 626 of file Legacy_TextFilter.class.php.

◆ preConvertXCode()

preConvertXCode ( $text,
$xcode = 1 )

Pre XCode Converting By default, keep content within [code][/code] tags

Parameters
string$text
int$xcode
Returns
string

Definition at line 558 of file Legacy_TextFilter.class.php.

◆ purifyHtml()

purifyHtml ( string $html,
string $encoding = null,
string $doctype = null,
object $config = null )

purifyHtml

Parameters
string$html
string | null$encoding
string | null$doctype
object | null$config
Returns
string

Definition at line 218 of file Legacy_TextFilter.class.php.

◆ sMakeClickableConvertTable()

static sMakeClickableConvertTable ( & $patterns,
& $replacements )
static

Definition at line 341 of file Legacy_TextFilter.class.php.

◆ sMakePostXCodeConvertTable()

static sMakePostXCodeConvertTable ( & $patterns,
& $replacements )
static

Definition at line 673 of file Legacy_TextFilter.class.php.

◆ sMakePreXCodeConvertTable()

static sMakePreXCodeConvertTable ( & $patterns,
& $replacements )
static

Definition at line 595 of file Legacy_TextFilter.class.php.

◆ sMakeXCodeCheckImgPatterns()

static sMakeXCodeCheckImgPatterns ( & $patterns)
static

Definition at line 436 of file Legacy_TextFilter.class.php.

◆ sMakeXCodeConvertTable()

static sMakeXCodeConvertTable ( & $patterns,
& $replacements )
static

Definition at line 449 of file Legacy_TextFilter.class.php.

◆ smiley()

smiley ( $text)

Replace emoticons in the message with smiley images

Parameters
$text
Returns
string

Definition at line 288 of file Legacy_TextFilter.class.php.

◆ toEdit()

toEdit ( $text)

Filters for editing text

Parameters
string$text
Returns
string

Reimplemented from XCube_TextFilter.

Definition at line 150 of file Legacy_TextFilter.class.php.

◆ toPreviewTarea()

toPreviewTarea ( string $text,
int $html = 0,
int $smiley = 1,
int $xcode = 1,
int $image = 1,
int $br = 1,
bool $x2comat = false )

Filters textarea data for preview

Parameters
string$text
int$htmlallow html?
int$smileyallow smileys?
int$xcodeallow xoopscode?
int$imageallow inline images?
int$brconvert linebreaks?
bool$x2comat
Returns
string

Definition at line 201 of file Legacy_TextFilter.class.php.

◆ toShow()

toShow ( $text,
$x2comat = false )

Filters for editing text

Parameters
string$text
bool$x2comat
Returns
string

Definition at line 130 of file Legacy_TextFilter.class.php.

◆ toShowTarea()

toShowTarea ( $text,
$html = 0,
$smiley = 1,
$xcode = 1,
$image = 1,
$br = 1,
$x2comat = false )

Filters textarea data for display

Parameters
string$text
int$htmlallow html?
int$smileyallow smileys?
int$xcodeallow xoopscode?
int$imageallow inline images?
int$brconvert linebreaks?
bool$x2comat
Returns
string

Definition at line 167 of file Legacy_TextFilter.class.php.

Field Documentation

◆ $mClickablePatterns

$mClickablePatterns = []

Definition at line 56 of file Legacy_TextFilter.class.php.

◆ $mClickableReplacements

$mClickableReplacements = []

Definition at line 57 of file Legacy_TextFilter.class.php.

◆ $mMakeClickableConvertTable

$mMakeClickableConvertTable = null

Definition at line 33 of file Legacy_TextFilter.class.php.

◆ $mMakeClickablePre

$mMakeClickablePre = null

Definition at line 53 of file Legacy_TextFilter.class.php.

◆ $mMakePostXCodeConvertTable

$mMakePostXCodeConvertTable = null

Definition at line 41 of file Legacy_TextFilter.class.php.

◆ $mMakePreXCodeConvertTable

$mMakePreXCodeConvertTable = null

Definition at line 37 of file Legacy_TextFilter.class.php.

◆ $mMakeXCodeCheckImgPatterns

$mMakeXCodeCheckImgPatterns = null

Definition at line 29 of file Legacy_TextFilter.class.php.

◆ $mMakeXCodeConvertTable

$mMakeXCodeConvertTable = null

Definition at line 25 of file Legacy_TextFilter.class.php.

◆ $mPostXCodeCallbacks

$mPostXCodeCallbacks = []

Definition at line 72 of file Legacy_TextFilter.class.php.

◆ $mPostXCodeHasCallback

$mPostXCodeHasCallback = []

Definition at line 73 of file Legacy_TextFilter.class.php.

◆ $mPostXCodePatterns

$mPostXCodePatterns = []

Definition at line 70 of file Legacy_TextFilter.class.php.

◆ $mPostXCodeReplacements

$mPostXCodeReplacements = []

Definition at line 71 of file Legacy_TextFilter.class.php.

◆ $mPreXCodeCallbacks

$mPreXCodeCallbacks = []

Definition at line 67 of file Legacy_TextFilter.class.php.

◆ $mPreXCodeHasCallback

$mPreXCodeHasCallback = false

Definition at line 68 of file Legacy_TextFilter.class.php.

◆ $mPreXCodePatterns

$mPreXCodePatterns = []

Definition at line 65 of file Legacy_TextFilter.class.php.

◆ $mPreXCodeReplacements

$mPreXCodeReplacements = []

Definition at line 66 of file Legacy_TextFilter.class.php.

◆ $mSmileys

$mSmileys = []

Definition at line 75 of file Legacy_TextFilter.class.php.

◆ $mSmileysConvTable

$mSmileysConvTable = []

Definition at line 76 of file Legacy_TextFilter.class.php.

◆ $mXCodeCallbacks

$mXCodeCallbacks = []

Definition at line 62 of file Legacy_TextFilter.class.php.

◆ $mXCodeCheckImgPatterns

$mXCodeCheckImgPatterns = []

Definition at line 61 of file Legacy_TextFilter.class.php.

◆ $mXCodeHasCallback

$mXCodeHasCallback = []

Definition at line 63 of file Legacy_TextFilter.class.php.

◆ $mXCodePatterns

$mXCodePatterns = []

Definition at line 59 of file Legacy_TextFilter.class.php.

◆ $mXCodePre

$mXCodePre = null

Definition at line 46 of file Legacy_TextFilter.class.php.

◆ $mXCodeReplacements

$mXCodeReplacements = []

Definition at line 60 of file Legacy_TextFilter.class.php.


The documentation for this class was generated from the following file: