Aktuelle Änderungen - Suchen:

PmWiki

pmwiki.org

edit SideBar

https://dados.ufrn.br/sv/user/xanax874 https://dados.ufrn.br/sv/user/xanor358 https://dados.ufrn.br/sv/user/valium924 https://dados.ufrn.br/sv/user/stesolid354 https://dados.ufrn.br/sv/user/ativan844 https://dados.ufrn.br/sv/user/stilnoct978 https://dados.ufrn.br/sv/user/ambien352 https://dados.ufrn.br/sv/user/tramadol326 https://dados.ufrn.br/sv/user/ritalin838 https://dados.ufrn.br/sv/user/adderall235 https://dados.ufrn.br/sv/user/concerta663 https://dados.ufrn.br/sv/user/elvanse932 https://dados.ufrn.br/sv/user/sonata824 https://dados.ufrn.br/sv/user/lunesta729 https://dados.ufrn.br/sv/user/modafinil390 https://dados.ufrn.br/sv/user/karisoprodol132 https://dados.ufrn.br/sv/user/midazolam325 https://dados.ufrn.br/sv/user/triazolam340 https://dados.ufrn.br/sv/user/temazepam392 https://dados.ufrn.br/sv/user/etizolam353 https://dados.ufrn.br/es/user/xanax875 https://dados.ufrn.br/es/user/trankimazin942 https://dados.ufrn.br/es/user/valium844 https://dados.ufrn.br/es/user/ativan323 https://dados.ufrn.br/es/user/orfidal388 https://dados.ufrn.br/es/user/stilnox748 https://dados.ufrn.br/es/user/ambien923 https://dados.ufrn.br/es/user/imovane530 https://dados.ufrn.br/es/user/tramadol284 https://dados.ufrn.br/es/user/adipex947 https://dados.ufrn.br/es/user/rivotril902 https://dados.ufrn.br/es/user/lexatin923 https://dados.ufrn.br/es/user/lexotan913 https://dados.ufrn.br/es/user/lyrica348 https://dados.ufrn.br/es/user/tapentadol240 https://dados.ufrn.br/es/user/ritalin737 https://dados.ufrn.br/es/user/adderall320 https://dados.ufrn.br/es/user/cytotec823 https://dados.ufrn.br/es/user/concerta552 https://dados.ufrn.br/es/user/rubifen325 https://dados.ufrn.br/es/user/elvanse934 https://dados.ufrn.br/es/user/sonata663 https://dados.ufrn.br/es/user/lunesta728 https://dados.ufrn.br/es/user/modafinilo492 https://dados.ufrn.br/es/user/carisoprodol249 https://dados.ufrn.br/es/user/midazolam349 https://dados.ufrn.br/es/user/triazolam934 https://dados.ufrn.br/es/user/temazepam234 https://dados.ufrn.br/es/user/etizolam428 https://dados.ufrn.br/it/user/xanax578 https://dados.ufrn.br/it/user/valium342 https://dados.ufrn.br/it/user/ativan991 https://dados.ufrn.br/it/user/tavor922 https://dados.ufrn.br/it/user/stilnox882 https://dados.ufrn.br/it/user/ambien576 https://dados.ufrn.br/it/user/imovane663 https://dados.ufrn.br/it/user/tramadolo249 https://dados.ufrn.br/it/user/adipex924 https://dados.ufrn.br/it/user/rivotril539 https://dados.ufrn.br/it/user/lexotan924 https://dados.ufrn.br/it/user/lyrica667 https://dados.ufrn.br/it/user/tapentadolo935 https://dados.ufrn.br/it/user/ritalin367 https://dados.ufrn.br/it/user/adderall848 https://dados.ufrn.br/it/user/cytotec892 https://dados.ufrn.br/it/user/concerta349 https://dados.ufrn.br/it/user/elvanse874 https://dados.ufrn.br/it/user/sonata842 https://dados.ufrn.br/it/user/lunesta922 https://dados.ufrn.br/it/user/modafinil220 https://dados.ufrn.br/it/user/carisoprodolo290 https://dados.ufrn.br/it/user/midazolam488 https://dados.ufrn.br/it/user/triazolam377 https://dados.ufrn.br/it/user/temazepam233 https://dados.ufrn.br/it/user/etizolam582 https://dados.ufrn.br/nl/user/xanax773 https://dados.ufrn.br/nl/user/valium928 https://dados.ufrn.br/nl/user/ativan327 https://dados.ufrn.br/nl/user/temesta684 https://dados.ufrn.br/nl/user/stilnoct934 https://dados.ufrn.br/nl/user/ambien750 https://dados.ufrn.br/nl/user/imovane569 https://dados.ufrn.br/nl/user/tramadol531 https://dados.ufrn.br/nl/user/tapentadol663 https://dados.ufrn.br/nl/user/rivotril437 https://dados.ufrn.br/nl/user/lexotanil495 https://dados.ufrn.br/nl/user/lyrica982 https://dados.ufrn.br/nl/user/adipex920 https://dados.ufrn.br/nl/user/cytotec847 https://dados.ufrn.br/nl/user/ritalin748 https://dados.ufrn.br/nl/user/adderall774 https://dados.ufrn.br/nl/user/concerta551 https://dados.ufrn.br/nl/user/elvanse982 https://dados.ufrn.br/nl/user/sonata628 https://dados.ufrn.br/nl/user/lunesta620 https://dados.ufrn.br/nl/user/modafinil538 https://dados.ufrn.br/nl/user/carisoprodol889 https://dados.ufrn.br/nl/user/midazolam235 https://dados.ufrn.br/nl/user/triazolam824 https://dados.ufrn.br/nl/user/temazepam302 https://dados.ufrn.br/nl/user/etizolam537 https://dados.ufrn.br/de/user/xanax573 https://dados.ufrn.br/de/user/valium139 https://dados.ufrn.br/de/user/ativan348 https://dados.ufrn.br/de/user/tavor563 https://dados.ufrn.br/de/user/stilnox890 https://dados.ufrn.br/de/user/ambien875 https://dados.ufrn.br/de/user/imovane738 https://dados.ufrn.br/de/user/tramadol982 https://dados.ufrn.br/de/user/tapentadol955 https://dados.ufrn.br/de/user/rivotril499 https://dados.ufrn.br/de/user/lexotanil942 https://dados.ufrn.br/de/user/lyrica981 https://dados.ufrn.br/de/user/adipex987 https://dados.ufrn.br/de/user/cytotec944 https://dados.ufrn.br/de/user/ritalin895 https://dados.ufrn.br/de/user/adderall903 https://dados.ufrn.br/de/user/xanax357 https://dados.ufrn.br/de/user/alprazolam130 https://dados.ufrn.br/de/user/valium847 https://dados.ufrn.br/de/user/diazepam299 https://dados.ufrn.br/de/user/ativan771 https://dados.ufrn.br/de/user/tavor135 https://dados.ufrn.br/de/user/lorazepam583 https://dados.ufrn.br/de/user/ambien532 https://dados.ufrn.br/de/user/stilnox350 https://dados.ufrn.br/de/user/zolpidem577 https://dados.ufrn.br/de/user/imovane883 https://dados.ufrn.br/de/user/zopiclon964 https://dados.ufrn.br/de/user/tramadol638 https://dados.ufrn.br/de/user/tapentadol236 https://dados.ufrn.br/de/user/rivotril368 https://dados.ufrn.br/de/user/clonazepam647 https://dados.ufrn.br/de/user/lexotanil445 https://dados.ufrn.br/de/user/bromazepam730 https://dados.ufrn.br/de/user/lyrica331 https://dados.ufrn.br/de/user/pregabalin682 https://dados.ufrn.br/de/user/adipex489 https://dados.ufrn.br/de/user/phentermin537 https://dados.ufrn.br/de/user/cytotec228 https://dados.ufrn.br/de/user/misoprostol355 https://dados.ufrn.br/de/user/ritalin325 https://dados.ufrn.br/de/user/concerta554 https://dados.ufrn.br/de/user/medikinet364 https://dados.ufrn.br/de/user/adderall605 https://dados.ufrn.br/de/user/elvanse356 https://dados.ufrn.br/de/user/modafinil479 https://dados.ufrn.br/fi/user/xanax588 https://dados.ufrn.br/fi/user/valium840 https://dados.ufrn.br/fi/user/ativan942 https://dados.ufrn.br/fi/user/temesta789 https://dados.ufrn.br/fi/user/rativor663 https://dados.ufrn.br/fi/user/stilnoct920 https://dados.ufrn.br/fi/user/ambien982 https://dados.ufrn.br/fi/user/imovane953 https://dados.ufrn.br/fi/user/tramadoli358 https://dados.ufrn.br/fi/user/tapentadoli532 https://dados.ufrn.br/fi/user/rivotril935 https://dados.ufrn.br/fi/user/rivatril942 https://dados.ufrn.br/fi/user/lexotanil955 https://dados.ufrn.br/fi/user/lyrica093 https://dados.ufrn.br/fi/user/adipex984 https://dados.ufrn.br/fi/user/cytotec354 https://dados.ufrn.br/fi/user/ritalin882 https://dados.ufrn.br/fi/user/adderall490 https://dados.ufrn.br/fi/user/concerta562 https://dados.ufrn.br/fi/user/elvanse856 https://dados.ufrn.br/fi/user/sonata782 https://dados.ufrn.br/fi/user/lunesta682 https://dados.ufrn.br/fi/user/modafiniili253 https://dados.ufrn.br/fi/user/karisoprodoli538 https://dados.ufrn.br/fi/user/midatsolaami835 https://dados.ufrn.br/fi/user/triatsolaami783 https://dados.ufrn.br/fi/user/tematsepaami856 https://dados.ufrn.br/fi/user/etitsolaami753 https://dados.ufrn.br/da_DK/user/xanax775 https://dados.ufrn.br/da_DK/user/valium858 https://dados.ufrn.br/da_DK/user/stesolid151 https://dados.ufrn.br/da_DK/user/ativan779 https://dados.ufrn.br/da_DK/user/stilnoct894 https://dados.ufrn.br/da_DK/user/ambien799 https://dados.ufrn.br/da_DK/user/imovane562 https://dados.ufrn.br/da_DK/user/tramadol559 https://dados.ufrn.br/da_DK/user/tapentadol537 https://dados.ufrn.br/da_DK/user/rivotril953 https://dados.ufrn.br/da_DK/user/lexotanil535 https://dados.ufrn.br/da_DK/user/bromam994 https://dados.ufrn.br/da_DK/user/lyrica944 https://dados.ufrn.br/da_DK/user/adipex995 https://dados.ufrn.br/da_DK/user/cytotec437 https://dados.ufrn.br/da_DK/user/ritalin746 https://dados.ufrn.br/da_DK/user/adderall538 https://dados.ufrn.br/da_DK/user/concerta527 https://dados.ufrn.br/da_DK/user/elvanse549 https://dados.ufrn.br/da_DK/user/sonata783 https://dados.ufrn.br/da_DK/user/lunesta268 https://dados.ufrn.br/da_DK/user/modafinil946 https://dados.ufrn.br/da_DK/user/carisoprodol122 https://dados.ufrn.br/da_DK/user/midazolam340 https://dados.ufrn.br/da_DK/user/triazolam942 https://dados.ufrn.br/da_DK/user/temazepam734 https://dados.ufrn.br/da_DK/user/etizolam520 https://dados.ufrn.br/pl/user/xanax548 https://dados.ufrn.br/pl/user/valium347 https://dados.ufrn.br/pl/user/ativan664 https://dados.ufrn.br/pl/user/tavor674 https://dados.ufrn.br/pl/user/stilnox883 https://dados.ufrn.br/pl/user/ambine732 https://dados.ufrn.br/pl/user/imovane240 https://dados.ufrn.br/pl/user/zimovane523 https://dados.ufrn.br/pl/user/tramadol984 https://dados.ufrn.br/pl/user/tapentadol249 https://dados.ufrn.br/pl/user/rivotril428 https://dados.ufrn.br/pl/user/lexotanil981 https://dados.ufrn.br/pl/user/lexotan426 https://dados.ufrn.br/pl/user/bromox924 https://dados.ufrn.br/pl/user/lyrica922 https://dados.ufrn.br/pl/user/adipex902 https://dados.ufrn.br/pl/user/cytotec872 https://dados.ufrn.br/pl/user/ritalin247 https://dados.ufrn.br/pl/user/adderall359 https://dados.ufrn.br/pl/user/concerta924 https://dados.ufrn.br/pl/user/elvanse952 https://dados.ufrn.br/pl/user/sonata539 https://dados.ufrn.br/pl/user/lunesta552 https://dados.ufrn.br/pl/user/modafinil357 https://dados.ufrn.br/pl/user/karizoprodol235 https://dados.ufrn.br/pl/user/midazolam110 https://dados.ufrn.br/pl/user/triazolam284 https://dados.ufrn.br/pl/user/temazepam357 https://dados.ufrn.br/pl/user/etizolam377 https://dados.ufrn.br/cs_CZ/user/xanax377 https://dados.ufrn.br/cs_CZ/user/valium859 https://dados.ufrn.br/cs_CZ/user/ativan462 https://dados.ufrn.br/cs_CZ/user/stilnox824 https://dados.ufrn.br/cs_CZ/user/stilnoct843 https://dados.ufrn.br/cs_CZ/user/ambien134 https://dados.ufrn.br/cs_CZ/user/imovane504 https://dados.ufrn.br/cs_CZ/user/tramadol359 https://dados.ufrn.br/cs_CZ/user/tapentadol935 https://dados.ufrn.br/cs_CZ/user/rivotril834 https://dados.ufrn.br/cs_CZ/user/lexotanil358 https://dados.ufrn.br/cs_CZ/user/lyrica943 https://dados.ufrn.br/cs_CZ/user/adipex955 https://dados.ufrn.br/cs_CZ/user/cytotec940 https://dados.ufrn.br/cs_CZ/user/ritalin788 https://dados.ufrn.br/cs_CZ/user/adderall326 https://dados.ufrn.br/cs_CZ/user/concerta873 https://dados.ufrn.br/cs_CZ/user/elvanse523 https://dados.ufrn.br/cs_CZ/user/sonata642 https://dados.ufrn.br/cs_CZ/user/lunesta593 https://dados.ufrn.br/cs_CZ/user/modafinil359 https://dados.ufrn.br/cs_CZ/user/carisoprodol158 https://dados.ufrn.br/cs_CZ/user/midazolam105 https://dados.ufrn.br/cs_CZ/user/triazolam924 https://dados.ufrn.br/cs_CZ/user/temazepam942 https://dados.ufrn.br/cs_CZ/user/etizolam829 https://dados.ufrn.br/pt_BR/user/xanax358 https://dados.ufrn.br/pt_BR/user/valium548 https://dados.ufrn.br/pt_BR/user/ativan842 https://dados.ufrn.br/pt_BR/user/lorenin358 https://dados.ufrn.br/pt_BR/user/ambien359 https://dados.ufrn.br/pt_BR/user/stilnox627 https://dados.ufrn.br/pt_BR/user/cymerion325 https://dados.ufrn.br/pt_BR/user/imovane552 https://dados.ufrn.br/pt_BR/user/tramadol239 https://dados.ufrn.br/pt_BR/user/tapentadol358 https://dados.ufrn.br/pt_BR/user/rivotril478 https://dados.ufrn.br/pt_BR/user/lexotan823 https://dados.ufrn.br/pt_BR/user/bromalex932 https://dados.ufrn.br/pt_BR/user/lyrica920 https://dados.ufrn.br/pt_BR/user/adipex929 https://dados.ufrn.br/pt_BR/user/cytotec828 https://dados.ufrn.br/pt_BR/user/ritalin881 https://dados.ufrn.br/pt_BR/user/adderall298 https://dados.ufrn.br/fr/user/alprazolam753 https://dados.ufrn.br/fr/user/diazepam744 https://dados.ufrn.br/fr/user/lorazepam239 https://dados.ufrn.br/fr/user/zolpidem482 https://dados.ufrn.br/fr/user/tramadol389 https://dados.ufrn.br/fr/user/bromazepam845 https://dados.ufrn.br/de/user/alprazolam667 https://dados.ufrn.br/de/user/diazepam993 https://dados.ufrn.br/de/user/lorazepam538 https://dados.ufrn.br/de/user/zolpidem313 https://dados.ufrn.br/de/user/tramadol235 https://dados.ufrn.br/de/user/bromazepam359 https://dados.ufrn.br/es/user/alprazolam539 https://dados.ufrn.br/es/user/diazepam352 https://dados.ufrn.br/es/user/lorazepam464 https://dados.ufrn.br/es/user/tramadol694 https://dados.ufrn.br/es/user/bromazepam834 https://dados.ufrn.br/it/user/alprazolam745 https://dados.ufrn.br/it/user/diazepam538 https://dados.ufrn.br/it/user/lorazepam350 https://dados.ufrn.br/it/user/zolpidem883 https://dados.ufrn.br/it/user/tramadolo771 https://dados.ufrn.br/it/user/bromazepam839 https://dados.ufrn.br/nl/user/alprazolam388 https://dados.ufrn.br/nl/user/diazepam667 https://dados.ufrn.br/nl/user/lorazepam358 https://dados.ufrn.br/nl/user/zolpidem119 https://dados.ufrn.br/nl/user/tramadol992 https://dados.ufrn.br/nl/user/bromazepam450 https://dados.ufrn.br/fi/user/alpratsolaami352 https://dados.ufrn.br/fi/user/diatsepaami889 https://dados.ufrn.br/fi/user/lorasepaami774 https://dados.ufrn.br/fi/user/tsolpideemi880 https://dados.ufrn.br/fi/user/tramadoli257 https://dados.ufrn.br/fi/user/bromatsepaami350 https://dados.ufrn.br/da_DK/user/alprazolam557 https://dados.ufrn.br/da_DK/user/diazepam429 https://dados.ufrn.br/da_DK/user/lorazepam248 https://dados.ufrn.br/da_DK/user/zolpidem250 https://dados.ufrn.br/da_DK/user/tramadol536 https://dados.ufrn.br/da_DK/user/bromazepam753 https://dados.ufrn.br/pt_BR/user/alprazolam724 https://dados.ufrn.br/pt_BR/user/diazepam428 https://dados.ufrn.br/pt_BR/user/lorazepam537 https://dados.ufrn.br/pt_BR/user/zolpidem166 https://dados.ufrn.br/pt_BR/user/tramadol592 https://dados.ufrn.br/pt_BR/user/bromazepam953 https://dados.ufrn.br/pl/user/alprazolam935 https://dados.ufrn.br/pl/user/diazepam530 https://dados.ufrn.br/pl/user/lorazepam359 https://dados.ufrn.br/pl/user/zolpidem554 https://dados.ufrn.br/pl/user/tramadol588 https://dados.ufrn.br/pl/user/bromazepam247 https://dados.ufrn.br/cs_CZ/user/alprazolam357 https://dados.ufrn.br/cs_CZ/user/diazepam635 https://dados.ufrn.br/cs_CZ/user/lorazepam188 https://dados.ufrn.br/cs_CZ/user/zolpidem350 https://dados.ufrn.br/cs_CZ/user/tramadol135 https://dados.ufrn.br/cs_CZ/user/bromazepam349 https://dados.ufrn.br/sv/user/oxycontin935 https://dados.ufrn.br/sv/user/oxynorm892 https://dados.ufrn.br/sv/user/piracetam420 https://dados.ufrn.br/sv/user/hydrokodon135 https://dados.ufrn.br/fr/user/oxycontin315 https://dados.ufrn.br/fr/user/oxynorm924 https://dados.ufrn.br/fr/user/piracetam913 https://dados.ufrn.br/fr/user/hydrocodone246 https://dados.ufrn.br/de/user/oxycontin913 https://dados.ufrn.br/de/user/oxygesic248 https://dados.ufrn.br/de/user/piracetam035 https://dados.ufrn.br/de/user/hydrocodon136 https://dados.ufrn.br/it/user/oxycontin591 https://dados.ufrn.br/it/user/oxynorm913 https://dados.ufrn.br/it/user/piracetam952 https://dados.ufrn.br/it/user/idrocodone335 https://dados.ufrn.br/es/user/oxycontin981 https://dados.ufrn.br/es/user/oxynorm518 https://dados.ufrn.br/es/user/piracetam843 https://dados.ufrn.br/es/user/hidrocodona527 https://dados.ufrn.br/nl/user/oxycontin357 https://dados.ufrn.br/nl/user/oxynorm752 https://dados.ufrn.br/nl/user/oxycodon428 https://dados.ufrn.br/nl/user/piracetam951 https://dados.ufrn.br/nl/user/hydrocodon362

