[pmwiki-users] Flagging Bare Wikiwords . . .

Ben Wilson dausha at gmail.com
Sun Nov 20 15:46:20 CST 2005


Okay, I like the 2.1 Beta 1 adoption of WikiWords off by default. I've 
been slowly moving the sites I manage toward this goal, so, at least for 
me, this is a step in the right direction.

However, I would like to know the least invasive way to flag those links 
so I can catch them. That is, when they are off, they don't stand out. 
What I would like is these former-links to have a CSS class assigned so 
I can mark it up that way.

So, what I tried to do is overload WikiLink, but I was getting errors 
that I can't redeclare the function (more of a PHP thing, I know). Since 
I don't have time to hunt down the error, I committed an unpardonable: I 
added "<span class='missingLink'>$word</span>" to line 894 where before 
there was just "$word". This will hold until 2.1 Beta 2.

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.

The result of my handywork is available at:
http://www.gmtoolbox.org/espace/Macropedia/ImperiumMacropediaTimeline

I will not fix those links for a few days until the discussion is complete.

Regards,
Ben Wilson




More information about the pmwiki-users mailing list