Overview

Packages

  • Auth
    • Ads
    • Ldap
    • Xoops
  • Autotasks
  • Config
    • Category
    • Item
    • Option
  • Core
    • Filesystem
    • Filters
    • Logger
    • Mail
    • Message
    • Password
    • Security
    • StopSpammer
    • Template
    • Textsanitizer
    • VersionChecker
  • Data
    • Avatar
    • Comment
  • Database
    • Connection
    • Criteria
    • Legacy
    • MySQL
    • PDO
    • Updater
  • Feeds
    • RSS
  • File
  • Form
    • Base
    • Elements
  • ICMS
    • IPF
      • View
  • Image
    • Category
  • Ipf
    • Category
    • Controller
    • Export
    • form
    • Keyhighlighter
    • Member
    • Object
    • Permission
    • richfile
    • Tree
    • urllink
    • View
  • kernel
    • Set
  • Member
    • Group
    • GroupMembership
    • GroupPermission
    • User
  • Messaging
  • Module
  • None
  • Notification
  • Page
  • Plugins
    • Editor
  • Preload
    • Libraries
  • Privmessage
  • Session
  • SmartObject
  • View
    • Block
    • Breadcrumb
    • PageNav
    • PrinterFriendly
    • Template
    • Templates
    • Theme
    • Tree

Classes

  • icms_core_DataFilter
  • icms_core_HTMLFilter
  • Overview
  • Package
  • Class

Class icms_core_DataFilter

Direct known subclasses

icms_core_HTMLFilter
Package: Core\Filters
Category: ICMS
Copyright: (c) 2007-2010 The ImpressCMS Project - www.impresscms.org
Author: vaughan montgomery (vaughan@impresscms.org)
Author: ImpressCMS Project
Located at core/DataFilter.php
Methods summary
public
# __construct( )
public static
# filterDebugInfo( $text, $msg )

Parameters

$text
$msg

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org

Author

vaughan montgomery (vaughan@impresscms.org)
public static string
# _filterImgUrl( array $matches )

Filters out invalid strings included in URL, if any

Filters out invalid strings included in URL, if any

Parameters

$matches

Returns

string

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org

Author

vaughan montgomery (vaughan@impresscms.org)
public static boolean
# checkUrlString( string $text )

Checks if invalid strings are included in URL

Checks if invalid strings are included in URL

Parameters

$text

Returns

boolean

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org

Author

vaughan montgomery (vaughan@impresscms.org)
public static string
# nl2Br( string $text )

Convert linebreaks to
tags

Convert linebreaks to
tags

Parameters

$text

Returns

string
public static string
# htmlSpecialChars( string $text )

for displaying data in html textbox forms

for displaying data in html textbox forms

Parameters

$text

Returns

string
public static string
# undoHtmlSpecialChars( string $text )

Reverses icms_core_DataFilter::htmlSpecialChars()

Reverses icms_core_DataFilter::htmlSpecialChars()

Parameters

$text

Returns

string
public static
# htmlEntities( unknown_type $text )

Parameters

$text
public static string
# addSlashes( string $text, string $param = null )

Parameters

$text

the text to apply the slashes to string $param which characters to apply the escaping to.

$param

Returns

string
Add slashes to the text if magic_quotes_gpc is turned off (and that should be always on >= PHP 5.4!!!).
public static string
# stripSlashesGPC( string $text )

Note: magic_quotes_gpc and magic_quotes_runtime are deprecated as of PHP5.3.0 (and that should be always on >= PHP 5.4!!!)

Note: magic_quotes_gpc and magic_quotes_runtime are deprecated as of PHP5.3.0 (and that should be always on >= PHP 5.4!!!)

Deprecated

we shouldn't be using this as a 'filter'

Parameters

$text

Returns

string
public static array
# cleanArray( array $arr )

Filters Multidimensional Array Recursively removing keys with empty values

Filters Multidimensional Array Recursively removing keys with empty values

Parameters

$arr
$array Array to be filtered

Returns

array
$array

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org

Author

vaughan montgomery (vaughan@impresscms.org)
public static
# checkVar( $data, $type, $options1 = '', $options2 = '' )

Parameters

$data
$type
$options1
$options2

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org

Author

vaughan montgomery (vaughan@impresscms.org)
public static array
# checkVarArray( array $input, array $filters, boolean $strict = true )

Filter an array of variables, such as $_GET or $_POST, using a set of filters.

Filter an array of variables, such as $_GET or $_POST, using a set of filters.

Any items in the input array not found in the filter array will be filtered as a string.

Parameters

$input
items to be filtered
$filters

the keys of this array should match the keys in the input array and the values should be valid types for the checkVar method

$strict

when true (default), items not in the filter array will be discarded when false, items not in the filter array will be filtered as strings and included

Returns

array

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org

Author

vaughan montgomery (vaughan@impresscms.org)
public static string
# filterTextareaInput( string $text )

Filters textarea form data for INPUt to DB (text only!!) For HTML please use icms_core_HTMLFilter::filterHTMLinput()

Filters textarea form data for INPUt to DB (text only!!) For HTML please use icms_core_HTMLFilter::filterHTMLinput()

Parameters

$text

Returns

string

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org

Author

vaughan montgomery (vaughan@impresscms.org)
public static string
# filterTextareaDisplay( string $text, boolean $smiley = 1, boolean $icode = 1, boolean $image = 1, boolean $br = 1 )

Filters textarea for DISPLAY purposes (text only!!) For HTML please use icms_core_HTMLFilter::filterHTMLdisplay()

