Cookbook /
PmWikiPlus-Talk
Summary: Talk page for PmWiki Plus.
Maintainer: simon
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.
Creating custom Markup Expressions
The array is used to register Markup Expressions for processing by PmWiki.
Each entry's key is the name of the Markup Expression.
The entry's value is the code to be evaluated for that expression. e.g.
$MarkupExpr
$MarkupExpr['fnmrkupexpr'] = 'mymrkupexprfunc()'; $MarkupExpr['cdmrkupexpr'] = 'PHP code';
When the expression is evaluated there are three parameter options that can be used:
$paramsis a simple string that contains all the text from the markup expression name to the closing brackets including leading and trailing spaces,
e.g.$MarkupExpr['myparams'] = 'myparams($params)';$argsis a simple array strings, space separated tokens from the markup expression's text string, actually this is the['']array returned byParseArgs(). Specific arguments can be used as parameters, parameters such askey='val'are not available.
e.g.$MarkupExpr['myargs'] = 'myargs($args[0], $args[1])';.$argpis the output from returned byParseArgs()with the standard entries for %['#'], %[''], %['+'], %['-']. Specific arguments can be used as parameters,
e.g.$MarkupExpr['myargp'] = 'myargp($argp['key'], $argp['ext'])';
Talk page for the PmWiki Plus recipe (users).