2 // PukiWiki - Yet another WikiWikiWeb clone
3 // $Id: pukiwiki.ini.php,v 1.143 2006/10/08 11:27:06 henoheno Exp $
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
9 // PukiWiki main setting file
11 /////////////////////////////////////////////////
12 // Functionality settings
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);
20 /////////////////////////////////////////////////
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
28 // PKWK_SAFE_MODE - Prohibits some unsafe(but compatible) functions
29 if (! defined('PKWK_SAFE_MODE'))
30 define('PKWK_SAFE_MODE', 0);
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);
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
44 /////////////////////////////////////////////////
45 // Experimental features
47 // Multiline plugin hack (See BugTrack2/84)
48 // EXAMPLE(with a known BUG):
49 // #plugin(args1,args2,...,argsN){{
55 // #memo(This makes '#memo(foo)' to this)
56 define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 1); // 1 = Disabled
58 /////////////////////////////////////////////////
59 // Language / Encoding settings
61 // LANG - Internal content encoding ('en', 'ja', or ...)
64 // UI_LANG - Content encoding for buttons, menus, etc
65 define('UI_LANG', LANG); // 'en' for Internationalized wikisite
67 /////////////////////////////////////////////////
68 // Directory settings I (ended with '/', permission '777')
70 // You may hide these directories (from web browsers)
71 // by setting DATA_HOME at index.php.
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
82 /////////////////////////////////////////////////
83 // Directory settings II (ended with '/')
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.
93 define('IMAGE_DIR', 'image/');
94 // Keep this directory shown via web browsers like
95 // ./IMAGE_DIR from index.php.
97 /////////////////////////////////////////////////
100 switch (LANG) { // or specifiy one
102 define('ZONE', 'JST');
103 define('ZONETIME', 9 * 3600); // JST = GMT + 9
106 define('ZONE', 'GMT');
107 define('ZONETIME', 0);
111 /////////////////////////////////////////////////
112 // Title of your Wikisite (Name this)
113 // Also used as RSS feed's channel name etc
114 $page_title = 'PukiWiki';
116 // Specify PukiWiki URL (default: auto)
117 //$script = 'http://example.com/pukiwiki/';
119 // Shorten $script: Cut its file name (default: not cut)
120 //$script_directory_index = 'index.php';
122 // Site admin's name (CHANGE THIS)
123 $modifier = 'anonymous';
125 // Site admin's Web page (CHANGE THIS)
126 $modifierlink = 'http://pukiwiki.example.com/';
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
135 /////////////////////////////////////////////////
136 // Change default Document Type Definition
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.
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;
147 /////////////////////////////////////////////////
148 // Always output "nofollow,noindex" attribute
150 $nofollow = 0; // 1 = Try hiding from search engines
152 /////////////////////////////////////////////////
154 // PKWK_ALLOW_JAVASCRIPT - Allow / Prohibit using JavaScript
155 define('PKWK_ALLOW_JAVASCRIPT', 0);
157 /////////////////////////////////////////////////
163 /////////////////////////////////////////////////
164 // Referer list feature
167 /////////////////////////////////////////////////
168 // _Disable_ WikiName auto-linking
171 /////////////////////////////////////////////////
174 // AutoLink minimum length of page name
175 $autolink = 0; // Bytes, 0 = OFF (try 8)
177 /////////////////////////////////////////////////
178 // Enable Freeze / Unfreeze feature
179 $function_freeze = 1;
181 /////////////////////////////////////////////////
182 // Allow to use 'Do not change timestamp' checkbox
183 // (0:Disable, 1:For everyone, 2:Only for the administrator)
186 /////////////////////////////////////////////////
187 // Admin password for this Wikisite
189 // Default: always fail
190 $adminpass = '{x-php-md5}!';
193 //$adminpass = 'pass'; // Cleartext
194 //$adminpass = '{x-php-md5}1a1dc91c907325c69271ddf0c944bc72'; // PHP md5() 'pass'
195 //$adminpass = '{CRYPT}$1$AR.Gk94x$uCe8fUUGMfxAPH83psCZG/'; // LDAP CRYPT 'pass'
196 //$adminpass = '{MD5}Gh3JHJBzJcaScd3wyUS8cg=='; // LDAP MD5 'pass'
197 //$adminpass = '{SMD5}o7lTdtHFJDqxFOVX09C8QnlmYmZnd2Qx'; // LDAP SMD5 'pass'
199 /////////////////////////////////////////////////
200 // Page-reading feature settings
201 // (Automatically creating pronounce datas, for Kanji-included page names,
202 // to show sorted page-list correctly)
204 // Enable page-reading feature by calling ChaSen or KAKASHI command
205 // (1:Enable, 0:Disable)
206 $pagereading_enable = 0;
208 // Specify converter as ChaSen('chasen') or KAKASI('kakasi') or None('none')
209 $pagereading_kanji2kana_converter = 'none';
211 // Specify Kanji encoding to pass data between PukiWiki and the converter
212 $pagereading_kanji2kana_encoding = 'EUC'; // Default for Unix
213 //$pagereading_kanji2kana_encoding = 'SJIS'; // Default for Windows
215 // Absolute path of the converter (ChaSen)
216 $pagereading_chasen_path = '/usr/local/bin/chasen';
217 //$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen.exe';
219 // Absolute path of the converter (KAKASI)
220 $pagereading_kakasi_path = '/usr/local/bin/kakasi';
221 //$pagereading_kakasi_path = 'c:\kakasi\bin\kakasi.exe';
223 // Page name contains pronounce data (written by the converter)
224 $pagereading_config_page = ':config/PageReading';
226 // Page name of default pronouncing dictionary, used when converter = 'none'
227 $pagereading_config_dict = ':config/PageReading/dict';
229 /////////////////////////////////////////////////
232 // Username => password
233 'foo' => 'foo_passwd', // Cleartext
234 'bar' => '{x-php-md5}f53ae779077e987718cc285b14dfbe86', // PHP md5() 'bar_passwd'
235 'hoge' => '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx', // LDAP SMD5 'hoge_passwd'
238 /////////////////////////////////////////////////
239 // Authentication method
241 $auth_method_type = 'pagename'; // By Page name
242 //$auth_method_type = 'contents'; // By Page contents
244 /////////////////////////////////////////////////
245 // Read auth (0:Disable, 1:Enable)
248 $read_auth_pages = array(
250 '#HogeHoge#' => 'hoge',
251 '#(NETABARE|NetaBare)#' => 'foo,bar,hoge',
254 /////////////////////////////////////////////////
255 // Edit auth (0:Disable, 1:Enable)
258 $edit_auth_pages = array(
260 '#BarDiary#' => 'bar',
261 '#HogeHoge#' => 'hoge',
262 '#(NETABARE|NetaBare)#' => 'foo,bar,hoge',
265 /////////////////////////////////////////////////
267 // 0: Disabled (Search read-prohibited page contents)
268 // 1: Enabled (Search only permitted pages for the user)
271 /////////////////////////////////////////////////
272 // $whatsnew: Max number of RecentChanges
275 // $whatsdeleted: Max number of RecentDeleted
277 $maxshow_deleted = 60;
279 /////////////////////////////////////////////////
280 // Page names can't be edit via PukiWiki
281 $cantedit = array( $whatsnew, $whatsdeleted );
283 /////////////////////////////////////////////////
284 // HTTP: Output Last-Modified header
287 /////////////////////////////////////////////////
289 $date_format = 'Y-m-d';
292 $time_format = 'H:i:s';
294 /////////////////////////////////////////////////
295 // Max number of RSS feed
298 /////////////////////////////////////////////////
299 // Backup related settings
304 // When a page had been removed, remove its backup too?
307 // Bacukp interval and generation
308 $cycle = 3; // Wait N hours between backup (0 = no wait)
309 $maxage = 120; // Stock latest N backups
311 // NOTE: $cycle x $maxage / 24 = Minimum days to lost your data
314 // Splitter of backup data (NOTE: Too dangerous to change)
315 define('PKWK_SPLITTER', '>>>>>>>>>>');
317 /////////////////////////////////////////////////
318 // Command execution per update
320 define('PKWK_UPDATE_EXEC', '');
322 // Sample: Namazu (Search engine)
323 //$target = '/var/www/wiki/';
324 //$mknmz = '/usr/bin/mknmz';
325 //$output_dir = '/var/lib/namazu/index/';
326 //define('PKWK_UPDATE_EXEC',
327 // $mknmz . ' --media-type=text/pukiwiki' .
328 // ' -O ' . $output_dir . ' -L ja -c -K ' . $target);
330 /////////////////////////////////////////////////
331 // HTTP proxy setting (for TrackBack etc)
333 // Use HTTP proxy server to get remote data
336 $proxy_host = 'proxy.example.com';
339 // Do Basic authentication
340 $need_proxy_auth = 0;
341 $proxy_auth_user = 'username';
342 $proxy_auth_pass = 'password';
344 // Hosts that proxy server will not be needed
346 'localhost', // localhost
347 '127.0.0.0/8', // loopback
348 // '10.0.0.0/8' // private class A
349 // '172.16.0.0/12' // private class B
350 // '192.168.0.0/16' // private class C
354 ////////////////////////////////////////////////
355 // Mail related settings
357 // Send mail per update of pages
361 $notify_diff_only = 1;
363 // SMTP server (Windows only. Usually specified at php.ini)
364 $smtp_server = 'localhost';
366 // Mail recipient (To:) and sender (From:)
367 $notify_to = 'to@example.com'; // To:
368 $notify_from = 'from@example.com'; // From:
370 // Subject: ($page = Page name wll be replaced)
371 $notify_subject = '[PukiWiki] $page';
374 // NOTE: Multiple items must be divided by "\r\n", not "\n".
377 /////////////////////////////////////////////////
378 // Mail: POP / APOP Before SMTP
380 // Do POP/APOP authentication before send mail
383 $pop_server = 'localhost';
388 // Use APOP instead of POP (If server uses)
389 // Default = Auto (Use APOP if possible)
390 // 1 = Always use APOP
391 // 0 = Always use POP
392 // $pop_auth_use_apop = 1;
394 /////////////////////////////////////////////////
397 // Regex of ignore pages
400 // Search ignored pages
401 $search_non_list = 1;
403 /////////////////////////////////////////////////
406 $auto_template_func = 1;
407 $auto_template_rules = array(
408 '((.+)\/([^\/]+))' => '\2/template'
411 /////////////////////////////////////////////////
412 // Automatically add fixed heading anchor
413 $fixed_heading_anchor = 1;
415 /////////////////////////////////////////////////
416 // Remove the first spaces from Preformatted text
417 $preformat_ltrim = 1;
419 /////////////////////////////////////////////////
420 // Convert linebreaks into <br />
423 /////////////////////////////////////////////////
424 // Use date-time rules (See rules.ini.php)
427 /////////////////////////////////////////////////
428 // User-Agent settings
430 // If you want to ignore embedded browsers for rich-content-wikisite,
431 // remove (or comment-out) all 'keitai' settings.
433 // If you want to to ignore desktop-PC browsers for simple wikisite,
434 // copy keitai.ini.php to default.ini.php and customize it.
437 // pattern: A regular-expression that matches device(browser)'s name and version
438 // profile: A group of browsers
440 // Embedded browsers (Rich-clients for PukiWiki)
442 // Windows CE (Microsoft(R) Internet Explorer 5.5 for Windows(R) CE)
443 // Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC)
444 array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#', 'profile'=>'default'),
446 // ACCESS "NetFront" / "Compact NetFront" and thier OEM, expects to be "Mozilla/4.0"
447 // Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0" (PlayStation BB Navigator, for SONY PlayStation 2)
448 // Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.19) NetFront/3.0" (SONY Clie series)
449 // Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (SHARP Zaurus)
450 array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]+)#', 'profile'=>'default'),
452 // Embedded browsers (Non-rich)
454 // Windows CE (the others)
455 // Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320 )" (GFORT, NTT DoCoMo)
456 array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keitai'),
458 // ACCESS "NetFront" / "Compact NetFront" and thier OEM
459 // Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2)
460 // Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket: AirH" Phone by JRC)
461 array('pattern'=>'#\b(NetFront)/([0-9\.]+)#', 'profile'=>'keitai'),
462 array('pattern'=>'#\b(CNF)/([0-9\.]+)#', 'profile'=>'keitai'),
463 array('pattern'=>'#\b(AveFront)/([0-9\.]+)#', 'profile'=>'keitai'),
464 array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#', 'profile'=>'keitai'), // The same?
466 // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones
467 // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c°Ê¹ß¤Ï²ÄÊÑ
468 // Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()¤ÎÃæ¤Ï²ÄÊÑ
469 array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#', 'profile'=>'keitai'),
471 // Vodafone's embedded browser
472 // Sample: "J-PHONE/2.0/J-T03" // 2.0¤Ï"¥Ö¥é¥¦¥¶¤Î"¥Ð¡¼¥¸¥ç¥ó
473 // Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0"
474 array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#', 'profile'=>'keitai'),
476 // Openwave(R) Mobile Browser (EZweb, WAP phone, etc)
477 // Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MMP/2.0"
478 array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#', 'profile'=>'keitai'),
480 // Opera, dressing up as other embedded browsers
481 // Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at 'keitai'-mode)
482 array('pattern'=>'#\b(?:DDIPOCKET|WILLCOM)\b.+\b(Opera) ([0-9\.]+)\b#', 'profile'=>'keitai'),
484 // Planetweb http://www.planetweb.com/
485 // Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2)
486 array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile'=>'keitai'),
488 // DreamPassport, Web browser for SEGA DreamCast
489 // Sample: "Mozilla/3.0 (DreamPassport/3.0)"
490 array('pattern'=>'#\b(DreamPassport)/([0-9\.]+)#', 'profile'=>'keitai'),
492 // Palm "Web Pro" http://www.palmone.com/us/support/accessories/webpro/
493 // Sample: "Mozilla/4.76 [en] (PalmOS; U; WebPro)"
494 array('pattern'=>'#\b(WebPro)\b#', 'profile'=>'keitai'),
496 // ilinx "Palmscape" / "Xiino" http://www.ilinx.co.jp/
497 // Sample: "Xiino/2.1SJ [ja] (v. 4.1; 153x130; c16/d)"
498 array('pattern'=>'#^(Palmscape)/([0-9\.]+)#', 'profile'=>'keitai'),
499 array('pattern'=>'#^(Xiino)/([0-9\.]+)#', 'profile'=>'keitai'),
501 // SHARP PDA Browser (SHARP Zaurus)
502 // Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
503 array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#', 'profile'=>'keitai'),
506 array('pattern'=>'#^(WebTV)/([0-9\.]+)#', 'profile'=>'keitai'),
508 // Desktop-PC browsers
510 // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail
511 // NOTE: Keep this pattern above MSIE and Mozilla
512 // Sample: "Opera/7.0 (OS; U)" (not disguise)
513 // Sample: "Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera 6.0" (disguise)
514 array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#', 'profile'=>'default'),
516 // MSIE: Microsoft Internet Explorer (or something disguised as MSIE)
517 // Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
518 array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#', 'profile'=>'default'),
521 // NOTE: Keep this pattern above Mozilla
522 // Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
523 array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#', 'profile'=>'default'),
525 // Loose default: Including something Mozilla
526 array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#', 'profile'=>'default'),
528 array('pattern'=>'#^#', 'profile'=>'default'), // Sentinel