NoWikiWords
<< Disable Wiki Words | Cookbook-V1 | Limit Wiki Words >>
Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
Goal
Simplify the maintenance of words that should not be taken as Wiki words although they look like such (i.e. camel case).
There is quite a number of words in mixed case that appear repeatedly in documentation and similiar text, and I found it annoying the be forced to either quote the words (with [=) or edit the local/config.php
continuously. So I needed an method for easier online maintenance.
Solution
This extension allows to create a Wiki page where you maintain words that should not be interpreted as Wiki words (i.e. should not create a link).
In the page, simply enter the words you want to block, line by line. Empty lines are ignored. Example:
The page is read by the extension and converted to the appropriate PmWiki orders.
Discussion
Installation
Download the file Attach:nowikiwords.php and install it into your local/
directory. Include the script from local/config.php
.
The Wiki Page containing camel case words that should not be taken as Wiki words defaults to $DefaultGroup.NoWikiWords. You may configure this by setting $NoWikiWordsPagename either before the include or in the script itself. Add a link to the page whereever you like. Set an edit permission if you like.
You still may define more words in the conventional way.
See Also
- PmWiki.LinkVariables - describes the function of
$WikiWordCount
. - Cookbook.DisableWikiWords, Cookbook.LimitWikiWords
- In many cases, a sufficient alternative may be to change the
to a more complex expression. See mailing list for examples.$WikiWordPattern
History
First version 2004-10-10. Tested with pmwiki-1.0.11
Comments & Bugs
One may want to give priority to declarations in the script over those in the Wiki page. Would need to check if the word is already set.
Contributors
Copyright
Just the same as PmWiki, naturally.
pmwiki-2.3.38 -- Last modified by {{tpahl}}