Test |
PmWiki • LocalCustomizations
A WikiAdministrator can make a lot of customizations simply by setting variables in the local/config.php file. Any group or page can also have its own configuration file. From its inception, PmWiki has been designed so that WikiAdministrators can greatly customize the way PmWiki displays pages and the markup sequences used to generate pages. (This is even mentioned explicitly in PmWikiPhilosophy #4.) As a result, the core pmwiki.php script makes extensive use of PmWiki.Variables to determine how markup sequences will be processed and what each individual page will output. The bulk of this page describes how customizations work in general, see PmWiki.DocumentationIndex for specific customizations that are commonly performed at many PmWiki installations, including: The simplest type of customization is merely setting a variable to 1 (or TRUE). Here's an example that enables ?action=diag and ?action=phpinfo actions: $EnableDiag = 1;
You can begin a line with a "#" (an octothorpe, a.k.a. a hash symbol or pound sign) to add a comment. Additionally, some built-in PmWiki variables take values other than 1 or 0 (true or false). Here's another example that customizes the wiki's behavior with respect to search engine web robots (see Cookbook:ControllingWebRobots): # Allow the site to be indexed by search engines. $MetaRobots = 'index,follow'; $EnableRobotCloakActions = 1; The scripts/ subdirectory (below the directory holding the pmwiki.php script) has many customizations. The PmWiki Cookbook contains many example customizations (recipes) that you can download into the cookbook/ subdirectory, The first few lines of each of these scripts generally contain instructions about how to enable (and use) the feature provided by the script. These customizations are included in your config.php site configuration. For most scripts this is done by simply adding lines like: include_once("cookbook/recipefile.php");
and include_once("scripts/scriptfile.php");
at the end of the config.php file to enable them. Some of the scripts are automatically enabled for you via the scripts/stdconfig.php script unless you disable it by setting Note that you should strongly resist the temptation to directly modify the pmwiki.php script or the files in the scripts/ subdirectory. Any modifications you make to these files will probably be overwritten whenever you perform a PmWiki.Upgrade. Instead, look at some of the sample scripts for examples of customizations that can be performed from config.php. You can even create your own script to do a customization and use << Initial setup tasks | DocumentationIndex | Skins >> |
July 2014: March 2014: March 2014: Jan 2014: Jan 2014: Oct 2013: Oct 2013: Jan 2013: Aug 2012: Apr 2012: Yate 4.1 released: better Gvoice support, iSAC codec, support for new Wanpipe drivers. Fixes – T.38 and Mac client issues. Mar 2012: Feb 2012: Nov 2011: Nov 2011: 04 May 2011: 12 Apr 2011: 9 Mar 2011: Feb 2011: 31 Jan 2011: 20 Dec 2010: 3 May 2010: 8 March 2010: 6-7 February 2010: 2 Nov 2009: 6 Aug 2008: 4 Aug 2008: |