[pmwiki-users] Fox recipe major update

Hans design5 at softflow.co.uk
Tue Apr 3 08:52:12 CDT 2007


http://www.pmwiki.org/wiki/Cookbook/Fox

This is a major update to a new variable syntax:

This update requires all templates and forms to be modified!

* Change from {var} to {$$var} syntax to avoid conflicts with
other markup using braces, and in line with a proposed future PmWiki
core substitution variable syntax.

* Change from {date: ...} and {strftime: ...} syntax to new
{(function ...)} syntax, in line with a proposed future PmWiki
syntax for function markup.

* Better replacement pattern for Fox's core engine.

The discussion on the list yesterday convinced me it would be better
to use a different syntax for substitution variables and functio
variables, and adopt Pm's proposed syntax which he may in future
introduce for the same purposes. There should not arise a future
conflict, but it is rather an alignment. Even though Pm has not
introduced these variables yet, I think it better to make the switch
now, before the recipe gets used even wider. I know it is inconvenient
for existing installations.

By loading text content of affected template pages and pages with
Fox forms into a text editor and do a "Search and Replace" operation
with care, it can be done reasonably quick I belief (it took me half
an hour to update over ten pages on pmwiki.org).

The script itself is improved due to this step, special functions and
routines trying to allow other markup using braces, such as smilies
and others, are no longer needed. I also find the new syntax easier to
read, it is easier to spot substitution variables in the source text.

My apologies to Fox users who face extra work in this upgrade. I think
you will find it very worthwhile in the long run.

Please send your feedback, comments, questions etc. thanks!


  ~Hans   




More information about the pmwiki-users mailing list