DisableWikiWords

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Question

How can I disable WikiWords from being treated as links in a page?

Answer 1: Disabling all WikiWords

Add the line

    $WikiWordCountMax = 0;

to local/config.php or a PerGroupCustomization file. This will disable "bare" WikiWords in pages. One can still link to pages by using the other linking mechanisms such as {{free links?}} and [[WikiWord alternate text]].

You may want to leave WikiWords enabled in the Main and PmWiki groups to preserve links in the documentation. Do this with $WikiWordCountMax = 1000000; in local/Main.php and/or local/PmWiki.php. Another option would be to put this in local/config.php to disable WikiWords in all groups except Main and PmWiki.

 
# Turns off WikiWords in all groups except Main and PmWiki
   $group = FmtPageName('$Group',$pagename);
   if ($group!='' && $group!='Main' && $group!='PmWiki') $WikiWordCountMax = 0; 

Answer 2: Disabling selected WikiWords

One can also disable selected WikiWords via the $WikiWordCount array. For example, to prevent "PhD" from being treated as a WikiWord, add the line

    $WikiWordCount['PhD']=0;

to local/config.php.

Answer 3: Disabling WikiWords on a Page

You can turn off WikiWords in an individual page by adding the following

  #Add No WikiWords Directive
  $BrowseDirectives['[[nowikiwords]]'] =
    '$GLOBALS["WikiPageCreateFmt"] = "\$LinkText";
    $GLOBALS["WikiPageCreateSpaceFmt"] = "\$LinkText";';

to local/config.php. Then use <#>? anywhere in the page where you do not want WikiWords to appear.

See also

pmwiki-2.2.143 -- Last modified by {{simon}}

from IP: 85.171.160.186 ip should be disabled by default for security reasons