|
XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
| addslashes ($text) | |
| bad_protocol_once2 ($matches) | |
| call_code_modifiers ($code, $lang) | |
| clean_disabled_tags ($text) | |
| clean_pre ($matches) | |
| clean_url ($url, $protocols=null, $context= 'display') | |
| codeConv ($text, $exmcode=1) | |
| codeDecode ($text, $allowimage=1) | |
| codePreConv ($text) | |
| decode_entities ($string) | |
| decode_entities_chr ($match) | |
| decode_entities_chr_hexdec ($match) | |
| decrypt ($string, $encode64=true) | |
| double_br ($string, $br=1) | |
| encrypt ($string, $encode64=true) | |
| ftp_clickable ($matches) | |
| get_emotions () | |
| mail_clickable ($matches) | |
| make_clickable ($string) | |
| nl2Br ($text) | |
| no_null ($string) | |
| nofollow ($text) | |
| popuplinks ($text) | |
| replace ($search, $subject) | |
| smiley ($message) | |
| specialchars ($string, $quote_style=ENT_NOQUOTES, $charset= 'UTF-8') | |
| specialchars_decode ($string, $quote_style=ENT_NOQUOTES) | |
| stripslashes ($text) | |
| sweetstring ($value, $lower=true) | |
| to_display ($text, $dbr=true, $clean_tags=true, $paragraph=true) | |
| truncate ($text, $len) | |
| url_clickable ($matches) | |
Static Public Member Functions | |
| static | getInstance () |
Private Member Functions | |
| bad_protocol ($string, $allowed_protocols) | |
| bad_protocol_once ($string, $allowed_protocols) | |
Private Attributes | |
| $disable_tags | |
| $emots = array() | |
| $protocols = array() | |
Handles many methods for formatting output.
Definition at line 16 of file textcleaner.php.
| TextCleaner::addslashes | ( | $text | ) |
Add slashes to the text if magic_quotes_gpc is turned off.
| string | $text |
Definition at line 416 of file textcleaner.php.
References stripslashes().

|
private |
Definition at line 214 of file textcleaner.php.
References bad_protocol_once(), and no_null().
Referenced by clean_url().


|
private |
Definition at line 226 of file textcleaner.php.
References bad_protocol_once2().
Referenced by bad_protocol().


| TextCleaner::bad_protocol_once2 | ( | $matches | ) |
Definition at line 237 of file textcleaner.php.
References $aprotocols, decode_entities(), and no_null().
Referenced by bad_protocol_once(), and bad_protocol_once2().


| TextCleaner::call_code_modifiers | ( | $code, | |
| $lang | |||
| ) |
This function is only a holder for event exmevent_format_code
| string | Code to format |
| string | Language name |
Definition at line 670 of file textcleaner.php.
References $lang, and RMEvents\get().

| TextCleaner::clean_disabled_tags | ( | $text | ) |
Definition at line 632 of file textcleaner.php.
References RMEvents\get().
Referenced by to_display().


| TextCleaner::clean_pre | ( | $matches | ) |
Accepts matches array from preg_replace_callback in wpautop() or a string.
Ensures that the contents of a <
>...<
> HTML block are not converted into paragraphs or line-breaks.
From Wordpress
| array | string | $matches | The array or string |
Definition at line 686 of file textcleaner.php.
| TextCleaner::clean_url | ( | $url, | |
$protocols = null, |
|||
$context = 'display' |
|||
| ) |
Checks and Clean a URL
Taked from Wordpress
| string | $url | The URL to be cleaned. |
| array | $protocols | Optional. An array of acceptable protocols. Defaults to 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet' if not set. |
| string | $context | Optional. How the URL will be used. Default is 'display'. |
Definition at line 179 of file textcleaner.php.
References $aprotocols, $protocols, $url, bad_protocol(), RMEvents\get(), and replace().

| TextCleaner::codeConv | ( | $text, | |
$exmcode = 1 |
|||
| ) |
Definition at line 652 of file textcleaner.php.
Referenced by to_display().

| TextCleaner::codeDecode | ( | $text, | |
$allowimage = 1 |
|||
| ) |
Replace EXMCodes with their equivalent HTML formatting
| string | $text | |
| bool | $allowimage | Allow images in the text? On FALSE, uses links to images. |
Definition at line 327 of file textcleaner.php.
References RMEvents\get().
Referenced by to_display().


| TextCleaner::codePreConv | ( | $text | ) |
Sanitizing of [code] tag from Xoops
Definition at line 645 of file textcleaner.php.
Referenced by to_display().

| TextCleaner::decode_entities | ( | $string | ) |
Definition at line 268 of file textcleaner.php.
Referenced by bad_protocol_once2().

| TextCleaner::decode_entities_chr | ( | $match | ) |
Definition at line 275 of file textcleaner.php.
Referenced by decode_entities_chr().

| TextCleaner::decode_entities_chr_hexdec | ( | $match | ) |
Definition at line 279 of file textcleaner.php.
Referenced by decode_entities_chr_hexdec().

| TextCleaner::decrypt | ( | $string, | |
$encode64 = true |
|||
| ) |
Decrypt a string
| strign | Text to decrypt |
| bool | Apply base64_decode? default true |
Definition at line 722 of file textcleaner.php.
References $rmc_config, RMFunctions\configs(), and Crypt\MODE_HEX.
Referenced by resize_images().


