You are here: start » core_variables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

core_variables [2014/05/10 00:01]
Christoph M. Becker [Variables]
core_variables [2018/10/26 15:33]
Line 1: Line 1:
-====== Variables and Constants ====== 
- 
- 
-===== Variables ===== 
- 
-A rough overview of the most important global variables. For CMSimple_XH 1.6+ consult the [[http://​www.cmsimple-xh.org/​dev-doc/​php/​|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| 
-^**$print**|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 (see $sl)| 
-==== $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: 
- 
-<​code=php>​ 
-$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'​] 
-</​code>​ 
- 
-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: 
- 
-<​code=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'​] 
-</​code>​ 
- 
-===== Constants ===== 
- 
-A rough overview over the most important constants. For CMSimple_XH 1.6+ consult the [[http://​www.cmsimple-xh.org/​dev-doc/​php/​|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)| 
  
 
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