You are here: start » core_variables

Variables and Constants

Variables

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 stringJavaScript 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'
$fhresourcea temporary file handle
$functionstringGET or POST parameter designating a special function
$harrayheadings-array
$hjsstringJavaScript and CSS area within the <head> element of a page
$i and $jintegertemporary loop variables
$keywordsstringvariable that overwrites the existing meta keywords from the config
$larrayarray of menu levels
$loginbooleanindicates if login has been requested/taken place
$mailformbooleanwhether the mailform is requested (becomes $f='mailform')
$normalbooleanindicates whether the CMS is in view (normal) mode
$ostringoutput for the contents area
$onloadstringvalue of the onload attribute of the <body> element of the page
$pd_currentarraycontains the page data of the current page
$printbooleanwhether a print view is requested
$ptharraycontains all paths/filenames used by CMSimple (details see below)
$sintegerpagenumber of the requested page
$sitemapbooleanwhether the sitemap is requested (becomes $f='sitemap')
$slstringactive language (short form, e.g. 'de' or 'dk')
$snstringcontains name of directory in which CMSimple is installed
$sustringchoosen URL (of present page)
$tempmixedtemporary variable
$uarrayURL-array (links to all pages of the content)
$titlestringtitle of the page
$txarraycontains all texts from the language system files of the used language

$pth

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

Constants

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.

ConstantDescription
CMSIMPLE_ROOTabsolute filepath of the installation folder
CMSIMPLE_XH_BUILDbuild number in format YYYYMMDDNN
CMSIMPLE_XH_VERSIONversion number (e.g. “CMSimple_XH 1.5.9”)
CMSIMPLE_XH_DATEbuild date in format YYYY-MM-DD
PLUGINLOADERplugin loader has been loaded
PLUGINLOADER_VERSIONversion number of the plugin loader (e.g. 2.111); unmainted since early CMSimple_XH versions; use CMSIMPLE_XH_VERSION instead
XH_ADMwhether the CMS is in admin mode or not (use instead of $adm since CMSimple_XH 1.5.4)
 
You are here: start » core_variables
Except where otherwise noted, content on this wiki is licensed under the following license: GNU Free Documentation License 1.3
Valid XHTML 1.0 Valid CSS Driven by DokuWiki