[pmwiki-users] {(...)} markup recipe available

Patrick R. Michaud pmichaud at pobox.com
Sun Apr 15 17:41:15 CDT 2007


On Sun, Apr 15, 2007 at 11:34:43PM +0100, Hans wrote:
> ...
> And I have been using this form all along, using a PV:
> 
> $FmtPV['$AccessCode'] = RandomAccess();
> function RandomAccess() {
>     return rand(100,999);
> }
> 
> A lot less code for the same work. I might as well stick with it,
> since  {(rand 100 999)}  is giving different numbers on the same page.

Still shorter:

    $FmtPV['$AccessCode'] = rand(100, 999);

Or if you really feel a need to use the {(...)} markup:

    $MarkupExpr['captcha'] = rand(100, 999);

Pm



More information about the pmwiki-users mailing list