[Pmwiki-users] Re: Single-Word WikiWords
Fabio Reis Cecin
frcecin
Sat May 8 08:28:21 CDT 2004
> Message: 5
> Date: Tue, 4 May 2004 22:29:19 +0200
> From: Christian Ridderstr?m <chr at home.se>
> Subject: [Pmwiki-users] Re: Single-Word WikiWords
>
> On Tue, 4 May 2004 Michael_Paulukonis at divintech.com wrote:
>
> > That is something along the ideas of what I was looking for--but I also
> > figured it would slow it down quite a bit. On the otherhand, if it ran
> > from a lookup table (say, "singlewordwikiwords.txt") and only converted
> > what it found there--would it work faster?
>
> I like this idea, but why not put the information on wiki page, e.g.
> Main/SingleWikiWords instead of in a separate file. This page could be:
>
> Perl -> IT/Perl
> PHP -> IT/Php
What about this approach -- I believe it could be used efficiently even for
non-capitalized single words ("java", "python", or all caps "PHP"...)
After a new version of any page is saved, it could be scanned for all
single-words (any combination of A-Z, a-z) that are set as freelinks,
and those words could then automatically be merged into a
"singlewikiwords.txt" file (if they already exist in the file, nothing
happens).
While any page is being rendered to a client, the "singlewikiwords.txt" file
is used to generate the desired single word links.
And for completeness' sake:
(1) To ban certain single wiki words, use a public
Main/BannedSingleWikiWords (for instance, if someone used a freelink
for {{java}} somewhere but you don't want "java" linked all over the place
-- people still must use the freelink explicitly). words in that page
are not added to "singlewikiwords.txt" when saving pages, and each
time Main/BannedSingleWikiWords is saved, "singlewikiwords.txt" is
updated for removal of any new banned words.
(2) To deal with pages that don't exist anymore (deleted by an admin):
If, while rendering a page:
- there is some single wiki word in the page being rendered
- there is an entry in "singlewikiwords.txt" for that single wiki word
- BUT the page for that single wiki word doesn't exist anymore
Then:
- remove that single wiki word's entry from
A "banned wiki words" page would also be useful for other purposes.
Sometimes I use CamelCase words that are NOT intended to become
page names. Having a browser-editable page to ban these words
would be useful as it saves the user from finding each word and
typing [=BannedWikiWord=] . The set of these words is generally
limited, but they tend to occur a lot of times, and so it becomes
really annoying to manually "ban" them in each instance...
Fabio
More information about the pmwiki-users
mailing list