Warning: Use of undefined constant USER_AUTH_VERSION - assumed 'USER_AUTH_VERSION' (this will throw an Error in a future version of PHP) in /home/clients/8ef696c5eb3119a3a1c9089013d2fece/web/cookbook/userauth.php on line 31

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; UserSessionVars has a deprecated constructor in /home/clients/8ef696c5eb3119a3a1c9089013d2fece/web/cookbook/userauth/UserSessionVars.php on line 39

Warning: Use of undefined constant USERSESSIONVARS - assumed 'USERSESSIONVARS' (this will throw an Error in a future version of PHP) in /home/clients/8ef696c5eb3119a3a1c9089013d2fece/web/cookbook/userauth/UserSessionVars.php on line 37

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; HtPasswd has a deprecated constructor in /home/clients/8ef696c5eb3119a3a1c9089013d2fece/web/cookbook/userauth/HtPasswd.php on line 55

Warning: Use of undefined constant HTPASSWD_CLASS - assumed 'HTPASSWD_CLASS' (this will throw an Error in a future version of PHP) in /home/clients/8ef696c5eb3119a3a1c9089013d2fece/web/cookbook/userauth/HtPasswd.php on line 53

Deprecated: Function create_function() is deprecated in /home/clients/8ef696c5eb3119a3a1c9089013d2fece/web/pmwiki.php on line 501
Valdemar.fr

Link Variables

admins (advanced)
%apply=item id=EnableLinkPageRelative?%$EnableLinkPageRelative
When enabled, causes PmWiki to use relative urls for page links instead of absolute urls.

$EnableLinkPageRelative = 1;

%apply=item id=EnableLinkPlusTitlespaced?%$EnableLinkPlusTitlespaced
When enabled, a link written like [[Name|+]] will display the "Spaced Title". Default is to display the "Title" of the page. See the page PageVariables for {$Title} and {$Titlespaced}.
%apply=item id=PagePathFmt?%$PagePathFmt
This array lists the order in which PmWiki looks for the page that you most likely are attempting to link to. The default is listed below. Look at Cookbook:PagePaths for some ideas.

array('{$Group}.$1', '$1.$1', '$1.{$DefaultName}')

%apply=item id=LinkPageExistsFmt?%$LinkPageExistsFmt
The (HTML) string to output for links to already existing wiki pages. Defaults to

<a class='wikilink' href='\$LinkUrl'>\$LinkText</a>

%apply=item id=LinkPageCreateFmt?%$LinkPageCreateFmt
The (HTML) string to output for links to non-existent wiki pages. The default is to add a '?' after the link text with a link to the page edit/create form. Defaults to

<a class='createlinktext' href='\$PageUrl?action=edit'>\$LinkText</a> <a class='createlink' href='\$PageUrl?action=edit'>?</a>

%apply=item id=LinkPageCreateSpaceFmt?%$LinkPageCreateSpaceFmt
Same as $LinkPageCreateFmt, but used when the link text has a space in it.
%apply=item id=LinkPageSelfFmt?%$LinkPageSelfFmt
The (HTML) string to output for self-referencing links (i.e. links to the page itself). Defaults to

<a class='selflink' href='\$LinkUrl'>\$LinkText</a>

%apply=item id=LinkCategoryFmt?%$LinkCategoryFmt
The (HTML) string to output for links to wiki category pages. Defaults to

<a class='categorylink' href='\$LinkUrl'>\$LinkText</a>

%apply=item id=UrlLinkFmt?%$UrlLinkFmt
The (HTML) string to output for URL-links that begin with 'http:', 'ftp:', etc. Defaults to

<a class='urllink' href='\$LinkUrl' title='\$LinkAlt' rel='nofollow'>\$LinkText</a>

%apply=item id=IMapLinkFmt?%$IMapLinkFmt
an array of link formats for various link "schemes". Not set as default.
Examples of custom formats to allow different styling via classes:
Links to http: standard url links:

