CMSimple_XH
Variables
cms.php File Reference

Variables

const XH_URICHAR_SEPARATOR
 The separator for urichar_org/new. More...
 
 $title
 The title of the current page. More...
 
 $o
 The HTML for the contents area. More...
 
 $e
 The HTML for the <li>s holding error messages. More...
 
 $hjs
 HTML that will be inserted to the <head> section. More...
 
 $bjs
 HTML that will be inserted right before the </body> tag. More...
 
 $onload
 JavaScript for the onload attribute of the body element. More...
 
 $temp
 A temporary value. More...
 
 $i
 A temporary (loop) value. More...
 
 $j
 A temporary (loop) value. More...
 
const CMSIMPLE_XH_VERSION
 The version in textual representation, e.g. More...
 
const CMSIMPLE_XH_BUILD
 The build number as integer: YYYYMMDDBB.
 
const CMSIMPLE_XH_DATE
 The release date in ISO 8601 format: YYYY-MM-DD.
 
 $pth
 A two dimensional array that holds the paths of important files and folders. More...
 
 $_XH_controller
 The controller.
 
 $cf
 The configuration of the core. More...
 
 $txc
 The language configuration. More...
 
 $iis
 Whether the webserver is IIS. More...
 
 $cgi
 Whether PHP is executed as (F)CGI. More...
 
 $sn
 The relative path of the root folder, i.e. More...
 
 $admin
 The requested plugin administration part. More...
 
 $action
 The requested action. More...
 
 $function
 The requested function. More...
 
 $login
 Whether login is requested. More...
 
 $keycut
 The admin password. More...
 
 $logout
 Whether logout is requested. More...
 
 $mailform
 Whether the mailform is requested. More...
 
 $download
 The filename requested for download. More...
 
 $downloads
 Whether the file browser is requested to show the download folder. More...
 
 $images
 Whether the file browser is requested to show the image folder. More...
 
 $media
 Whether the file browser is requested to show the media folder. More...
 
 $userfiles
 Whether the file browser is requested to show the userfiles folder. More...
 
 $edit
 Whether edit mode is requested. More...
 
 $normal
 Whether normal (aka view) mode is requested. More...
 
 $print
 Whether print mode is requested. More...
 
 $file
 The name of a special file to be handled in the back-end. More...
 
 $search
 The current search string. More...
 
 $selected
 The URL of the requested page. More...
 
 $settings
 Whether the settings page is requested. More...
 
 $sitemap
 Whether the sitemap is requested. More...
 
 $text
 The text of the editor on save. More...
 
 $validate
 Whether the link check is requested. More...
 
 $xhpages
 Whether the page manager is requested. More...
 
const CMSIMPLE_ROOT
 The absolute path of the root folder.
 
const CMSIMPLE_BASE
 The relative path of the root folder.
 
const CMSIMPLE_URL
 The fully qualified absolute URL of the installation (main or current language). More...
 
 $su
 The current page's URL (selected URL). More...
 
 $adm
 Whether admin mode is active. More...
 
 $f
 The requested function. More...
 
 $_XH_pluginMenu
 The plugin menu builder.
 
 $plugin
 The currently loaded plugin. More...
 
 $_XH_csrfProtection
 The CRSF protection object. More...
 
const XH_ADM
 Whether admin mode is active. More...
 
 $cl
 The number of pages. More...
 
 $pd_router
 The page data router. More...
 
 $xh_publisher
 The publisher instance. More...
 
 $s
 The index of the currently requested page. More...
 
 $c
 The content of the pages. More...
 
 $h
 The headings of the pages. More...
 
 $u
 The URLs of the pages. More...
 
 $l
 The menu levels of the pages. More...
 
const PLUGINLOADER
 For compatibility with plugins.
 
const PLUGINLOADER_VERSION
 For compatibility with plugins.
 
const XH_FORM_NAMESPACE
 A unique prefix for autogenerated forms. More...
 
 $pd_s
 The index of the currently requested page. More...
 
 $pd_current
 The infos about the current page. More...
 
 $plugin_cf
 The configuration of the plugins. More...
 
 $plugin_tx
 The localization of the plugins. More...
 
 $hc
 The page indexes of the visible menu items. More...
 
 $hl
 The length of $hc.
 
 $si
 The index of the current page in $hc.
 
 if (isset( $description))
 The output to be manipulated by CMSimple scripting.
 

Detailed Description

The main file of CMSimple_XH.

Author
Peter Harteg peter.nosp@m.@har.nosp@m.teg.d.nosp@m.k
The CMSimple_XH developers devs@.nosp@m.cmsi.nosp@m.mple-.nosp@m.xh.o.nosp@m.rg

