CMSimple_XH
Variables
cms.php File Reference

The main file of CMSimple_XH. More...

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 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($su==uenc('site/cms info')) 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.

XH $_XH_csrfProtection

public

CSRFProtection.cls

◆ $_XH_pluginMenu

$_XH_pluginMenu

The plugin menu builder.

XH $_XH_pluginMenu

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.

string $action

public

◆ $adm

$adm

Whether admin mode is active.

This variable is strictly read-only.

bool $adm

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.

string $admin

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.

string $bjs

public

See also
$hjs

1.5.4

◆ $c

$c

The content of the pages.

Treat as read-only when in edit mode.

array $c

public

◆ $cf

$cf

The configuration of the core.

Should be treated as read-only.

array $cf

public

See also
$plugin_cf

◆ $cgi

$cgi

Whether PHP is executed as (F)CGI.

Should be treated as read-only.

public

bool $cgi

◆ $cl

$cl

The number of pages.

Treat as read-only.

int $cl

public

◆ $download

The filename requested for download.

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

string $download

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.

string $downloads

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.

string $e

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 or view mode, you should set the edit GET parameter.

string $edit

public

See also
$normal

◆ $errors

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

Debug output generated by PHP according to debug mode.

array $errors

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.

string $f

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.

string $file

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.

string $function

public

◆ $h

$h

The headings of the pages.

Treat as read-only.

array $h

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().

array $hc

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.

string $hjs

public

See also
$bjs

◆ $hl

$hl

The length of $hc.

int $hl

private

◆ $i

$i

A temporary (loop) value.

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

mixed $i

public

◆ $iis

$iis

Whether the webserver is IIS.

Should be treated as read-only.

public

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.

string $images

public

◆ $j

$j

A temporary (loop) value.

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

mixed $j

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.

string $keycut

private

◆ $l

$l

The menu levels of the pages.

Treat as read-only.

array $l

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

string $login

private

◆ $logout

$logout

Whether logout is requested.

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

string $logout

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

string $mailform

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.

string $media

public

◆ $normal

$normal

Whether normal mode is requested.

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

string $normal

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.

string $o

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.

string $onload

public

◆ $output

if ( $su==uenc( 'site/cms info')) if (XH_ADM) if ( $s==-1 &&! $f &&$o=='' &&$su=='') if (XH_ADM) $output

The output to be manipulated by CMSimple scripting.

string $output

public

◆ $pd_current

$pd_current

The infos about the current page.

Treat as read-only.

array $pd_current

public

◆ $pd_router

$pd_router

The page data router.

Treat as read-only.

XH $pd_router

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.

int $pd_s

public

See also
$s

◆ $plugin

$plugin

The currently loaded plugin.

Should be treated as read-only.

string $plugin

public

◆ $plugin_cf

$plugin_cf

The configuration of the plugins.

Treat as read-only.

XH $plugin_cf

public

See also
$cf

◆ $plugin_tx

$plugin_tx

The localization of the plugins.

Treat as read-only.

XH $plugin_tx

public

See also
$tx

◆ $print

$print

Whether print mode is requested.

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

string $print

public

◆ $pth

$pth

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

Should be treated as read-only.

array $pth

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.

int $s

public

◆ $search

$search

The current search string.

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

string $search

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.

string $selected

private

◆ $settings

$settings

Whether the settings page is requested.

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

string $settings

private

◆ $si

$si

The index of the current page in $hc.

int $si

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

string $sitemap

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.

string $sl

public

◆ $sn

$sn

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

the script name.

Should be treated as read-only.

string $sn

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.

string $su

public

See also
$selected
$u

◆ $temp

$temp

A temporary value.

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

mixed $temp

public

◆ $text

$text

The text of the editor on save.

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

string $text

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.

public

◆ $tx

$tx

The localization of the core.

Should be treated as read-only.

array $tx

public

See also
$plugin_tx

◆ $txc

$txc

The language configuration.

array $txc

public

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

◆ $u

$u

The URLs of the pages.

Treat as read-only.

array $u

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.

string $userfiles

public

◆ $validate

$validate

Whether the link check is requested.

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

string $validate

private

◆ $xh_publisher

$xh_publisher

The publisher instance.

XH::Publisher $xh_publisher

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.

string $xhpages

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