[pmwiki-users] validating ZAP pagenames & (:pagelist:) problem?

Hans design5 at softflow.co.uk
Fri Mar 9 02:28:07 CST 2007


Friday, March 9, 2007, 7:14:39 AM, SteP wrote:

> The newpageboxplus recipe seems to use
> $base = MakePageName($pagename, $_REQUEST['base']);

## ResolvePageName "normalizes" a pagename based on the current
## settings of $DefaultPage and $PagePathFmt.  It's normally used
## during initialization to fix up any missing or partial pagenames.
function ResolvePageName($pagename) {
......

## MakePageName is used to convert a string $str into a fully-qualified
## pagename.  If $str doesn't contain a group qualifier, then 
## MakePageName uses $basepage and $PagePathFmt to determine the 
## group of the returned pagename.
function MakePageName($basepage, $str) {
......

Just two examples from pmwiki.php of Pm's wonderful notes explaining the
functions he wrote. Helped me many times to understand the inner
workings of pmwiki. Another very helpful feature of Pm's coding is the
use of sensible names in naming variables, not just Globals, but also
inside functions. A third the very careful choice of markup, which
should be both short and understandable, as it is aimed at users, not
developers.

I wish ZAP would be written like that, even if the code doubles or
triples in length, and would be released as OpenSource code.
Then people may get an understanding of it, and be able to use it
better, and develop implementations and offer help, so the burden of
helping others lies not on the Editor alone.



Hans




More information about the pmwiki-users mailing list