OSDN Git Service

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