Filters textarea for DISPLAY purposes (text only!!) For HTML please use icms_core_HTMLFilter::filterHTMLdisplay()

Parameters

$text
$smiley
allow smileys?
$icode
allow icmscode?
$image
allow inline images?
$br
convert linebreaks?

Returns

string
public static string
# filterHTMLinput( string $html, boolean $smiley = 1, boolean $icode = 1, boolean $image = 1, $br = 0 )

Filters HTML form data for INPUT to DB

Filters HTML form data for INPUT to DB

Parameters

$html
$smiley
allow smileys?
$icode
allow icmscode?
$image
allow inline images?
$br

Returns

string

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org

Author

vaughan montgomery (vaughan@impresscms.org)
public static string
# filterHTMLdisplay( string $html, boolean $icode = 1, $br = 0 )

Filters HTML form data for Display Only we don't really require the icmscode stuff, but we need to for content already in the DB before we start filtering on INPUT instead of OUTPUT!!

Filters HTML form data for Display Only we don't really require the icmscode stuff, but we need to for content already in the DB before we start filtering on INPUT instead of OUTPUT!!

Parameters

$html
$icode
allow icmscode?
$br

Returns

string

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org

Author

vaughan montgomery (vaughan@impresscms.org)
public static string
# codeDecode( string & $text, boolean $allowimage = 1 )

Replace icmsCodes with their equivalent HTML formatting

Replace icmsCodes with their equivalent HTML formatting

Parameters

$text
$allowimage

Allow images in the text? On false, uses links to images.

Returns

string
public static string
# makeClickable( string $text )

Make links in the text clickable

Make links in the text clickable

Parameters

$text

Returns

string
public static
# smiley( $message )

Parameters

$message
public static
# getSmileys( $all = false )

Parameters

$all
public static string
# censorString( string & $text )

Replaces banned words in a string with their replacements

Replaces banned words in a string with their replacements

Parameters

$text

Returns

string
public static
# codePreConv( $text, $imcode = 1 )

@+

Sanitizing of [code] tag

@+

Sanitizing of [code] tag

public static string
# codeConv( string $text, integer $imcode = 1, integer $image = 1 )

Converts text to imcode

Converts text to imcode

Parameters

$text
Text to convert
$imcode
Is the code Xcode?
$image
configuration for the purifier

Returns

string
$text the converted text
public static string
# codeSanitizer( string $str, string $image = 1 )

Sanitizes decoded string

Sanitizes decoded string

Parameters

$str
String to sanitize
$image
Is the string an image

Returns

string
$str The sanitized decoded string
public static object
# codeDecode_extended( integer $text, boolean $allowimage = 1 )

This function gets allowed plugins from DB and loads them in the sanitizer

This function gets allowed plugins from DB and loads them in the sanitizer

Parameters

$text
$id ID of the config
$allowimage
$withoptions load the config's options now?

Returns

object
reference to the IcmsConfig

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org
public static boolean
# loadExtension( string $name )

loads the textsanitizer plugins

loads the textsanitizer plugins

Parameters

$name
Name of the extension to load

Returns

boolean

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org
public static array
# executeExtension( string $name, string $text )

Executes file with a certain extension using call_user_func_array

Executes file with a certain extension using call_user_func_array

Parameters

$name
Name of the file to load
$text
Text to show if the function doesn't exist

Returns

array
the return of the called function

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org
public static string
# textsanitizer_syntaxhighlight( string & $text )

Syntaxhighlight the code

Syntaxhighlight the code

Parameters

$text
purifies (lightly) and then syntax highlights the text

Returns

string
$text the syntax highlighted text

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org
public static string
# textsanitizer_php_highlight( string $text )

Syntaxhighlight the code using PHP highlight

Syntaxhighlight the code using PHP highlight

Parameters

$text
Text to highlight

Returns

string
$buffer the highlighted text

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org
public static string
# textsanitizer_geshi_highlight( string $text )

Syntaxhighlight the code using Geshi highlight

Syntaxhighlight the code using Geshi highlight

Parameters

$text
The text to highlight

Returns

string
$code the highlighted text

Copyright

(c) 2007-2010 The ImpressCMS Project - www.impresscms.org
public static string
# icms_trim( string $text )

Trims certain text

Trims certain text

Replaces include/functions.php :: xoops_trim()

Parameters

$text
The Text to trim

Returns

string
$text The trimmed text
public static string
# utf8_strrev( string $str, string $reverse = false )

Function to reverse given text with utf-8 character sets

Function to reverse given text with utf-8 character sets

credit for this function should goto lwc courtesy of php.net.

Parameters

$str
The text to be reversed.
$reverse

true will reverse everything including numbers, false will reverse text only but numbers will be left intact. example: when true: impresscms 2008 > 8002 smcsserpmi, false: impresscms 2008 > 2008 smcsserpmi

Returns

string
public static string
# icms_substr( string $str, integer $start, integer $length, string $trimmarker = '...' )

Returns the portion of string specified by the start and length parameters. If $trimmarker is supplied, it is appended to the return string. This function works fine with multi-byte characters if mb_* functions exist on the server.

Returns the portion of string specified by the start and length parameters. If $trimmarker is supplied, it is appended to the return string. This function works fine with multi-byte characters if mb_* functions exist on the server.

Replaces legacy include/functions.php :: xoops_substr()

Parameters

$str
$start
$length
$trimmarker

Returns

string
Properties summary
public static array $displaySmileys

Public

array
# array()
public static array $allSmileys

Public

array
# array()
API documentation generated by ApiGen