Functions

admins (advanced)

This page describes some of the internal workings of PmWiki by explaining how some of the functions in pmwiki.php work. For a more brief list/overview on functions useful to for instance cookbook writers, see Cookbook:Functions.

To use this functions you have to make sure that all relevant internal variables have been initialized correctly. See Custom Markup and Custom Actions for more information on how these functions are typically called via Markup() or $HandleActions[].

pmcrypt($password, $salt = null)

The pmcrypt() function is intended to be a safe replacement for the PHP 5.6+ crypt() function without providing a $salt, which would raise a notice. If a salt is provided, crypt() is called to check an existing password. If a salt is not provided, password_hash() will be called to create a cryptographically strong password hash.

pmsetcookie($name, $val="", $exp=0, $path="", $dom="", $secure=null, $httponly=null)

This function is intended as a replacement for setcookie(). It will automatically set the $secure and $httponly arguments if they are not set by the caller function and if $EnableCookieSecure and $EnableCookieHTTPOnly are enabled.

PCCF($php_code, $callback_template='default', $callback_arguments = '$m') Deprecated since PHP 7.2

The PCCF() function (PmWiki Create Callback Function) can be used to create callback functions used with preg_replace_callback. It is required for PHP 5.5, but will also work with earlier PHP versions.

The first argument is the PHP code to be evaluated.

