https://www.jetphotos.com/photographer/598301 https://www.jetphotos.com/photographer/598304 https://www.jetphotos.com/photographer/598305 https://www.jetphotos.com/photographer/598307 https://www.jetphotos.com/photographer/598310 https://www.jetphotos.com/photographer/598312 https://www.jetphotos.com/photographer/598317 https://www.jetphotos.com/photographer/598318 https://www.jetphotos.com/photographer/598320 https://www.jetphotos.com/photographer/598321 https://www.jetphotos.com/photographer/598322 https://www.jetphotos.com/photographer/598324 https://www.jetphotos.com/photographer/598328 https://www.jetphotos.com/photographer/598340 https://www.jetphotos.com/photographer/598341 https://www.jetphotos.com/photographer/598346 https://www.jetphotos.com/photographer/598349 https://www.jetphotos.com/photographer/598357 https://www.jetphotos.com/photographer/598366 https://www.jetphotos.com/photographer/598372 https://www.jetphotos.com/photographer/598374 https://www.jetphotos.com/photographer/598378 https://www.jetphotos.com/photographer/600028 https://www.jetphotos.com/photographer/600031 https://www.jetphotos.com/photographer/600032 https://www.jetphotos.com/photographer/600034 https://www.jetphotos.com/photographer/600036 https://www.jetphotos.com/photographer/600037 https://www.jetphotos.com/photographer/600039 https://www.jetphotos.com/photographer/600041 https://www.jetphotos.com/photographer/600042 https://www.jetphotos.com/photographer/600045 https://www.jetphotos.com/photographer/600046 https://www.jetphotos.com/photographer/600047 https://www.jetphotos.com/photographer/600048 https://www.jetphotos.com/photographer/600050 https://www.jetphotos.com/photographer/600051 https://www.jetphotos.com/photographer/600052 https://www.jetphotos.com/photographer/600053 https://www.jetphotos.com/photographer/600055 https://www.jetphotos.com/photographer/600057 https://www.jetphotos.com/photographer/600641 https://www.jetphotos.com/photographer/600644 https://www.jetphotos.com/photographer/600645 https://www.jetphotos.com/photographer/600646 https://www.jetphotos.com/photographer/602231 https://www.jetphotos.com/photographer/602240 https://www.jetphotos.com/photographer/602244 https://www.jetphotos.com/photographer/602247 https://www.jetphotos.com/photographer/602261 https://www.jetphotos.com/photographer/602265 https://www.jetphotos.com/photographer/602279 https://www.jetphotos.com/photographer/602307 https://www.jetphotos.com/photographer/602315 https://www.jetphotos.com/photographer/602323 https://www.jetphotos.com/photographer/602340 https://www.jetphotos.com/photographer/602346 https://www.jetphotos.com/photographer/602741 https://www.jetphotos.com/photographer/602743 https://www.jetphotos.com/photographer/602744 https://www.jetphotos.com/photographer/602745 https://www.jetphotos.com/photographer/602746 https://www.jetphotos.com/photographer/602748 https://www.jetphotos.com/photographer/602749 https://www.jetphotos.com/photographer/602750 https://www.jetphotos.com/photographer/602757 https://www.jetphotos.com/photographer/602758 https://www.jetphotos.com/photographer/602762 https://www.jetphotos.com/photographer/602763 https://www.jetphotos.com/photographer/602764 https://www.jetphotos.com/photographer/602769 https://www.jetphotos.com/photographer/602770 https://www.jetphotos.com/photographer/602772 https://www.jetphotos.com/photographer/602773 https://www.jetphotos.com/photographer/602774 https://www.jetphotos.com/photographer/602775 https://www.jetphotos.com/photographer/601186 https://www.jetphotos.com/photographer/601188 https://www.jetphotos.com/photographer/601189 https://www.jetphotos.com/photographer/601191 https://www.jetphotos.com/photographer/601192 https://www.jetphotos.com/photographer/601194 https://www.jetphotos.com/photographer/601196 https://www.jetphotos.com/photographer/601197 https://www.jetphotos.com/photographer/601248 https://www.jetphotos.com/photographer/601249 https://www.jetphotos.com/photographer/601250 https://www.jetphotos.com/photographer/601251 https://www.jetphotos.com/photographer/601252 https://www.jetphotos.com/photographer/601254 https://www.jetphotos.com/photographer/601255 https://www.jetphotos.com/photographer/601256 https://www.jetphotos.com/photographer/601258 https://www.jetphotos.com/photographer/601260 https://www.jetphotos.com/photographer/601261 https://www.jetphotos.com/photographer/601263 https://www.jetphotos.com/photographer/601264 https://www.jetphotos.com/photographer/601265 https://www.jetphotos.com/photographer/601266 https://www.jetphotos.com/photographer/601267 https://www.jetphotos.com/photographer/601268 https://www.jetphotos.com/photographer/601269 https://www.jetphotos.com/photographer/601270 https://www.jetphotos.com/photographer/601272 https://www.jetphotos.com/photographer/601273 https://www.jetphotos.com/photographer/602779 https://www.jetphotos.com/photographer/602780 https://www.jetphotos.com/photographer/602781 https://www.jetphotos.com/photographer/602782 https://www.jetphotos.com/photographer/600111 https://www.jetphotos.com/photographer/600112 https://www.jetphotos.com/photographer/600148 https://www.jetphotos.com/photographer/600151 https://www.jetphotos.com/photographer/600155 https://www.jetphotos.com/photographer/600157 https://www.jetphotos.com/photographer/600159 https://www.jetphotos.com/photographer/600161 https://www.jetphotos.com/photographer/600163 https://www.jetphotos.com/photographer/600647 https://www.jetphotos.com/photographer/600648 https://www.jetphotos.com/photographer/600649 https://www.jetphotos.com/photographer/600650 https://www.jetphotos.com/photographer/602889 https://www.jetphotos.com/photographer/602890 https://www.jetphotos.com/photographer/602891 https://www.jetphotos.com/photographer/602895 https://www.jetphotos.com/photographer/602897 https://www.jetphotos.com/photographer/602900 https://www.jetphotos.com/photographer/602904 https://www.jetphotos.com/photographer/602907 https://www.jetphotos.com/photographer/602913 https://www.jetphotos.com/photographer/602916 https://www.jetphotos.com/photographer/602918 https://www.jetphotos.com/photographer/602922 https://www.jetphotos.com/photographer/602923 https://www.jetphotos.com/photographer/602925 https://www.jetphotos.com/photographer/602926 https://www.jetphotos.com/photographer/600534 https://www.jetphotos.com/photographer/600535 https://www.jetphotos.com/photographer/600536 https://www.jetphotos.com/photographer/600538 https://www.jetphotos.com/photographer/600539 https://www.jetphotos.com/photographer/600540 https://www.jetphotos.com/photographer/600542 https://www.jetphotos.com/photographer/600543 https://www.jetphotos.com/photographer/600544 https://www.jetphotos.com/photographer/600547 https://www.jetphotos.com/photographer/600548 https://www.jetphotos.com/photographer/600549 https://www.jetphotos.com/photographer/600550 https://www.jetphotos.com/photographer/600552 https://www.jetphotos.com/photographer/600553 https://www.jetphotos.com/photographer/600555 https://www.jetphotos.com/photographer/600558 https://www.jetphotos.com/photographer/600565 https://www.jetphotos.com/photographer/600566 https://www.jetphotos.com/photographer/600567 https://www.jetphotos.com/photographer/600568 https://www.jetphotos.com/photographer/600571 https://www.jetphotos.com/photographer/600573 https://www.jetphotos.com/photographer/600575 https://www.jetphotos.com/photographer/600576 https://www.jetphotos.com/photographer/600577 https://www.jetphotos.com/photographer/600578 https://www.jetphotos.com/photographer/600666 https://www.jetphotos.com/photographer/600668 https://www.jetphotos.com/photographer/600669 https://www.jetphotos.com/photographer/600670 https://www.jetphotos.com/photographer/602963 https://www.jetphotos.com/photographer/601276 https://www.jetphotos.com/photographer/601280 https://www.jetphotos.com/photographer/601281 https://www.jetphotos.com/photographer/601284 https://www.jetphotos.com/photographer/601285 https://www.jetphotos.com/photographer/601286 https://www.jetphotos.com/photographer/601287 https://www.jetphotos.com/photographer/601288 https://www.jetphotos.com/photographer/601291 https://www.jetphotos.com/photographer/601293 https://www.jetphotos.com/photographer/602776 https://www.jetphotos.com/photographer/602777 https://www.jetphotos.com/photographer/602955 https://www.jetphotos.com/photographer/602956 https://www.jetphotos.com/photographer/602957 https://www.jetphotos.com/photographer/602959 https://www.jetphotos.com/photographer/602960 https://www.jetphotos.com/photographer/602961 |
PmWiki /
Functionsadmins (advanced) This page describes some of the internal workings of PmWiki by explaining how some of the functions in 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 PSFT()
The Unlike PmWiki 2.3.0 uses this function in all cases where it previously used The old functions were deprecated by the PHP developers because they behaved inconsistently on different platforms, and were dependent on installed system locales (i.e. a language would only work if the system had its locale installed). The new function uses the PHP class IntlDateFormatter and should be better. Unfortunately, it is not always enabled by hosting providers. So depending on your installation, a specific language may be available with In addition, some rarely used shortcut percent-formats For these reasons, You can set in Since the
A difference between
For PmWiki, it seemed reasonable to make empty strings and other non-numeric values default to the current time. If your PSFT($format, intval($stamp)); pmtoken()
The Calling The name of the input element, by default 'pmtoken', can be changed by setting for example Calling Calling Calling pmcrypt()
The pmsetcookie()
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 PCCF() Deprecated since PHP 7.2
The The first argument is the PHP code to be evaluated. The second argument (optional) is the callback template, a key from the global
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).
See the PHP create function. PHP 7.2 deprecates '/(?<=^| )([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 PPRA()
The Since PmWiki 2.2.56, PmWiki uses this function to process the following arrays: 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 Previously, PmWiki used such constructs: It is now possible to use simply this: $fmt = PPRA(
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 '/(?<=^| )([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 For PHP 7.2 and newer, instead of using '/(?<=^| )([a-z])/' => ' my_callback',
PPRE() Deprecated since PHP 7.2
The Since PHP 5.5, the 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 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 Qualify()
PHSC()
The The The It should be safe for recipe developers to replace all calls to Unlike PSS()
The 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 ExampleThis is a fictitious example where <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 stripmagic()
This function should be used when processing the contents of The function can process arrays recursively (only the values are processed). FmtPageName()
Returns This is one of the major functions in PmWiki, see PmWiki.FmtPageName for lots of details. Markup()
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
Also see: PmWiki.CustomMarkup and Cookbook:Functions#Markup MarkupToHTML()
Converts the string ' !vspace ' removes <:vspace> after headings.
' <vspace><p> ' replaces <:vspace><p> with <p class='vspace'>
' <vspace> ' replaces <:vspace> with <div class='vspace'>
and finally
' ^<: ' removes any remaining <:vspace> , mostly from restored [=escaped text=].
Also see: Cookbook:Functions#MarkupToHTML mkdirp()
The function Lock()
This function is used to make sure only one instance of PmWiki is running when files are being written. It does not "lock pages" for editing. From a recipe, use:
If you don't release an acquired lock, it should be automatically released at the end of the processing. MakeLink()
The function 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 Also see: PmWiki:MakeLink and Cookbook:Functions#MakeLink MakeUploadName()
DownloadUrl()
This function returns the public URL of an attached file. The arguments are as follow:
If the file doesn't exist, the function returns false. The global variable The function calls The returned URL respects SessionAuth()
IsAuthorized()
CondAuth()
Note that $EnableDrafts = 1; $DefaultPasswords['publish'] = pmcrypt('secret'); include_once("$FarmD/scripts/draft.php"); if (! CondAuth($pagename, 'edit')) { /* whatever */ } Best is to use RetrieveAuthPage()
Pm words as said in https://www.pmwiki.org/pipermail/pmwiki-users/2005-April/012804.html where: The Use e.g. Passing 'ALWAYS' as the authorization level (instead of 'read', 'edit', etc.) will cause RetrieveAuthSection()
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()
InsertEditFunction()
This function makes it easy for recipe authors to insert a custom function in a specific position of the processing, see The first argument is the name of the new function. The second argument is the position where to place the new function, related to other edit functions? It can be:
The function will return true on success, and false on failure (when the specified position or existing function was not recognized). DisableSkinParts()
This function allows easy disabling of the skin sections header, footer, title, actions, and sidebars, like the corresponding directives DisableSkinParts('Left Header Footer Action Title'); ParseArgs()See Cookbook:ParseArgs. Redirect()PageIndexTerms()AsSpacedUTF8(), AsSpaced()
Categories: PmWiki Developer This page may have a more recent version on pmwiki.org: PmWiki:Functions, and a talk page: PmWiki:Functions-Talk. |