<< I18n Variables | PmWiki.Variables | Mail Posts >>

$DiffKeepDays
The $DiffKeepDays variable sets the minimum length of time that a page's revision history is kept. By default it is set to 3650 days, or a little less than ten years. You can change this value in a customization file to be something smaller, e.g.:
        $DiffKeepDays = 30; # keep revisions at least 30 days
Note that a specific page revision isn't removed from the page until the first edit after the time specified by $DiffKeepDays has elapsed. Thus, it's still possible for some pages to have revisions older than $DiffKeepDays -- such revisions will be removed the next time those pages are edited.

$EnableFixedUrlRedirect
When PmWiki is given a partial page name (e.g., just the name of a WikiGroup), it uses $PagePathFmt in order to make a complete page name from the partial one, then issues a "redirect" to the browser to tell it to reload the page with the correct full page name. Setting $EnableFixedUrlRedirect=0; blocks the redirect, so that PmWiki continues processing with the adjusted page name rather than issuing the redirect.

$EnableIMSCaching
A variable which, when set equal to 1, recognizes the "If-Modified-Since" header coming from browsers and allows browsers to use locally cached pages. Disabled by default to help the administrator customize its page without needing permanent reloading.

$EnablePageListProtect
When set to 1, causes (:pagelist:) and (:searchresults:) to exclude listing any pages for which the browser does not currently have read authorization.

$EnableLinkIndex
When set to 1, causes PmWiki to maintain a "link index" in $LinkIndexFile which significantly speeds up the link= option to (:pagelist:) (i.e., for Categories and backlinks).

$EnableStopWatch
This activates an internal stopwatch that shows how long it takes to render a page. (If you have a wiki that composes a HTML page from multiple pages, such as a normal layout with a sidebar, you'll get separate timings for each subpage and for the total page.)

The timings can be displayed by adding <!--function:StopWatch--> in the wiki template.

Valid values are:
        $EnableStopWatch = 0; # No timings (the default). No HTML will be generated.
        $EnableStopWatch = 1; # Wall-clock timings only.
        $EnableStopWatch = 2; # Wall-clock and CPU usage timings. Won't work on Windows.

$FmtV
This variable is an array that is used for string substitutions at the end of a call to FmtPageName(). For each element in the array, the "key" (interpreted as a string) will be replaced by the corresponding "value". The variable is intended to be a place to store substitution variables that have frequently changing values (thus avoiding a rebuild of the variable cache). Also see $FmtP.

$FmtP
This variable is an array that is used for pattern substitutions near the beginning of a call to FmtPageName. For each element in the array, the "key" (interpreted as a pattern) will be replaced by the corresponding value evaluated for the name of the current page. This is for instance used to handle $-substitutions that depend on the pagename passed to FmtPageName(). Also see $FmtV.

$HandleAuth
This sets the required authentication Level that is necessary to perform an action. When using the following example in your config.php you need to be authenticated as editor in order to view the page history:
        $HandleAuth['diff'] = 'edit';

$HTMLVSpace
Setting $HTMLVSpace = ''; in a local customizationfile (e.g., local/config.php) prevents insertion of spacer paragraphs (<p class='vspace'></p>) in generated HTML code. To limit this change to a single skin, place the $HTMLVSpace = ''; statement in a skin.php file, preceded by the statement global $HTMLVSpace;.

$LinkIndexFile
The location of the "link index" file used for the link= option to (:pagelist:), defaults to $WorkDir/.linkindex.

$MakePageNamePatterns
$MakePageNamePatterns is an array of regular expression replacements that is used to map the page link in a free link such as [[free link]] into a page name. Currently the default sequence is:
    "/'/" => '',                           # strip single-quotes
    "/[^$PageNameChars]+/" => ' ',         # convert non-alnums to spaces
    "/((^|[^-\\w])\\w)/e" 
      => "strtoupper('$1')",               # initial caps after spaces
    "/ /" => ''                            # strip spaces

$MetaRobots
Sets the value of the <meta name='robots' ... /> tag generated by PmWiki to control search engine robots accessing the site. PmWiki's default setting tells robots to not index anything but the normal page view, and to not index pages in the PmWiki wiki group. Explicitly setting $MetaRobots overrides this default.
        # never index this site
        $MetaRobots = 'noindex,nofollow';
        # disable the robots tag entirely
        $MetaRobots = '';

$SearchPatterns
An array of page name patterns to be required or excluded from search and pagelist results. In order to be included in a search listing or page listing, a page's name must not match any pattern that is delimited by exclamation points (!) and must match all other patterns. See Cookbook:SearchPatterns.
        # Limit all searches to Main group
        $SearchPatterns['default'][] = '/^Main\\./';
        # Exclude the Main group from search results
        $SearchPatterns['default'][] = '!^Main\\.!';
        # Exclude RecentChanges pages from search results
        $SearchPatterns['default'][] = '!\\.(All)?RecentChanges$!';

$TableCellAttrFmt
For simple tables, defines the HTML attributes given to each <td> or <th> cell in the output. Can contain references to $TableCellCount which holds the horizontal column number of the current cell.

$TableRowAttrFmt
For simple tables, defines the HTML attributes given to each <tr> element in the output. Can contain references to $TableRowCount to give the absolute row number within the table, or $TableRowIndex to provide a repeating row index from 1 to $TableRowIndexMax.
        # Give each row a unique CSS class based on row number (tr1, tr2, tr3, ... )
        $TableRowAttrFmt = "class='tr\$TableRowCount'";
        # Give each row alternating CSS classes (ti1, ti2, ti1, ti2, ti1, ... )
        $TableRowIndexMax = 2;
        $TableRowAttrFmt = "class='ti\$TableRowIndex'";

$TableRowIndexMax
The maximum value for $TableRowIndex in simple tables.
        # Set rows indexes as 1, 2, 3, 1, 2, 3, 1, 2, ...
        $TableRowIndexMax = 3;

$WorkDir
This variable is a string that gives a local path to a directory where the pmwiki engine can create temporary files etc. PmWiki needs this for a variety of things, such as building merged edits, caching mailposts entries, keeping track of the last modification time of the site, other types of cache, etc. Do not confuse this variable with $WikiDir; the reason that both $WorkDir and $WikiDir refer by default to the directory wiki.d/ is merely to simplify things for the administrator.

$WikiDir
$WikiDir is a PageStore-object that refers to how wiki pages are stored. This can be a simple reference to a directory (typically wiki.d), or something more advanced such as a MySQL backend or a .dbm-file. Do not confuse this variable with $WorkDir; the reason that both $WorkDir and $WikiDir refer by default to the directory wiki.d/ is merely to simplify things for the administrator.