The second argument (optional) is the callback template, a key from the global $CallbackFnTemplates array. There are two templates that can be used by recipe authors:

  • 'default' will pass $php_code as a function code
  • 'return' will wrap $php_code like "return $php_code;" (since PmWiki 2.2.62)

The third argument (optional) is the argument of the callback function. Note that PmWiki uses the '$m' argument to pass the matches of a regular expression search, but your function can use other argument(s).

PCCF() will create an anonymous (lambda) callback function containing the supplied code, and will cache it. On subsequent calls with the same $php_code, PCCF() will return the cached function name.

See http://php.net/create_function.

PHP 7.2 deprecates create_function() and future versions will remove it. If you need to migrate older code that used PCCF(), you can usually write regular functions and pass the function name where you previously passed the result of PCCF(). For example, suppose you had a pattern like this:

  '/(?<=^| )([a-z])/' => PCCF("return strtoupper(\$m[1]);"),

For PHP 7.2 compatibility, you can write a callback function:

  function my_callback($m) { return strtoupper($m[1]); }

then change the pattern to look like this:

  '/(?<=^| )([a-z])/' => 'my_callback',

See also: the recipe PccfToPcfOverride allows existing recipes to run on PHP 7 without causing deprecated create_function() messages.

PPRA($array_search_replace, $string)

