CMSimple_XH
Variables
cms.php File Reference

Variables

const XH_URICHAR_SEPARATOR (preg_match('/cms\.php/i', $_SERVER['PHP_SELF']))
 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 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...
 
 $cf
 The configuration of the core. More...
 
if($cf['site']['compat']) $errors
 Debug output generated by PHP according to debug mode. More...
 
if(!isset($cf['folders']['content'])) if($cf['site']['timezone'] !=='' &&function_exists('date_default_timezone_set')) $sl
 The current language. More...
 
 $tx
 The localization 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 ($temp as $i)
 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. More...
 
 $plugin
 The currently loaded plugin. More...
 
foreach(XH_plugins() as $plugin) $_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 ($function=='save')
 For compatibility with plugins.
 
const PLUGINLOADER_VERSION
 For compatibility with plugins.
 
const XH_FORM_NAMESPACE
 A unique prefix for autogenerated forms. More...
 
if(XH_ADM$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...
 
switch($f) $hc
 The page indexes of the visible menu items. More...
 
 $hl
 The length of $hc. More...
 
 $si
 The index of the current page in $hc. More...
 
if(XH_ADM) if($s==-1 &&! $f && $o=='' && $su=='') if(XH_ADM$output
 The output to be manipulated by CMSimple scripting. More...
 

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

foreach (XH_plugins() as $plugin) $_XH_csrfProtection

The CRSF protection object.

Should be treated as read-only.

@global XH\CSRFProtection $_XH_csrfProtection

@access public

@tutorial CSRFProtection.cls

◆ $_XH_pluginMenu

$_XH_pluginMenu

The plugin menu builder.

@global XH\ClassicPluginMenu $_XH_pluginMenu

@access private

◆ $action

$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.

@global string $action

@access public

◆ $adm

$adm

Whether admin mode is active.

This variable is strictly read-only.

@global bool $adm

@access public

See also
XH_ADM

◆ $admin

$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.

@global string $admin

@access public

◆ $bjs

$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.

@global string $bjs

@access public

See also
$hjs

1.5.4

◆ $c

$c

The content of the pages.

Treat as read-only when in edit mode.

@global array $c

@access public

◆ $cf

$cf

The configuration of the core.

Should be treated as read-only.

@global array $cf

@access public

See also
$plugin_cf

◆ $cgi

$cgi

Whether PHP is executed as (F)CGI.

Should be treated as read-only.

@access public

@global bool $cgi

◆ $cl

$cl

The number of pages.

Treat as read-only.

@global int $cl

@access public

◆ $download

The filename requested for download.

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

@global string $download

@access private

◆ $downloads

$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.

@global string $downloads

@access public

◆ $e

$e

The HTML for the 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.

@global string $e

@access public

See also
e()

◆ $edit

$edit

Whether edit mode is requested.

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

@global string $edit

@access public

See also
$normal

◆ $errors

if ( $cf[ 'site'][ 'compat']) $errors

Debug output generated by PHP according to debug mode.

@global array $errors

@access private

◆ $f

$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.

@global string $f

@access public

◆ $file

$file

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

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

@global string $file

@access private

◆ $function

$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.

@global string $function

@access public

◆ $h

$h

The headings of the pages.

Treat as read-only.

@global array $h

@access public

See also
h()

◆ $hc

switch ( $f) $hc

The page indexes of the visible menu items.

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

@global array $hc

@access public

◆ $hjs

$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.

@global string $hjs

@access public

See also
$bjs

◆ $hl

$hl

The length of $hc.

@global int $hl

@access private

◆ $i

$i

A temporary (loop) value.

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

@global mixed $i

@access public

◆ $iis

$iis

Whether the webserver is IIS.

Should be treated as read-only.

@access public

@global bool $iis

◆ $images

$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.

@global string $images

@access public

◆ $j

$j

A temporary (loop) value.

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

@global mixed $j

@access public

◆ $keycut

$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.

@global string $keycut

@access private

◆ $l

$l

The menu levels of the pages.

Treat as read-only.

@global array $l

@access public

See also
l()

◆ $login

$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'.

@global string $login

@access private

◆ $logout

$logout

Whether logout is requested.

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

@global string $logout

@access private

◆ $mailform

$mailform

Whether the mailform is requested.

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

@global string $mailform

@access private

◆ $media

$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.

@global string $media

@access public

◆ $normal

$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.

@global string $normal

@access public

See also
$edit

◆ $o

$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.

@global string $o

@access public

◆ $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.

@global string $onload

@access public

◆ $output

if (XH_ADM) if ( $s==-1 &&! $f &&$o=='' &&$su=='') if (XH_ADM) $output

The output to be manipulated by CMSimple scripting.

@global string $output

@access public

◆ $pd_current

$pd_current

The infos about the current page.

Treat as read-only.

@global array $pd_current

@access public

◆ $pd_router

$pd_router

The page data router.

Treat as read-only.

@global XH\PageDataRouter $pd_router

@access public

◆ $pd_s

if (XH_ADM) $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.

@global int $pd_s

@access public

See also
$s

◆ $plugin

$plugin

The currently loaded plugin.

Should be treated as read-only.

@global string $plugin

@access public

◆ $plugin_cf

$plugin_cf

The configuration of the plugins.

Treat as read-only.

@global XH\PluginConfig $plugin_cf

@access public

See also
$cf

◆ $plugin_tx

$plugin_tx

The localization of the plugins.

Treat as read-only.

@global XH\PluginConfig $plugin_tx

@access public

See also
$tx

◆ $print

$print

Whether print mode is requested.

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

@global string $print

@access public

◆ $pth

$pth

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

Should be treated as read-only.

@global array $pth

@access public

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

◆ $s

$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.

@global int $s

@access public

◆ $search

$search

The current search string.

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

@global string $search

@access public

◆ $selected

$selected

The URL of the requested page.

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

@global string $selected

@access private

◆ $settings

$settings

Whether the settings page is requested.

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

@global string $settings

@access private

◆ $si

$si

The index of the current page in $hc.

@global int $si

@access private

◆ $sitemap

$sitemap

Whether the sitemap is requested.

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

@global string $sitemap

@access private

◆ $sl

if (!isset( $cf[ 'folders'][ 'content'])) if ( $cf[ 'site'][ 'timezone'] !=='' &&function_exists( 'date_default_timezone_set')) $sl

The current language.

This read-only variable contains an ISO 639-1 language code.

@global string $sl

@access public

◆ $sn

$sn

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

the script name.

Should be treated as read-only.

@global string $sn

@access public

See also
CMSIMPLE_URL

◆ $su

if (!isset( $cf[ 'uri'][ 'length'])) $su

The current page's URL (selected URL).

Should be treated as read-only.

@global string $su

@access public

See also
$selected
$u

◆ $temp

$temp

A temporary value.

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

@global mixed $temp

@access public

◆ $text

$text

The text of the editor on save.

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

@global string $text

@access private

◆ $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.

@access public

◆ $tx

$tx

The localization of the core.

Should be treated as read-only.

@global array $tx

@access public

See also
$plugin_tx

◆ $txc

$txc

The language configuration.

@global array $txc

@access public

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

◆ $u

$u

The URLs of the pages.

Treat as read-only.

@global array $u

@access public

See also
$su

◆ $userfiles

$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.

@global string $userfiles

@access public

◆ $validate

$validate

Whether the link check is requested.

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

@global string $validate

@access private

◆ $xh_publisher

$xh_publisher

The publisher instance.

@global XH::Publisher $xh_publisher

@access public

Since
1.7.0

◆ $xhpages

$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.

@global string $xhpages

@access public

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

$adm

◆ XH_FORM_NAMESPACE

const XH_FORM_NAMESPACE

A unique prefix for autogenerated forms.

&t=4956#p25550

◆ XH_URICHAR_SEPARATOR

const XH_URICHAR_SEPARATOR(preg_match('/cms\.php/i', $_SERVER[ 'PHP_SELF']))

The separator for urichar_org/new.

Since
1.6