Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
//=======================================================================
3
// File:	JPG-CONFIG.INC
4
// Description:	Configuration file for JpGraph library
5
// Created: 	2004-03-27
6
// Ver:		$Id: jpg-config.inc.php 852 2007-03-18 18:18:35Z ljp $
7
//
8
// Copyright (c) Aditus Consulting. All rights reserved.
9
//========================================================================
10
 
11
 
12
 
13
//------------------------------------------------------------------------
14
// Directories for cache and font directory.
15
//
16
// CACHE_DIR:
17
// The full absolute name of the directory to be used to store the
18
// cached image files. This directory will not be used if the USE_CACHE
19
// define (further down) is false. If you enable the cache please note that
20
// this directory MUST be readable and writable for the process running PHP.
21
// Must end with '/'
22
//
23
// TTF_DIR:
24
// Directory where TTF fonts can be found. Must end with '/'
25
//
26
// The default values used if these defines are left commented out are:
27
//
28
// UNIX:
29
//   CACHE_DIR imgcache/
30
//   TTF_DIR   /usr/X11R6/lib/X11/fonts/truetype/
31
//   MBTTF_DIR /usr/share/fonts/ja/TrueType/
32
//
33
// WINDOWS:
34
//   CACHE_DIR $SERVER_TEMP/jpgraph_cache/
35
//   TTF_DIR   $SERVER_SYSTEMROOT/fonts/
36
//   MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
37
//
38
//------------------------------------------------------------------------
39
// DEFINE("CACHE_DIR","/tmp/jpgraph_cache/");
40
// DEFINE("TTF_DIR","/usr/X11R6/lib/X11/fonts/truetype/");
41
// DEFINE("MBTTF_DIR","/usr/share/fonts/ja/TrueType/");
42
DEFINE("TTF_DIR","/usr/share/fonts/truetype/");
43
//-------------------------------------------------------------------------
44
// Cache directory specification for use with CSIM graphs that are
45
// using the cache.
46
// The directory must be the filesysystem name as seen by PHP
47
// and the 'http' version must be the same directory but as
48
// seen by the HTTP server relative to the 'htdocs' ddirectory.
49
// If a relative path is specified it is taken to be relative from where
50
// the image script is executed.
51
// Note: The default setting is to create a subdirectory in the
52
// directory from where the image script is executed and store all files
53
// there. As ususal this directory must be writeable by the PHP process.
54
DEFINE("CSIMCACHE_DIR","csimcache/");
55
DEFINE("CSIMCACHE_HTTP_DIR","csimcache/");
56
 
57
//------------------------------------------------------------------------
58
 
59
//------------------------------------------------------------------------
60
// Defines for font setup
61
//------------------------------------------------------------------------
62
 
63
// Actual name of the TTF file used together with FF_CHINESE aka FF_BIG5
64
// This is the TTF file being used when the font family is specified as
65
// either FF_CHINESE or FF_BIG5
66
DEFINE('CHINESE_TTF_FONT','bkai00mp.ttf');
67
 
68
// Special unicode greek language support
69
DEFINE("LANGUAGE_GREEK",false);
70
 
71
// If you are setting this config to true the conversion of greek characters
72
// will assume that the input text is windows 1251
73
DEFINE("GREEK_FROM_WINDOWS",false);
74
 
75
// Special unicode cyrillic language support
76
DEFINE("LANGUAGE_CYRILLIC",false);
77
 
78
// If you are setting this config to true the conversion
79
// will assume that the input text is windows 1251, if
80
// false it will assume koi8-r
81
DEFINE("CYRILLIC_FROM_WINDOWS",false);
82
 
83
// The following constant is used to auto-detect
84
// whether cyrillic conversion is really necessary
85
// if enabled. Just replace 'windows-1251' with a variable
86
// containing the input character encoding string
87
// of your application calling jpgraph.
88
// A typical such string would be 'UTF-8' or 'utf-8'.
89
// The comparison is case-insensitive.
90
// If this charset is not a 'koi8-r' or 'windows-1251'
91
// derivate then no conversion is done.
92
//
93
// This constant can be very important in multi-user
94
// multi-language environments where a cyrillic conversion
95
// could be needed for some cyrillic people
96
// and resulting in just erraneous conversions
97
// for not-cyrillic language based people.
98
//
99
// Example: In the free project management
100
// software dotproject.net $locale_char_set is dynamically
101
// set by the language environment the user has chosen.
102
//
103
// Usage: DEFINE('LANGUAGE_CHARSET', $locale_char_set);
104
//
105
// where $locale_char_set is a GLOBAL (string) variable
106
// from the application including JpGraph.
107
//
108
DEFINE('CYRILLIC_LANGUAGE_CHARSET', null);
109
 
