DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:symlink_farm_archived_stuff

This is the archive for old and probably outdated stuff of the symlink farm.

Disabling Plugins for each Animal individually

Older Version of the Patch (2007)

If you want to allow administrators of individual animal wiki to enable or disable plugins in their animal of your farm, apply the following simple patch:

diff -r 6c2002b69126 inc/pluginutils.php
--- a/inc/pluginutils.php	Fri Nov 30 14:43:15 2007 +0100
+++ b/inc/pluginutils.php	Fri Nov 30 15:36:46 2007 +0100
@@ -90,6 +90,6 @@ function &plugin_load($type,$name){
   return $DOKU_PLUGINS[$type][$name];
 }
 
-function plugin_isdisabled($name) { return @file_exists(DOKU_PLUGIN.$name.'/disabled'); }
-function plugin_enable($name) { return @unlink(DOKU_PLUGIN.$name.'/disabled'); }
-function plugin_disable($name) { return @touch(DOKU_PLUGIN.$name.'/disabled'); }
+function plugin_isdisabled($name) { return (@file_exists(DOKU_CONF.$name.'.disabled')); }
+function plugin_enable($name) { return (@unlink(DOKU_CONF.$name.'.disabled')); }
+function plugin_disable($name) { return (@touch(DOKU_CONF.$name.'.disabled')); }

With that patch applied, plugins can still be disabled in the farmer wiki by creating an empty file conf/<pluginame>.disabled inside the farmer wiki for each plugin, you want to disable (<pluginame> being the name of the plugin to disable).

touch dokuwiki-farm/conf/<pluginame>.disabled

For the previous 2008-05-05 version

If you are using the previous version of DokuWiki aka DokuWiki-2008-05-05 you should apply the following patch to a freshly extracted copy of DokuWiki:

diff --git a/inc/init.php b/inc/init.php
--- a/inc/init.php
+++ b/inc/init.php
@@ -9,6 +9,9 @@
     return ((float)$usec+(float)$sec)-((float)$start);
   }
   define('DOKU_START_TIME', delta_time());
+
+  // if available load a preload config file
+  @include(fullpath(dirname(__FILE__)).'/preload.php');
 
   // define the include path
   if(!defined('DOKU_INC')) define('DOKU_INC',fullpath(dirname(__FILE__).'/../')
.'/');

Old discussion

I am running the latest version of DokuWiki with the “old patch” applied. After a few minor modifications on some plugins, I am pretty happy with the final result except the templates. Some of the templates have menu.php in their directories (see incognitek, for an example). I tried do not link lib and copy it and below to the animal lib. The configuration manager still show the templates on the farmer. If I hardcode my personalized template in local.php, some images are recovered but not full CSS information, and the site seems a mess. It is only a minor point. As a workaround, I have duplicate the incognitek template and modified the second copy.

Thadeu Penna 2009/03/10 01:12

The Mojito-Website for the old patch seems to be down at this moment and I was unable to find a cached copy anywhere else. Could anyone provide me with a copy? (Never mind, the website is up again.)

christian studer 2009/03/27 09:27

I have install a farm, but in the animal, the mediamanager isn't OK. I don't see the media in my animal, but the media of the farm !!! Somebody have an idea ?

Junior76 2009/09/23 17:11

It seems that all media files goes to root farm directory data/media instead of animal#/data/media, no matter in which farm did you uploaded the file or with what user (admin or user). So all media files are shared through all animals. I think this is a bug.

Josué 2009/09/29 12:22

It's exactly the problem. Do you know a solution to this “bug” ????

Junior76 2009/09/29 19:20

Did you find a solution for that ?

Benjamin 2009/10/21 16:20

I did some debugging and found a solution. Modify your preload.php to the following:

$dir = dirname($_SERVER['SCRIPT_FILENAME']);
if(is_dir($dir . '/conf'))
	define('DOKU_CONF', $dir . '/conf/');
else
{
	$dir = str_replace('lib/exe', 'conf/', $dir);
	if(is_dir($dir))
		define('DOKU_CONF', $dir);
}

As of the latest version, 2009-12-02 (Mulled Wine), this is all you need to do.

Tommy 2009/12/14 19:10

That's nice, Tommy, exactly what I needed. Since plugins such as acl need 'conf/' too, I added support for 'lib/plugin.*' too. @Josué,Junior76,Benjamin: Note that you have to set the savedir to your animals data folder, see above. I updated this page accordingly. I also added a new patch for plugin management. — Mirko 2010/04/01 17:22
tips/symlink_farm_archived_stuff.txt · Last modified: 2010-10-18 13:12 by 192.124.26.250

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki