[Pmwiki-users] Re: Re: Single-Word WikiWords

Christian Ridderström chr
Sat May 8 16:43:39 CDT 2004


On Sat, 8 May 2004, Fabio Reis Cecin wrote:

> On 8 May 2004 at 9:43, Patrick R. Michaud wrote:
> 
> > On Sat, May 08, 2004 at 11:33:43AM -0300, Fabio Reis Cecin wrote:
> > > 
> > > 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 

I'm not sure you'd want this behaviour, i.e. on some pages maybe I do want 
'java' to become a link, but on others I don't... e.g. I'll just get way 
to many links that way. Of maybe the word can have two meanings, so it'd 
automatically become a link which might go to the wrong page.

> > However, I do see how it might be useful to have the disabling
> > capability stored somewhere that non-admins can modify it.

I definitely think so, and I also find it more convenient to do things 
using the browser, than having to hack the config files.

> >  There are some questions here--do we need to have a per-group version
> > of this page?  How about per-site?

I think this should be per-group, i.e. if the page 

	$Group.GroupDisabledWikiWords

exists, it'll be used. Then it's just a matter of coming up with a good 
name for a page that's used for the entire site... how about:

	Main.SiteDisabledWikiWords

However, I just got a related idea for how we could use headers to easily
separate directives, e.g. 'AGroup.GroupDisabledWikiWords' could contain

	PHP -> IT/PHP

	! PageName

	java -> IT/Java

	! AnotherPage

	coffee -> AboutCoffee/Coffee

Maybe the page name '$Group.GroupDefinedWikiWords' could be used to define 
words that will be interpreted and rendered as wiki words?

> > Here's another approach that might work:  Instead of maintaining
> > a single page containing the list of disabled WikiWords, how about
> > indicating the disabling via the page itself.  This is a bit complex
> > to explain, but suppose someone frequently uses the term "CamelCase"
> > in a page but doesn't want it to be a WikiWord link.  Instead of 
> > escaping [=CamelCase=] throughout the document or getting the admin
> > to set $WikiWordCount['CamelCase'], they instead go ahead and create 
> > a page called "CamelCase" and put [[wikiwordcount=0]] in the page 
> > contents.  Later, when PmWiki is rendering a page that contains
> > "CamelCase" in it, it first looks at the CamelCase page to see if it
> > should be linked or not or how many times it should be linked.

Won't this be rather time consuming, i.e you have to read every page 
that's pointed to by the page that's currently being rendered?

But couldn't we just have a directive that does this, e.g. something 
like this:

	[[disable-wikiword:CamelCase]]
	[[define-wikiword:PHP IT/PHP]]

Then you could just put these directives in GroupHeader etc. 

/Christian

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list