The PPRA() function (PmWiki preg_replace array) can be used to perform a regular expression replacement with or without evaluation, for PHP 5.5 compatibility.

Since PmWiki 2.2.56, PmWiki uses this function to process the following arrays: $MakePageNamePatterns, $FmtP, $QualifyPatterns, $ROEPatterns, $ROSPatterns, $SaveAttrPatterns, $MakeUploadNamePatterns. Any custom settings should continue to work for PHP 5.4 and earlier, but wikis running on PHP 5.5 may need to make a few changes.

The first argument contains the 'search'=>'replace' pairs, the second is the "haystack" string to be manipulated.

The 'replace' parts of the array can be strings or function names. If the 'replace' part is a callable function name, it will be called with the array of matches as a first argument via preg_replace_callback(). If not a callable function, a simple preg_replace() will be performed.

Previously, PmWiki used such constructs:

  $fmt = preg_replace(array_keys($FmtP), array_values($FmtP), $fmt);

It is now possible to use simply this:

  $fmt = PPRA($FmtP, $fmt);

Note that since PHP 5.5, the search patterns cannot have an /e evaluation flag. When creating the $array_search_replace array, before PHP 5.5 we could use something like (eg. for $MakePageNamePatterns):

  '/(?<=^| )([a-z])/e' => "strtoupper('$1')",