Variable Documentation

◆ $_XH_csrfProtection

XH CSRFProtection $_XH_csrfProtection

The CRSF protection object.

Should be treated as read-only.

See also
CSRF Protection

◆ $action

string $action

The requested action.

This read-only variable is initialized from an action GET/POST parameter, and is usually used in combination with $admin to request some functionality of a plugin back-end.

◆ $adm

bool $adm

Whether admin mode is active.

This variable is strictly read-only.

See also
XH_ADM

◆ $admin

string $admin

The requested plugin administration part.

This read-only variable is initialized from an admin GET/POST parameter, and is usually used in combination with $action to request some functionality of a plugin back-end.

◆ $bjs

string $bjs

HTML that will be inserted right before the </body> tag.

This read-write variable can be used to add script elements to the end of the body element. Usually you will only append to this variable.

See also
$hjs
http://www.cmsimple-xh.org/wiki/doku.php/plugin_interfaces#bjs
Since
1.5.4

◆ $c

array $c

The content of the pages.

Treat as read-only when in edit mode.

◆ $cf

array $cf

The configuration of the core.

Should be treated as read-only.

See also
$plugin_cf

◆ $cgi

bool $cgi

Whether PHP is executed as (F)CGI.

Should be treated as read-only.

◆ $cl

int $cl

The number of pages.

Treat as read-only.

◆ $download

string $download

The filename requested for download.

This variable is initialized from a download GET/POST parameter.

◆ $downloads

string $downloads

Whether the file browser is requested to show the download folder.

This variable is initialized from a downloads GET/POST parameter, and should only be used by file browsers and similar extensions, which may treat it as read-write.

◆ $e

string $e

The HTML for the <li>s holding error messages.

This read-write variable can be used to add error messages above the content. Usually you will only append to this variable.

See also
e()

◆ $edit

string $edit

Whether edit mode is requested.

This read-only variable is initialized from an edit GET/POST parameter or the mode cookie. If you want to switch to edit mode, set the edit GET parameter.

See also
$normal

◆ $f

string $f

The requested function.

This read-write variable is initialized from different GET/POST parameters. Usually you will want to treat it as read-only or even as private.

◆ $file

string $file

The name of a special file to be handled in the back-end.

This variable is initialized from a file GET/POST parameter.

◆ $function

string $function

The requested function.

This variable is set from a function GET/POST parameter, which denotes some special functionality. If set from your extension treat it as read-write; otherwise ignore it.

◆ $h

array $h

The headings of the pages.

Treat as read-only.

See also
h()

◆ $hc

array $hc

The page indexes of the visible menu items.

This read-only variable can be used to build a menu with li().

◆ $hjs

string $hjs

HTML that will be inserted to the <head> section.

This read-write variable can be used to add script, style, meta and link elements etc. to the head element. Usually you will only append to this variable.

See also
$bjs

◆ $i

mixed $i

A temporary (loop) value.

This read-write variable can be used to avoid polluting the global scope.

◆ $iis

bool $iis

Whether the webserver is IIS.

Should be treated as read-only.

◆ $images

string $images

Whether the file browser is requested to show the image folder.

This variable is initialized from a images GET/POST parameter, and should only be used by file browsers and similar extensions, which may treat it as read-write.

◆ $j

mixed $j

A temporary (loop) value.

This read-write variable can be used to avoid polluting the global scope.

◆ $keycut

string $keycut

The admin password.

This variable is initialized from a keycut GET/POST parameter.

This variable has been renamed from $passwd since CMSimple_XH 1.6 to avoid trouble with mod_security.

◆ $l

array $l

The menu levels of the pages.

Treat as read-only.

See also
l()

◆ $login

string $login

Whether login is requested.

This variable is initialized from a login GET/POST parameter. If the login has been successful, $f == 'login'; otherwise $f == 'xh_login_failed'.

◆ $logout

string $logout

Whether logout is requested.

This variable is initialized from a logout GET/POST parameter. On logout $f == 'xh_loggedout'.

◆ $mailform

string $mailform

Whether the mailform is requested.

This variable is initialized from a mailform GET/POST parameter. If the mailform has been requested $f == 'mailform'.

◆ $media

string $media

Whether the file browser is requested to show the media folder.

This variable is initialized from a media GET/POST parameter, and should only be used by file browsers and similar extensions, which may treat it as read-write.

◆ $normal

string $normal

Whether normal (aka view) mode is requested.

This read-only variable is initialized from a normal GET/POST parameter, but not from the mode cookie. If you want to detect normal mode, check for !$edit. If you want to switch to normal mode, set the normal GET parameter.