| TextCleaner::double_br | ( | $string, | |
$br = 1 |
|||
| ) |
Replaces double line-breaks with paragraph elements.
A group of regex replaces used to identify text formatted with newlines and replace double line-breaks with HTML paragraph tags. The remaining line-breaks after conversion become <
> tags, unless $br is set to '0' or 'false'.
Taked from Wordpress
GPL 2
| string | $string | The text which has to be formatted. |
| int | bool | $br | Optional. If set, this will convert all remaining line-breaks after paragraphing. Default true. |
Definition at line 543 of file textcleaner.php.
Referenced by to_display().

| TextCleaner::encrypt | ( | $string, | |
$encode64 = true |
|||
| ) |
Encrypt a string
| string | Text to crypt |
| bool | Apply base64_encode? |
Definition at line 706 of file textcleaner.php.
References $rmc_config, RMFunctions\get(), and Crypt\MODE_HEX.

| TextCleaner::ftp_clickable | ( | $matches | ) |
Definition at line 149 of file textcleaner.php.
References $ret.
Referenced by ftp_clickable().

| TextCleaner::get_emotions | ( | ) |
Get all emotions icons, including plugins with this capability
Definition at line 49 of file textcleaner.php.
References $emots, $rmc_config, $url, RMFunctions\get(), RMEvents\get(), and RMCURL.
Referenced by smiley().


|
static |
Singleton
Definition at line 37 of file textcleaner.php.
Referenced by RMFormEditor\__construct(), RMFunctions\add_keywords_description(), RMObject\cleanVars(), RmcommonCorePreload\eventCoreIncludeCommonLanguage(), formatSQL(), RMFunctions\get_comments(), RMInternalBlock\getContent(), RMObject\getVar(), images_form(), RMObject\loadValuesArray(), preg_striptags(), rmc_bkcomments_show(), RMObject\saveToTable(), send_mail(), show_comments(), update_thumbnails(), and RMObject\updateTable().

| TextCleaner::mail_clickable | ( | $matches | ) |
Definition at line 163 of file textcleaner.php.
Referenced by mail_clickable().

| TextCleaner::make_clickable | ( | $string | ) |
Make links in the text clickable
| string | $text |
Definition at line 109 of file textcleaner.php.
Referenced by to_display().

| TextCleaner::nl2Br | ( | $text | ) |
Convert linebreaks to <br /> tags
| string | $text |
Definition at line 405 of file textcleaner.php.
Referenced by to_display().

| TextCleaner::no_null | ( | $string | ) |
Definition at line 283 of file textcleaner.php.
Referenced by bad_protocol(), and bad_protocol_once2().

| TextCleaner::nofollow | ( | $text | ) |
Definition at line 121 of file textcleaner.php.
References stripslashes().

| TextCleaner::popuplinks | ( | $text | ) |
Definition at line 129 of file textcleaner.php.
| TextCleaner::replace | ( | $search, | |
| $subject | |||
| ) |
Definition at line 290 of file textcleaner.php.
Referenced by clean_url().

| TextCleaner::smiley | ( | $message | ) |
Replace emots codes for ther image
| string | $message |
Definition at line 88 of file textcleaner.php.
References $emots, and get_emotions().
Referenced by to_display().


| TextCleaner::specialchars | ( | $string, | |
$quote_style = ENT_NOQUOTES, |
|||
$charset = 'UTF-8' |
|||
| ) |
Definition at line 445 of file textcleaner.php.
References elseif().
Referenced by to_display().


| TextCleaner::specialchars_decode | ( | $string, | |
$quote_style = ENT_NOQUOTES |
|||
| ) |
Reverses htmlSpecialChars()
| string | $text |
Definition at line 484 of file textcleaner.php.
References elseif().

| TextCleaner::stripslashes | ( | $text | ) |
Definition at line 430 of file textcleaner.php.
Referenced by addslashes(), RMObject\cleanVars(), and nofollow().

| TextCleaner::sweetstring | ( | $value, | |
$lower = true |
|||
| ) |
Clean an string by deleting all blank spaces and other chars
Definition at line 737 of file textcleaner.php.
Referenced by RMFileUploader\_copyFile().

| TextCleaner::to_display | ( | $text, | |
$dbr = true, |
|||
$clean_tags = true, |
|||
$paragraph = true |
|||
| ) |
Filters textarea form data in DB for display based on Xoops displayTarea
| string | $text | |
| bool | $dbr | Disbale replace of breaklines when html is enabled |
| bool | Clean disabled tags? |
Definition at line 596 of file textcleaner.php.
References $rmc_config, $rmCodes, clean_disabled_tags(), codeConv(), codeDecode(), codePreConv(), double_br(), RMFunctions\get(), RMEvents\get(), make_clickable(), nl2Br(), smiley(), and specialchars().

| TextCleaner::truncate | ( | $text, | |
| $len | |||
| ) |
MyTextSanitizer::truncate()
| mixed | $text |
Definition at line 311 of file textcleaner.php.
References $ret.
Referenced by rmc_bkcomments_show().

| TextCleaner::url_clickable | ( | $matches | ) |
Next set of three functions are a set of callbacks to manege url and uri matches
| array | Matches |
Definition at line 140 of file textcleaner.php.
References $url.
Referenced by url_clickable().

|
private |
Tags that will be disbled when dohtml is activated
Definition at line 26 of file textcleaner.php.
|
private |
Stores all the emoticons used on system
Definition at line 22 of file textcleaner.php.
Referenced by get_emotions(), and smiley().
|
private |
Definition at line 18 of file textcleaner.php.
Referenced by clean_url().