Class constructor
mosMainFrame
mosMainFrame
(
database &$db,
string $option,
string $basePath, [
mixed $isAdmin =
false])
-
database
&$db: A database connection object
-
string
$option: The url option
-
string
$basePath: The path of the mos directory
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)
-
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
void
appendPathWay
(mixed $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
()
number
getBlogCategoryCount
()
number
getBlogSectionCount
()
mixed
getCfg
(string $varname)
-
string
$varname: The name of the variable (from configuration.php)
number
getContentItemLinkCount
()
string
getCustomPathWay
()
number
getGlobalBlogSectionCount
()
correct
getItemid
(mixed $id, [mixed $typed = 1], [mixed $link = 1], [mixed $bs = 1], [mixed $bc = 1], [mixed $gbs = 1])
Returns a stored path variable
void
getPath
(mixed $varname, [mixed $option = ''])
number
getStaticContentCount
()
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
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 validation function
Username and encoded password is compare to db entries in the mos_users table. A successful validation updates the current session record with the users details.
void
login
([mixed $username = null], [mixed $passwd = null])
User logout
Reverts the current session record back to 'anonymous' parameters
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
Determines the paths for including engine and menu files
void
_setAdminPaths
(string $option, [string $basePath = '.'])
-
string
$option: The current option used in the url
-
string
$basePath: The base path from which to load the configuration file
Loads the configuration.php file and assigns values to the internal variable
void
_setConfig
([string $basePath = '.'])
-
string
$basePath: The base path from which to load the configuration file
void
_setTemplate
([mixed $isAdmin = false])