7 * LICENSE: This source file is licensed under the terms of the GNU General Public License.
9 * @package Magic3 Framework
10 * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
11 * @copyright Copyright 2006-2010 Magic3 Project.
12 * @license http://www.gnu.org/copyleft/gpl.html GPL License
13 * @version SVN: $Id: pukiwiki.ini.php 3478 2010-08-14 08:33:30Z fishbone $
14 * @link http://www.magic3.org
17 // 2002-2006 PukiWiki Developers Team
18 // 2001-2002 Originally written by yu-ji
19 // License: GPL v2 or (at your option) any later version
21 // PukiWiki main setting file
33 global $trackback_javascript;
37 global $function_freeze;
41 global $auth_method_type;
43 global $read_auth_pages;
45 global $edit_auth_pages;
49 global $maxshow_deleted;
62 global $need_proxy_auth;
63 global $proxy_auth_user;
64 global $proxy_auth_pass;
68 global $notify_diff_only;
72 global $notify_subject;
73 global $notify_header;
81 global $search_non_list;
82 global $auto_template_func;
83 global $auto_template_rules;
84 global $fixed_heading_anchor;
85 global $preformat_ltrim;
90 /////////////////////////////////////////////////
91 // Functionality settings
93 // PKWK_OPTIMISE - Ignore verbose but understandable checking and warning
94 // If you end testing this PukiWiki, set '1'.
95 // If you feel in trouble about this PukiWiki, set '0'.
96 if (! defined('PKWK_OPTIMISE'))
97 define('PKWK_OPTIMISE', 0);
99 /////////////////////////////////////////////////
102 // PKWK_READONLY - Prohibits editing and maintain via WWW
103 // NOTE: Counter-related functions will work now (counter, attach count, etc)
104 if (! defined('PKWK_READONLY'))
105 define('PKWK_READONLY', 0); // 0 or 1
107 // PKWK_SAFE_MODE - Prohibits some unsafe(but compatible) functions
108 if (! defined('PKWK_SAFE_MODE'))
109 define('PKWK_SAFE_MODE', 0);
111 // PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using inline-image-tag for URIs
112 // Inline-image-tag for URIs may allow leakage of Wiki readers' information
113 // (in short, 'Web bug') or external malicious CGI (looks like an image's URL)
114 // attack to Wiki readers, but easy way to show images.
115 if (! defined('PKWK_DISABLE_INLINE_IMAGE_FROM_URI'))
116 define('PKWK_DISABLE_INLINE_IMAGE_FROM_URI', 0);
118 // PKWK_QUERY_STRING_MAX
119 // Max length of GET method, prohibits some worm attack ASAP
120 // NOTE: Keep (page-name + attach-file-name) <= PKWK_QUERY_STRING_MAX
121 define('PKWK_QUERY_STRING_MAX', 640); // Bytes, 0 = OFF
123 /////////////////////////////////////////////////
124 // Experimental features
126 // Multiline plugin hack (See BugTrack2/84)
127 // EXAMPLE(with a known BUG):
128 // #plugin(args1,args2,...,argsN){{
134 // #memo(This makes '#memo(foo)' to this)
135 define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 1); // 1 = Disabled
137 /////////////////////////////////////////////////
138 // Language / Encoding settings
140 // LANG - Internal content encoding ('en', 'ja', or ...)
141 define('LANG', 'ja');
143 // UI_LANG - Content encoding for buttons, menus, etc
144 define('UI_LANG', LANG); // 'en' for Internationalized wikisite
146 /////////////////////////////////////////////////
147 // Directory settings I (ended with '/', permission '777')
149 // You may hide these directories (from web browsers)
150 // by setting DATA_HOME at index.php.
152 define('DATA_DIR', DATA_HOME . 'wiki/' ); // Latest wiki texts
153 define('DIFF_DIR', DATA_HOME . 'diff/' ); // Latest diffs
154 define('BACKUP_DIR', DATA_HOME . 'backup/' ); // Backups
155 define('CACHE_DIR', DATA_HOME . 'cache/' ); // Some sort of caches
156 define('UPLOAD_DIR', DATA_HOME . 'attach/' ); // Attached files and logs
157 define('COUNTER_DIR', DATA_HOME . 'counter/' ); // Counter plugin's counts
158 define('TRACKBACK_DIR', DATA_HOME . 'trackback/'); // TrackBack logs
159 define('PLUGIN_DIR', DATA_HOME . 'plugin/' ); // Plugin directory
161 // modified for Magic3 by naoki on 2008/9/26
162 //define('UPLOAD_DIR', $gEnvManager->getCurrentWidgetRootPath() . '/upload/'); // Attached files and logs
163 define('UPLOAD_DIR', $gEnvManager->getResourcePath() . '/widgets/wiki/upload/');
164 define('PLUGIN_DIR', $gEnvManager->getCurrentWidgetIncludePath() . '/plugin/'); // Plugin directory
166 /////////////////////////////////////////////////
167 // Directory settings II (ended with '/')
169 // Skins / Stylesheets
170 //define('SKIN_DIR', 'skin/');
171 // Skin files (SKIN_DIR/*.skin.php) are needed at
172 // ./DATAHOME/SKIN_DIR from index.php, but
173 // CSSs(*.css) and JavaScripts(*.js) are needed at
174 // ./SKIN_DIR from index.php.
176 // Static image files
177 // modified for Magic3 by naoki on 2008/9/29
178 //define('IMAGE_DIR', 'image/');
179 define('IMAGE_DIR', $gEnvManager->getCurrentWidgetRootUrl() . '/image/');
181 /////////////////////////////////////////////////
182 // Local time setting
184 switch (LANG) { // or specifiy one
186 define('ZONE', 'JST');
187 define('ZONETIME', 9 * 3600); // JST = GMT + 9
190 define('ZONE', 'GMT');
191 define('ZONETIME', 0);
195 /////////////////////////////////////////////////
196 // Title of your Wikisite (Name this)
197 // Also used as RSS feed's channel name etc
198 $page_title = 'PukiWiki';
200 // Specify PukiWiki URL (default: auto)
201 //$script = 'http://example.com/pukiwiki/';
203 // Shorten $script: Cut its file name (default: not cut)
204 //$script_directory_index = 'index.php';
206 // Site admin's name (CHANGE THIS)
207 $modifier = 'anonymous';
209 // Site admin's Web page (CHANGE THIS)
210 $modifierlink = 'http://pukiwiki.example.com/';
213 //$defaultpage = 'FrontPage'; // Top / Default page
214 $whatsnew = 'RecentChanges'; // Modified page list
215 $whatsdeleted = 'RecentDeleted'; // Removeed page list
216 $interwiki = 'InterWikiName'; // Set InterWiki definition here
217 $menubar = 'MenuBar'; // Menu
219 /////////////////////////////////////////////////
220 // Change default Document Type Definition
222 // Some web browser's bug, and / or Java apprets may needs not-Strict DTD.
223 // Some plugin (e.g. paint) set this PKWK_DTD_XHTML_1_0_TRANSITIONAL.
225 //$pkwk_dtd = PKWK_DTD_XHTML_1_1; // Default
226 //$pkwk_dtd = PKWK_DTD_XHTML_1_0_STRICT;
227 //$pkwk_dtd = PKWK_DTD_XHTML_1_0_TRANSITIONAL;
228 //$pkwk_dtd = PKWK_DTD_HTML_4_01_STRICT;
229 //$pkwk_dtd = PKWK_DTD_HTML_4_01_TRANSITIONAL;
231 /////////////////////////////////////////////////
232 // Always output "nofollow,noindex" attribute
234 $nofollow = 0; // 1 = Try hiding from search engines
236 /////////////////////////////////////////////////
238 // PKWK_ALLOW_JAVASCRIPT - Allow / Prohibit using JavaScript
239 define('PKWK_ALLOW_JAVASCRIPT', 0);
241 /////////////////////////////////////////////////
247 // Show trackbacks with an another window (using JavaScript)
248 $trackback_javascript = 0;
250 /////////////////////////////////////////////////
251 // Referer list feature
253 //$referer = 1; // tmp for magic3
255 /////////////////////////////////////////////////
256 // _Disable_ WikiName auto-linking
259 /////////////////////////////////////////////////
262 // AutoLink minimum length of page name
263 $autolink = 0; // Bytes, 0 = OFF (try 8)
265 /////////////////////////////////////////////////
266 // Enable Freeze / Unfreeze feature
267 $function_freeze = 1;
269 /////////////////////////////////////////////////
270 // Allow to use 'Do not change timestamp' checkbox
271 // (0:Disable, 1:For everyone, 2:Only for the administrator)
274 /////////////////////////////////////////////////
275 // Admin password for this Wikisite
277 // Default: always fail
278 //$adminpass = '{x-php-md5}!';
281 //$adminpass = 'pass'; // Cleartext
282 //$adminpass = '{x-php-md5}1a1dc91c907325c69271ddf0c944bc72'; // PHP md5() 'pass'
283 //$adminpass = '{CRYPT}$1$AR.Gk94x$uCe8fUUGMfxAPH83psCZG/'; // LDAP CRYPT 'pass'
284 //$adminpass = '{MD5}Gh3JHJBzJcaScd3wyUS8cg=='; // LDAP MD5 'pass'
285 //$adminpass = '{SMD5}o7lTdtHFJDqxFOVX09C8QnlmYmZnd2Qx'; // LDAP SMD5 'pass'
287 /////////////////////////////////////////////////
288 // Page-reading feature settings
289 // (Automatically creating pronounce datas, for Kanji-included page names,
290 // to show sorted page-list correctly)
292 // Enable page-reading feature by calling ChaSen or KAKASHI command
293 // (1:Enable, 0:Disable)
294 $pagereading_enable = 0;
296 // Specify converter as ChaSen('chasen') or KAKASI('kakasi') or None('none')
297 $pagereading_kanji2kana_converter = 'none';
299 // Specify Kanji encoding to pass data between PukiWiki and the converter
300 $pagereading_kanji2kana_encoding = 'EUC'; // Default for Unix
301 //$pagereading_kanji2kana_encoding = 'SJIS'; // Default for Windows
303 // Absolute path of the converter (ChaSen)
304 $pagereading_chasen_path = '/usr/local/bin/chasen';
305 //$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen.exe';
307 // Absolute path of the converter (KAKASI)
308 $pagereading_kakasi_path = '/usr/local/bin/kakasi';
309 //$pagereading_kakasi_path = 'c:\kakasi\bin\kakasi.exe';
311 // Page name contains pronounce data (written by the converter)
312 $pagereading_config_page = ':config/PageReading';
314 // Page name of default pronouncing dictionary, used when converter = 'none'
315 $pagereading_config_dict = ':config/PageReading/dict';
317 /////////////////////////////////////////////////
320 // Username => password
321 'foo' => 'foo_passwd', // Cleartext
322 'bar' => '{x-php-md5}f53ae779077e987718cc285b14dfbe86', // PHP md5() 'bar_passwd'
323 'hoge' => '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx', // LDAP SMD5 'hoge_passwd'
326 /////////////////////////////////////////////////
327 // Authentication method
329 $auth_method_type = 'pagename'; // By Page name
330 //$auth_method_type = 'contents'; // By Page contents
332 /////////////////////////////////////////////////
333 // Read auth (0:Disable, 1:Enable)
336 $read_auth_pages = array(
338 '#HogeHoge#' => 'hoge',
339 '#(NETABARE|NetaBare)#' => 'foo,bar,hoge',
342 /////////////////////////////////////////////////
343 // Edit auth (0:Disable, 1:Enable)
346 $edit_auth_pages = array(
348 '#BarDiary#' => 'bar',
349 '#HogeHoge#' => 'hoge',
350 '#(NETABARE|NetaBare)#' => 'foo,bar,hoge',
353 /////////////////////////////////////////////////
355 // 0: Disabled (Search read-prohibited page contents)
356 // 1: Enabled (Search only permitted pages for the user)
359 /////////////////////////////////////////////////
360 // $whatsnew: Max number of RecentChanges
363 // $whatsdeleted: Max number of RecentDeleted
365 $maxshow_deleted = 60;
367 /////////////////////////////////////////////////
368 // Page names can't be edit via PukiWiki
369 $cantedit = array( $whatsnew, $whatsdeleted );
371 /////////////////////////////////////////////////
372 // HTTP: Output Last-Modified header
375 /////////////////////////////////////////////////
377 $date_format = 'Y-m-d';
380 $time_format = 'H:i:s';
382 /////////////////////////////////////////////////
383 // Max number of RSS feed
386 /////////////////////////////////////////////////
387 // Backup related settings
392 // When a page had been removed, remove its backup too?
395 // Bacukp interval and generation
396 //$cycle = 3; // Wait N hours between backup (0 = no wait)
397 //$maxage = 120; // Stock latest N backups
399 // NOTE: $cycle x $maxage / 24 = Minimum days to lost your data
402 // Splitter of backup data (NOTE: Too dangerous to change)
403 define('PKWK_SPLITTER', '>>>>>>>>>>');
405 /////////////////////////////////////////////////
406 // Command execution per update
408 define('PKWK_UPDATE_EXEC', '');
410 // Sample: Namazu (Search engine)
411 //$target = '/var/www/wiki/';
412 //$mknmz = '/usr/bin/mknmz';
413 //$output_dir = '/var/lib/namazu/index/';
414 //define('PKWK_UPDATE_EXEC',
415 // $mknmz . ' --media-type=text/pukiwiki' .
416 // ' -O ' . $output_dir . ' -L ja -c -K ' . $target);
418 /////////////////////////////////////////////////
419 // HTTP proxy setting (for TrackBack etc)
421 // Use HTTP proxy server to get remote data
424 $proxy_host = 'proxy.example.com';
427 // Do Basic authentication
428 $need_proxy_auth = 0;
429 $proxy_auth_user = 'username';
430 $proxy_auth_pass = 'password';
432 // Hosts that proxy server will not be needed
434 'localhost', // localhost
435 '127.0.0.0/8', // loopback
436 // '10.0.0.0/8' // private class A
437 // '172.16.0.0/12' // private class B
438 // '192.168.0.0/16' // private class C
442 ////////////////////////////////////////////////
443 // Mail related settings
445 // Send mail per update of pages
449 $notify_diff_only = 1;
451 // SMTP server (Windows only. Usually specified at php.ini)
452 $smtp_server = 'localhost';
454 // Mail recipient (To:) and sender (From:)
455 $notify_to = 'to@example.com'; // To:
456 $notify_from = 'from@example.com'; // From:
458 // Subject: ($page = Page name wll be replaced)
459 $notify_subject = '[PukiWiki] $page';
462 // NOTE: Multiple items must be divided by "\r\n", not "\n".
465 /////////////////////////////////////////////////
466 // Mail: POP / APOP Before SMTP
468 // Do POP/APOP authentication before send mail
471 $pop_server = 'localhost';
476 // Use APOP instead of POP (If server uses)
477 // Default = Auto (Use APOP if possible)
478 // 1 = Always use APOP
479 // 0 = Always use POP
480 // $pop_auth_use_apop = 1;
482 /////////////////////////////////////////////////
485 // Regex of ignore pages
488 // Search ignored pages
489 $search_non_list = 1;
491 /////////////////////////////////////////////////
494 $auto_template_func = 1;
495 $auto_template_rules = array(
496 '((.+)\/([^\/]+))' => '\2/template'
499 /////////////////////////////////////////////////
500 // Automatically add fixed heading anchor
501 $fixed_heading_anchor = 1;
503 /////////////////////////////////////////////////
504 // Remove the first spaces from Preformatted text
505 $preformat_ltrim = 1;
507 /////////////////////////////////////////////////
508 // Convert linebreaks into <br />
511 /////////////////////////////////////////////////
512 // Use date-time rules (See rules.ini.php)
515 /////////////////////////////////////////////////
516 // User-Agent settings
518 // If you want to ignore embedded browsers for rich-content-wikisite,
519 // remove (or comment-out) all 'keitai' settings.
521 // If you want to to ignore desktop-PC browsers for simple wikisite,
522 // copy keitai.ini.php to default.ini.php and customize it.
525 // pattern: A regular-expression that matches device(browser)'s name and version
526 // profile: A group of browsers
528 // Embedded browsers (Rich-clients for PukiWiki)
530 // Windows CE (Microsoft(R) Internet Explorer 5.5 for Windows(R) CE)
531 // Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC)
532 array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#', 'profile'=>'default'),
534 // ACCESS "NetFront" / "Compact NetFront" and thier OEM, expects to be "Mozilla/4.0"
535 // Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0" (PlayStation BB Navigator, for SONY PlayStation 2)
536 // Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.19) NetFront/3.0" (SONY Clie series)
537 // Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (SHARP Zaurus)
538 array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]+)#', 'profile'=>'default'),
540 // Embedded browsers (Non-rich)
542 // Windows CE (the others)
543 // Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320 )" (GFORT, NTT DoCoMo)
544 array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keitai'),
546 // ACCESS "NetFront" / "Compact NetFront" and thier OEM
547 // Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2)
548 // Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket: AirH" Phone by JRC)
549 array('pattern'=>'#\b(NetFront)/([0-9\.]+)#', 'profile'=>'keitai'),
550 array('pattern'=>'#\b(CNF)/([0-9\.]+)#', 'profile'=>'keitai'),
551 array('pattern'=>'#\b(AveFront)/([0-9\.]+)#', 'profile'=>'keitai'),
552 array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#', 'profile'=>'keitai'), // The same?
554 // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones
555 // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c以降は可変
556 // Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()の中は可変
557 array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#', 'profile'=>'keitai'),
559 // Vodafone's embedded browser
560 // Sample: "J-PHONE/2.0/J-T03" // 2.0は"ブラウザの"バージョン
561 // Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0"
562 array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#', 'profile'=>'keitai'),
564 // Openwave(R) Mobile Browser (EZweb, WAP phone, etc)
565 // Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MMP/2.0"
566 array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#', 'profile'=>'keitai'),
568 // Opera, dressing up as other embedded browsers
569 // Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at 'keitai'-mode)
570 array('pattern'=>'#\b(?:DDIPOCKET|WILLCOM)\b.+\b(Opera) ([0-9\.]+)\b#', 'profile'=>'keitai'),
572 // Planetweb http://www.planetweb.com/
573 // Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2)
574 array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile'=>'keitai'),
576 // DreamPassport, Web browser for SEGA DreamCast
577 // Sample: "Mozilla/3.0 (DreamPassport/3.0)"
578 array('pattern'=>'#\b(DreamPassport)/([0-9\.]+)#', 'profile'=>'keitai'),
580 // Palm "Web Pro" http://www.palmone.com/us/support/accessories/webpro/
581 // Sample: "Mozilla/4.76 [en] (PalmOS; U; WebPro)"
582 array('pattern'=>'#\b(WebPro)\b#', 'profile'=>'keitai'),
584 // ilinx "Palmscape" / "Xiino" http://www.ilinx.co.jp/
585 // Sample: "Xiino/2.1SJ [ja] (v. 4.1; 153x130; c16/d)"
586 array('pattern'=>'#^(Palmscape)/([0-9\.]+)#', 'profile'=>'keitai'),
587 array('pattern'=>'#^(Xiino)/([0-9\.]+)#', 'profile'=>'keitai'),
589 // SHARP PDA Browser (SHARP Zaurus)
590 // Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
591 array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#', 'profile'=>'keitai'),
594 array('pattern'=>'#^(WebTV)/([0-9\.]+)#', 'profile'=>'keitai'),
596 // Desktop-PC browsers
598 // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail
599 // NOTE: Keep this pattern above MSIE and Mozilla
600 // Sample: "Opera/7.0 (OS; U)" (not disguise)
601 // Sample: "Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera 6.0" (disguise)
602 array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#', 'profile'=>'default'),
604 // MSIE: Microsoft Internet Explorer (or something disguised as MSIE)
605 // Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
606 array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#', 'profile'=>'default'),
609 // NOTE: Keep this pattern above Mozilla
610 // Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
611 array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#', 'profile'=>'default'),
613 // Loose default: Including something Mozilla
614 array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#', 'profile'=>'default'),
616 array('pattern'=>'#^#', 'profile'=>'default'), // Sentinel