< Notify | Variables | Page Variables >
Where the variables are available as wiki markup they are shown as Variable value "{$VariableName}".
AsSpaced'.
$AsSpacedFunction = 'MyAsSpaced';
$Author is currently ""
Profiles'. This variable is implicit in the markup [[~AuthorName]]
$AuthorGroup = 'Users';
SessionAuth($pagename);
if( isset($AuthId) ) { // this person has been authenticated
SessionAuth($pagename);
if( isset($AuthPw) ) { // this person has entered a password
$BaseName is currently "PmWiki.BasicVariables"
{$BaseName} PageVariable. The key to the hash is the pattern to be replaced and the value is the replacement string.
# If {$FullName} is 'Group.Page-Draft' then {$BaseName} is 'Group.Page'
$BaseNamePatterns['/-Draft$/'] = '';
# If {$FullName} is 'Comments-Group.Page' then {$BaseName} is 'Group.Page'
$BaseNamePatterns['/^Comments-/'] = '';
Category'. (See Categories). This variable is implicit in the markup [[!CategoryName]]
$CookiePrefix = 'pmwiki_'; # set cookie prefix to 'pmwiki_'
config.php to get a unique prefix for each field in the farm, thus isolating each field's cookies.$CookiePrefix = substr($tmp = md5(__FILE__), 0, 5).'_';
$DefaultGroup is currently "MonWiki"
$DefaultName is currently "Accueil"
(farm)config.php scripts - this must be set prior to any call of ResolvePageName().
$DefaultGroup.$DefaultName.
$DefaultGroup, $DefaultName and $DefaultPage variables to work, they should be defined in the beginning of (farm)config.php, before any call to the function ResolvePageName(). This means, before any script from PmWiki and before any recipe that might be using this function. This also means it cannot be set in a per-page or per-group customization script - ResolvePageName() is called before these are loaded.
(farm)config.php, not in individual groups. Trying to use different $DefaultName, $DefaultPage or $PagePathFmt settings in different groups will cause cross-group linking anomalies.
local/config.php customizations (usually for a farm's wikis). Can be set to zero in local/farmconfig.php to prevent the farm's wikis' local/config.php from being loaded.
$EnableLocalConfig = 0; # disable PmWiki's local/config
scripts/stdconfig.php and a large part of the core functionalities provided by the scripts in the pmwiki/scripts directory and outlined in the core documentation, unless included by your own local configuration (notably core markup rules, page history, skins, uploads). Allows you to completely reshape the way PmWiki behaves, if you need to.
$EnableStdConfig = 0; # disable many standard features
$EnablePGCust = 0; # turn off per-page/group configs
local/Group.Page.php in addition to local/Group.Page-Draft.php.
$EnableBaseNameConfig = 1; # include basename configuration
$EnableWSPre = 1; # leading spaces are preformatted text
$EnableWSPre = 0; # leading spaces are normal lines of text
$EnableWSPre = 4; # 4+ spaces are preformatted text
ftime" function. The default $FTimeFmt is $TimeFmt. (See Markup Expressions.)
# limit groups to Site, SiteAdmin, PmWiki, and MyGroup
$GroupPattern = '(?:Site|SiteAdmin|PmWiki|MyGroup)';
#for case-sensitive group names, note the ?-i switch:
$GroupPattern = '(?-i:Site|SiteAdmin|PmWiki|MyGroup)';
(:linkwikiwords:) and (:nolinkwikiwords:) directives.
$LinkWikiWords = 1; # turn on WikiWord links
$LinkWikiWords = 0; # disable WikiWord links
?action=logout. Defaults to the current page.
$LogoutRedirectFmt = 'Site.Logout'; # ?action=logout target
?action=logout is invoked.
$pagename=$GLOBALS['MarkupToHTML']['pagename'];
global $pagename; # if you use it inside a function
$pagename = ResolvePageName($pagename);
$page = PageVar($pagename, '$FullName'); # =$pagename $group = PageVar($pagename, '$Group'); $name = PageVar($pagename, '$Name');
(farm)config.php, not in individual groups. Trying to use different $DefaultName, $DefaultPage or $PagePathFmt settings in different groups will cause cross-group linking anomalies.
$PagePathFmt = array('{$Group}.$1','$1.$1','$1.{$DefaultName}');
$PagePathFmt = array('{$Group}.$1','$1.{$DefaultName}','$1.$1');
Groupname.Groupname page does exist but Groupname.Defaultname does not exist, then Groupname.Groupname will still take precedence. You may remove the '$1.$1' entirely to require Groupname.Defaultname to be the group homepage - that would look like this:
$PagePathFmt = array('{$Group}.$1','$1.{$DefaultName}');
$SiteGroup is currently "Site"
SiteAdmin'.
(:spacewikiwords:) and (:nospacewikiwords:) directives.
$SpaceWikiWords = 1; # turn on WikiWord spacing
$SpaceWikiWords = 0; # turn off WikiWord spacing
strftime() format. The default value is '%B %d, %Y at %I:%M %p', which gives dates of the form "September 8, 2005 at 10:57 PM". Formats $CurrentTime variable.
$TimeFmt = '%B %d, %Y'; # dates as "September 8, 2005"
$TimeFmt = '%Y-%m-%d'; # dates as "2005-09-08"
{(ftime)} markup expression. See explanation at Functions#PSFT. (For PHP 8.1, strftime() is deprecated, and the new functions are enabled by default.)
$Version is currently "pmwiki-2.3.25"
$VersionNum is currently "2003025"
2.1.0 2001000 2.1.1 2001001 ... 2.1.27 2001027 2.2.0-beta1 2001901 2.2.0-beta2 2001902 ... 2.2.0-beta18 2001918 ... 2.2.0 2002000
$EnableRelativePageVars = 1; # PmWiki current default{$Name} displays the name of the physical page where it written. If {$Name} is in an included page, it will display the name of the included page. (This is currently PmWiki's default.)
$EnableRelativePageVars = 0; # revert to previous default{$Name} displays the name of the currently browsed page. Even if {$Name} is in an included page, it will display the name of the browsed page. This was PmWiki's default in versions 2.2.8 and earlier, and changed in 2.2.9, but you can revert it back with this line in config.php.
{*$Name} with an asterisk always displays the name of the currently browsed page, regardless of $EnableRelativePageVars.
Categories: PmWiki Developer
< Notify | Variables | Page Variables >
This page may have a more recent version on pmwiki.org: PmWiki:BasicVariables, and a talk page: PmWiki:BasicVariables-Talk.