[pmwiki-users] Flagging Bare Wikiwords . . .
christian.ridderstrom at gmail.com
christian.ridderstrom at gmail.com
Tue Jan 24 08:42:31 CST 2006
On Mon, 21 Nov 2005, Patrick R. Michaud wrote:
Going through old threads... this is about finding/detecting/fixing
WikiWords that might have been links in an old wiki installation, but
since an upgrade to using only [[link]], they no longer do what they used
to do.
I think the eventual solutition became that wiki words to existing pages
got their own <span>??
> On Mon, Nov 21, 2005 at 09:20:45AM -0600, Patrick R. Michaud wrote:
> > On Sun, Nov 20, 2005 at 03:46:20PM -0600, Ben Wilson wrote:
> > > I would ask one of two solutions. Either assign WikiLink() to a variable
> > > (e.g. $WikiLink) so we may override more painlessly, or sneak a span
> > > into WikiLink() as I have done that will allow me to flag the link.
> >
> > How about a third solution...? In a local customization file:
> >
> > Markup('wikilink', '>urllink',
> > "/\\b($GroupPattern([\\/.]))?($WikiWordPattern)/e",
> > "Keep('<span class=\\'missingLink\\'>$0</span>', 'L')");
>
> Actually, a fourth solution, which I'm likely to adopt into the
> core distribution, is:
>
> Markup('wikilink', '>urllink',
> "/\\b($GroupPattern([\\/.]))?($WikiWordPattern)/e",
> "Keep('<span class=\\'wikiword\\'>'
> . WikiLink(\$pagename,'$0') . '</span>', 'L')");
>
> Then wikiword links can be styled separately from other page links.
> In particular, the following CSS settings can be made:
>
> span.wikiword a.createlink { display:none; }
> span.wikiword a.createlinktext { text-decoration:none;
> border-bottom:none; color:inherit; }
>
> which will cause WikiWord links to existing pages to continue to
> display as links, while WikiWords to non-existent pages would display
> as normal text (but would still be clickable links to create the page).
>
> Additional CSS could be used to make WikiWord links to existing pages
> stand out, while still remaining links:
>
> span.wikiword a.wikilink { background-color: pink; }
Pm also wrote later on:
On Tue, Nov 22, 2005 at 04:46:18PM +0100, chr at home.se wrote:
> Now it just needs to be combined with something that allows
> you to get a list of the pages where you have this problem (so that you
> manually can go and fix it).
Regarding finding pages that contain pages with with WikiLinks that don't
go anywhere, Pm later also wrote:
I'm thinking a custom filter for (:pagelist:) might do the trick.
It'd be slow, but you'd only have to run it once.
This bit about using (:pagelist:) for finding the bare wiki words, should
I add it to PITS so we don't forget about it for all future?
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list