Since PHP 5.5, we should use this (will also work in PHP 5.4 and earlier):

  '/(?<=^| )([a-z])/' => PCCF("return strtoupper(\$m[1]);"),

Note that the /e flag should be now omitted, instead of '$0', '$1', '$2', we should use $m[0], $m[1], $m[2], etc. in the replacement code, and there is no need to call PSS() in the replacement code, as backslashes are not automatically added.

For PHP 7.2 and newer, instead of using PCCF() to create anonymous functions, we add a real function in our add-on, and then pass the function name as the pattern replacement (see example at PCCF, which will also work on PHP 4 and 5):

  '/(?<=^| )([a-z])/' => 'my_callback',

PPRE($search_pattern, $replacement_code, $string) Deprecated since PHP 7.2

The PPRE() function (PmWiki preg_replace evaluate) can be used to perform a regular expression replacement with evaluation.

Since PHP 5.5, the preg_replace() function has deprecated the /e evaluation flag, and displays warnings when the flag is used. The PPRE() function automatically creates a callback function with the replacement code and calls it.

Before PHP 5.5, it was possible to use such calls:

  $fmt = preg_replace('/\\$([A-Z]\\w*Fmt)\\b/e','$GLOBALS["$1"]',$fmt);

Since PHP 5.5, it is possible to replace the previous snippet with the following (also works before PHP 5.5):

  $fmt = PPRE('/\\$([A-Z]\\w*Fmt)\\b/','$GLOBALS[$m[1]]',$fmt);

