OSDN Git Service

BugTrack/2557 Fix touchgraph plugin Moji-bake
[pukiwiki/pukiwiki.git] / pukiwiki.ini.php
1 <?php
2 // PukiWiki - Yet another WikiWikiWeb clone
3 // pukiwiki.ini.php
4 // Copyright
5 //   2002-2020 PukiWiki Development 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 $aliaspage    = 'AutoAliasName'; // Set AutoAlias definition here
133 $menubar      = 'MenuBar';       // Menu
134 $rightbar_name = 'RightBar';     // RightBar
135
136 /////////////////////////////////////////////////
137 // Change default Document Type Definition
138
139 // Some web browser's bug, and / or Java apprets may needs not-Strict DTD.
140 // Some plugin (e.g. paint) set this PKWK_DTD_XHTML_1_0_TRANSITIONAL.
141
142 //$pkwk_dtd = PKWK_DTD_XHTML_1_1; // Default
143 //$pkwk_dtd = PKWK_DTD_XHTML_1_0_STRICT;
144 //$pkwk_dtd = PKWK_DTD_XHTML_1_0_TRANSITIONAL;
145 //$pkwk_dtd = PKWK_DTD_HTML_4_01_STRICT;
146 //$pkwk_dtd = PKWK_DTD_HTML_4_01_TRANSITIONAL;
147
148 /////////////////////////////////////////////////
149 // Always output "nofollow,noindex" attribute
150
151 $nofollow = 0; // 1 = Try hiding from search engines
152
153 /////////////////////////////////////////////////
154
155 // PKWK_ALLOW_JAVASCRIPT - Must be 1 only for compatibility
156 define('PKWK_ALLOW_JAVASCRIPT', 1);
157
158 /////////////////////////////////////////////////
159 // _Disable_ WikiName auto-linking
160 $nowikiname = 0;
161
162 /////////////////////////////////////////////////
163 // AutoLink feature
164 // Automatic link to existing pages
165
166 // AutoLink minimum length of page name
167 $autolink = 0; // Bytes, 0 = OFF (try 8)
168
169 /////////////////////////////////////////////////
170 // AutoAlias feature
171 // Automatic link from specified word, to specifiled URI, page or InterWiki
172
173 // AutoAlias minimum length of alias "from" word
174 $autoalias = 0; // Bytes, 0 = OFF (try 8)
175
176 // Limit loading valid alias pairs
177 $autoalias_max_words = 50; // pairs
178
179 /////////////////////////////////////////////////
180 // Enable Freeze / Unfreeze feature
181 $function_freeze = 1;
182
183 /////////////////////////////////////////////////
184 // Allow to use 'Do not change timestamp' checkbox
185 // (0:Disable, 1:For everyone,  2:Only for the administrator)
186 $notimeupdate = 1;
187
188 /////////////////////////////////////////////////
189 // Admin password for this Wikisite
190
191 // Default: always fail
192 $adminpass = '{x-php-md5}!';
193
194 // Sample:
195 //$adminpass = 'pass'; // Cleartext
196 //$adminpass = '{x-php-md5}1a1dc91c907325c69271ddf0c944bc72'; // PHP md5()  'pass'
197 //$adminpass = '{x-php-sha256}d74ff0ee8da3b9806b18c877dbf29bbde50b5bd8e4dad7a3a725000feb82e8f1'; // PHP sha256  'pass'
198 //$adminpass = '{CRYPT}$1$AR.Gk94x$uCe8fUUGMfxAPH83psCZG/';   // LDAP CRYPT 'pass'
199 //$adminpass = '{MD5}Gh3JHJBzJcaScd3wyUS8cg==';               // LDAP MD5   'pass'
200 //$adminpass = '{SMD5}o7lTdtHFJDqxFOVX09C8QnlmYmZnd2Qx';      // LDAP SMD5  'pass'
201 //$adminpass = '{SHA256}10/w7o2juYBrGMh32/KbveULW9jk2tejpyUAD+uC6PE=' // LDAP SHA256 'pass'
202
203 /////////////////////////////////////////////////
204 // Page-reading feature settings
205 // (Automatically creating pronounce datas, for Kanji-included page names,
206 //  to show sorted page-list correctly)
207
208 // Enable page-reading feature by calling ChaSen or KAKASHI command
209 // (1:Enable, 0:Disable)
210 $pagereading_enable = 0;
211
212 // Specify converter as ChaSen('chasen') or KAKASI('kakasi') or None('none')
213 $pagereading_kanji2kana_converter = 'none';
214
215 // Specify Kanji encoding to pass data between PukiWiki and the converter
216 $pagereading_kanji2kana_encoding = 'EUC'; // Default for Unix
217 //$pagereading_kanji2kana_encoding = 'SJIS'; // Default for Windows
218
219 // Absolute path of the converter (ChaSen)
220 $pagereading_chasen_path = '/usr/local/bin/chasen';
221 //$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen.exe';
222
223 // Absolute path of the converter (KAKASI)
224 $pagereading_kakasi_path = '/usr/local/bin/kakasi';
225 //$pagereading_kakasi_path = 'c:\kakasi\bin\kakasi.exe';
226
227 // Page name contains pronounce data (written by the converter)
228 $pagereading_config_page = ':config/PageReading';
229
230 // Page name of default pronouncing dictionary, used when converter = 'none'
231 $pagereading_config_dict = ':config/PageReading/dict';
232
233
234 /////////////////////////////////////////////////
235 // Authentication type
236 // AUTH_TYPE_NONE, AUTH_TYPE_FORM, AUTH_TYPE_BASIC, AUTH_TYPE_EXTERNAL, ...
237 // $auth_type = AUTH_TYPE_FORM;
238 // $auth_external_login_url_base = './exlogin.php';
239
240 /////////////////////////////////////////////////
241 // LDAP
242 $ldap_user_account = 0; // (0: Disabled, 1: Enabled)
243 // $ldap_server = 'ldap://ldapserver:389';
244 // $ldap_base_dn = 'ou=Users,dc=ldap,dc=example,dc=com';
245 // $ldap_bind_dn = 'uid=$login,dc=example,dc=com';
246 // $ldap_bind_password = '';
247
248 /////////////////////////////////////////////////
249 // User prefix that shows its auth provider
250 $auth_provider_user_prefix_default = 'default:';
251 $auth_provider_user_prefix_ldap = 'ldap:';
252 $auth_provider_user_prefix_external = 'external:';
253 $auth_provider_user_prefix_saml = 'saml:';
254
255
256 /////////////////////////////////////////////////
257 // User definition
258 $auth_users = array(
259         // Username => password
260         'foo'   => 'foo_passwd', // Cleartext
261         'bar'   => '{x-php-md5}f53ae779077e987718cc285b14dfbe86', // PHP md5() 'bar_passwd'
262         'hoge'  => '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx',      // LDAP SMD5 'hoge_passwd'
263 );
264
265 // Group definition
266 $auth_groups = array(
267         // Groupname => group members(users)
268         'valid-user' => '', // Reserved 'valid-user' group contains all authenticated users
269         'groupfoobar'   => 'foo,bar',
270 );
271
272 /////////////////////////////////////////////////
273 // Authentication method
274
275 $auth_method_type       = 'pagename';   // By Page name
276 //$auth_method_type     = 'contents';   // By Page contents
277
278 /////////////////////////////////////////////////
279 // Read auth (0:Disable, 1:Enable)
280 $read_auth = 0;
281
282 $read_auth_pages = array(
283         // Regex                   Groupname or Username
284         '#PageForAllValidUsers#'        => 'valid-user',
285         '#HogeHoge#'            => 'hoge',
286         '#(NETABARE|NetaBare)#' => 'foo,bar,hoge',
287 );
288
289 /////////////////////////////////////////////////
290 // Edit auth (0:Disable, 1:Enable)
291 $edit_auth = 0;
292
293 $edit_auth_pages = array(
294         // Regex                   Username
295         '#BarDiary#'            => 'bar',
296         '#HogeHoge#'            => 'hoge',
297         '#(NETABARE|NetaBare)#' => 'foo,bar,hoge',
298 );
299
300 /////////////////////////////////////////////////
301 // Search auth
302 // 0: Disabled (Search read-prohibited page contents)
303 // 1: Enabled  (Search only permitted pages for the user)
304 $search_auth = 0;
305
306 /////////////////////////////////////////////////
307 // AutoTicketLink
308 // (0:Create AutoTicketLinkName page automatically, 1:Don't create the page)
309 $no_autoticketlinkname = 0;
310 $ticket_link_sites = array(
311 /*
312         array(
313                 'key' => 'phpbug',
314                 'type' => 'redmine', // type: redmine, jira or git
315                 'title' => 'PHP :: Bug #$1',
316                 'base_url' => 'https://bugs.php.net/bug.php?id=',
317         ),
318         array(
319                 'key' => 'asfjira',
320                 'type' => 'jira',
321                 'title' => 'ASF JIRA [$1]',
322                 'base_url' => 'https://issues.apache.org/jira/browse/',
323         ),
324         array(
325                 'key' => 'pukiwiki-commit',
326                 'type' => 'git',
327                 'title' => 'PukiWiki revision $1',
328                 'base_url' => 'https://ja.osdn.net/projects/pukiwiki/scm/git/pukiwiki/commits/',
329         ),
330 */
331 );
332 // AutoTicketLink - JIRA Default site
333 /*
334 $ticket_jira_default_site = array(
335         'title' => 'My JIRA - $1',
336         'base_url' => 'https://issues.example.com/jira/browse/',
337 );
338 //*/
339
340 /////////////////////////////////////////////////
341 // Show External Link Cushion Page
342 // 0: Disabled
343 // 1: Enabled
344 $external_link_cushion_page = 0;
345 $external_link_cushion = array(
346         // Wait N seconds before jumping to an external site
347         'wait_seconds' => 5,
348         // Internal site domain list
349         'internal_domains' => array(
350                 'localhost',
351                 // '*.example.com',
352         ),
353         // Don't show extenal link icons on these domains
354         'silent_external_domains' => array(
355                 'pukiwiki.osdn.jp',
356                 'pukiwiki.example.com',
357         ),
358 );
359
360 /////////////////////////////////////////////////
361 // Show Topicpath title
362 // 0: Disabled
363 // 1: Enabled
364 $topicpath_title = 1;
365
366 /////////////////////////////////////////////////
367 // Output HTML meta Referrer Policy
368 // Value: '' (default), no-referrer, origin, same-origin, ...
369 // Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
370 $html_meta_referrer_policy = '';
371
372 /////////////////////////////////////////////////
373 // Output custom HTTP response headers
374 $http_response_custom_headers = array(
375         // 'Strict-Transport-Security: max-age=86400',
376         // 'X-Content-Type-Options: nosniff',
377 );
378
379 /////////////////////////////////////////////////
380 // $whatsnew: Max number of RecentChanges
381 $maxshow = 500;
382
383 // $whatsdeleted: Max number of RecentDeleted
384 // (0 = Disabled)
385 $maxshow_deleted = 200;
386
387 /////////////////////////////////////////////////
388 // Page names can't be edit via PukiWiki
389 $cantedit = array( $whatsnew, $whatsdeleted );
390
391 /////////////////////////////////////////////////
392 // HTTP: Output Last-Modified header
393 $lastmod = 0;
394
395 /////////////////////////////////////////////////
396 // Date format
397 $date_format = 'Y-m-d';
398
399 // Time format
400 $time_format = 'H:i:s';
401
402 /////////////////////////////////////////////////
403 // Max number of RSS feed
404 $rss_max = 15;
405
406 /////////////////////////////////////////////////
407 // Backup related settings
408
409 // Enable backup
410 $do_backup = 1;
411
412 // When a page had been removed, remove its backup too?
413 $del_backup = 0;
414
415 // Bacukp interval and generation
416 $cycle  =   3; // Wait N hours between backup (0 = no wait)
417 $maxage = 120; // Stock latest N backups
418
419 // NOTE: $cycle x $maxage / 24 = Minimum days to lost your data
420 //          3   x   120   / 24 = 15
421
422 // Splitter of backup data (NOTE: Too dangerous to change)
423 define('PKWK_SPLITTER', '>>>>>>>>>>');
424
425 /////////////////////////////////////////////////
426 // Command execution per update
427
428 define('PKWK_UPDATE_EXEC', '');
429
430 // Sample: Namazu (Search engine)
431 //$target     = '/var/www/wiki/';
432 //$mknmz      = '/usr/bin/mknmz';
433 //$output_dir = '/var/lib/namazu/index/';
434 //define('PKWK_UPDATE_EXEC',
435 //      $mknmz . ' --media-type=text/pukiwiki' .
436 //      ' -O ' . $output_dir . ' -L ja -c -K ' . $target);
437
438 /////////////////////////////////////////////////
439 // HTTP proxy setting
440
441 // Use HTTP proxy server to get remote data
442 $use_proxy = 0;
443
444 $proxy_host = 'proxy.example.com';
445 $proxy_port = 8080;
446
447 // Do Basic authentication
448 $need_proxy_auth = 0;
449 $proxy_auth_user = 'username';
450 $proxy_auth_pass = 'password';
451
452 // Hosts that proxy server will not be needed
453 $no_proxy = array(
454         'localhost',    // localhost
455         '127.0.0.0/8',  // loopback
456 //      '10.0.0.0/8'    // private class A
457 //      '172.16.0.0/12' // private class B
458 //      '192.168.0.0/16'        // private class C
459 //      'no-proxy.com',
460 );
461
462 ////////////////////////////////////////////////
463 // Mail related settings
464
465 // Send mail per update of pages
466 $notify = 0;
467
468 // Send diff only
469 $notify_diff_only = 1;
470
471 // SMTP server (Windows only. Usually specified at php.ini)
472 $smtp_server = 'localhost';
473
474 // Mail recipient (To:) and sender (From:)
475 $notify_to   = 'to@example.com';        // To:
476 $notify_from = 'from@example.com';      // From:
477
478 // Subject: ($page = Page name wll be replaced)
479 $notify_subject = '[PukiWiki] $page';
480
481 // Mail header
482 // NOTE: Multiple items must be divided by "\r\n", not "\n".
483 $notify_header = '';
484
485 /////////////////////////////////////////////////
486 // Mail: POP / APOP Before SMTP
487
488 // Do POP/APOP authentication before send mail
489 $smtp_auth = 0;
490
491 $pop_server = 'localhost';
492 $pop_port   = 110;
493 $pop_userid = '';
494 $pop_passwd = '';
495
496 // Use APOP instead of POP (If server uses)
497 //   Default = Auto (Use APOP if possible)
498 //   1       = Always use APOP
499 //   0       = Always use POP
500 // $pop_auth_use_apop = 1;
501
502 /////////////////////////////////////////////////
503 // Ignore list
504
505 // Regex of ignore pages
506 $non_list = '^\:';
507
508 // Search ignored pages
509 $search_non_list = 1;
510
511
512 // Page redirect rules
513 $page_redirect_rules = array(
514         //'#^FromProject($|(/(.+)$))#' => 'ToProject$1',
515         //'#^FromProject($|(/(.+)$))#' => function($matches) { return 'ToProject' . $matches[1]; },
516 );
517
518 /////////////////////////////////////////////////
519 // Template setting
520
521 $auto_template_func = 1;
522 $auto_template_rules = array(
523         '((.+)\/([^\/]+))' => '\2/template'
524 );
525
526 /////////////////////////////////////////////////
527 // Automatically add fixed heading anchor
528 $fixed_heading_anchor = 1;
529
530 /////////////////////////////////////////////////
531 // Remove the first spaces from Preformatted text
532 $preformat_ltrim = 1;
533
534 /////////////////////////////////////////////////
535 // Convert linebreaks into <br />
536 $line_break = 0;
537
538 /////////////////////////////////////////////////
539 // Use date-time rules (See rules.ini.php)
540 $usedatetime = 1;
541
542 /////////////////////////////////////////////////
543 // Logging updates (0 or 1)
544 $logging_updates = 0;
545 $logging_updates_log_dir = '/var/log/pukiwiki';
546
547 /////////////////////////////////////////////////
548 // Page-URI mapping handler ( See https://pukiwiki.osdn.jp/?PukiWiki/PageURI )
549 $page_uri_handler = null; // default
550 // $page_uri_handler = new PukiWikiStandardPageURIHandler();
551
552 /////////////////////////////////////////////////
553 // User-Agent settings
554 //
555 // If you want to ignore embedded browsers for rich-content-wikisite,
556 // remove (or comment-out) all 'keitai' settings.
557 //
558 // If you want to to ignore desktop-PC browsers for simple wikisite,
559 // copy keitai.ini.php to default.ini.php and customize it.
560
561 $agents = array(
562 // pattern: A regular-expression that matches device(browser)'s name and version
563 // profile: A group of browsers
564
565     // Embedded browsers (Rich-clients for PukiWiki)
566
567         // Windows CE (Microsoft(R) Internet Explorer 5.5 for Windows(R) CE)
568         // Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC)
569         array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#', 'profile'=>'default'),
570
571         // ACCESS "NetFront" / "Compact NetFront" and thier OEM, expects to be "Mozilla/4.0"
572         // Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0" (PlayStation BB Navigator, for SONY PlayStation 2)
573         // Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.19) NetFront/3.0" (SONY Clie series)
574         // Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (SHARP Zaurus)
575         array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]+)#',   'profile'=>'default'),
576
577     // Embedded browsers (Non-rich)
578
579         // Windows CE (the others)
580         // Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320 )" (GFORT, NTT DoCoMo)
581         array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keitai'),
582
583         // ACCESS "NetFront" / "Compact NetFront" and thier OEM
584         // Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2)
585         // Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket: AirH" Phone by JRC)
586         array('pattern'=>'#\b(NetFront)/([0-9\.]+)#',   'profile'=>'keitai'),
587         array('pattern'=>'#\b(CNF)/([0-9\.]+)#',        'profile'=>'keitai'),
588         array('pattern'=>'#\b(AveFront)/([0-9\.]+)#',   'profile'=>'keitai'),
589         array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#',  'profile'=>'keitai'), // The same?
590
591         // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones
592         // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c以降は可変
593         // Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()の中は可変
594         array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#',      'profile'=>'keitai'),
595
596         // Vodafone's embedded browser
597         // Sample: "J-PHONE/2.0/J-T03"  // 2.0は"ブラウザの"バージョン
598         // Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0"
599         array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#',     'profile'=>'keitai'),
600
601         // Openwave(R) Mobile Browser (EZweb, WAP phone, etc)
602         // Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MMP/2.0"
603         array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#',        'profile'=>'keitai'),
604
605         // Opera, dressing up as other embedded browsers
606         // Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at 'keitai'-mode)
607         array('pattern'=>'#\b(?:DDIPOCKET|WILLCOM)\b.+\b(Opera) ([0-9\.]+)\b#', 'profile'=>'keitai'),
608
609         // Planetweb http://www.planetweb.com/
610         // Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2)
611         array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile'=>'keitai'),
612
613         // DreamPassport, Web browser for SEGA DreamCast
614         // Sample: "Mozilla/3.0 (DreamPassport/3.0)"
615         array('pattern'=>'#\b(DreamPassport)/([0-9\.]+)#',      'profile'=>'keitai'),
616
617         // Palm "Web Pro" http://www.palmone.com/us/support/accessories/webpro/
618         // Sample: "Mozilla/4.76 [en] (PalmOS; U; WebPro)"
619         array('pattern'=>'#\b(WebPro)\b#',      'profile'=>'keitai'),
620
621         // ilinx "Palmscape" / "Xiino" http://www.ilinx.co.jp/
622         // Sample: "Xiino/2.1SJ [ja] (v. 4.1; 153x130; c16/d)"
623         array('pattern'=>'#^(Palmscape)/([0-9\.]+)#',   'profile'=>'keitai'),
624         array('pattern'=>'#^(Xiino)/([0-9\.]+)#',       'profile'=>'keitai'),
625
626         // SHARP PDA Browser (SHARP Zaurus)
627         // Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
628         array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#',        'profile'=>'keitai'),
629
630         // WebTV
631         array('pattern'=>'#^(WebTV)/([0-9\.]+)#',       'profile'=>'keitai'),
632
633     // Desktop-PC browsers
634
635         // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail
636         // NOTE: Keep this pattern above MSIE and Mozilla
637         // Sample: "Opera/7.0 (OS; U)" (not disguise)
638         // Sample: "Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera 6.0" (disguise)
639         array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#', 'profile'=>'default'),
640
641         // MSIE: Microsoft Internet Explorer (or something disguised as MSIE)
642         // Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
643         array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#',     'profile'=>'default'),
644
645         // Mozilla Firefox
646         // NOTE: Keep this pattern above Mozilla
647         // Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
648         array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#',  'profile'=>'default'),
649
650         // Loose default: Including something Mozilla
651         array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#',     'profile'=>'default'),
652
653         array('pattern'=>'#^#', 'profile'=>'default'),  // Sentinel
654 );