OSDN Git Service

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