Note that the /e flag should be now omitted, instead of '$0', '$1', '$2', we should use $m[0], $m[1], $m[2], etc. in the replacement code, and there is no need to call PSS() in the replacement code, as backslashes are not automatically added.

For PHP 7.2 and newer, calling this function will raise "deprecated" notices. You need to rewrite your code to use preg_replace_callback, by moving the code into real functions:

  $fmt = preg_replace_callback('/\\$([A-Z]\\w*Fmt)\\b/', 'my_global_var_callback',$fmt);
  function my_global_var_callback($m) { return $GLOBALS[$m[1]]; }

instead of using PCCF() to create anonymous functions, we add a real function in our add-on, and then pass the function name as the pattern replacement (see example at PCCF, which will also work on PHP 4 and 5):

  '/(?<=^| )([a-z])/' => 'my_callback',

Qualify($pagename, $text)

Qualify() applies $QualifyPatterns to convert relative links and references into absolute equivalents. This function is called by usual wiki markups that include text from other pages. It will 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. See also $QualifyPatterns and RetrieveAuthSection().

PHSC($string_or_array, $flags=ENT_COMPAT, $encoding=null, $double_encode=true)

The PHSC() function (PmWiki HTML special characters) is a replacement for the PHP function htmlspecialchars.

The htmlspecialchars() function was modified since PHP 5.4 in two ways: it now requires a valid string for the supplied encoding, and it changes the default encoding to UTF-8. This can cause sections of the page to become blank/empty on many sites using the ISO-8859-1 encoding without having set the third argument ($encoding) when calling htmlspecialchars().

The PHSC() function calls htmlspecialchars() with an 8-bit encoding as third argument, whatever the encoding of the wiki (unless you supply an encoding). This way the string never contains invalid characters.

It should be safe for recipe developers to replace all calls to htmlspecialchars() with calls to PHSC(). Only the first argument is required when calling PHSC(), although authors may wish to call PHSC($string_or_array, ENT_QUOTES).

Unlike htmlspecialchars(), the PHSC() function can process arrays recursively (only the values are converted, not the keys of the array).

PSS($string)

The PSS() function (PmWiki Strip Slashes) removes the backslashes that are automatically inserted in front of quotation marks by the /e option of PHP's preg_replace function. PSS() is most commonly used in replacement arguments to Markup(), when the pattern specifies /e and one or more of the parenthesized subpatterns could contain a quote or backslash. ("PSS" stands for "PmWiki Strip Slashes".)

From PM: PmWiki expects PSS() to always occur inside of double-quoted strings and to contain single quoted strings internally. The reason for this is that we don't want the $1 or $2 to accidentally contain characters that would then be interpreted inside of the double-quoted string when the PSS is evaluated.
Markup('foo', 'inline', '/(something)/e', 'Foo(PSS("$1"))'); # wrong
Markup('foo', 'inline', '/(something)/e', "Foo(PSS('$1'))"); # right

Note, the extra slashes are only added by preg_replace with an /e modifier. The markup definitions with Markup_e() do NOT need to use PSS() in the replacement strings. The new-type markup definitions with Markup() and a simple function name as a replacement do NOT need to use PSS() inside the replacement function. If you migrate old markup rules to the new format, delete the PSS() calls.

Example

This is a fictitious example where PSS() should be used. Let us assume that you wish to define a directive (:example:) such that (:example "A horse":) results in the HTML

<div>"A horse"</div>.

Here is how the markup rule can be created:

Markup('example', 'directives',
       '/\\(:example\\s(.*?):\\)/e',
       "Keep('<div>'.PSS('$1').'</div>')");

