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

John Rankin john.rankin at affinity.co.nz
Sun Apr 13 16:53:22 CDT 2003


> A difference: The standard configuration thiswiki.php expects=20
> ThisWiki:/Group/Page, whereas the local version of=20
>      $LinkPatterns["\\bThisWiki:($UrlPathPattern)"] =3D=20
>        "<a href=3D'$ScriptUrl/\$1'>\$0</a>";
> expects ThisWiki:Group/Page (ie no / after :). Which markup is=20
> the preferred one? I assume I should follow thiswiki.php.

Tell me which you prefer and I'll set thiswiki.php to match.  I think
for scripts/thiswiki.php I chose to not include the slash in the =
replacement
pattern (i.e., requiring the author to include a slash) because the
canonical usage for ThisWiki: was for query string parameters (e.g.,
ThisWiki:?action=3Dcrypt).  But I didn't have a strong opinion about it
and I'd be willing to switch.
----
One the one hand, the more general option is the preferred one. Presumably,=
 if ThisWiki: inserts the /, then ThisWiki:?action=3Dcrypt doesn't work?

On the other hand, This Wiki:Group/Page is more consistent with ThisGroup:=
Page.

My inclination is that unless there is a good reason to change, the status =
quo prevails. So I'll change my local script to align with thiswiki.php. :-=
)
----
> A confused administrator:
> I tried doing
>      $LinkPatterns["\\bThisWiki:($UrlPathPattern)"] =3D=20
>        "<a class=3D'thiswiki' href=3D'$ScriptUrl/\$1'>\$0</a>";
> but the resulting html omits the class=3D'thiswiki' bit. So either I'm=20
> doing something stupid, have missed something obvious or there is=20
> something going on that I don't understand...

Hmm, that's odd.  Do you happen to have a "ThisWiki" entry in localmap.txt,=

local/localmap.txt, or scripts/intermap.txt somewhere?  That entry would=20
replace your custom LinkPattern value with the InterMap one.

If that's not it, then it may have something to do with the order in which
entries are being added to $LinkPatterns (the order is somewhat =
significant).
But unless you're doing some really odd stuff I'd be surprised if that's=20
the cause of the problem.  I might need to see more of the local.php to
figure out what's going on.

Pm
----
OK curiouser and curiouser:
There is no localmap.txt and intermap.txt is as shipped.

However:
[[ThisWiki:Grpup/Page text]] works but excludes the class=3D'thisurl'
ThisWiki:Group/Page includes the class=3D'thisurl' but doesn't pick up the =
Group/Page and appears as ThisWiki:1 -- it doesn't seem to matter whether =
I have \$1 or $1

Maybe it's related to the ThisWiki: bug?

I do the link patterns in the order ThisWiki, ThisGroup, ThisPage. =
thiswiki.php does ThisWiki, ThisPage, ThisGroup.

Does this help?

JR






More information about the pmwiki-users mailing list