2 // PukiWiki - Yet another WikiWikiWeb clone
3 // $Id: pukiwiki.ini.php,v 1.119 2005/04/05 13:40:31 henoheno Exp $
5 // PukiWiki main setting file
7 /////////////////////////////////////////////////
8 // Functionality settings
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);
16 /////////////////////////////////////////////////
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
24 // PKWK_SAFE_MODE - Prohibits some unsafe(but compatible) functions
25 if (! defined('PKWK_SAFE_MODE'))
26 define('PKWK_SAFE_MODE', 0);
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
33 /////////////////////////////////////////////////
34 // Language / Encoding settings
36 // LANG - Internal content encoding ('en', 'ja', or ...)
39 // UI_LANG - Content encoding for buttons, menus, etc
40 define('UI_LANG', LANG); // 'en' for Internationalized wikisite
42 /////////////////////////////////////////////////
43 // Directory settings I (ended with '/', permission '777')
45 // You may hide these directories (from web browsers)
46 // by setting DATA_HOME at index.php.
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
57 /////////////////////////////////////////////////
58 // Directory settings II (ended with '/')
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.
68 define('IMAGE_DIR', 'image/');
69 // Keep this directory shown via web browsers like
70 // ./IMAGE_DIR from index.php.
72 /////////////////////////////////////////////////
75 switch (LANG) { // or specifiy one
77 define('ZONE', 'JST');
78 define('ZONETIME', 9 * 3600); // JST = GMT + 9
81 define('ZONE', 'GMT');
82 define('ZONETIME', 0);
86 /////////////////////////////////////////////////
87 // Title of your Wikisite (Name this)
88 // Also used as RSS feed's channel name etc
89 $page_title = 'PukiWiki';
91 // Specify PukiWiki URL (default: auto)
92 //$script = 'http://example.com/pukiwiki/';
94 // Shorten $script: Cut its file name (default: not cut)
95 //$script_directory_index = 'index.php';
97 // Site admin's name (CHANGE THIS)
98 $modifier = 'anonymous';
100 // Site admin's Web page (CHANGE THIS)
101 $modifierlink = 'http://pukiwiki.example.com/';
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 $menubar = 'MenuBar'; // Menu
110 /////////////////////////////////////////////////
111 // Change default Document Type Definition
113 // Some web browser's bug, and / or Java apprets may needs not-Strict DTD.
114 // Some plugin (e.g. paint) set this PKWK_DTD_XHTML_1_0_TRANSITIONAL.
116 //$pkwk_dtd = PKWK_DTD_XHTML_1_1; // Default
117 //$pkwk_dtd = PKWK_DTD_XHTML_1_0_STRICT;
118 //$pkwk_dtd = PKWK_DTD_XHTML_1_0_TRANSITIONAL;
119 //$pkwk_dtd = PKWK_DTD_HTML_4_01_STRICT;
120 //$pkwk_dtd = PKWK_DTD_HTML_4_01_TRANSITIONAL;
122 /////////////////////////////////////////////////
124 // PKWK_ALLOW_JAVASCRIPT - Allow / Prohibit using JavaScript
125 define('PKWK_ALLOW_JAVASCRIPT', 0);
127 /////////////////////////////////////////////////
133 // Show trackbacks with an another window (using JavaScript)
134 $trackback_javascript = 0;
136 /////////////////////////////////////////////////
137 // Referer list feature
140 /////////////////////////////////////////////////
141 // _Disable_ WikiName auto-linking
144 /////////////////////////////////////////////////
147 // AutoLink minimum length of page name
148 $autolink = 8; // Bytes, 0 = OFF
150 /////////////////////////////////////////////////
151 // Enable Freeze / Unfreeze feature
152 $function_freeze = 1;
154 /////////////////////////////////////////////////
155 // Enable 'Do not change timestamp' at edit
156 // (1:Enable, 2:Enable only administrator, 0:Disable)
159 /////////////////////////////////////////////////
160 // Admin password for this Wikisite
163 $adminpass = '{x-php-md5}1a1dc91c907325c69271ddf0c944bc72'; // md5('pass')
165 /////////////////////////////////////////////////
166 // Page-reading feature settings
167 // (Automatically creating pronounce datas, for Kanji-included page names,
168 // to show sorted page-list correctly)
170 // Enable page-reading feature by calling ChaSen or KAKASHI command
171 // (1:Enable, 0:Disable)
172 $pagereading_enable = 0;
174 // Specify converter as ChaSen('chasen') or KAKASI('kakasi') or None('none')
175 $pagereading_kanji2kana_converter = 'none';
177 // Specify Kanji encoding to pass data between PukiWiki and the converter
178 $pagereading_kanji2kana_encoding = 'EUC'; // Default for Unix
179 //$pagereading_kanji2kana_encoding = 'SJIS'; // Default for Windows
181 // Absolute path of the converter (ChaSen)
182 $pagereading_chasen_path = '/usr/local/bin/chasen';
183 //$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen.exe';
185 // Absolute path of the converter (KAKASI)
186 $pagereading_kakasi_path = '/usr/local/bin/kakasi';
187 //$pagereading_kakasi_path = 'c:\kakasi\bin\kakasi.exe';
189 // Page name contains pronounce data (written by the converter)
190 $pagereading_config_page = ':config/PageReading';
192 // Page name of default pronouncing dictionary, used when converter = 'none'
193 $pagereading_config_dict = ':config/PageReading/dict';
195 /////////////////////////////////////////////////
198 'foo' => 'foo_passwd', // Cleartext
199 'bar' => '{x-php-md5}f53ae779077e987718cc285b14dfbe86', // md5('bar_passwd')
200 'hoge' => '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx', // SMD5 'hoge_passwd'
203 /////////////////////////////////////////////////
204 // Authentication method
206 $auth_method_type = 'contents'; // By Page contents
207 //$auth_method_type = 'pagename'; // By Page name
209 /////////////////////////////////////////////////
210 // Read auth (0:Disable, 1:Enable)
214 $read_auth_pages = array(
215 '#¤Ò¤¤³¤â¤ë¤Û¤²#' => 'hoge',
216 '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo,bar,hoge',
219 /////////////////////////////////////////////////
220 // Edit auth (0:Disable, 1:Enable)
224 $edit_auth_pages = array(
225 '#Bar¤Î¸ø³«Æüµ#' => 'bar',
226 '#¤Ò¤¤³¤â¤ë¤Û¤²#' => 'hoge',
227 '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo,bar,hoge',
230 /////////////////////////////////////////////////
232 // 0: Disabled (Search read-prohibited page contents)
233 // 1: Enabled (Search only permitted pages for the user)
236 /////////////////////////////////////////////////
237 // $whatsnew: Max number of RecentChanges
240 // $whatsdeleted: Max number of RecentDeleted
242 $maxshow_deleted = 60;
244 /////////////////////////////////////////////////
245 // Page names can't be edit via PukiWiki
246 $cantedit = array( $whatsnew, $whatsdeleted );
248 /////////////////////////////////////////////////
249 // HTTP: Output Last-Modified header
252 /////////////////////////////////////////////////
254 $date_format = 'Y-m-d';
257 $time_format = 'H:i:s';
259 /////////////////////////////////////////////////
260 // Max number of RSS feed
263 /////////////////////////////////////////////////
264 // Backup related settings
269 // When a page had been removed, remove its backup too?
272 // Bacukp interval and generation
273 $cycle = 3; // Wait N hours between backup (0 = no wait)
274 $maxage = 120; // Stock latest N backups
276 // NOTE: $cycle x $maxage / 24 = Minimum days to lost your data
279 // Splitter of backup data (NOTE: Too dangerous to change)
280 define('PKWK_SPLITTER', '>>>>>>>>>>');
282 /////////////////////////////////////////////////
283 // Command executed per update
285 //$update_exec = '/usr/bin/mknmz --media-type=text/pukiwiki -O /var/lib/namazu/index/ -L ja -c -K /var/www/wiki/';
287 /////////////////////////////////////////////////
288 // HTTP proxy setting (for TrackBack etc)
290 // Use HTTP proxy server to get remote data
293 $proxy_host = 'proxy.example.com';
296 // Do Basic authentication
297 $need_proxy_auth = 0;
298 $proxy_auth_user = 'username';
299 $proxy_auth_pass = 'password';
301 // Hosts that proxy server will not be needed
303 'localhost', // localhost
304 '127.0.0.0/8', // loopback
305 // '10.0.0.0/8' // private class A
306 // '172.16.0.0/12' // private class B
307 // '192.168.0.0/16' // private class C
311 ////////////////////////////////////////////////
312 // Mail related settings
314 // Send mail per update of pages
318 $notify_diff_only = 1;
320 // SMTP server (Windows only. Usually specified at php.ini)
321 $smtp_server = 'localhost';
323 // Mail recipient (To:) and sender (From:)
324 $notify_to = 'to@example.com'; // To:
325 $notify_from = 'from@example.com'; // From:
327 // Subject: ($page = Page name wll be replaced)
328 $notify_subject = '[PukiWiki] $page';
331 $notify_header = "From: $notify_from\r\n" .
332 'X-Mailer: PukiWiki/' . S_VERSION . ' PHP/' . phpversion();
334 /////////////////////////////////////////////////
335 // Mail: POP / APOP Before SMTP
337 // Do POP/APOP authentication before send mail
340 $pop_server = 'localhost';
345 // Use APOP instead of POP (If server uses)
346 // Default = Auto (Use APOP if possible)
347 // 1 = Always use APOP
348 // 0 = Always use POP
349 // $pop_auth_use_apop = 1;
351 /////////////////////////////////////////////////
354 // Regex of ignore pages
357 // Search ignored pages
358 $search_non_list = 1;
360 /////////////////////////////////////////////////
363 $auto_template_func = 1;
364 $auto_template_rules = array(
365 '((.+)\/([^\/]+))' => '\2/template'
368 /////////////////////////////////////////////////
369 // Automatically add fixed heading anchor
370 $fixed_heading_anchor = 1;
372 /////////////////////////////////////////////////
373 // Remove the first spaces from Preformatted text
374 $preformat_ltrim = 1;
376 /////////////////////////////////////////////////
377 // Convert linebreaks into <br />
380 /////////////////////////////////////////////////
381 // Use date-time rules (See rules.ini.php)
384 /////////////////////////////////////////////////
385 // User-Agent settings
387 // If you want to ignore embedded browsers for rich-content-wikisite,
388 // remove (or comment-out) all 'keitai' settings.
390 // If you want to to ignore desktop-PC browsers for simple wikisite,
391 // copy keitai.ini.php to default.ini.php and customize it.
394 // pattern: A regular-expression that matches device(browser)'s name and version
395 // profile: A group of browsers
397 // Embedded browsers (Rich-clients for PukiWiki)
399 // Windows CE (Microsoft(R) Internet Explorer 5.5 for Windows(R) CE)
400 // Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC)
401 array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#', 'profile'=>'default'),
403 // ACCESS "NetFront" / "Compact NetFront" and thier OEM, expects to be "Mozilla/4.0"
404 // Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0" (PlayStation BB Navigator, for SONY PlayStation 2)
405 // Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.19) NetFront/3.0" (SONY Clie series)
406 // Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (SHARP Zaurus)
407 array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]+)#', 'profile'=>'default'),
409 // Embedded browsers (Non-rich)
411 // Windows CE (the others)
412 // Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320 )" (GFORT, NTT DoCoMo)
413 array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keitai'),
415 // ACCESS "NetFront" / "Compact NetFront" and thier OEM
416 // Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2)
417 // Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket: AirH" Phone by JRC)
418 array('pattern'=>'#\b(NetFront)/([0-9\.]+)#', 'profile'=>'keitai'),
419 array('pattern'=>'#\b(CNF)/([0-9\.]+)#', 'profile'=>'keitai'),
420 array('pattern'=>'#\b(AveFront)/([0-9\.]+)#', 'profile'=>'keitai'),
421 array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#', 'profile'=>'keitai'), // The same?
423 // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones
424 // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c°Ê¹ß¤Ï²ÄÊÑ
425 // Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()¤ÎÃæ¤Ï²ÄÊÑ
426 array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#', 'profile'=>'keitai'),
428 // Vodafone's embedded browser
429 // Sample: "J-PHONE/2.0/J-T03" // 2.0¤Ï"¥Ö¥é¥¦¥¶¤Î"¥Ð¡¼¥¸¥ç¥ó
430 // Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0"
431 array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#', 'profile'=>'keitai'),
433 // Openwave(R) Mobile Browser (EZweb, WAP phone, etc)
434 // Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MMP/2.0"
435 array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#', 'profile'=>'keitai'),
437 // Opera, dressing up as other embedded browsers
438 // Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at 'keitai'-mode)
439 array('pattern'=>'#\bDDIPOCKET\b.+\b(Opera) ([0-9\.]+)\b#', 'profile'=>'keitai'),
441 // Planetweb http://www.planetweb.com/
442 // Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2)
443 array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile'=>'keitai'),
445 // DreamPassport, Web browser for SEGA DreamCast
446 // Sample: "Mozilla/3.0 (DreamPassport/3.0)"
447 array('pattern'=>'#\b(DreamPassport)/([0-9\.]+)#', 'profile'=>'keitai'),
449 // Palm "Web Pro" http://www.palmone.com/us/support/accessories/webpro/
450 // Sample: "Mozilla/4.76 [en] (PalmOS; U; WebPro)"
451 array('pattern'=>'#\b(WebPro)\b#', 'profile'=>'keitai'),
453 // ilinx "Palmscape" / "Xiino" http://www.ilinx.co.jp/
454 // Sample: "Xiino/2.1SJ [ja] (v. 4.1; 153x130; c16/d)"
455 array('pattern'=>'#^(Palmscape)/([0-9\.]+)#', 'profile'=>'keitai'),
456 array('pattern'=>'#^(Xiino)/([0-9\.]+)#', 'profile'=>'keitai'),
458 // SHARP PDA Browser (SHARP Zaurus)
459 // Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
460 array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#', 'profile'=>'keitai'),
463 array('pattern'=>'#^(WebTV)/([0-9\.]+)#', 'profile'=>'keitai'),
465 // Desktop-PC browsers
467 // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail
468 // NOTE: Keep this pattern above MSIE and Mozilla
469 // Sample: "Opera/7.0 (OS; U)" (not disguise)
470 // Sample: "Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera 6.0" (disguise)
471 array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#', 'profile'=>'default'),
473 // MSIE: Microsoft Internet Explorer (or something disguised as MSIE)
474 // Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
475 array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#', 'profile'=>'default'),
478 // NOTE: Keep this pattern above Mozilla
479 // Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
480 array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#', 'profile'=>'default'),
482 // Loose default: Including something Mozilla
483 array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#', 'profile'=>'default'),
485 array('pattern'=>'#^#', 'profile'=>'default'), // Sentinel