We need to use PSS() around the '$1' because the matched text could contain quotation marks, and the /e will add backslashes in front of them.

stripmagic($string)

This function should be used when processing the contents of $_POST or _GET variables when they could contain quotes or backslashes. It verifies get_magic_quotes(), if true, strips the automatically inserted escapes from the string.

The function can process arrays recursively (only the values are processed).

FmtPageName($fmt, $pagename)

Returns $fmt, with $variable and $[internationalisation] substitutions performed, under the assumption that the current page is pagename. See PmWiki.Variables for an (incomplete) list of available variables, PmWiki.Internationalizations for internationalisation. Security: not to be run on user-supplied data.

This is one of the major functions in PmWiki, see PmWiki.FmtPageName for lots of details.

Markup($name, $when, $pattern, $replace)

Adds a new markup to the conversion table. Described in greater detail at PmWiki.CustomMarkup.

This function is used to insert translation rules into the PmWiki's translation engine. The arguments to Markup() are all strings, where:

$name
The string names the rule that is inserted. If a rule of the same name already exists, then this rule is ignored.
$when
This string is used to control when a rule is to be applied relative to other rules. A specification of "<xyz" says to apply this rule prior to the rule named "xyz", while ">xyz" says to apply this rule after the rule "xyz". See CustomMarkup for more details on the order of rules.
$pattern
This string is a regular expression that is used by the translation engine to look for occurences of this rule in the markup source.
$replace
This string will replace the matched text when a match occurs, or the function name that will return the replacement text.

Also see: PmWiki.CustomMarkup and Cookbook:Functions#Markup

MarkupToHTML($pagename, $str)

Converts the string $str containing PmWiki markup into the corresponding HTML code, assuming the current page is $pagename.

Also see: Cookbook:Functions#MarkupToHTML

mkdirp($dir)

The function mkdirp($dir) creates a directory, $dir, if it doesn't already exist, including any parent directories that might be needed. For each directory created, it checks that the permissions on the directory are sufficient to allow PmWiki scripts to read and write files in that directory. This includes checking for restrictions imposed by PHP's safe_mode setting. If mkdirp() is unable to successfully create a read/write directory, mkdirp() aborts with an error message telling the administrator the steps to take to either create $dir manually or give PmWiki sufficient permissions to be able to do it.

MakeLink($pagename, $target, $txt, $suffix, $fmt)

The function MakeLink($pagename, $target, $txt, $suffix, $fmt) returns an html-formatted anchor link. Its arguments are as follows:

 $pagename is the source page
 $target is where the link should go
 $txt is the value to use for '$LinkText' in the output 
 $suffix is any suffix string to be added to $txt
 $fmt is a format string to use

If $txt is NULL or not specified, then it is automatically computed from $target.

If $fmt is NULL or not specified, then MakeLink uses the default format as specified by the type of link. For page links this means the $LinkPageExistsFmt and $LinkPageCreateFmt variables, for intermap-style links it comes from either the $IMapLinkFmt array or from $UrlLinkFmt. Inside of the formatting strings, $LinkUrl is replaced by the resolved url for the link, $LinkText is replaced with the appropriate text, and $LinkAlt is replaced by any "title" (alternate text) information associated with the link.

Also see: PmWiki:MakeLink and Cookbook:Functions#MakeLink

MakeUploadName($pagename, $x)

