ampReplace (line 4059)
Replaces & with & for xhtml compliance
Needed to handle unicode conflicts due to unicode conflicts
void
ampReplace
(mixed $text)
doGzip (line 2623)
Perform GZIP
void
doGzip
()
html_entity_decode (line 2667)
html_entity_decode function for backward compatability in PHP
void
html_entity_decode
(string $string, [string $opt = ENT_COMPAT])
-
string
$string
-
string
$opt
initGzip (line 2587)
Initialise GZIP
void
initGzip
()
mosBindArrayToObject (line 1874)
Copy the named array content into the object as properties
only existing properties of object are filled. when undefined in hash, properties wont be deleted
void
mosBindArrayToObject
(array $array, obj &$obj, [string $ignore = ""], [boolean $prefix = NULL], [mixed $checkSlashes = true])
-
array
$array: the input array
-
obj
&$obj: byref the object to fill of any class
-
string
$ignore
-
boolean
$prefix
mosChmod (line 4142)
Chmods files and directories recursively to mos global permissions. Available from 4.5.2 up.
TRUE=all
mosChmod
(path $path, filemode 1, dirmode 2)
-
filemode
1: Integer value to chmod files. NULL = dont chmod files.
-
dirmode
2: Integer value to chmod directories. NULL = dont chmod directories.
-
path
$path: The starting file or directory (no trailing slash)
mosChmodRecursive (line 4106)
Chmods files and directories recursively to given permissions. Available from 4.5.2 up.
TRUE=all
mosChmodRecursive
(path $path, [filemode $filemode = NULL], [dirmode $dirmode = NULL])
-
path
$path: The starting file or directory (no trailing slash)
-
filemode
$filemode: Integer value to chmod files. NULL = dont chmod files.
-
dirmode
$dirmode: Integer value to chmod directories. NULL = dont chmod directories.
mosCompressID (line 2451)
void
mosCompressID
(mixed $ID)
mosCreateGUID (line 2443)
void
mosCreateGUID
()
mosCreateMail (line 2490)
Function to create a mail object for futher use (uses phpMailer)
object Mail
mosCreateMail
([string $from = ''], [string $fromname = ''], string $subject, string $body)
-
string
$from: From e-mail address
-
string
$fromname: From name
-
string
$subject: E-mail subject
-
string
$body: Message body
mosCurrentDate (line 2395)
Returns current date according to current local and time offset
current
mosCurrentDate
([string $format = ""])
-
string
$format: format optional format for strftime
mosExpandID (line 2455)
void
mosExpandID
(mixed $ID)
mosFormatDate (line 2374)
Returns formated date according to current local and adds time offset
formated
mosFormatDate
(string $date, [string $format = ""], [offset $offset = ""])
-
string
$date: date in datetime format
-
string
$format: format optional format for strftime
-
offset
$offset: time offset if different than global one
mosGetBrowser (line 2228)
Checks the user agent string against known browsers
void
mosGetBrowser
(mixed $agent)
mosGetOrderingList (line 2283)
void
mosGetOrderingList
(string $sql, [integer $chop = '30'])
-
string
$sql: SQL with ordering As value and 'name field' AS text
-
integer
$chop: The length of the truncated headline
mosGetOS (line 2266)
Checks the user agent string against known operating systems
void
mosGetOS
(mixed $agent)
mosGetParam (line 1824)
void
mosGetParam
(mixed &$arr, mixed $name, [mixed $def = null], [mixed $mask = 0])
mosMail (line 2538)
Mail function (uses phpMailer)
void
mosMail
(string $from, string $fromname, string/array $recipient, string $subject, string $body, [boolean $mode = 0], [string/array $cc = NULL], [string/array $bcc = NULL], [string/array $attachment = NULL])
-
string
$from: From e-mail address
-
string
$fromname: From name
-
string/array
$recipient: Recipient e-mail address(es)
-
string
$subject: E-mail subject
-
string
$body: Message body
-
boolean
$mode: false = plain text, true = HTML
-
string/array
$cc: CC e-mail address(es)
-
string/array
$bcc: BCC e-mail address(es)
-
string/array
$attachment: Attachment file name(s)
mosMakeHtmlSafe (line 2323)
Makes a variable safe to display in forms
Object parameters that are non-string, array, object or start with underscore will be converted
void
mosMakeHtmlSafe
(object An &$mixed, [int $quote_style = ENT_QUOTES], [string|array $exclude_keys = ''])
-
object An
&$mixed: object to be parsed
-
int
$quote_style: The optional quote style for the htmlspecialchars function
-
string|array
$exclude_keys: An optional single field name or array of field names not to be parsed (eg, for a textarea)
mosMakePassword (line 2651)
Random password generator
password
mosMakePassword
()
mosMenuCheck (line 2347)
Checks whether a menu option is within the users access level
boolean
mosMenuCheck
(
int $Itemid,
string $menu_option,
int $task,
database $gid)
-
int
$Itemid: Item id number
-
string
$menu_option: The menu option
-
int
$task: The users group ID number
-
database
$gid: A database connector object
mosNotAuth (line 4045)
Displays a not authorised message
If the user is not logged in then an addition message is displayed.
void
mosNotAuth
()
mosObjectToArray (line 2209)
void
mosObjectToArray
(mixed $p_obj)
mosPathName (line 1994)
Function to strip additional / or \ in a path name
void
mosPathName
(string $p_path, [boolean $p_addtrailingslash = true])
-
string
$p_path: The path
-
boolean
$p_addtrailingslash: Add trailing slash
mosPathWay (line 4035)
void
mosPathWay
()
mosPrepareSearchContent (line 4074)
Prepares results from search for display
string
mosPrepareSearchContent
(string $text, [int $length = 200], string $searchword)
-
string
$text: The source string
-
int
$length: Number of chars to trim
-
string
$searchword: The searchword to select around
mosReadDirectory (line 1907)
Utility function to read the files in a directory
void
mosReadDirectory
(string $path, [string $filter = '.'], [boolean $recurse = false], [boolean $fullpath = false])
-
string
$path: The file system path
-
string
$filter: A filter for the names
-
boolean
$recurse: Recurse search into sub-directories
-
boolean
$fullpath: True if to prepend the full path to the file name
mosRedirect (line 1943)
Utility function redirect the browser location to another url
Can optionally provide a message.
void
mosRedirect
(string $url, [string $msg = ''])
-
string
$url: The file system path
-
string
$msg: A filter for the names
mosSendAdminMail (line 4023)
Sends mail to admin
void
mosSendAdminMail
(mixed $adminName, mixed $adminEmail, mixed $email, mixed $type, mixed $title, mixed $author)
mosSmartSubstr (line 4089)
returns substring of characters around a searchword
string
mosSmartSubstr
(string $text, [int $length = 200], string $searchword)
-
string
$text: The source string
-
int
$length: Number of chars to return
-
string
$searchword: The searchword to select around
mosStripslashes (line 1848)
Strip slashes from strings or arrays of strings
void
mosStripslashes
(value &$value)
-
value
&$value: the input string or array
mosToolTip (line 2410)
Utility function to provide ToolTips
HTML
mosToolTip
(string $tooltip, [string $title = ''], [mixed $width = ''], [mixed $image = 'tooltip.png'], [mixed $text = ''], [mixed $href = '#'])
-
string
$tooltip: ToolTip text
-
string
$title: Box title
mosTreeRecurse (line 1961)
void
mosTreeRecurse
(mixed $id, mixed $indent, mixed $list, mixed &$children, [mixed $maxlevel = 9999], [mixed $level = 0], [mixed $type = 1])
mosWarning (line 2437)
Utility function to provide Warning Icons
HTML
mosWarning
(string $warning, [string $title = 'Mambo Warning'])
-
string
$warning: Warning text
-
string
$title: Box title
SortArrayObjects (line 4007)
Sorts an Array of objects
sort_direction [1 = Ascending] [-1 = Descending]
void
SortArrayObjects
(mixed &$a, mixed $k, [mixed $sort_direction = 1])
SortArrayObjects_cmp (line 3989)
Sorts an Array of objects
void
SortArrayObjects_cmp
(mixed &$a, mixed &$b)