On Fri, 13 Apr 2007, Patrick R. Michaud wrote:

Is there such a animal, and if not is it possible to create a custom one?

$FmtPV['$SiteDomain'] =
 "'" . preg_replace('!^\\w+://(www\.)?!', '', \$ScriptUrl) . "'";

After this you can use {$SiteDomain} to get the site's domain name stripped of any leading "www." .

Just a comment that the above does not work if you've set $ScriptUrl to e.g. '/'. (Or have we said that $ScritpUrl is always a full/complete URI?)

/Christian

--
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr
_______________________________________________
pmwiki-users mailing list
[EMAIL PROTECTED]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to