OSDN Git Service

Better late than never. Added simple credits, workdays(years), and license notificati...
[pukiwiki/pukiwiki.git] / pukiwiki.ini.php
1 <?php
2 // PukiWiki - Yet another WikiWikiWeb clone
3 // $Id: pukiwiki.ini.php,v 1.120 2005/04/29 09:47:40 henoheno Exp $
4 // Copywrite (C)
5 //   2002-2005 PukiWiki Developers Team
6 //   2001      Originally written by yu-ji
7 // License: GPL v2 or (at your option) any later version
8 //
9 // PukiWiki main setting file
10
11 /////////////////////////////////////////////////
12 // Functionality settings
13
14 // PKWK_OPTIMISE - Ignore verbose but understandable checking and warning
15 //   If you end testing this PukiWiki, set '1'.
16 //   If you feel in trouble about this PukiWiki, set '0'.
17 if (! defined('PKWK_OPTIMISE'))
18         define('PKWK_OPTIMISE', 0);
19
20 /////////////////////////////////////////////////
21 // Security settings
22
23 // PKWK_READONLY - Prohibits editing and maintain via WWW
24 //   NOTE: Counter-related functions will work now (counter, attach count, etc)
25 if (! defined('PKWK_READONLY'))
26         define('PKWK_READONLY', 0); // 0 or 1
27
28 // PKWK_SAFE_MODE - Prohibits some unsafe(but compatible) functions 
29 if (! defined('PKWK_SAFE_MODE'))
30         define('PKWK_SAFE_MODE', 0);
31
32 // PKWK_QUERY_STRING_MAX
33 //   Max length of GET method, prohibits some worm attack ASAP
34 //   NOTE: Keep (page-name + attach-file-name) <= PKWK_QUERY_STRING_MAX
35 define('PKWK_QUERY_STRING_MAX', 640); // Bytes, 0 = OFF
36
37 /////////////////////////////////////////////////
38 // Language / Encoding settings
39
40 // LANG - Internal content encoding ('en', 'ja', or ...)
41 define('LANG', 'ja');
42
43 // UI_LANG - Content encoding for buttons, menus,  etc
44 define('UI_LANG', LANG); // 'en' for Internationalized wikisite
45
46 /////////////////////////////////////////////////
47 // Directory settings I (ended with '/', permission '777')
48
49 // You may hide these directories (from web browsers)
50 // by setting DATA_HOME at index.php.
51
52 define('DATA_DIR',      DATA_HOME . 'wiki/'     ); // Latest wiki texts
53 define('DIFF_DIR',      DATA_HOME . 'diff/'     ); // Latest diffs
54 define('BACKUP_DIR',    DATA_HOME . 'backup/'   ); // Backups
55 define('CACHE_DIR',     DATA_HOME . 'cache/'    ); // Some sort of caches
56 define('UPLOAD_DIR',    DATA_HOME . 'attach/'   ); // Attached files and logs
57 define('COUNTER_DIR',   DATA_HOME . 'counter/'  ); // Counter plugin's counts
58 define('TRACKBACK_DIR', DATA_HOME . 'trackback/'); // TrackBack logs
59 define('PLUGIN_DIR',    DATA_HOME . 'plugin/'   ); // Plugin directory
60
61 /////////////////////////////////////////////////
62 // Directory settings II (ended with '/')
63
64 // Skins / Stylesheets
65 define('SKIN_DIR', 'skin/');
66 // Skin files (SKIN_DIR/*.skin.php) are needed at
67 // ./DATAHOME/SKIN_DIR from index.php, but
68 // CSSs(*.css) and JavaScripts(*.js) are needed at
69 // ./SKIN_DIR from index.php.
70
71 // Static image files
72 define('IMAGE_DIR', 'image/');
73 // Keep this directory shown via web browsers like
74 // ./IMAGE_DIR from index.php.
75
76 /////////////////////////////////////////////////
77 // Local time setting
78
79 switch (LANG) { // or specifiy one
80 case 'ja':
81         define('ZONE', 'JST');
82         define('ZONETIME', 9 * 3600); // JST = GMT + 9
83         break;
84 default  :
85         define('ZONE', 'GMT');
86         define('ZONETIME', 0);
87         break;
88 }
89
90 /////////////////////////////////////////////////
91 // Title of your Wikisite (Name this)
92 // Also used as RSS feed's channel name etc
93 $page_title = 'PukiWiki';
94
95 // Specify PukiWiki URL (default: auto)
96 //$script = 'http://example.com/pukiwiki/';
97
98 // Shorten $script: Cut its file name (default: not cut)
99 //$script_directory_index = 'index.php';
100
101 // Site admin's name (CHANGE THIS)
102 $modifier = 'anonymous';
103
104 // Site admin's Web page (CHANGE THIS)
105 $modifierlink = 'http://pukiwiki.example.com/';
106
107 // Default page name
108 $defaultpage  = 'FrontPage';     // Top / Default page
109 $whatsnew     = 'RecentChanges'; // Modified page list
110 $whatsdeleted = 'RecentDeleted'; // Removeed page list
111 $interwiki    = 'InterWikiName'; // Set InterWiki definition here
112 $menubar      = 'MenuBar';       // Menu
113
114 /////////////////////////////////////////////////
115 // Change default Document Type Definition
116
117 // Some web browser's bug, and / or Java apprets may needs not-Strict DTD.
118 // Some plugin (e.g. paint) set this PKWK_DTD_XHTML_1_0_TRANSITIONAL.
119
120 //$pkwk_dtd = PKWK_DTD_XHTML_1_1; // Default
121 //$pkwk_dtd = PKWK_DTD_XHTML_1_0_STRICT;
122 //$pkwk_dtd = PKWK_DTD_XHTML_1_0_TRANSITIONAL;
123 //$pkwk_dtd = PKWK_DTD_HTML_4_01_STRICT;
124 //$pkwk_dtd = PKWK_DTD_HTML_4_01_TRANSITIONAL;
125
126 /////////////////////////////////////////////////
127
128 // PKWK_ALLOW_JAVASCRIPT - Allow / Prohibit using JavaScript
129 define('PKWK_ALLOW_JAVASCRIPT', 0);
130
131 /////////////////////////////////////////////////
132 // TrackBack feature
133
134 // Enable Trackback
135 $trackback = 0;
136
137 // Show trackbacks with an another window (using JavaScript)
138 $trackback_javascript = 0;
139
140 /////////////////////////////////////////////////
141 // Referer list feature
142 $referer = 0;
143
144 /////////////////////////////////////////////////
145 // _Disable_ WikiName auto-linking
146 $nowikiname = 0;
147
148 /////////////////////////////////////////////////
149 // AutoLink feature
150
151 // AutoLink minimum length of page name
152 $autolink = 8; // Bytes, 0 = OFF
153
154 /////////////////////////////////////////////////
155 // Enable Freeze / Unfreeze feature
156 $function_freeze = 1;
157
158 /////////////////////////////////////////////////
159 // Enable 'Do not change timestamp' at edit
160 // (1:Enable, 2:Enable only administrator, 0:Disable)
161 $notimeupdate = 1;
162
163 /////////////////////////////////////////////////
164 // Admin password for this Wikisite
165
166 // CHANGE THIS
167 $adminpass = '{x-php-md5}1a1dc91c907325c69271ddf0c944bc72'; // md5('pass')
168
169 /////////////////////////////////////////////////
170 // Page-reading feature settings
171 // (Automatically creating pronounce datas, for Kanji-included page names,
172 //  to show sorted page-list correctly)
173
174 // Enable page-reading feature by calling ChaSen or KAKASHI command
175 // (1:Enable, 0:Disable)
176 $pagereading_enable = 0;
177
178 // Specify converter as ChaSen('chasen') or KAKASI('kakasi') or None('none')
179 $pagereading_kanji2kana_converter = 'none';
180
181 // Specify Kanji encoding to pass data between PukiWiki and the converter
182 $pagereading_kanji2kana_encoding = 'EUC'; // Default for Unix
183 //$pagereading_kanji2kana_encoding = 'SJIS'; // Default for Windows
184
185 // Absolute path of the converter (ChaSen)
186 $pagereading_chasen_path = '/usr/local/bin/chasen';
187 //$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen.exe';
188
189 // Absolute path of the converter (KAKASI)
190 $pagereading_kakasi_path = '/usr/local/bin/kakasi';
191 //$pagereading_kakasi_path = 'c:\kakasi\bin\kakasi.exe';
192
193 // Page name contains pronounce data (written by the converter)
194 $pagereading_config_page = ':config/PageReading';
195
196 // Page name of default pronouncing dictionary, used when converter = 'none'
197 $pagereading_config_dict = ':config/PageReading/dict';
198
199 /////////////////////////////////////////////////
200 // User definition
201 $auth_users = array(
202         'foo'   => 'foo_passwd', // Cleartext
203         'bar'   => '{x-php-md5}f53ae779077e987718cc285b14dfbe86', // md5('bar_passwd')
204         'hoge'  => '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx', // SMD5 'hoge_passwd'
205 );
206
207 /////////////////////////////////////////////////
208 // Authentication method
209
210 $auth_method_type = 'contents'; // By Page contents
211 //$auth_method_type = 'pagename';       // By Page name
212
213 /////////////////////////////////////////////////
214 // Read auth (0:Disable, 1:Enable)
215 $read_auth = 0;
216
217 // Read auth regex
218 $read_auth_pages = array(
219         '#¤Ò¤­¤³¤â¤ë¤Û¤²#'      => 'hoge',
220         '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo,bar,hoge',
221 );
222
223 /////////////////////////////////////////////////
224 // Edit auth (0:Disable, 1:Enable)
225 $edit_auth = 0;
226
227 // Edit auth regex
228 $edit_auth_pages = array(
229         '#Bar¤Î¸ø³«Æüµ­#'       => 'bar',
230         '#¤Ò¤­¤³¤â¤ë¤Û¤²#'      => 'hoge',
231         '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo,bar,hoge',
232 );
233
234 /////////////////////////////////////////////////
235 // Search auth
236 // 0: Disabled (Search read-prohibited page contents)
237 // 1: Enabled  (Search only permitted pages for the user)
238 $search_auth = 0;
239
240 /////////////////////////////////////////////////
241 // $whatsnew: Max number of RecentChanges
242 $maxshow = 60;
243
244 // $whatsdeleted: Max number of RecentDeleted
245 // (0 = Disabled)
246 $maxshow_deleted = 60;
247
248 /////////////////////////////////////////////////
249 // Page names can't be edit via PukiWiki
250 $cantedit = array( $whatsnew, $whatsdeleted );
251
252 /////////////////////////////////////////////////
253 // HTTP: Output Last-Modified header
254 $lastmod = 0;
255
256 /////////////////////////////////////////////////
257 // Date format
258 $date_format = 'Y-m-d';
259
260 // Time format
261 $time_format = 'H:i:s';
262
263 /////////////////////////////////////////////////
264 // Max number of RSS feed
265 $rss_max = 15;
266
267 /////////////////////////////////////////////////
268 // Backup related settings
269
270 // Enable backup
271 $do_backup = 1;
272
273 // When a page had been removed, remove its backup too?
274 $del_backup = 0;
275
276 // Bacukp interval and generation
277 $cycle  =   3; // Wait N hours between backup (0 = no wait)
278 $maxage = 120; // Stock latest N backups
279
280 // NOTE: $cycle x $maxage / 24 = Minimum days to lost your data
281 //          3   x   120   / 24 = 15
282
283 // Splitter of backup data (NOTE: Too dangerous to change)
284 define('PKWK_SPLITTER', '>>>>>>>>>>');
285
286 /////////////////////////////////////////////////
287 // Command executed per update
288 $update_exec = '';
289 //$update_exec = '/usr/bin/mknmz --media-type=text/pukiwiki -O /var/lib/namazu/index/ -L ja -c -K /var/www/wiki/';
290
291 /////////////////////////////////////////////////
292 // HTTP proxy setting (for TrackBack etc)
293
294 // Use HTTP proxy server to get remote data
295 $use_proxy = 0;
296
297 $proxy_host = 'proxy.example.com';
298 $proxy_port = 8080;
299
300 // Do Basic authentication
301 $need_proxy_auth = 0;
302 $proxy_auth_user = 'username';
303 $proxy_auth_pass = 'password';
304
305 // Hosts that proxy server will not be needed
306 $no_proxy = array(
307         'localhost',    // localhost
308         '127.0.0.0/8',  // loopback
309 //      '10.0.0.0/8'    // private class A
310 //      '172.16.0.0/12' // private class B
311 //      '192.168.0.0/16'        // private class C
312 //      'no-proxy.com',
313 );
314
315 ////////////////////////////////////////////////
316 // Mail related settings
317
318 // Send mail per update of pages
319 $notify = 0;
320
321 // Send diff only
322 $notify_diff_only = 1;
323
324 // SMTP server (Windows only. Usually specified at php.ini)
325 $smtp_server = 'localhost';
326
327 // Mail recipient (To:) and sender (From:)
328 $notify_to   = 'to@example.com';        // To:
329 $notify_from = 'from@example.com';      // From:
330
331 // Subject: ($page = Page name wll be replaced)
332 $notify_subject = '[PukiWiki] $page';
333
334 // Mail header
335 $notify_header = "From: $notify_from\r\n" .
336         'X-Mailer: PukiWiki/' .  S_VERSION . ' PHP/' . phpversion();
337
338 /////////////////////////////////////////////////
339 // Mail: POP / APOP Before SMTP
340
341 // Do POP/APOP authentication before send mail
342 $smtp_auth = 0;
343
344 $pop_server = 'localhost';
345 $pop_port   = 110;
346 $pop_userid = '';
347 $pop_passwd = '';
348
349 // Use APOP instead of POP (If server uses)
350 //   Default = Auto (Use APOP if possible)
351 //   1       = Always use APOP
352 //   0       = Always use POP
353 // $pop_auth_use_apop = 1;
354
355 /////////////////////////////////////////////////
356 // Ignore list
357
358 // Regex of ignore pages
359 $non_list = '^\:';
360
361 // Search ignored pages
362 $search_non_list = 1;
363
364 /////////////////////////////////////////////////
365 // Template setting
366
367 $auto_template_func = 1;
368 $auto_template_rules = array(
369         '((.+)\/([^\/]+))' => '\2/template'
370 );
371
372 /////////////////////////////////////////////////
373 // Automatically add fixed heading anchor
374 $fixed_heading_anchor = 1;
375
376 /////////////////////////////////////////////////
377 // Remove the first spaces from Preformatted text
378 $preformat_ltrim = 1;
379
380 /////////////////////////////////////////////////
381 // Convert linebreaks into <br />
382 $line_break = 0;
383
384 /////////////////////////////////////////////////
385 // Use date-time rules (See rules.ini.php)
386 $usedatetime = 1;
387
388 /////////////////////////////////////////////////
389 // User-Agent settings
390 //
391 // If you want to ignore embedded browsers for rich-content-wikisite,
392 // remove (or comment-out) all 'keitai' settings.
393 //
394 // If you want to to ignore desktop-PC browsers for simple wikisite,
395 // copy keitai.ini.php to default.ini.php and customize it.
396
397 $agents = array(
398 // pattern: A regular-expression that matches device(browser)'s name and version
399 // profile: A group of browsers
400
401     // Embedded browsers (Rich-clients for PukiWiki)
402
403         // Windows CE (Microsoft(R) Internet Explorer 5.5 for Windows(R) CE)
404         // Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC)
405         array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#', 'profile'=>'default'),
406
407         // ACCESS "NetFront" / "Compact NetFront" and thier OEM, expects to be "Mozilla/4.0"
408         // Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0" (PlayStation BB Navigator, for SONY PlayStation 2)
409         // Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.19) NetFront/3.0" (SONY Clie series)
410         // Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (SHARP Zaurus)
411         array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]+)#',   'profile'=>'default'),
412
413     // Embedded browsers (Non-rich)
414
415         // Windows CE (the others)
416         // Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320 )" (GFORT, NTT DoCoMo)
417         array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keitai'),
418
419         // ACCESS "NetFront" / "Compact NetFront" and thier OEM
420         // Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2)
421         // Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket: AirH" Phone by JRC)
422         array('pattern'=>'#\b(NetFront)/([0-9\.]+)#',   'profile'=>'keitai'),
423         array('pattern'=>'#\b(CNF)/([0-9\.]+)#',        'profile'=>'keitai'),
424         array('pattern'=>'#\b(AveFront)/([0-9\.]+)#',   'profile'=>'keitai'),
425         array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#',  'profile'=>'keitai'), // The same?
426
427         // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones
428         // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c°Ê¹ß¤Ï²ÄÊÑ
429         // Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()¤ÎÃæ¤Ï²ÄÊÑ
430         array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#',      'profile'=>'keitai'),
431
432         // Vodafone's embedded browser
433         // Sample: "J-PHONE/2.0/J-T03"  // 2.0¤Ï"¥Ö¥é¥¦¥¶¤Î"¥Ð¡¼¥¸¥ç¥ó
434         // Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0"
435         array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#',     'profile'=>'keitai'),
436
437         // Openwave(R) Mobile Browser (EZweb, WAP phone, etc)
438         // Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MMP/2.0"
439         array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#',        'profile'=>'keitai'),
440
441         // Opera, dressing up as other embedded browsers
442         // Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at 'keitai'-mode)
443         array('pattern'=>'#\bDDIPOCKET\b.+\b(Opera) ([0-9\.]+)\b#',     'profile'=>'keitai'),
444
445         // Planetweb http://www.planetweb.com/
446         // Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2)
447         array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile'=>'keitai'),
448
449         // DreamPassport, Web browser for SEGA DreamCast
450         // Sample: "Mozilla/3.0 (DreamPassport/3.0)"
451         array('pattern'=>'#\b(DreamPassport)/([0-9\.]+)#',      'profile'=>'keitai'),
452
453         // Palm "Web Pro" http://www.palmone.com/us/support/accessories/webpro/
454         // Sample: "Mozilla/4.76 [en] (PalmOS; U; WebPro)"
455         array('pattern'=>'#\b(WebPro)\b#',      'profile'=>'keitai'),
456
457         // ilinx "Palmscape" / "Xiino" http://www.ilinx.co.jp/
458         // Sample: "Xiino/2.1SJ [ja] (v. 4.1; 153x130; c16/d)"
459         array('pattern'=>'#^(Palmscape)/([0-9\.]+)#',   'profile'=>'keitai'),
460         array('pattern'=>'#^(Xiino)/([0-9\.]+)#',       'profile'=>'keitai'),
461
462         // SHARP PDA Browser (SHARP Zaurus)
463         // Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
464         array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#',        'profile'=>'keitai'),
465
466         // WebTV
467         array('pattern'=>'#^(WebTV)/([0-9\.]+)#',       'profile'=>'keitai'),
468
469     // Desktop-PC browsers
470
471         // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail
472         // NOTE: Keep this pattern above MSIE and Mozilla
473         // Sample: "Opera/7.0 (OS; U)" (not disguise)
474         // Sample: "Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera 6.0" (disguise)
475         array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#', 'profile'=>'default'),
476
477         // MSIE: Microsoft Internet Explorer (or something disguised as MSIE)
478         // Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
479         array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#',     'profile'=>'default'),
480
481         // Mozilla Firefox
482         // NOTE: Keep this pattern above Mozilla
483         // Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
484         array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#',  'profile'=>'default'),
485
486         // Loose default: Including something Mozilla
487         array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#',     'profile'=>'default'),
488
489         array('pattern'=>'#^#', 'profile'=>'default'),  // Sentinel
490 );
491 ?>