Variable substitutions in the skin template are all managed by the FmtPageName()function from pmwiki.php. Pmwiki variable substitutions available on pages are managed by the substitutions from stdmarkup.php or superseded in local/config files.
This array is used to override the current skin when performing a given action. The most common use is to set $ActionSkin['print']='foo' to use the 'foo' skin when printing, regardless of what the $Skin variable is set to.
This variable contains the current date and time stamp, saved in RecentChanges (since 2.3.0). This time stamp will be saved in the wiki source text in Greenwich Mean Time (UTC/GMT), but will be shown according to $TimeFmt in the timezone of the wiki. When $EnableLocalTimes is enabled, then it will be shown in the visitor's time zone. The same format is also saved in user signatures if $EnableLocalTimes is enabled.
This variable controls whether the script pub/pmwiki-utils.js should be loaded or not. The script contains JavaScript utility functions for the table of contents, the syntax highlighting, the recent changes, and the email obfuscation. By default $EnablePmUtils is 1 (enabled), but its functions should be enabled individually ($EnableLocalTimes, $EnableHighlight, $PmTOC, $LinkFunctions['mailto:']). Set this variable to 0 to disable all these functions.
(Default disabled) Enables the rewriting of date and time stamps into the timezone of the visitor, see documentation at Cookbook:LocalTimes. Dates affected are in RecentChanges pages, in page histories, and in user signatures.
$EnableLocalTimes = 2; Enables long local times, as in MM/DD/YYYY HH:MM:SS.
$EnableLocalTimes = 1; Enables compact local times, either HH:MM (within 24 hours), MM/DD or DD/MM (within 11 months), and MM/DD/YYYY or DD/MM/YYYY if earlier than 11 months. The long format appears in a tooltip title when the mouse is over the short format.
(Not to be confused with $EnableHighlight) When set to 1, enables PmSyntax, a syntax highlighting for the PmWiki markup language, which makes the documentation easy to read (from 2.3.0). When set to 2, it also enables the experimental syntax highlighting in the basic edit form:
$EnablePmSyntax = 1; # highlight documentation blocks
$EnablePmSyntax = 2; # both documentation and edit form
if ($action=='edit') $EnablePmSyntax = 2; # only edit form
(Not to be confused with $EnablePmSyntax) If set to 1, enables compatibility with the highlight.js library to highlight program code. In addition, you need to include the library and mark your code blocks with the wikistyle %highlight%, see WikiStyles#highlight.
An array of CSS statements to be included in the page's output along with other HTML headers. This array provides an easy place for scripts to add custom CSS statements.
An array of HTML text to be included in the page's <head> section, at the point where the skin template specifies a <!--HTMLHeader--> directive. This array provides an easy place for scripts to add custom HTML headers.
For example, if you want to specify a favicon for all the pages of your wiki (a png image for Firefox (and others...), an ico for Internet Explorer):
Like $HTMLHeaderFmt above, this contains an array of HTML text to be included near the end of an HTML document, at the point where the skin template specifies a <!--HTMLFooter--> directive (usually just before a closing </body> tag). Primarily used by scripts to add custom HTML output after the body of the page output.
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 = '';
Note the two consecutive spaces before the three dots (. . .). The two spaces separate two parts of the format: the first part doesn't change (e.g. a link to the changed page) and the second part does change (e.g. the date and author of the change). Upon saving a page, PmWiki removes a line that matches the first part and adds a line with the current format before the first line with 2 spaces. This way, any line without two consecutive spaces stays at the top of the recent changes page.
You can use and adapt the following to change the format (put it in config.php):
Since PmWiki 2.3.0, the format uses $CurrentLocalTime by default which shows exactly what $CurrentTime previously showed, but when $EnableLocalTimes is set, will rewrite the time and date in the local format and timezone of the visitor.
Note that changes made to the format will only affect new edits. In other words, you will need to edit a page for your new format to be visible. Note also that you need to have two spaces between the page name and the other information about the edit.
Also note that this variable has other uses, such as not reporting at all to RecentChanges and AllRecentChanges as found here PmWiki Questions. More informations on customizing RecentChanges pages here : CustomRecentChanges?.
An array specifying the format for uploaded files at the RecentChanges listing. It is similar to $RecentChangesFmt. If enabled, newly uploaded files will be logged to the RecentChanges pages. Default is disabled. See Cookbook:RecentUploadsLog for more information. See also $EnableRecentUploads.
When set to 1, and when $RecentUploadsFmt is not set, it enables Recent uploads in a default format, only on the page Site.AllRecentChanges. This was added in 2.3.0 to easily enable the feature with some default settings that may be good enough for many wikis.
An array specifying the format of the RecentChanges listing when saving Draft pages.
$RecentChangesFmt is set to $DraftRecentChangesFmt when a Draft page is saved. For example, you could save drafts in a separate Recent Draft Changes page and not list in the normal group's Recent Changes page:
If a "wiki CSS page" is enabled with $WikiPageCSSFmt, this is an array with global PHP $variables available as pre-processor @variables in that page. By default the array contains: 'FarmPubDirUrl', 'PubDirUrl', 'Skin', 'action', 'SkinDirUrl'.
If a "wiki CSS page" is enabled with $WikiPageCSSFmt, that specific page doesn't have CSS applied to itself when browsed or edited. In case a grave mistake is made in the styles and the site becomes unusable, this page will still be viewable and editable. People familiar with CSS can set this to 1 and the styles will be applied to the page itself, also in "Preview" mode:
Controls the number of times that pages can be included via the (:include:) and other directives, used to control recursion and otherwise pose a sanity check on page contents. $MaxIncludes defaults to 50, but can be set to any value by the wiki administrator.
$MaxIncludes = 50; # default
$MaxIncludes = 1000; # allow lots of includes
$MaxIncludes = 0; # turn off includes
Lists the name(s) of skins to load, unless overridden by $ActionSkin. Normally $Skin contains a single string which is the name of a skin directory, but it may also be an array of names, in which case the first skin found from the list is used.
Set by scripts/skins.php to be the base url of the current skin's directory (i.e., within a 'pub/skins/' directory). This variable is typically used inside of a skin .tmpl file to provide access to .css files and graphic images associated with the skin.
An array which, given the filesystem path (array key) to a skin (or a directory containing several skins), provides the corresponding URL (array value).
The array key is the directory containing the skin.tmpl and skin.php files, as seen by the PmWiki program. It does not have to be publicly accessible.
The value is the URL (web address) of the directory containing the .css, .gif, and other files which appear in the HTML code sent by PMWiki to the browser. This directory must be publicly accessible.
Extra details: When PMWiki is searching for a skin it looks for a directory named for the skin in the array index/keys, and if it finds it then it will use the files in that directory and also the files in the matching array value url. The two sides normally point to the same publicly accessible directory, but they do not have to.
how many levels of inclusion are allowed for skin templates with the <!--IncludeTemplate:...--> directive. By default this directive is disabled. Setting it to 1 allows one level of inclusions, setting it to 2 allows included templates to include more templates. There can be up to 10 levels of inclusion. This variable can be defined either in local/config.php or in pub/skins/skinname/skinname.php (with SDV):
# in config.php, allow one level of inclusions
$SkinTemplateIncludeLevel = 1;
# in skinname.php, allow 3 levels of inclusions
SDV($GLOBALS['SkinTemplateIncludeLevel'], 3);
is the url that refers to a logo image which most skins display somewhere in the page's header (top left usually), e.g. "/images/lebaron_text_klein.jpg"
Changes the handling of the page URL. When set to 1 page URL will be ...wiki.php/Main/Main, when set to 0 (default) it will be ...wiki.php?n=Main.Main.
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.
Specifies the HTTP header to send when attempting to browse a page that doesn't exist. Some webserver packages (notably Microsoft's "Personal Web Server") require that this variable be changed in order to work.
# default
$PageNotFoundHeaderFmt = 'HTTP/1.1 404 Not Found';
# return all pages as found
$PageNotFoundHeaderFmt = 'HTTP/1.1 200 Ok';
Beware when expecting to return the content of a Group(header|footer) for an non existent page! By default PmWiki returns 404 (because the page does not exist), despite there is some content to show. Firefox shows the content, while Internet Explorer displays its default 404 page. $PageNotFoundHeaderFmt MUST be set to return 200 as described above in order to get the expected behaviour with all browsers.
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;.
This variable allows to enable linebreaks by default, i.e. without having the directive (:linebreaks:) in a page or in a GroupHeader. To enable line breaks, add to config.php such a line: $HTMLPNewline = '<br/>';
This variable can contain a CSS classname to be used for simple tables, if a "class=" attribute is not defined in the wiki page (default unset): $SimpleTableDefaultClassName = "wikisimpletable"; See for sample code PITS:00638.
For 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.
For Tables, defines the HTML attributes for alignment of each <td> or <th> cell. Default is " align='%s'" where %s will be replaced with 'center', 'left' or 'right'. For a valid HTML5 output you may want to change this in config.php: $TableCellAlignFmt = " class='%s'"; then define the CSS classes td.center, td.right and td.left (also th).
For 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'";
Advanced tables are intended for layout, and automatically insert the valign='top' attribute if there is no valign attribute defined in the markup source. Setting this variable to 0 in config.php will prevent the automatic addition.
This is an array of allowed skins that can be changed by the visitor with ?skin= or ?setskin= URL query to the wiki. See also $EnableAutoSkinList and Skins:SkinChange.