[2] | 1 | <?php
|
---|
| 2 | //=======================================================================
|
---|
[265] | 3 | // File: JPG-CONFIG.INC
|
---|
| 4 | // Description: Configuration file for JpGraph library
|
---|
| 5 | // Created: 2004-03-27
|
---|
| 6 | // Ver: $Id: jpg-config.inc.php 1871 2009-09-29 05:56:39Z ljp $
|
---|
[2] | 7 | //
|
---|
[265] | 8 | // Copyright (c) Asial Corporation. All rights reserved.
|
---|
[2] | 9 | //========================================================================
|
---|
| 10 |
|
---|
| 11 |
|
---|
| 12 | //------------------------------------------------------------------------
|
---|
[265] | 13 | // Directories for cache and font directory.
|
---|
[2] | 14 | //
|
---|
| 15 | // CACHE_DIR:
|
---|
| 16 | // The full absolute name of the directory to be used to store the
|
---|
| 17 | // cached image files. This directory will not be used if the USE_CACHE
|
---|
| 18 | // define (further down) is false. If you enable the cache please note that
|
---|
| 19 | // this directory MUST be readable and writable for the process running PHP.
|
---|
| 20 | // Must end with '/'
|
---|
| 21 | //
|
---|
| 22 | // TTF_DIR:
|
---|
| 23 | // Directory where TTF fonts can be found. Must end with '/'
|
---|
| 24 | //
|
---|
| 25 | // The default values used if these defines are left commented out are:
|
---|
| 26 | //
|
---|
| 27 | // UNIX:
|
---|
| 28 | // CACHE_DIR /tmp/jpgraph_cache/
|
---|
| 29 | // TTF_DIR /usr/share/fonts/truetype/
|
---|
[265] | 30 | // MBTTF_DIR /usr/share/fonts/truetype/
|
---|
[2] | 31 | //
|
---|
| 32 | // WINDOWS:
|
---|
| 33 | // CACHE_DIR $SERVER_TEMP/jpgraph_cache/
|
---|
| 34 | // TTF_DIR $SERVER_SYSTEMROOT/fonts/
|
---|
| 35 | // MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
|
---|
| 36 | //
|
---|
| 37 | //------------------------------------------------------------------------
|
---|
[265] | 38 | // define('CACHE_DIR','/tmp/jpgraph_cache/');
|
---|
| 39 | // define('TTF_DIR','/usr/share/fonts/TrueType/');
|
---|
| 40 | // define('MBTTF_DIR','/usr/share/fonts/TrueType/');
|
---|
[2] | 41 |
|
---|
| 42 | //-------------------------------------------------------------------------
|
---|
| 43 | // Cache directory specification for use with CSIM graphs that are
|
---|
| 44 | // using the cache.
|
---|
| 45 | // The directory must be the filesysystem name as seen by PHP
|
---|
[265] | 46 | // and the 'http' version must be the same directory but as
|
---|
| 47 | // seen by the HTTP server relative to the 'htdocs' ddirectory.
|
---|
[2] | 48 | // If a relative path is specified it is taken to be relative from where
|
---|
| 49 | // the image script is executed.
|
---|
[265] | 50 | // Note: The default setting is to create a subdirectory in the
|
---|
[2] | 51 | // directory from where the image script is executed and store all files
|
---|
| 52 | // there. As ususal this directory must be writeable by the PHP process.
|
---|
[265] | 53 | define('CSIMCACHE_DIR','csimcache/');
|
---|
| 54 | define('CSIMCACHE_HTTP_DIR','csimcache/');
|
---|
[2] | 55 |
|
---|
| 56 | //------------------------------------------------------------------------
|
---|
| 57 | // Various JpGraph Settings. Adjust accordingly to your
|
---|
| 58 | // preferences. Note that cache functionality is turned off by
|
---|
| 59 | // default (Enable by setting USE_CACHE to true)
|
---|
| 60 | //------------------------------------------------------------------------
|
---|
| 61 |
|
---|
| 62 | // Deafult locale for error messages.
|
---|
| 63 | // This defaults to English = 'en'
|
---|
| 64 | define('DEFAULT_ERR_LOCALE','en');
|
---|
| 65 |
|
---|
[265] | 66 | // Deafult graphic format set to 'auto' which will automatically
|
---|
[2] | 67 | // choose the best available format in the order png,gif,jpeg
|
---|
| 68 | // (The supported format depends on what your PHP installation supports)
|
---|
[265] | 69 | define('DEFAULT_GFORMAT','auto');
|
---|
[2] | 70 |
|
---|
| 71 | // Should the cache be used at all? By setting this to false no
|
---|
[265] | 72 | // files will be generated in the cache directory.
|
---|
[2] | 73 | // The difference from READ_CACHE being that setting READ_CACHE to
|
---|
| 74 | // false will still create the image in the cache directory
|
---|
| 75 | // just not use it. By setting USE_CACHE=false no files will even
|
---|
| 76 | // be generated in the cache directory.
|
---|
[265] | 77 | define('USE_CACHE',false);
|
---|
[2] | 78 |
|
---|
[265] | 79 | // Should we try to find an image in the cache before generating it?
|
---|
[2] | 80 | // Set this define to false to bypass the reading of the cache and always
|
---|
[265] | 81 | // regenerate the image. Note that even if reading the cache is
|
---|
[2] | 82 | // disabled the cached will still be updated with the newly generated
|
---|
[265] | 83 | // image. Set also 'USE_CACHE' below.
|
---|
| 84 | define('READ_CACHE',true);
|
---|
[2] | 85 |
|
---|
| 86 | // Determine if the error handler should be image based or purely
|
---|
| 87 | // text based. Image based makes it easier since the script will
|
---|
| 88 | // always return an image even in case of errors.
|
---|
[265] | 89 | define('USE_IMAGE_ERROR_HANDLER',true);
|
---|
[2] | 90 |
|
---|
[265] | 91 | // Should the library examine the global php_errmsg string and convert
|
---|
[2] | 92 | // any error in it to a graphical representation. This is handy for the
|
---|
| 93 | // occasions when, for example, header files cannot be found and this results
|
---|
[265] | 94 | // in the graph not being created and just a 'red-cross' image would be seen.
|
---|
[2] | 95 | // This should be turned off for a production site.
|
---|
[265] | 96 | define('CATCH_PHPERRMSG',true);
|
---|
[2] | 97 |
|
---|
| 98 | // Determine if the library should also setup the default PHP
|
---|
| 99 | // error handler to generate a graphic error mesage. This is useful
|
---|
| 100 | // during development to be able to see the error message as an image
|
---|
[265] | 101 | // instead as a 'red-cross' in a page where an image is expected.
|
---|
| 102 | define('INSTALL_PHP_ERR_HANDLER',false);
|
---|
[2] | 103 |
|
---|
| 104 | // Should usage of deprecated functions and parameters give a fatal error?
|
---|
| 105 | // (Useful to check if code is future proof.)
|
---|
[265] | 106 | define('ERR_DEPRECATED',true);
|
---|
[2] | 107 |
|
---|
[265] | 108 | // The builtin GD function imagettfbbox() fuction which calculates the bounding box for
|
---|
| 109 | // text using TTF fonts is buggy. By setting this define to true the library
|
---|
| 110 | // uses its own compensation for this bug. However this will give a
|
---|
| 111 | // slightly different visual apparance than not using this compensation.
|
---|
| 112 | // Enabling this compensation will in general give text a bit more space to more
|
---|
| 113 | // truly reflect the actual bounding box which is a bit larger than what the
|
---|
| 114 | // GD function thinks.
|
---|
| 115 | define('USE_LIBRARY_IMAGETTFBBOX',true);
|
---|
[2] | 116 |
|
---|
| 117 | //------------------------------------------------------------------------
|
---|
| 118 | // The following constants should rarely have to be changed !
|
---|
| 119 | //------------------------------------------------------------------------
|
---|
| 120 |
|
---|
| 121 | // What group should the cached file belong to
|
---|
[265] | 122 | // (Set to '' will give the default group for the 'PHP-user')
|
---|
[2] | 123 | // Please note that the Apache user must be a member of the
|
---|
| 124 | // specified group since otherwise it is impossible for Apache
|
---|
| 125 | // to set the specified group.
|
---|
[265] | 126 | define('CACHE_FILE_GROUP','www');
|
---|
[2] | 127 |
|
---|
| 128 | // What permissions should the cached file have
|
---|
[265] | 129 | // (Set to '' will give the default persmissions for the 'PHP-user')
|
---|
| 130 | define('CACHE_FILE_MOD',0664);
|
---|
[2] | 131 |
|
---|
[265] | 132 | // Default theme class name
|
---|
| 133 | define('DEFAULT_THEME_CLASS', 'UniversalTheme');
|
---|
[2] | 134 |
|
---|
[265] | 135 | define('SUPERSAMPLING', true);
|
---|
| 136 | define('SUPERSAMPLING_SCALE', 1);
|
---|
[2] | 137 |
|
---|
| 138 | ?>
|
---|