attach_message (line 178)
Attach a message to the page output.
string
attach_message
(mixed $message, [ID_TEXT $type = 'inform'])
-
mixed
$message: The type of special message
-
ID_TEXT
$type: The template to use
breadcrumbs (line 259)
Get the tempcode for the breadcrumbs.
tempcode
breadcrumbs
()
breadcrumbs_get_default_stub (line 315)
Get the tempcode for the default breadcrumbs stub. This isn't entirely a default, because it does work with breadcrumb_set_parents. We refer to it as a default as it is possible to override the whole breadcrumbs environment via the special BREADCRUMBS global variable.
tempcode
breadcrumbs_get_default_stub
([boolean $link_to_self_entrypoint = true])
-
boolean
$link_to_self_entrypoint: Whether we'll be providing a link to where we are currently at
breadcrumb_add_segment (line 372)
Add a segment to the breadcrumbs (if this isn't used, a default will be used for the stub).
void
breadcrumb_add_segment
(tempcode $segment, [?mixed $final_title = NULL])
-
tempcode
$segment: The segment
-
?mixed
$final_title: The title of the follower of the segment OR an array as for breadcrumb_set_parents (NULL: implicit in $segment)
breadcrumb_set_parents (line 418)
Put a list of parents in for the breadcrumbs.
void
breadcrumb_set_parents
(array $parents)
-
array
$parents: The list of parent entry points (pairs: entry point, title)
breadcrumb_set_self (line 429)
Set the current title.
void
breadcrumb_set_self
(tempcode $title)
-
tempcode
$title: The title
comcode_breadcrumbs (line 1406)
Get a UI element of a route from a known Comcode page back to the declared root of the tree.
tempcode
comcode_breadcrumbs
(ID_TEXT $the_page, ID_TEXT $the_zone, [ID_TEXT $root = ''], [boolean $no_link_for_me_sir = true], [integer $jumps = 0])
-
ID_TEXT
$the_page: The Comcode page name
-
ID_TEXT
$the_zone: The Comcode page zone
-
ID_TEXT
$root: The virtual root
-
boolean
$no_link_for_me_sir: Whether not to put a link at this point in the navigation tree (usually, because the viewer is already at it)
-
integer
$jumps: The number of jumps we have gone through so far (cuts out after 10 as a failsafe)
do_footer (line 542)
Get the tempcode for the footer. You will not normally need to use this function, as this is called as part of the website engine.
tempcode
do_footer
([boolean $bail_out = false])
-
boolean
$bail_out: Whether we are forcibly handling a bail-out (an error occurred during output and our XHTML is likely corrupted)
do_header (line 441)
Get the tempcode for the header. You will not normally need to use this function, as this is called as part of the website engine.
tempcode
do_header
([boolean $skip_top = false])
-
boolean
$skip_top: Whether to skip showing the top (logo/zone-navigation/banner)
do_site (line 605)
This is it - the start of rendering of a website page.
Take in all inputs, sends them to the correct functions to process, gathers up all the outputs, sticks them together and echoes them.
void
do_site
()
get_logo_url (line 239)
Get the relative URL to the logo for the current zone.
URLPATH
get_logo_url
([?ID_TEXT $zone_name = NULL])
-
?ID_TEXT
$zone_name: The zone being operated within (NULL: auto-detect)
init__site (line 24)
Standard code module initialisation function.
void
init__site
()
load_comcode_page (line 1231)
Get the parsed contents of a comcode page.
tempcode
load_comcode_page
(PATH $string, ID_TEXT $zone, ID_TEXT $codename, [?PATH $file_base = NULL], [boolean $being_included = false])
-
PATH
$string: The relative (to ocPortal's base directory) path to the page (e.g. pages/comcode/EN/start.txt)
-
ID_TEXT
$zone: The zone the page is being loaded from
-
ID_TEXT
$codename: The codename of the page
-
?PATH
$file_base: The file base to load from (NULL: standard)
-
boolean
$being_included: Whether the page is being included from another
log_stats (line 1482)
Log statistics for the page view.
void
log_stats
(string $string, integer $pg_time)
-
string
$string: The string to the page file
-
integer
$pg_time: The time taken for page loading in milliseconds
request_page (line 922)
Take the specified parameters, and try to find the corresponding page, then execute a function to load the page (load_html_page/load_comcode_page).
?tempcode
request_page
(ID_TEXT $codename, boolean $required, [?ID_TEXT $zone = NULL], [?ID_TEXT $page_type = NULL], [boolean $being_included = false], [boolean $no_redirect_check = false])
-
ID_TEXT
$codename: The codename of the page to load
-
boolean
$required: Whether it is required for this page to exist (shows an error if it doesn't) -- otherwise, it will just return NULL
-
?ID_TEXT
$zone: The zone the page is being loaded in (NULL: as shown by access URL)
-
?ID_TEXT
$page_type: The type of page - for if you know it (NULL: don't know it)
-
boolean
$being_included: Whether the page is being included from another
-
boolean
$no_redirect_check: Whether to not check for redirects (normally you would)
_request_page (line 1067)
Take the specified parameters, and try to find the corresponding page
~array
_request_page
(ID_TEXT $codename, ID_TEXT $zone, [?ID_TEXT $page_type = NULL], [?LANGUAGE_NAME $lang = NULL], [boolean $no_redirect_check = false])
-
ID_TEXT
$codename: The codename of the page to load
-
ID_TEXT
$zone: The zone the page is being loaded in
-
?ID_TEXT
$page_type: The type of page - for if you know it (NULL: don't know it)
-
?LANGUAGE_NAME
$lang: Language name (NULL: users language)
-
boolean
$no_redirect_check: Whether to not check for redirects (normally you would)