See also
$edit

◆ $o

string $o

The HTML for the contents area.

This read-write variable is used to buffer the output, which is prepended to the contents of the current page (if any). Usually you will only append to this variable.

◆ $onload

string $onload

JavaScript for the onload attribute of the body element.

This read-write variable can be used to register window onload event handlers. Usually you will only append to this variable.

◆ $pd_current

array $pd_current

The infos about the current page.

Treat as read-only.

◆ $pd_router

XH PageDataRouter $pd_router

The page data router.

Treat as read-only.

◆ $pd_s

int $pd_s

The index of the currently requested page.

Treat as read-only. Note that the index of the currently requested page is available in $s after the plugins have been loaded. During plugin loading you may use $pd_s, but this is not guaranteed to be correct, as it may be set to 0, even if $s might later be -1.

See also
$s

◆ $plugin

string $plugin

The currently loaded plugin.

Should be treated as read-only.

◆ $plugin_cf

XH PluginConfig $plugin_cf

The configuration of the plugins.

Treat as read-only.

See also
$cf

◆ $plugin_tx

XH PluginConfig $plugin_tx

The localization of the plugins.

Treat as read-only.

See also
$tx

◆ $print

string $print

Whether print mode is requested.

This read-only variable is initialized from a print GET/POST parameter.

◆ $pth

array $pth

A two dimensional array that holds the paths of important files and folders.

Should be treated as read-only.

See also
http://www.cmsimple-xh.org/wiki/doku.php/core_variables#pth

◆ $s

int $s

The index of the currently requested page.

Treat as read-only. Note that $s is not properly set for the start page until all plugins are loaded. If you need the know the index of the currently requested page during plugin loading, consider to use $pd_s.

◆ $search

string $search

The current search string.

This read-only variable is initialized from a search GET/POST parameter.

◆ $selected

string $selected

The URL of the requested page.

This variable is initialized from a selected GET/POST parameter. If present $su is set accordingly.

◆ $settings

string $settings

Whether the settings page is requested.

This variable is initialized from a settings GET/POST parameter.

◆ $sitemap

string $sitemap

Whether the sitemap is requested.

This variable is initialized from a sitemap GET/POST parameter. If the sitemap is requested $f == 'sitemap'.

◆ $sn

string $sn

The relative path of the root folder, i.e.

the script name.

Should be treated as read-only.

See also
CMSIMPLE_URL

◆ $su

string $su

The current page's URL (selected URL).

Should be treated as read-only.

See also
$selected
$u

◆ $temp

mixed $temp

A temporary value.

This read-write variable can be used to avoid polluting the global scope.

◆ $text

string $text

The text of the editor on save.

This variable is initialized from a text GET/POST parameter.

◆ $title

string $title

The title of the current page.

This read-write variable can be used to set the page title in the plugin administration and for special extension pages.

◆ $txc

array $txc

The language configuration.

Deprecated:
since 1.6 (use $cf resp. $tx instead).

◆ $u

array $u

The URLs of the pages.

Treat as read-only.

See also
$su

◆ $userfiles

string $userfiles

Whether the file browser is requested to show the userfiles folder.

This variable is initialized from a userfiles GET/POST parameter, and should only be used by file browsers and similar extensions, which may treat it as read-write.

◆ $validate

string $validate

Whether the link check is requested.

This variable is initialized from a validate GET/POST parameter.

◆ $xh_publisher

XH::Publisher $xh_publisher

The publisher instance.

Since
1.7.0

◆ $xhpages

string $xhpages

Whether the page manager is requested.

This variable is initialized from a xhpages GET/POST parameter, and should only be used by page managers, which may treat it as read-write.

See also
http://www.cmsimple-xh.org/wiki/doku.php/plugin_interfaces#page_managers

◆ CMSIMPLE_URL

const CMSIMPLE_URL

The fully qualified absolute URL of the installation (main or current language).

Since
1.6
See also
$sn

◆ CMSIMPLE_XH_VERSION

const CMSIMPLE_XH_VERSION

The version in textual representation, e.g.

CMSimple_XH 1.6

◆ XH_ADM

const XH_ADM

Whether admin mode is active.

Since
1.5.4
See also
$adm
http://www.cmsimple-xh.org/wiki/doku.php/plugin_interfaces#xh_adm

◆ XH_FORM_NAMESPACE

const XH_FORM_NAMESPACE

A unique prefix for autogenerated forms.

See also
http://forum.cmsimple-xh.dk/?f=12&t=4956#p25550

◆ XH_URICHAR_SEPARATOR

const XH_URICHAR_SEPARATOR

The separator for urichar_org/new.

Since
1.6