Questions answered by this recipe
How can I add basic captcha capabilities to my wiki?
How can I tell how many pages there are in a group?
How can I get a thread number for some group?
How can I display a CSV list, nicely formatted?
How can I show markup from a page or section of a page?
How can I get server variable information from a visitor?
How it works:
Below are some of the extensions (and some page variables) that are available to you if you install this recipe.
|Number of pages in current group, or if specified another group. Use a | to begin a list of CSV excluded page names.|
|Thread for current group, or if specified another group. Highest number page in the group +1|
|Random number between 10000 and 99999, all after instances on same page return the same number. Add two numbers if you want to change the range.|
|Returns 8.75. Can take any basic math expression. Accepted characters configurable|
|Changes to (:pagelist group=Main:) and executes. Can be stored in a hidden text variable. Default allowed directives include: table, tableend, cell, cellnr, include, if, pagelist, input, messages, redirect, title. Can also be configured to include ZAP forms.|
|Returns source code for that page, and that section if specified. Use the included (:textarea:) markup to prefill the source into a textarea. Put a + before Group.Name to eliminate trailing textarea.|
|Returns ip address of visitor. Other var's available include $ReturnLink (referrer link), $Browser, and $DomainName.|
|Converts the CSV text var mylist into a nicely formatted list of links to their profile pages. Can be configured however you want.|
|Returns keywords for a page (to match $Title & $Description) and if authorized, the $PasswdEdit, $PasswdRead attributes for current page. Add a pagename parameter to return the attributes of a different page.|
|Returns a random number between 1 and 6|
|Returns current unix timestamp.|
There may be some other things I left out...
As the markup expressions are all processed just after page and text variables, page and text variables can be used in them. Because it is processed just before conditionals and other directives, it can be used in them. Also, MarkupExpressions allow for nice chaining of these functions! Have fun...
- Caveman Click here to learn more about the story behind this recipe...
- Many others who have suggested countless ideas along the way.
See Discussion at MarkupExpressionsExtensions-Talk