OSDN Git Service

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