MakeUploadName() simply takes a string $x (representing an attachment's name) and converts it to a valid name by removing any unwanted characters. It also requires the name to begin and end with an alphanumeric character, and as of 2.0.beta28 it forces any file extensions to lowercase. This function is defined in scripts/upload.php and only used when uploads are enabled.

SessionAuth($pagename, $auth=NULL)

SessionAuth() manages keeping authentication via cookie-sessions. Session contains ever password or vaidated id and associated groups from previous calls.It adds elements passed by $auth to session. It also writes every element saved in session to $AuthPw(passwords) and $AuthList(ids and groups).

IsAuthorized($chal, $source, &$from)

IsAuthorized takes a pageattributesstring (e. g. "id:user1 $1$Ff3w34HASH...") in $chal. $source is simply returned and used for building the authcascade (pageattributes - groupattributes - $DefaultPassword). $from will be returned if $chal is empty, because it is not checked before calling IsAuthorized(), this is needed for the authcascade. IsAuthorized() returns an array with three values: $auth 1 - authenticated, 0 - not authenticated, -1 - refused; $passwd; $source from the parameter list.

CondAuth ($pagename, 'auth level')

CondAuth implements the ConditionalMarkup for (:if auth level:). For instance CondAuth($pagename,'edit') is true if authorization level is 'edit'. Use inside local configuration files to build conditionals with a check of authorization level, similar to using (:if auth level:) on a wiki page.

Note that CondAuth() should be called after all authorization levels and passwords have been defined. For example, if you use it with Drafts, you should include the draft.php script before calling CondAuth():

   $EnableDrafts = 1;
   $DefaultPasswords['publish'] = pmcrypt('secret');
   include_once("$FarmD/scripts/draft.php");
   if (! CondAuth($pagename, 'edit')) { /* whatever */ }

Best is to use CondAuth() near the bottom of your config.php script.

RetrieveAuthPage($pagename, $level, $authprompt=true, $since=0)

Pm words as said in http://article.gmane.org/gmane.comp.web.wiki.pmwiki.user/12493/match=retrieveauthpage%% where:

   $pagename   - name of page to be read
   $level      - authorization level required (read/edit/auth/upload)
   $authprompt - true if user should be prompted for a password if needed
   $since      - how much of the page history to read
                 0 == read entire page including all of history
                 READPAGE_CURRENT == read page without loading history
                 timestamp == read history only back through timestamp

The $since parameter allows PmWiki to stop reading from a page file as soon as it has whatever information is needed -- i.e., if an operation such as browsing isn't going to need the page's history, then specifying READPAGE_CURRENT can result in a much faster loading time. (This can be especially important for things such as searching and page listings.) However, if combined with UpdatePage, the updated page will have no history.

Use e.g. $page = @RetrieveAuthPage('Main.MyPage', 'read') to obtain a page object that contains all the information of the correspondent file in separate keys, e.g. $page['text'] will contain a string with the current wiki markup of Main.MyPage. Use this generally in preference to the alternative function ReadPage($pagename, $since=0) since it respects the authorisation of the user, i.e. it checks the authorisation level before loading the page, or it can be set to do so. ReadPage() reads a page regardless of permission.

Passing 'ALWAYS' as the authorization level (instead of 'read', 'edit', etc.) will cause RetrieveAuthPage to always read and return the page, even if it happens to be protected by a read password.

RetrieveAuthSection($pagename, $pagesection, $list=NULL, $auth='read')

RetrieveAuthSection extracts a section of text from a page. If $pagesection starts with anything other than '#', the text before the first '#' (or all of it, if there is no '#') identifies the page to extract text from. Otherwise RetrieveAuthSection looks in the pages given by $list (should be an array), or in $pagename if $list is not specified.

  • The selected page is placed in the global $RASPageName variable.
  • The caller is responsible for calling Qualify() as needed, i.e. if you need to control how unqualified page and variable names shall be resolved.
    • To have them act as in the original text, let Qualify() resolve them relative to the source page.
    • If the imported text was not meant as wikitext but as some other kind of markup that might happen to contain double pairs of square brackets, or dollar signs inside curly brackets, you probably don't want to Qualify() them. If you output them into wikitext, you'll probably need to Keep() the text (in case of HTML, XML, RSS or similar output, PHSC() first!), to prevent later stages of processing from interpreting the apparent wiki markups in context of the target page.
    • If your code produces wikitext for an auxiliary page that is meant to be included by another page higher up in the inclusion chain, and want links and variables to work as if they were in the auxiliary page, use the auxiliary page's "GroupName.PageName" as the $pagename argument for Qualify().

Provides a way to limit the array that is returned by ReadPage, so that it only pulls the content up to a specific section marker. For example, pulling from start of page to '##blogend':

function FeedText($pagename, &$page, $tag) {
  $text = RetrieveAuthSection($pagename, '##blogend');
  $content = MarkupToHTML($pagename, $text);
  return "<$tag><![CDATA[$content]]></$tag>";
}

The '##blogend' argument says to read from the beginning of the page to just before the line containing the marker. See IncludeOtherPages for more information about the section specifications.

This version won't read text from pages that are read-protected; if you want to get text even from read-protected pages, then

  $text = RetrieveAuthSection($pagename, '##blogend', NULL, 'ALWAYS');

UpdatePage($pagename, $old (page object), $new (page object));

More Technical Notes

UpdatePage() allows cookbook recipes to mimic the behavior of editing wiki pages via the browser. Internally, PmWiki does several house keeping tasks which are accessible via this function (preserving history/diff information, updating page revision numbers, updating RecentChanges pages, sending email notifications, etc._

  • "Page object" refers to an array pulled from RetrieveAuthPage($pagename, $level, $authprompt=true, $since=0); (preferred), or ReadPage($pagename); (disregards page security). Note that $new['text'] should contain all page data for the new version of the page.
  • If a page doesn't exist, UpdatePage() will attempt to create it.
  • Ignoring $old (e.g. UpdatePage($pagename, '', $new);) will erase all historical page data---a tabula rasa.
    • If you retrieved $old using RetrieveAuthPage($pagename,$auth,$prompt,READPAGE_CURRENT) and set $new=$old, then UpdatePage will also erase all historical data

UpdatePage() cannot be called directly from config.php because there are necessary initializations which occur later in pmwiki.php. It is not enough to just load stdconfig.php. If you want to use UpdatePage() you will need to do it within a custom markup, a custom markup expression, or a custom action.

Categories: PmWiki Developer


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

Bearbeiten - Versionen - Druckansicht - Aktuelle Änderungen - Suchen
Zuletzt geändert am 30.08.2019 12:32 Uhr