devel:preload
This is an old revision of the document!
Table of Contents
Preload
- could probably be done with better prose rather than bullets :)
inc/preload.php
is not part of the default dokuwiki installation- inc/init.php attempts to include
inc/preload.php
before it does anything else - preload.php has the opportunity override many aspects of standard dokuwiki, incl.
- most of the directory locations
- the configuration cascade
- the plugin controller
It is of particular interest to wiki farms allowing them control several independent wikis from a single dokuwiki installation.
Examples
Local Config Folder
- preload.php
<?php /** * Sample preload.php to use a separate folder for all local configuration settings * * By default this script will locate the local config files in * /path/to/doku/conf/local/ * * The locations of both the default dokuwiki configuration and local configuration * can be controlled using DOKU_DEFAULT & DOKU_CONF. * * NOTE: DOKU_CONF controls the location of several other files not contained in the * configuration cascade. They are: * acl.auth.php * users.auth.php * userscript.php * userstyle.css (and media specific user stylesheets, e.g. userscreen.css, userprint.css) * report_e_all * msg * */ if(!defined('DOKU_DEFAULT')) define('DOKU_DEFAULT',DOKU_INC.'conf/'); if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_DEFAULT.'local/'); global $config_cascade; $config_cascade = array( 'main' => array( 'default' => array(DOKU_DEFAULT.'dokuwiki.php'), 'local' => array(DOKU_CONF.'dokuwiki.php'), 'protected' => array(DOKU_CONF.'protected.php'), ), 'acronyms' => array( 'default' => array(DOKU_DEFAULT.'acronyms.conf'), 'local' => array(DOKU_CONF.'acronyms.conf'), ), 'entities' => array( 'default' => array(DOKU_DEFAULT.'entities.conf'), 'local' => array(DOKU_CONF.'entities.conf'), ), 'interwiki' => array( 'default' => array(DOKU_DEFAULT.'interwiki.conf'), 'local' => array(DOKU_CONF.'interwiki.conf'), ), 'license' => array( 'default' => array(DOKU_DEFAULT.'license.php'), 'local' => array(DOKU_CONF.'license.php'), ), 'mediameta' => array( 'default' => array(DOKU_DEFAULT.'mediameta.php'), 'local' => array(DOKU_CONF.'mediameta.php'), ), 'mime' => array( 'default' => array(DOKU_DEFAULT.'mime.conf'), 'local' => array(DOKU_CONF.'mime.conf'), ), 'scheme' => array( 'default' => array(DOKU_DEFAULT.'scheme.conf'), 'local' => array(DOKU_CONF.'scheme.conf'), ), 'smileys' => array( 'default' => array(DOKU_DEFAULT.'smileys.conf'), 'local' => array(DOKU_CONF.'smileys.conf'), ), 'wordblock' => array( 'default' => array(DOKU_DEFAULT.'wordblock.conf'), 'local' => array(DOKU_CONF.'wordblock.conf'), ), );
devel/preload.1262953175.txt.gz · Last modified: 2010-01-08 13:19 by kazmiya