OSDN Git Service

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