[pmwiki-users] variable returns domain name?

Patrick R. Michaud pmichaud at pobox.com
Fri Apr 13 10:05:08 CDT 2007


On Fri, Apr 13, 2007 at 08:37:09AM -0500, Tegan Dowling wrote:
> On 4/13/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >On Fri, Apr 13, 2007 at 07:33:44AM -0500, Tegan Dowling wrote:
> >>  I'm looking for a variable that will provide my site's domain name,
> >> stripped of the URL's "http://www.", so, for instance, on the PmWiki
> >
> >$FmtPV['$SiteDomain'] =
> >  "'" . preg_replace('!^\\w+://(www\.)?!', '', \$ScriptUrl) . "'";
> 
> Agreed:  Which would be the best Variables page of the docs for this?

It should probably go in as a cookbook recipe.  Or, it could be
another custom page variable.

Pm



More information about the pmwiki-users mailing list