[pmwiki-users] Re: variables for customization

chr at home.se chr at home.se
Thu Jul 7 04:28:00 CDT 2005


On Thu, 7 Jul 2005, Patrick R. Michaud wrote:

> In order to produce its output, PmWiki has to do a variety of
> string substitutions:
>   1. Generating the full name, group, title, or url of a page
>      (other than the currently displayed page)
>   2. Substituting the values of global variables
>   3. Performing internationalization substitutions
>   4. Converting $ScriptUrl/$Group/$Name to $ScriptUrl?n=$Group.$Name
>      for sites that cannot handle PATH_INFO urls
>   5. Other substitutions needed by specific functions
> 
> PmWiki centralizes all of that substitute-a-dynamic-value-in-a-string 
> into the FmtPageName() subroutine.  Because some things are extremely
> dynamic, such as the url or group for an arbitrary page that
> is not the current one, those things cannot be simple global PHP 
> variables.  Or, if they do become global variables, they're 
> variables that cannot be trusted to hold a value for very long 
> because some other routine (that may happen to be formatting a
> string for a different page) will come along and change that
> global variable for whatever it happens to be doing.

I added the above to http://www.pmwiki.org/wiki/PmWiki/Functions
Btw... maybe FmtPageName() deserves a page of it's own?  If so, should it 
be PmWiki.FmtPageName, or should we have a separate group for internal 
pmwiki functions and variables (e.g. PmWikiInternals.FmtPageName)

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list