[pmwiki-users] Re: Re: Question about HTML output for link targets

Patrick R. Michaud pmichaud at pobox.com
Thu Feb 3 17:09:17 CST 2005


On Thu, Feb 03, 2005 at 11:31:27PM +0100, chr at home.se wrote:
> On Wed, 2 Feb 2005, Patrick R. Michaud wrote:
> > On Wed, Feb 02, 2005 at 06:43:08PM +0100, chr at home.se wrote:
> > > Maybe we should have to variables for referring to the 'script'? One that 
> > > always uses an external link and one that can be a relative link?
> > 
> > Perhaps.  I'm not a big fan of separate variables for basically the
> > same thing, as one has to then explain the difference.  But perhaps
> > $ScriptHostUrl would be a useful synonym.
> 
> Is something like '/wiki/pmwiki.php' really a URI? Maybe the variable
> actually should have been $ScriptPath?  

A URI without a (server) location and access scheme is called a 
"relative URI"  and is defined in section 5 of RFC 2396.  So yes,
it's still a URI.  :-)

URIs that are independent of the context in which the identifier is
used are called "absolute URIs".

> As for $ScriptHostUrl, do you mean
> that: $ScriptUrl could either be e.g. 'http://pmwiki.org/wiki/pmwiki.php',
> or simply 'wiki/pmwiki.php', whereas $ScriptHostUrl always starts with 
> 'http://...'?

It'd have to be '/wiki/pmwiki.php' to be relative, but yes, the idea
was that $ScriptHostUrl would always be absolute while $ScriptUrl could
be set either absolute or relative depending on the needs of the 
administrator.

PmWiki would likely default to a relative setting for $ScriptUrl, and
use $ScriptHostUrl in those places where it's known that relative uris
have caused trouble in the past (i.e., search forms, mailpost scripts,
etc.).

Pm



More information about the pmwiki-users mailing list