====== Farms ====== **ATTENTION:** This page is mainly aimed at gathering ideas about [[tips:farm|farm]] setup/administration/implementation. ===== Enabling / Disabling Plugins ===== * Define (''inc/preload.php''): * ''DOKU_FARM'' * 0 => Animal * 1 => Farmer * Configuration (''inc/preload.php'') * set value for global $config_cascade * load default farm settings after default dokuwiki settings * load protected farm settings after local settings * Events: * Previously mentioned, ''PLUGIN_NAME_ISDISABLED'', ''PLUGIN_NAME_DISABLE'', ''PLUGIN_NAME_ENABLE'' won't work due to chicken and egg problem. By the time a plugin can control other plugins its too late. Problem solved by implementing a replaceable "plugin controller", see below. * ''PLUGIN_PLUGINMANAGER_PLUGINLIST'', ''PLUGIN_CONFIG_PLUGINLIST'' (implemented) * Plugin Controller (''preload.php'') * replace DokuWiki's default plugin controller (''inc/plugin_controller.class.php'') * redefine isDisabled method to control which plugins an animal uses * retrieve plugin enable/disable settings from farm/animal configuration (see plugin manager below) * Plugin Manager: - disable upload/install for animals - enable/disable for animals - per animal & farm-wide disable for farmer * Farm Admin Plugin: * farmer needs to be able to take over animals ===== Farm Administration ===== * automatic creation of an animal * ability to disable an animal * ability to take control of an animal * ability to set a default configuration of/for embryonic animals * ability to set default user(s), at least an admin * ability to set/edit "protected" configuration values - values that animals can not change * modifications to plugin management: * upload/delete plugins (while not allowing animals to upload/delete them) * enable/disable plugins farm wide * mechanism for recording details of animal administrators * mechanism for notifying (emailing) animal administrators