A rough overview of the most important global variables. For CMSimple_XH 1.6+ consult the developer documentation, where the global variables are listed in the variables section of the file cms.php.
Variable | Typ | Description |
---|---|---|
$adm | boolean | whether the CMS is in admin mode or not |
$bjs | string | JavaScript area at the end of the <body> element |
$c | array | content-array (content, divided according to headings h1-hn) |
$cf | array | contains all config data from config.php |
$cl | integer | number of all pages |
$description | string | variable that overwrites the existing meta description from the config |
$download | string | whether a download is requested, and if so contains the name of the file to be made available for download |
$e | string | error messages |
$edit | boolean | indicates whether the CMS is in edit mode |
$f | string | the requested special function, e.g. 'search', 'mailform', 'sitemap' |
$fh | resource | a temporary file handle |
$function | string | GET or POST parameter designating a special function |
$h | array | headings-array |
$hjs | string | JavaScript and CSS area within the <head> element of a page |
$i and $j | integer | temporary loop variables |
$keywords | string | variable that overwrites the existing meta keywords from the config |
$l | array | array of menu levels |
$login | boolean | indicates if login has been requested/taken place |
$mailform | boolean | whether the mailform is requested (becomes $f='mailform') |
$normal | boolean | indicates whether the CMS is in view (normal) mode |
$o | string | output for the contents area |
$onload | string | value of the onload attribute of the <body> element of the page |
$pd_current | array | contains the page data of the current page |
boolean | whether a print view is requested | |
$pth | array | contains all paths/filenames used by CMSimple (details see below) |
$s | integer | pagenumber of the requested page |
$sitemap | boolean | whether the sitemap is requested (becomes $f='sitemap') |
$sl | string | active language (short form, e.g. 'de' or 'dk') |
$sn | string | contains name of directory in which CMSimple is installed |
$su | string | choosen URL (of present page) |
$temp | mixed | temporary variable |
$u | array | URL-array (links to all pages of the content) |
$title | string | title of the page |
$tx | array | contains all texts from the language system files of the used language |
$pth is a two dimensional array containing the relative paths to system files and folders. The first dimension contains the keys 'file' and 'folder'. The following paths are available throughout the system:
$pth['folder']['base'] $pth['folder']['cmsimple'] $pth['folder']['language'] $pth['file']['language'] $pth['folder']['langconfig'] $pth['file']['langconfig'] $pth['file']['adm'] $pth['file']['cms'] $pth['file']['config'] $pth['file']['log'] $pth['file']['login'] $pth['file']['mailform'] $pth['file']['search'] $pth['file']['corestyle'] $pth['folder']['content'] $pth['file']['content'] $pth['file']['pagedata'] $pth['folder']['downloads'] $pth['folder']['images'] $pth['folder']['flags'] $pth['folder']['userfiles'] $pth['folder']['media'] $pth['folder']['plugins'] $pth['folder']['templates'] $pth['folder']['template'] $pth['folder']['menubuttons'] $pth['folder']['templateimages'] $pth['file']['template'] $pth['file']['stylesheet']
Additionally the following keys are properly set when the plugin is loaded, so they're available in the global scope of the plugin's index.php and admin.php:
$pth['folder']['plugin'] $pth['file']['plugin_index'] $pth['file']['plugin_admin'] $pth['folder']['plugin_classes'] $pth['file']['plugin_classes'] $pth['folder']['plugin_config'] $pth['file']['plugin_config'] $pth['folder']['plugin_content'] $pth['folder']['plugin_css'] $pth['file']['plugin_stylesheet'] $pth['folder']['plugin_help'] $pth['file']['plugin_help'] $pth['folder']['plugin_includes'] $pth['folder']['plugin_languages'] $pth['file']['plugin_language']
A rough overview over the most important constants. For CMSimple_XH 1.6+ consult the developer documentation, where the constants are listed in the constants section of the file cms.php.
Constant | Description |
---|---|
CMSIMPLE_ROOT | absolute filepath of the installation folder |
CMSIMPLE_XH_BUILD | build number in format YYYYMMDDNN |
CMSIMPLE_XH_VERSION | version number (e.g. “CMSimple_XH 1.5.9”) |
CMSIMPLE_XH_DATE | build date in format YYYY-MM-DD |
PLUGINLOADER | plugin loader has been loaded |
PLUGINLOADER_VERSION | version number of the plugin loader (e.g. 2.111); unmainted since early CMSimple_XH versions; use CMSIMPLE_XH_VERSION instead |
XH_ADM | whether the CMS is in admin mode or not (use instead of $adm since CMSimple_XH 1.5.4) |