This page should give you a brief overview about available variables and constants you can use in plugin or template development.
Holds the current action, see Action Modes. (reference)
The globally available $auth object represents an instance of the used authentication backend. (reference)
The globally available $conf array holds all of DokuWiki's configuration settings. In general it follows the following structure:
$conf[<setting_name>] — DokuWiki settings (refer config)$conf[<setting_group>][<setting_name>] — Some DokuWiki settings use this format, e.g. ftp, proxy and target settings.$conf['tpl'][<template_name>][<setting_name>] — Template configuration settings, refer to the template documentation.$conf['plugin'][<plugin_name>][<setting_name>] — Plugin configuration settings, refer to the plugin documentation.$conf['auth'][<auth_name>][<setting_name>] — Auth backend settings, refer to the auth backend documentation.Normally you don't need to access this array directly. Both, Plugins and Templates have their own methods to accessing their respective configuration settings.
Holds the pagename of the currently rendered page. This page is usually the currently viewed page, but not necessarily - see the $INFO['id']] below. (reference)
This is an associative array, populated with information provided by inc/common.php function pageinfo().
Current elements are:
id — pagename of main page currently viewed. Usually the same as $ID but might sometimes be different. See 1320 for some detail.rev — revision of the main page currently viewed, usually the same as $REV.userinfo — only set for a logged user, an associative array…pass — password, encryptedname — full namemail — email addressgrps — groups the user belongs to (Array buid — a special id constructed from details of the user's browser and IP addressperm — the user's permissions related to the current page ($ID)subscribed — true if the user has subscribed to this page, false otherwisenamespace — the namespace the current page ($ID) belongs tolocked — true if the page is locked, false otherwisefilepath — the file system path to the raw wiki data for the current page ($ID+$REV)exists — true if the raw wiki data for the current page exists ($ID+$REV), false otherwiserev — the revision id for the current page ($ID), an empty string if the current revisionwritable — true if for the current page ($ID+$REV) the combination of file existence, file permissions and the user's ACL permissions allow them to, write to an existing file or to create a non-existant file. False otherwise.editable — true if the current page ($ID+$REV) is writable and not currently locked.lastmod — timestamp of the last modification to the current page ($ID+$REV)meta — metadata for the current page ($ID)ip — ip address of the last editor of the current page ($ID+$REV)user — username of the last editor of the current page ($ID+$REV)sum — edit summary annotation for the current page ($ID+$REV)editor — user name (or ip address if user name is unknown) of the last editor of the current page ($ID+$REV)isadmin — true if the currently logged in user is a superuserismanager — true if the currently logged in user is a managerdraft — contains the file name of a draft file if it exists for the current user and pageismobile — true if the page is browsed from a mobile device or phone develonlyAn associative array which hold all translation strings of the interface, plugins and templates. (reference)
Holds the revision timestamp of the currently rendered page. This is false when the most current page is meant. (reference)
This variable is explicitly set by DokuWiki's authentication mechanism when a user logs in and holds the users name.
On save and preview this global variable holds the text submitted via the edit form. (reference)
This variable will, if populated, be used by tpl_toc() to build the TOC of a page. Normally this variable is empty and tpl_toc() builds the TOC from the page metadata. (reference)
An globally available associative array which hold some information of a authenticated user.
Here follows a list of the most important constants.
The AUTH_<*> type constants represent the permission levels, as integer value, used in DokuWiki's ACL system. They can be used to let ACL checks for a given page/namespace look a little bit more verbose.
if (auth_quickaclcheck($ID) >= AUTH_READ) { // do sth. }
The DOKU_<*> type constants hold information about various system information for DokuWiki's internal use.
The URL base of the DokuWiki install. (reference)
/dokuwiki/
The server side conf path of the DokuWiki install. (reference)
/var/www/dokuwiki/conf/
The server side include path of the DokuWiki install. (reference)
/var/www/dokuwiki/
The URL base path to the current used template. (reference)
/dokuwiki/lib/tpl/<template>/
The server side include path of the current used template. (reference)
lib/tpl/<template>/
Or if canonical is set:
http//domain.org/lib/tpl/<template>/
The absolute URL to the DokuWiki install (base is preferred). (reference)
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported