Class constructor
mosMainFrame
mosMainFrame
(
database &$db,
string $option,
string $basePath, [
$isAdmin =
false])
-
database
&$db: A database connection object
-
string
$option: The url option
-
string
$basePath: The path of the mos directory
-
$isAdmin
Adds a custom html string to the head block
void
addCustomHeadTag
(string $html)
-
string
$html: The html to add to the head
void
addMetaTag
(string $name, string $content, [string $prepend = ''], [string $append = ''])
-
string
$name: The value of the name attibute
-
string
$content: The value of the content attibute
-
string
$prepend: Text to display before the tag
-
string
$append: Text to display after the tag
void
appendMetaTag
(string $name, string $content, [ $ifEmpty = false])
-
string
$name: The value of the name attibute
-
string
$content: The value of the content attibute to append to the existing Tags ordered in with Site Keywords and Description first
-
$ifEmpty
void
appendPathWay
( $html)
Detects a 'visit'
This function updates the agent and domain table hits for a particular visitor. The user agent is recorded/incremented if this is the first visit. A cookie is set to mark the first visit.
void
detect
()
void
getBlogCategoryCount
()
retained for backward compatability
void
getBlogSectionCount
()
mixed
getCfg
(string $varname)
-
string
$varname: The name of the variable (from configuration.php)
void
getContentItemLinkCount
()
string
getCustomPathWay
()
void
getGlobalBlogSectionCount
()
void
&getInstance
(object 0)
correct
getItemid
( $id, [ $typed = 1], [ $link = 1], [ $bs = 1], [ $bc = 1], [ $gbs = 1])
-
$id
-
$typed
-
$link
-
$bs
-
$bc
-
$gbs
Returns a standard path variable
void
getPath
( $varname, [ $option = ''])
void
getStaticContentCount
()
Get the current user - deprecated - use mamboCore instead
void
getUser
()
Gets the value of a user state variable
void
getUserState
(string $var_name)
-
string
$var_name: The name of the variable
Gets the value of a user state variable
void
getUserStateFromRequest
(string $var_name, string $req_name, [string $var_default = null])
-
string
$var_name: The name of the user state variable
-
string
$req_name: The name of the variable passed in a request
-
string
$var_default: The default value for the variable if not found
Checks to see if an image exists in the current templates image directory if it does it loads this image. Otherwise the default image is loaded.
Also can be used in conjunction with the menulist param to create the chosen image load the default or use no image
void
ImageCheck
( $file, [ $directory = '/images/M_images/'], [ $param = NULL], [ $param_directory = '/images/M_images/'], [ $alt = NULL], [ $name = 'image'], [ $type = 1], [ $align = 'middle'])
-
$file
-
$directory
-
$param
-
$param_directory
-
$alt
-
$name
-
$type
-
$align
Initialises the user session
Old sessions are flushed based on the configuration value for the cookie lifetime. If an existing session, then the last access time is updated. If a new session, a session id is generated and a record is created in the mos_sessions table.
void
&initSession
()
Login a user given name and password - deprecated - use the code here directly
void
login
([ $username = null], [ $passwd = null])
Logout the current user - deprecated - use the code here directly
void
logout
()
void
prependMetaTag
(string $name, string $content)
-
string
$name: The value of the name attibute
-
string
$content: The value of the content attibute to append to the existing
void
setPageTitle
([string $title = null])
Sets the value of a user state variable
void
setUserState
(string $var_name, string $var_value)
-
string
$var_name: The name of the variable
-
string
$var_value: The value of the variable
Returns the first to be found of one or more files, or null
void
tryFiles
( $first_choice, [ $second_choice = null], [ $third_choice = null])
-
$first_choice
-
$second_choice
-
$third_choice
void
_getMetaTag
(string $name)
-
string
$name: The value of the name attibute
void
_setTemplate
([ $isAdmin = false])
void
_tidyMetaData
(string $name, string $content)
-
string
$name: The value of the name attibute
-
string
$content: The value of the content attibute to append to the existing