- Description
-
Class trees
Index of elements
Todo List
Interfaces
Phpfox_Cache_Interface
Phpfox_Database_Interface
Phpfox_Gateway_Interface
Phpfox_Image_Interface
Phpfox_Mail_Interface
Classes
Database_Driver_Mssql
Database_Driver_Oracle
Database_Driver_Postgres
Database_Driver_Sqlite
Phpfox
Phpfox_Ajax
Phpfox_Api
Phpfox_Archive
Phpfox_Archive_Export
Phpfox_Archive_Extension_Tar
Phpfox_Archive_Extension_Xml
Phpfox_Archive_Extension_Zip
Phpfox_Archive_Import
Phpfox_Archive_Support
Phpfox_Cache
Phpfox_Cache_Abstract
Phpfox_Cache_Storage_File
Phpfox_Cache_Storage_Memcache
Phpfox_Cdn
Phpfox_Cdn_Abstract
Phpfox_Cdn_Module_S3
Phpfox_Component
Phpfox_Cron
Phpfox_Database
Phpfox_Database_Dba
Phpfox_Database_Driver_Mysql
Phpfox_Database_Driver_Mysqli
Phpfox_Database_Export
Phpfox_Database_Support
Phpfox_Date
Phpfox_Debug
Phpfox_Diff_Md5
Phpfox_Editor
Phpfox_Error
Phpfox_File
Phpfox_File_Minimize
Phpfox_Ftp
Phpfox_Gateway
Phpfox_Gateway_Api_2checkout
Phpfox_Gateway_Api_Paypal
Phpfox_Hash
Phpfox_Image
Phpfox_Image_Abstract
Phpfox_Image_Helper
Phpfox_Image_Library_Gd
Phpfox_Locale
Phpfox_Mail
Phpfox_Mail_Driver_Phpmailer_Mail
Phpfox_Mail_Driver_Phpmailer_Smtp
Phpfox_Module
Phpfox_Pager
Phpfox_Parse_Bbcode
Phpfox_Parse_Css
Phpfox_Parse_Format
Phpfox_Parse_Input
Phpfox_Parse_Output
Phpfox_Parse_Wiki
Phpfox_Plugin
Phpfox_Process
Phpfox_Request
Phpfox_Search
Phpfox_Search_Inline
Phpfox_Server
Phpfox_Service
Phpfox_Session
Phpfox_Session_Handler
Phpfox_Session_Handler_Default
Phpfox_Session_Handler_File
Phpfox_Session_Handler_Memcache
Phpfox_Session_Storage_Cookie
Phpfox_Session_Storage_Session
Phpfox_Setting
Phpfox_Spam
Phpfox_Spam_Hash
Phpfox_Template
Phpfox_Url
Phpfox_Validator
Phpfox_Xml_Builder
Phpfox_Xml_Parser
Functions
d
e
p
Files
2checkout.class.php
abstract.class.php
abstract.class.php
abstract.class.php
ajax.class.php
api.class.php
archive.class.php
bbcode.class.php
builder.class.php
cache.class.php
cdn.class.php
component.class.php
cookie.class.php
cron.class.php
css.class.php
database.class.php
date.class.php
dba.class.php
debug.class.php
default.class.php
editor.class.php
error.class.php
export.class.php
export.class.php
file.class.php
file.class.php
file.class.php
format.class.php
ftp.class.php
gateway.class.php
gd.class.php
handler.class.php
hash.class.php
hash.class.php
helper.class.php
image.class.php
import.class.php
inline.class.php
input.class.php
interface.class.php
interface.class.php
interface.class.php
interface.class.php
interface.class.php
locale.class.php
mail.class.php
mail.class.php
md5.class.php
memcache.class.php
memcache.class.php
minimize.class.php
module.class.php
mssql.class.php
mysql.class.php
mysqli.class.php
oracle.class.php
output.class.php
pager.class.php
parser.class.php
paypal.class.php
phpfox.class.php
plugin.class.php
postgres.class.php
process.class.php
request.class.php
s3.class.php
search.class.php
server.class.php
service.class.php
session.class.php
session.class.php
setting.class.php
smtp.class.php
spam.class.php
sqlite.class.php
support.class.php
support.class.php
tar.class.php
template.class.php
url.class.php
validator.class.php
wiki.class.php
xml.class.php
zip.class.php
Template-
Classes
Phpfox_Template_Cache
Files
cache.class.php
Phpfox_Parse_Input
Input Parser Class is used to parse all incoming data sent by end users via HTML forms.
Goal is to remove any "evil" data and convert it into safe HTML. This allows us to store the original data and a safe version.
Located in /include/library/phpfox/parse/input.class.php (line 19)
string
prepareTitle
(string $sModule, string $sTitle, string $sField, [int $iUserId = null], string $sTable, [mixed $mCondition = null], [boolean $bCleanOnly = false], [array $bCache = true])
array
$_aAllowedTags
= array() (line 137)
HTML tags we allow.
array
$_aEvilCss
= array('position',
'top',
'left',
'background',
'background-image',
'background-color',
'width',
'height',
'behaviour'
) (line 99)
Invalid CSS properties we need to remove.
array
$_aEvilEvents
= array('onActivate',
'onAfterPrint',
'onBeforePrint',
'onAfterUpdate',
'onBeforeUpdate',
'onErrorUpdate',
'onAbort',
'onBeforeDeactivate',
'onDeactivate',
'onBeforeCopy',
'onBeforeCut',
'onBeforeEditFocus',
'onBeforePaste',
'onBeforeUnload',
'onBlur',
'onBounce',
'onChange',
'onClick',
'onControlSelect',
'onCopy',
'onCut',
'onDblClick',
'onDrag',
'onDragEnter',
'onDragLeave',
'onDragOver',
'onDragStart',
'onDrop',
'onFilterChange',
'onDragDrop',
'onError',
'onFilterChange',
'onFinish',
'onFocus',
'onHelp',
'onKeyDown',
'onKeyPress',
'onKeyUp',
'onLoad',
'OnLoseCapture',
'onMouseDown',
'onMouseEnter',
'onMouseLeave',
'onMouseMove',
'onMouseOut',
'onMouseOver',
'onMouseUp',
'onMove',
'onPaste',
'onPropertyChange',
'onReadyStateChange',
'onReset',
'onResize',
'onResizeEnd',
'onResizeStart',
'onScroll',
'onSelectStart',
'onSelect',
'onSelectionChange',
'onStart',
'onStop',
'onSubmit',
'onUnload',
'class',
'style'
) (line 26)
Invalid events we need to remove.
string
$_sDbQstrRegexp
= '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"' (line 116)
REGEX used to get params from within {}
string
$_sSiQstrRegexp
= '\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'' (line 123)
REGEX used to get params from within {}
string
$_sText
= '' (line 130)
Store text we are parsing temp.
Constructor __construct (line 143)
Class constructor. Prepare regex for usgae a little later on in the script.
addBreak (line 426)
Add line breaks. Unlike the PHP version of this function it looks into not adding line breaks within HTML and PHP code.
- string $sTxt: String we need to parse.
allowTitle (line 277)
Checks if a title of the item can be used in the sites root. This is mainly used
to check a persons vanity URL name. Since if a user would use the name "friend" it would cause problems when trying to visit anything related to the "friend" module as it would instead load this persons profile. With this check it makes sure that the name or title being used is not a module, a folder in the sites root directory, rewrite rule, page or the user name isn't already in use.
- string $sTitle: Title to check.
- string $sErrorMessage: Error message you want to return in case there is an error.
clean (line 159)
Parse and clean a string. We mainly use this for a title of an item, which does not allow any HTML. It can also be used to shorten a string bassed on the numerical value passed by the 2nd argument.
- string $sTxt: Text to parse.
- int $iShorten: (Optional) Define how short you want the string to be.
cleanFileName (line 256)
Cleans a file name and removes any non-latin characters.
- string $sName: Name of the file.
cleanTitle (line 228)
Parse and clean a title of an item and convert it into a URL title string.
Example if you had:
- this is a TEST string!!!
- this-is-a-test-string
- http://www.yoursite.com/this-is-a-test-string/
- string $sUrls: String to convert into a URL.
convert (line 397)
Converts a string that contains non-latin characters into UNICODE.
- string $sTxt: Text to convert to UNICODE.
fixHtml (line 408)
Fixes any odd HTML, mainly dealing with HTML output from TinyMCE (WYSIWYG Editor).
- string $sTxt: Text to parse.
getParams (line 444)
Get params within SMARTY {} tags.
- string $sTxt: String we need to parse.
jsClean (line 339)
Remove evil attributes from JavaScript.
- string $sTxt: JavaScript code to parse.
prepare (line 365)
Prepare text strings. Used to prepare all data that can contain HTML. Not only does it protect against harmful HTML and CSS, it also has support for emoticon and BBCode conversion.
- string $sTxt: Text to parse.
prepareTitle (line 525)
Preparing a URL title. Will be used to replace a title "this is a TITLE" to "this-is-a-title".
Example:
- string $sModule: Module ID.
- string $sTitle: Title to parse and fix.
- string $sField: Database field to check if such titles already exist.
- int $iUserId: User ID to check
- string $sTable: Name of the database table.
- mixed $mCondition: Database WHERE condition.
- boolean $bCleanOnly: Return true if you want to return the clean title without running the existing title check.
- array $bCache: FALSE will force a new check, while default TRUE will cache previous checks.
removeEvilAttributes (line 501)
Removes evit attributes within HTML.
- string $sTxt: String to parse.
reversePrepare (line 351)
Reverse prepares strings based on what we converted with the method prepare().
- string $sTxt: String to parse.
stripInnerHtml (line 626)
Removes HTML found within HTML.
- string $sText: Text to parse.
_addBreak (line 1070)
Add a line break.
- array $aMatches: Matches from regex found in public method addBreak().
_cacheHtml (line 838)
Part of the method _stripTags() to remove unwanted HTML tags.
- string $sAttr: HTML attributes.
- string $sTxt: HTML inner text.
- string $sTag: HTML tag.
- bool $bClose: TRUE will close the tag, FALSE will leave it open.
_cleanHtml (line 741)
Common routine we run when using the prepare() method to clean HTML to make sure it is safe.
- string $sTxt: Text to parse.
_cleanObject (line 1049)
Cleans HTML object to make it XHTML valid
- string $sObject: is the object data
- string $sEmbed: is all the <embed> tags found withing a <object>
_removeEvilAttributes (line 857)
Removes all evil attributes in a string to make sure the data returned is safe to output on the site.
- string $sTxt: Text we need to parse.
- bool $bCleanOnly: TRUE to just clean the text, FALSE to clean and make sure HTML tags are valid.
_shorten (line 181)
Shortens a string respecting non english characters
- string $sTxt: string to shorten
- int $iLetters: how many characters must the resulting string have
_stripInnerHtml (line 644)
Removes HTML found within HTML.
- string $sText: Text to parse.
- $sTag
_stripTags (line 807)
Our method of PHP strip_tags().
- string $sTxt: String to parse.
_unicodeToEntitiesPreservingAscii (line 1016)
Converts a string with non-latin characters into UNICODE. This method is used with the method _utf8ToUnicode().
- array $unicode: ARRAY of unicode values.
- bool $bForUrl: TRUE for URL strings, FALSE for general usage.
_utf8ToUnicode (line 972)
Converts a string with non-latin characters into UNICODE. We convert all strings before we enter them into the database so clients do not have to worry about database collations and website encoding as all common browsers have no problems displaying UNICODE.
- string $str: String we need to parse.
- bool $bForUrl: TRUE for URL strings, FALSE for general usage.
Documentation generated on Tue, 28 Sep 2010 10:36:40 +0200 by phpDocumentor 1.4.0a2