[Pmwiki-users] http references with : in the link
John Rankin
john.rankin at affinity.co.nz
Sun Apr 13 01:50:51 CDT 2003
Getting there and looking good...
A bug:
[[ThisWiki:/Group/Page text]] works correctly, but ThisWiki:/Group/Page =
isn't picking up the group and page reference.
A difference:
The standard configuration thiswiki.php expects 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 the =
preferred one? I assume I should follow 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 =
doing something stupid, have missed something obvious or there is =
something going on that I don't understand...
--=20
John Rankin
I've taken a slightly different approach. $UrlLinkFmt works as before, =
but
I've also defined a $UrlLinkTextFmt which is the replacement text to be
used whenever [[http://... text]] is given. If not set, $UrlLinkTextFmt
is the same as $UrlLinkFmt.
Thus, for your application, I'd set:
$UrlLinkFmt =3D "<a href=3D'\$Url' class=3D'url'>\$LinkText</a>";
$UrlLinkTextFmt =3D=20
"<cite>\$LinkText</cite> [<a href=3D'\$Url' class=3D'url'>\$Url</a>]";
----
She's right!!
----
Also, I have a few ideas for URL footnotes, but before I get into those=20
(may take me a few days with my current schedule) let me just comment=20
that it's possible for a WikiAdministrator to completely redefine the=20
link formatting routines. I.e., if someone doesn't like the way that=20
FmtUrlLink currently works, then just write a new function for the=20
desired behavior and set the $FmtUrlLink variable to the name of=20
the function. =20
----
Will offer thoughts on this once I have organised them...
JR
More information about the pmwiki-users
mailing list