110
// Japanese TrueType font used with FF_MINCHO, FF_PMINCHO, FF_GOTHIC, FF_PGOTHIC
111
DEFINE('MINCHO_TTF_FONT','ipam.ttf');
112
DEFINE('PMINCHO_TTF_FONT','ipamp.ttf');
113
DEFINE('GOTHIC_TTF_FONT','ipag.ttf');
114
DEFINE('PGOTHIC_TTF_FONT','ipagp.ttf');
115
 
116
// Assume that Japanese text have been entered in EUC-JP encoding.
117
// If this define is true then conversion from EUC-JP to UTF8 is done
118
// automatically in the library using the mbstring module in PHP.
119
DEFINE('ASSUME_EUCJP_ENCODING',false);
120
 
121
//------------------------------------------------------------------------
122
// Various JpGraph Settings. Adjust accordingly to your
123
// preferences. Note that cache functionality is turned off by
124
// default (Enable by setting USE_CACHE to true)
125
//------------------------------------------------------------------------
126
 
127
// Deafult locale for error messages.
128
// This defaults to English = 'en'
129
DEFINE('DEFAULT_ERR_LOCALE','en');
130
 
131
// Deafult graphic format set to "auto" which will automatically
132
// choose the best available format in the order png,gif,jpeg
133
// (The supported format depends on what your PHP installation supports)
134
DEFINE("DEFAULT_GFORMAT","auto");
135
 
136
// Should the cache be used at all? By setting this to false no
137
// files will be generated in the cache directory.
138
// The difference from READ_CACHE being that setting READ_CACHE to
139
// false will still create the image in the cache directory
140
// just not use it. By setting USE_CACHE=false no files will even
141
// be generated in the cache directory.
142
DEFINE("USE_CACHE",false);
143
 
144
// Should we try to find an image in the cache before generating it?
145
// Set this define to false to bypass the reading of the cache and always
146
// regenerate the image. Note that even if reading the cache is
147
// disabled the cached will still be updated with the newly generated
148
// image. Set also "USE_CACHE" below.
149
DEFINE("READ_CACHE",true);
150
 
151
// Determine if the error handler should be image based or purely
152
// text based. Image based makes it easier since the script will
153
// always return an image even in case of errors.
154
DEFINE("USE_IMAGE_ERROR_HANDLER",true);
155
 
156
// Determine if the library should also setup the default PHP
157
// error handler to generate a graphic error mesage. This is useful
158
// during development to be able to see the error message as an image
159
// instead as a "red-cross" in a page where an image is expected.
160
DEFINE("INSTALL_PHP_ERR_HANDLER",false);
161
 
162
// Should the library examin the global php_errmsg string and convert
163
// any error in it to a graphical representation. This is handy for the
164
// occasions when, for example, header files cannot be found and this results
165
// in the graph not being created and just a "red-cross" image would be seen.
166
// This should be turned off for a production site.
167
DEFINE("CATCH_PHPERRMSG",true);
168
 
169
// Should usage of deprecated functions and parameters give a fatal error?
170
// (Useful to check if code is future proof.)
171
DEFINE("ERR_DEPRECATED",true);
172
 
173
// Should the time taken to generate each picture be branded to the lower
174
// left in corner in each generated image? Useful for performace measurements
175
// generating graphs
176
DEFINE("BRAND_TIMING",false);
177
 
178
// What format should be used for the timing string?
179
DEFINE("BRAND_TIME_FORMAT","(%01.3fs)");
180
 
181
//------------------------------------------------------------------------
182
// The following constants should rarely have to be changed !
183
//------------------------------------------------------------------------
184
 
185
// What group should the cached file belong to
186
// (Set to "" will give the default group for the "PHP-user")
187
// Please note that the Apache user must be a member of the
188
// specified group since otherwise it is impossible for Apache
189
// to set the specified group.
190
DEFINE("CACHE_FILE_GROUP","wwwadmin");
191
 
192
// What permissions should the cached file have
193
// (Set to "" will give the default persmissions for the "PHP-user")
194
DEFINE("CACHE_FILE_MOD",0664);
195
 
196
// Decide if we should use the bresenham circle algorithm or the
197
// built in Arc(). Bresenham gives better visual apperance of circles
198
// but is more CPU intensive and slower then the built in Arc() function
199
// in GD. Turned off by default for speed
200
DEFINE("USE_BRESENHAM",false);
201
 
202
// Special file name to indicate that we only want to calc
203
// the image map in the call to Graph::Stroke() used
204
// internally from the GetHTMLCSIM() method.
205
DEFINE("_CSIM_SPECIALFILE","_csim_special_");
206
 
207
// HTTP GET argument that is used with image map
208
// to indicate to the script to just generate the image
209
// and not the full CSIM HTML page.
210
DEFINE("_CSIM_DISPLAY","_jpg_csimd");
211
 
212
// Special filename for Graph::Stroke(). If this filename is given
213
// then the image will NOT be streamed to browser of file. Instead the
214
// Stroke call will return the handler for the created GD image.
215
DEFINE("_IMG_HANDLER","__handle");
216
 
217
 
218
?>