[Pmwiki-users] http references with : in the link

John Rankin john.rankin at affinity.co.nz
Thu Apr 10 16:23:08 CDT 2003

Progress: 2 q:) and 2 :(
On Thursday, 10 April 2003 4:07 PM, John Rankin <john.rankin at affinity.co.=
nz> wrote:

On Thursday, 10 April 2003 11:50 AM, Patrick R. Michaud <pmichaud at sci.=
tamucc.edu> wrote:
Argggh, another bug.  Change UrlPagePattern to be UrlPathPattern, as in

     $EnableThisWiki =3D 0;		# to avoid including thiswiki.php=20
     $LinkPatterns["\\bThisWiki:($UrlPathPattern)"] =3D=20
       "<a href=3D'\$ScriptUrl/\$1'>\$0</a>";
     $LinkPatterns["\\bThisPage:($UrlPathPattern)"] =3D
       FmtPageName("<a href=3D'\$PageUrl\$1'>\$0</a>",$pagename);
     $LinkPatterns["\\bThisGroup:($UrlPathPattern)"] =3D
       FmtPageName("<a href=3D'\$ScriptUrl/\$Group/\$1'>\$0</a>",$pagename)=

Note the addition of \ in ThisWiki and removal of / in ThisPage. Mostly, I =
have tested ThisPage and found the following problem.
The wiki calendar has [[ThisPage:?logdate=3D200303 March 2003]] - [[=
ThisPage:?logdate=3D200305 May 2003]] to give next month/previous month =
navigation. The first link is correct. The second link renders as May 2003 =
but the <a href=3D... shows in the HTML source as ?logdate=3D200303 -- it'=
s picking up the first reference again. This works using thikwiki.php. See =
it at:

On Wed, 9 Apr 2003, Patrick R. Michaud wrote:

> > > 1. Distinguish links that are local to the encyclopedia from those=20
> > > that will take a visitor elsewhere, preferably by using a different=20
> > > link colour. This should happen automatically -- the author focuses=20
> > > on content, the style sheet takes care of presentation.
> > > [...]
> >=20
> >=20
> > So, if you want to have external links appear with a special style =
> > you can just set $UrlLinkFmt to be=20
> >    "<a href=3D'\$Url' class=3D'url'>\$LinkText</a>"
> > and all URL references will come out with a class attribute set.


And in the printable version I have set it to:
   "<cite>\$LinkText</cite> [<a href=3D'\$Url' class=3D'url'>\$Url</a>]"

> > This should work with all of the permutations of links and their =
> > counterparts.

But, links of the form http://www... render in the printable version as:
http://... [http://www...]

Is there a need for a Fmt variable used when $LinkText =3D=3D $Url:
   $UrlPlainFmt =3D  <a href=3D'\$Url' class=3D'url'>\$Url</a>;

> > I'm going to skip the "display external references as endnotes" =
feature for=20
> > a moment--I think that's also doable, but I want to tackle this one in
> > baby steps if we can.

OK -- I can describe how I handled footnotes, which may be relevant. Or =

Thank you, this is looking good. JR

Pmwiki-users mailing list
Pmwiki-users at pmichaud.com

More information about the pmwiki-users mailing list