[Pmwiki-users] How do I re-enable WikiWords?

Patrick R. Michaud pmichaud
Fri Feb 20 06:52:53 CST 2004


On Fri, Feb 20, 2004 at 07:18:02PM +1100, Nathan Jones wrote:
> I'm not sure which question to ask:
> 
> 1. How often does PmWiki read the contents of config.php?

PmWiki reads the contents of config.php each time it is executed--i.e.,
each time someone access the wiki site (browse, edit, etc.).

> 2. How do I re-enable WikiWords after disabling them by setting
>    $WikiWordCountMax=0?

Just commenting out $WikiWordCountMax=0; should be enough to restore them,
but there's more going on here...

> I prefer FreeLinks to WikiWords, so I uncommented "$WikiWordCountMax=0;"
> in local/config.php. I then changed my mind and decided to only use it
> for one group (by putting it in local/Main.php), as the PmWiki group has
> many WikiWords.
> Despite restoring config.php to the default, WikiWords are still disabled
> when viewing pages [...]

It's probably because 'Main' is your default group.  By default PmWiki
looks for a per-page config file ("local/Group.PageName.php"), and 
not finding one it looks for a per-group config ("local/Group.php"),
and not finding that it uses the config for the default group.

You can fix this several ways.  If you only want WikiWords enabled in
the PmWiki group and disabled everywhere else, then set $WikiWordCountMax=0
in local/config.php (global), and set $WikiWordCountMax=1000 in 
local/PmWiki.php to re-enable WikiWords in PmWiki/.

If you only want WikiWords disabled in Main but enabled everywhere else,
then use the following in local/Main.php (or local/config.php) and don't
set $WikiWordCountMax in local/config.php:

   $group = FmtPageName('$Group',$pagename);
   if ($group=='Main') $WikiWordCountMax=0;

Pm



More information about the pmwiki-users mailing list