$IMapLinkFmt['http:'] = "<a class='httplink urllink' href='\$LinkUrl'>\$LinkText</a>";

Links to https: secure pages:

$IMapLinkFmt['https:'] = "<a class='httpslink urllink' href='\$LinkUrl'>\$LinkText</a>";

Links to PmWiki: InterMap shortcut:

$IMapLinkFmt['PmWiki:'] = "<a class='pmwikilink urllink' href='\$LinkUrl'>\$LinkText</a>";

%apply=item id=AddLinkCSS?%$AddLinkCSS
An array of additional custom link CSS classes, that are added to the link format $UrlLinkFmt, $IMapLinkFmt or $LinkPageExistsFmt. Currently can have 2 elements:
$AddLinkCSS['othergroup'] = "crossgroup"; # add "crossgroup" class to wikilinks to other wikigroups
$AddLinkCSS['samedomain'] = "currentsite"; # add "currentsite" class to URL or Path links to resources on the same domain.
%apply=item id=InterMapFiles?%$InterMapFiles
An array consisting a list of files and pages containing InterMap entries to be loaded.
%apply=item id=MakePageNameFunction?%$MakePageNameFunction
Name of a custom function to replace MakePageName(), which converts strings into valid page names.
%apply=item id=MakePageNamePatterns?%$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 to spaces characters not allowed in pagenames
    '/((^|[^-\\w])\\w)/' => 'cb_toupper',  # capitalize 1st letter of words
    '/ /' => ''                     # remove spaces
Note that if you change $MakePageNamePatterns, the documentation links may break. This can be fixed by re-setting $MakePageNamePatterns to the default in local/PmWiki.php.
%apply=item id=MakePageNameSplitPattern?%$MakePageNameSplitPattern
See Cookbook:DotsInLinks.
%apply=item id=WikiWordCountMax?%$WikiWordCountMax
The maximum number of times to convert each WikiWord encountered on a page. Defaults to 1,000,000. Common settings for this variable are zero (disable WikiWord links) and one (convert only the first occurrence of each WikiWord).

$WikiWordCountMax = 0; # disable WikiWord links $WikiWordCountMax = 1; # convert only first WikiWord

%apply=item id=WikiWordCount?%$WikiWordCount
An array that allows the number of WikiWord conversions to be set on a per-WikiWord basis. The default is to use $WikiWordCountMax unless a value is set in this array. By default PmWiki sets $WikiWordCount['PmWiki']=1 to limit the number of conversions of "PmWiki".

$WikiWordCount['PhD']=0; # Don't convert "PhD" $WikiWordCount['WikiWord']=5; # Convert WikiWord 5 times # the following lines keep a page from linking to itself $title = FmtPageName('$Title_',$pagename); $WikiWordCount[$title]=0;

%apply=item id=EnableRedirectQuiet?%$EnableRedirectQuiet
Enable the quiet=1 parameter for the redirect directive. On publicly edited wikis it is advisable not to enable quiet redirects.

$EnableRedirectQuiet = 0; # disable quiet redirects (default) $EnableRedirectQuiet = 1; # enable quiet redirects

%apply=item id=QualifyPatterns?%$QualifyPatterns
An array of regular expression replacements applied when text from one page is included in another, used by the function Qualify(). The two default patterns rewrite links like [[Page]] into [[Group/Page]], and page (text) variables like {$Title} into {Group.Page$Title} so that they work the same way in the source page and in the including page.

Categories: PmWiki Developer


This page may have a more recent version on pmwiki.org: PmWiki:LinkVariables, and a talk page: PmWiki:LinkVariables-Talk.

Valdemar.fr est un site personnel sur l'univers des Hérauts de Valdemar à but non commercial. Nous n'avons aucun lien avec Mercedes Lackey. Les textes ne sont pas libres de droit. Merci de prendre contact avec l'administrateur du site pour toute utilisation. Valdemar, une création de Mercedes Lackey. www.mercedeslackey.com