include "lib/main.php";
* (to be found at the end of the file) by
* include "lib/imagecache.php";
.
* Make sure that there is a trailing
* question mark in 'cache_url'.
* @param 'maxarglen' int number of characters allowed to be send as
* parameters in the url before using sessions
* vars instead.
* @param 'usecache' boolean switches the use of the cache on (true)
* or off (false). If you want to avoid the
* usage of a cache but need WikiPlugin~s
* that nevertheless rely on a cache you might set
* 'usecache' to false. You still need to set
* 'cache_dir' appropriately to allow image creation
* and you should set 'force_syncmap' to false.
* @param 'force_syncmap' boolean Will prevent image creation for an image
* map 'on demand'. It is a good idea to set this
* to 'true' because it will also prevent the
* html part not to fit to the image of the map.
* If you don't use a cache, you have to set it
* to 'false', maps will not work otherwise but
* strange effects may happen if the output of
* an image map producing WikiPlugin is not
* completely determined by its parameters.
* (As it is the case for a graphical site map.)
*/
$CacheParams = array(
// db settings (database='file' is the fastest)
'database' => 'file',
// the webserver muist have write access to this dir!
'cache_dir' => (substr(PHP_OS,0,3) == 'WIN')
? ($GLOBALS['HTTP_ENV_VARS']['TEMP'] . "\\cache\\")
: '/tmp/cache/',
'filename_prefix' => 'phpwiki',
// When highwater is exceeded, a garbage collection will start.
// It will collect garbage till lowwater is reached.
'highwater' => 4 * Megabyte,
'lowwater' => 3 * Megabyte,
// If an image has not been used for maxlifetime remove it from
// the cache.
// (Since there is also the highwater/lowwater mechanism
// and an image usually requires only 1kb you don't have to
// make it very small, I think.)
'maxlifetime' => 30 * Day,
// name of the imagecache start up file
// This file should have been created by hand by copying
// phpwiki/index.php and substituting
// include "lib/main.php";
// by
// include "lib/imagecache.php";
//
//'cacheurl' => '../imagecache/',
'cacheurl' => '/phpwiki/getimg.php?',
// usually send plugin arguments as URL, but when they become
// longer than maxarglen store them in session variables
// setting it to 3000 worked fine for me, 30000 completely
// crashed my linux, 1000 should be safe.
'maxarglen' => 1000,
// actually use the cache
// (should be always true unless you are debugging)
'usecache' => true,
// This will prevent image creation for an image
// map 'on demand'. It is a good idea to set this
// to 'true' because it will also prevent the
// html part not to fit to the image of the map.
// If you don't use a cache, you have to set it
// to 'false', maps will not work otherwise.
'force_syncmap' => true,
// if ImageTypes() does not exist (PHP < 4.0.2) allow the
// following image formats (IMG_PNG | IMG_GIF | IMG_JPG | IMG_WBMP)
// in principal all image types which are compiled into php:
// libgd, libpng, libjpeg, libungif, libtiff, libgd2, ...
'imgtypes' => array('png','gif','gd','gd2','jpeg','wbmp','xbm','xpm')
// Todo: swf, pdf, ...
);
?>