Re: [pmwiki-users] variable returns domain name?

2007-04-14 Thread Kathryn Andersen
On Sat, Apr 14, 2007 at 02:38:42PM +0200, [EMAIL PROTECTED] wrote: > 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) . "'

Re: [pmwiki-users] variable returns domain name?

2007-04-14 Thread Kathryn Andersen
On Sun, Apr 15, 2007 at 12:12:04AM +0200, [EMAIL PROTECTED] wrote: > On Sat, 14 Apr 2007, Patrick R. Michaud wrote: > > >$ScriptUrl must always be a complete uri. If it's set to a relative uri > >reference, then PmWiki produces incomplete references in redirects, RSS > >feeds, various forms, an

Re: [pmwiki-users] variable returns domain name?

2007-04-14 Thread christian . ridderstrom
On Sat, 14 Apr 2007, Patrick R. Michaud wrote: $ScriptUrl must always be a complete uri. If it's set to a relative uri reference, then PmWiki produces incomplete references in redirects, RSS feeds, various forms, and a few other places. For the rest of the readers. If you don't use the funct

Re: [pmwiki-users] variable returns domain name?

2007-04-14 Thread Patrick R. Michaud
On Sat, Apr 14, 2007 at 02:38:42PM +0200, [EMAIL PROTECTED] wrote: > 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) . "'

Re: [pmwiki-users] variable returns domain name?

2007-04-14 Thread christian . ridderstrom
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 an

Re: [pmwiki-users] variable returns domain name?

2007-04-13 Thread Patrick R. Michaud
On Fri, Apr 13, 2007 at 04:15:30PM +0100, Hans wrote: > Friday, April 13, 2007, 4:05:08 PM, Patrick wrote: > > > It should probably go in as a cookbook recipe. Or, it could be > > another custom page variable. > > Perhaps we can have a Cookbook.CustomPageVariables page. > > Some of Cookbook.Mor

Re: [pmwiki-users] variable returns domain name?

2007-04-13 Thread Hans
Friday, April 13, 2007, 4:05:08 PM, Patrick wrote: > It should probably go in as a cookbook recipe. Or, it could be > another custom page variable. Perhaps we can have a Cookbook.CustomPageVariables page. Some of Cookbook.MoreCustomPageVariables could be transferred. A lot of the time PV on th

Re: [pmwiki-users] variable returns domain name?

2007-04-13 Thread Patrick R. Michaud
On Fri, Apr 13, 2007 at 08:37:09AM -0500, Tegan Dowling wrote: > On 4/13/07, Patrick R. Michaud <[EMAIL PROTECTED]> 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://w

Re: [pmwiki-users] variable returns domain name?

2007-04-13 Thread Tegan Dowling
On 4/13/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Fri, Apr 13, 2007 at 07:33:44AM -0500, Tegan Dowling wrote: > > Hi, List: > > > > I've looked through http://www.pmwiki.org/wiki/PmWiki/PathVariables > > and other pages listed on http://www.pmwiki.org/wiki/PmWiki/Variables, > > but if

Re: [pmwiki-users] variable returns domain name?

2007-04-13 Thread Patrick R. Michaud
On Fri, Apr 13, 2007 at 07:33:44AM -0500, Tegan Dowling wrote: > Hi, List: > > I've looked through http://www.pmwiki.org/wiki/PmWiki/PathVariables > and other pages listed on http://www.pmwiki.org/wiki/PmWiki/Variables, > but if what I want is there, I didn't recognize it (and so apologize). > I'

Re: [pmwiki-users] variable returns domain name?

2007-04-13 Thread Hans
Friday, April 13, 2007, 1:58:22 PM, Hans wrote: > Side note: > {$ScriptUrl} on its own is rendered as a link. > Stripping the initial http://www. will render as text. > Bracketing the markup expression > [[{(substr "{$ScriptUrl}" 11)}]] > will render as link, but to some wiki page, most likely

Re: [pmwiki-users] variable returns domain name?

2007-04-13 Thread Hans
Friday, April 13, 2007, 1:52:20 PM, Hans wrote: > should be: {(substr "{$ScriptUrl}" 11)} Side note: {$ScriptUrl} on its own is rendered as a link. Stripping the initial http://www. will render as text. Bracketing the markup expression [[{(substr "{$ScriptUrl}" 11)}]] will render as link, bu

Re: [pmwiki-users] variable returns domain name?

2007-04-13 Thread Hans
Friday, April 13, 2007, 1:45:09 PM, Hans wrote: > Install the new MarkupExpressions recipe > http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions > and use {(substr {$ScriptUrl} 12)} should be: {(substr "{$ScriptUrl}" 11)} the "" are necessary, and the string character count starts with 0

Re: [pmwiki-users] variable returns domain name?

2007-04-13 Thread Hans
Friday, April 13, 2007, 1:33:44 PM, Tegan 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 > site, it would return simply pmwiki.org. > Is there such a animal, and if not is it possible to create

[pmwiki-users] variable returns domain name?

2007-04-13 Thread Tegan Dowling
Hi, List: I've looked through http://www.pmwiki.org/wiki/PmWiki/PathVariables and other pages listed on http://www.pmwiki.org/wiki/PmWiki/Variables, but if what I want is there, I didn't recognize it (and so apologize). I'm looking for a variable that will provide my site's domain name, stripped