PageRenderTime 58ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 1ms

/pukiwiki.ini.php

https://github.com/miya5n/pukiwiki
PHP | 573 lines | 166 code | 131 blank | 276 comment | 6 complexity | 70667a1f281cb65a50c7631d76f945a9 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. // PukiWiki - Yet another WikiWikiWeb clone
  3. // $Id: pukiwiki.ini.php,v 1.149 2007/08/26 15:19:48 henoheno Exp $
  4. // Copyright (C)
  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
  8. //
  9. // PukiWiki main setting file
  10. /////////////////////////////////////////////////
  11. // Functionality settings
  12. // PKWK_OPTIMISE - Ignore verbose but understandable checking and warning
  13. // If you end testing this PukiWiki, set '1'.
  14. // If you feel in trouble about this PukiWiki, set '0'.
  15. if (! defined('PKWK_OPTIMISE'))
  16. define('PKWK_OPTIMISE', 0);
  17. /////////////////////////////////////////////////
  18. // Security settings
  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
  23. // PKWK_SAFE_MODE - Prohibits some unsafe(but compatible) functions
  24. if (! defined('PKWK_SAFE_MODE'))
  25. define('PKWK_SAFE_MODE', 0);
  26. // PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using inline-image-tag for URIs
  27. // Inline-image-tag for URIs may allow leakage of Wiki readers' information
  28. // (in short, 'Web bug') or external malicious CGI (looks like an image's URL)
  29. // attack to Wiki readers, but easy way to show images.
  30. if (! defined('PKWK_DISABLE_INLINE_IMAGE_FROM_URI'))
  31. define('PKWK_DISABLE_INLINE_IMAGE_FROM_URI', 0);
  32. // PKWK_QUERY_STRING_MAX
  33. // Max length of GET method, prohibits some worm attack ASAP
  34. // NOTE: Keep (page-name + attach-file-name) <= PKWK_QUERY_STRING_MAX
  35. define('PKWK_QUERY_STRING_MAX', 640); // Bytes, 0 = OFF
  36. /////////////////////////////////////////////////
  37. // Experimental features
  38. // Multiline plugin hack (See BugTrack2/84)
  39. // EXAMPLE(with a known BUG):
  40. // #plugin(args1,args2,...,argsN){{
  41. // argsN+1
  42. // argsN+1
  43. // #memo(foo)
  44. // argsN+1
  45. // }}
  46. // #memo(This makes '#memo(foo)' to this)
  47. define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 1); // 1 = Disabled
  48. /////////////////////////////////////////////////
  49. // Language / Encoding settings
  50. // LANG - Internal content encoding ('en', 'ja', or ...)
  51. define('LANG', 'ja');
  52. // UI_LANG - Content encoding for buttons, menus, etc
  53. define('UI_LANG', LANG); // 'en' for Internationalized wikisite
  54. /////////////////////////////////////////////////
  55. // Directory settings I (ended with '/', permission '777')
  56. // You may hide these directories (from web browsers)
  57. // by setting DATA_HOME at index.php.
  58. define('DATA_DIR', DATA_HOME . 'wiki/' ); // Latest wiki texts
  59. define('DIFF_DIR', DATA_HOME . 'diff/' ); // Latest diffs
  60. define('BACKUP_DIR', DATA_HOME . 'backup/' ); // Backups
  61. define('CACHE_DIR', DATA_HOME . 'cache/' ); // Some sort of caches
  62. define('UPLOAD_DIR', DATA_HOME . 'attach/' ); // Attached files and logs
  63. define('COUNTER_DIR', DATA_HOME . 'counter/' ); // Counter plugin's counts
  64. define('PLUGIN_DIR', DATA_HOME . 'plugin/' ); // Plugin directory
  65. /////////////////////////////////////////////////
  66. // Directory settings II (ended with '/')
  67. // Skins / Stylesheets
  68. define('SKIN_DIR', 'skin/');
  69. // Skin files (SKIN_DIR/*.skin.php) are needed at
  70. // ./DATAHOME/SKIN_DIR from index.php, but
  71. // CSSs(*.css) and JavaScripts(*.js) are needed at
  72. // ./SKIN_DIR from index.php.
  73. // Static image files
  74. define('IMAGE_DIR', 'image/');
  75. // Keep this directory shown via web browsers like
  76. // ./IMAGE_DIR from index.php.
  77. /////////////////////////////////////////////////
  78. // Local time setting
  79. switch (LANG) { // or specifiy one
  80. case 'ja':
  81. define('ZONE', 'JST');
  82. define('ZONETIME', 9 * 3600); // JST = GMT + 9
  83. break;
  84. default :
  85. define('ZONE', 'GMT');
  86. define('ZONETIME', 0);
  87. break;
  88. }
  89. /////////////////////////////////////////////////
  90. // Title of your Wikisite (Name this)
  91. // Also used as RSS feed's channel name etc
  92. $page_title = 'PukiWiki';
  93. // Specify PukiWiki URL (default: auto)
  94. //$script = 'http://example.com/pukiwiki/';
  95. // Shorten $script: Cut its file name (default: not cut)
  96. //$script_directory_index = 'index.php';
  97. // Site admin's name (CHANGE THIS)
  98. $modifier = 'anonymous';
  99. // Site admin's Web page (CHANGE THIS)
  100. $modifierlink = 'http://pukiwiki.example.com/';
  101. // Default page name
  102. $defaultpage = 'FrontPage'; // Top / Default page
  103. $whatsnew = 'RecentChanges'; // Modified page list
  104. $whatsdeleted = 'RecentDeleted'; // Removeed page list
  105. $interwiki = 'InterWikiName'; // Set InterWiki definition here
  106. $aliaspage = 'AutoAliasName'; // Set AutoAlias definition here
  107. $menubar = 'MenuBar'; // Menu
  108. /////////////////////////////////////////////////
  109. // Change default Document Type Definition
  110. // Some web browser's bug, and / or Java apprets may needs not-Strict DTD.
  111. // Some plugin (e.g. paint) set this PKWK_DTD_XHTML_1_0_TRANSITIONAL.
  112. //$pkwk_dtd = PKWK_DTD_XHTML_1_1; // Default
  113. //$pkwk_dtd = PKWK_DTD_XHTML_1_0_STRICT;
  114. //$pkwk_dtd = PKWK_DTD_XHTML_1_0_TRANSITIONAL;
  115. //$pkwk_dtd = PKWK_DTD_HTML_4_01_STRICT;
  116. //$pkwk_dtd = PKWK_DTD_HTML_4_01_TRANSITIONAL;
  117. /////////////////////////////////////////////////
  118. // Always output "nofollow,noindex" attribute
  119. $nofollow = 0; // 1 = Try hiding from search engines
  120. /////////////////////////////////////////////////
  121. // PKWK_ALLOW_JAVASCRIPT - Allow / Prohibit using JavaScript
  122. define('PKWK_ALLOW_JAVASCRIPT', 0);
  123. /////////////////////////////////////////////////
  124. // Spam URI insertion filtering
  125. $spam = 1; // 1 = On
  126. if ($spam) {
  127. $spam = array();
  128. // Threshold and rules for insertion (default)
  129. $spam['method']['_default'] = array(
  130. '_comment' => '_default',
  131. 'quantity' => 8,
  132. //'non_uniquri' => 3,
  133. 'non_uniqhost' => 3,
  134. 'area_anchor' => 0,
  135. 'area_bbcode' => 0,
  136. 'uniqhost' => TRUE,
  137. 'badhost' => TRUE,
  138. 'asap' => TRUE, // Stop as soon as possible (quick but less-info)
  139. );
  140. // For editing
  141. // NOTE:
  142. // Any thresholds may LOCK your contents by
  143. // "posting one URL" many times.
  144. // Any rules will lock contents that have NG things already.
  145. $spam['method']['edit'] = array(
  146. // Supposed_by_you(n) * Margin(1.5)
  147. '_comment' => 'edit',
  148. //'quantity' => 60 * 1.5,
  149. //'non_uniquri' => 5 * 1.5,
  150. //'non_uniqhost' => 50 * 1.5,
  151. //'area_anchor' => 30 * 1.5,
  152. //'area_bbcode' => 15 * 1.5,
  153. 'uniqhost' => TRUE,
  154. 'badhost' => TRUE,
  155. 'asap' => TRUE,
  156. );
  157. //$spam['exitmode'] = 'dump'; // Dump progress
  158. }
  159. /////////////////////////////////////////////////
  160. // _Disable_ WikiName auto-linking
  161. $nowikiname = 0;
  162. /////////////////////////////////////////////////
  163. // AutoLink feature
  164. // Automatic link to existing pages (especially helpful for non-wikiword pages, but heavy)
  165. // Minimum length of page name
  166. $autolink = 0; // Bytes, 0 = OFF (try 8)
  167. /////////////////////////////////////////////////
  168. // AutoAlias feature
  169. // Automatic link from specified word, to specifiled URI, page or InterWiki
  170. // Minimum length of alias "from" word
  171. $autoalias = 0; // Bytes, 0 = OFF (try 8)
  172. // Limit loading valid alias pairs
  173. $autoalias_max_words = 50; // pairs
  174. /////////////////////////////////////////////////
  175. // Enable Freeze / Unfreeze feature
  176. $function_freeze = 1;
  177. /////////////////////////////////////////////////
  178. // Allow to use 'Do not change timestamp' checkbox
  179. // (0:Disable, 1:For everyone, 2:Only for the administrator)
  180. $notimeupdate = 1;
  181. /////////////////////////////////////////////////
  182. // Admin password for this Wikisite
  183. // Default: always fail
  184. $adminpass = '{x-php-md5}!';
  185. // Sample:
  186. //$adminpass = 'pass'; // Cleartext
  187. //$adminpass = '{x-php-md5}1a1dc91c907325c69271ddf0c944bc72'; // PHP md5() 'pass'
  188. //$adminpass = '{CRYPT}$1$AR.Gk94x$uCe8fUUGMfxAPH83psCZG/'; // LDAP CRYPT 'pass'
  189. //$adminpass = '{MD5}Gh3JHJBzJcaScd3wyUS8cg=='; // LDAP MD5 'pass'
  190. //$adminpass = '{SMD5}o7lTdtHFJDqxFOVX09C8QnlmYmZnd2Qx'; // LDAP SMD5 'pass'
  191. /////////////////////////////////////////////////
  192. // Page-reading feature settings
  193. // (Automatically creating pronounce datas, for Kanji-included page names,
  194. // to show sorted page-list correctly)
  195. // Enable page-reading feature by calling ChaSen or KAKASHI command
  196. // (1:Enable, 0:Disable)
  197. $pagereading_enable = 0;
  198. // Specify converter as ChaSen('chasen') or KAKASI('kakasi') or None('none')
  199. $pagereading_kanji2kana_converter = 'none';
  200. // Specify Kanji encoding to pass data between PukiWiki and the converter
  201. $pagereading_kanji2kana_encoding = 'EUC'; // Default for Unix
  202. //$pagereading_kanji2kana_encoding = 'SJIS'; // Default for Windows
  203. // Absolute path of the converter (ChaSen)
  204. $pagereading_chasen_path = '/usr/local/bin/chasen';
  205. //$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen.exe';
  206. // Absolute path of the converter (KAKASI)
  207. $pagereading_kakasi_path = '/usr/local/bin/kakasi';
  208. //$pagereading_kakasi_path = 'c:\kakasi\bin\kakasi.exe';
  209. // Page name contains pronounce data (written by the converter)
  210. $pagereading_config_page = ':config/PageReading';
  211. // Page name of default pronouncing dictionary, used when converter = 'none'
  212. $pagereading_config_dict = ':config/PageReading/dict';
  213. /////////////////////////////////////////////////
  214. // User definition
  215. $auth_users = array(
  216. // Username => password
  217. 'foo' => 'foo_passwd', // Cleartext
  218. 'bar' => '{x-php-md5}f53ae779077e987718cc285b14dfbe86', // PHP md5() 'bar_passwd'
  219. 'hoge' => '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx', // LDAP SMD5 'hoge_passwd'
  220. );
  221. /////////////////////////////////////////////////
  222. // Authentication method
  223. $auth_method_type = 'pagename'; // By Page name
  224. //$auth_method_type = 'contents'; // By Page contents
  225. /////////////////////////////////////////////////
  226. // Read auth (0:Disable, 1:Enable)
  227. $read_auth = 0;
  228. $read_auth_pages = array(
  229. // Regex Username
  230. '#HogeHoge#' => 'hoge',
  231. '#(NETABARE|NetaBare)#' => 'foo,bar,hoge',
  232. );
  233. /////////////////////////////////////////////////
  234. // Edit auth (0:Disable, 1:Enable)
  235. $edit_auth = 0;
  236. $edit_auth_pages = array(
  237. // Regex Username
  238. '#BarDiary#' => 'bar',
  239. '#HogeHoge#' => 'hoge',
  240. '#(NETABARE|NetaBare)#' => 'foo,bar,hoge',
  241. );
  242. /////////////////////////////////////////////////
  243. // Search auth
  244. // 0: Disabled (Search read-prohibited page contents)
  245. // 1: Enabled (Search only permitted pages for the user)
  246. $search_auth = 0;
  247. /////////////////////////////////////////////////
  248. // $whatsnew: Max number of RecentChanges
  249. $maxshow = 60;
  250. // $whatsdeleted: Max number of RecentDeleted
  251. // (0 = Disabled)
  252. $maxshow_deleted = 60;
  253. /////////////////////////////////////////////////
  254. // Page names can't be edit via PukiWiki
  255. $cantedit = array( $whatsnew, $whatsdeleted );
  256. /////////////////////////////////////////////////
  257. // HTTP: Output Last-Modified header
  258. $lastmod = 0;
  259. /////////////////////////////////////////////////
  260. // Date format
  261. $date_format = 'Y-m-d';
  262. // Time format
  263. $time_format = 'H:i:s';
  264. /////////////////////////////////////////////////
  265. // Max number of RSS feed
  266. $rss_max = 15;
  267. /////////////////////////////////////////////////
  268. // Backup related settings
  269. // Enable backup
  270. $do_backup = 1;
  271. // When a page had been removed, remove its backup too?
  272. $del_backup = 0;
  273. // Bacukp interval and generation
  274. $cycle = 3; // Wait N hours between backup (0 = no wait)
  275. $maxage = 120; // Stock latest N backups
  276. // NOTE: $cycle x $maxage / 24 = Minimum days to lost your data
  277. // 3 x 120 / 24 = 15
  278. // Splitter of backup data (NOTE: Too dangerous to change)
  279. define('PKWK_SPLITTER', '>>>>>>>>>>');
  280. /////////////////////////////////////////////////
  281. // Command execution per update
  282. define('PKWK_UPDATE_EXEC', '');
  283. // Sample: Namazu (Search engine)
  284. //$target = '/var/www/wiki/';
  285. //$mknmz = '/usr/bin/mknmz';
  286. //$output_dir = '/var/lib/namazu/index/';
  287. //define('PKWK_UPDATE_EXEC',
  288. // $mknmz . ' --media-type=text/pukiwiki' .
  289. // ' -O ' . $output_dir . ' -L ja -c -K ' . $target);
  290. /////////////////////////////////////////////////
  291. // HTTP proxy setting
  292. // Use HTTP proxy server to get remote data
  293. $use_proxy = 0;
  294. $proxy_host = 'proxy.example.com';
  295. $proxy_port = 8080;
  296. // Do Basic authentication
  297. $need_proxy_auth = 0;
  298. $proxy_auth_user = 'username';
  299. $proxy_auth_pass = 'password';
  300. // Hosts that proxy server will not be needed
  301. $no_proxy = array(
  302. 'localhost', // localhost
  303. '127.0.0.0/8', // loopback
  304. // '10.0.0.0/8' // private class A
  305. // '172.16.0.0/12' // private class B
  306. // '192.168.0.0/16' // private class C
  307. // 'no-proxy.com',
  308. );
  309. ////////////////////////////////////////////////
  310. // Mail related settings
  311. // Send mail per update of pages
  312. $notify = 0;
  313. // Send diff only
  314. $notify_diff_only = 1;
  315. // SMTP server (Windows only. Usually specified at php.ini)
  316. $smtp_server = 'localhost';
  317. // Mail recipient (To:) and sender (From:)
  318. $notify_to = 'to@example.com'; // To:
  319. $notify_from = 'from@example.com'; // From:
  320. // Subject: ($page = Page name wll be replaced)
  321. $notify_subject = '[PukiWiki] $page';
  322. // Mail header
  323. // NOTE: Multiple items must be divided by "\r\n", not "\n".
  324. $notify_header = '';
  325. /////////////////////////////////////////////////
  326. // Mail: POP / APOP Before SMTP
  327. // Do POP/APOP authentication before send mail
  328. $smtp_auth = 0;
  329. $pop_server = 'localhost';
  330. $pop_port = 110;
  331. $pop_userid = '';
  332. $pop_passwd = '';
  333. // Use APOP instead of POP (If server uses)
  334. // Default = Auto (Use APOP if possible)
  335. // 1 = Always use APOP
  336. // 0 = Always use POP
  337. // $pop_auth_use_apop = 1;
  338. /////////////////////////////////////////////////
  339. // Ignore list
  340. // Regex of ignore pages
  341. $non_list = '^\:';
  342. // Search ignored pages
  343. $search_non_list = 1;
  344. /////////////////////////////////////////////////
  345. // Template setting
  346. $auto_template_func = 1;
  347. $auto_template_rules = array(
  348. '((.+)\/([^\/]+))' => '\2/template'
  349. );
  350. /////////////////////////////////////////////////
  351. // Automatically add fixed heading anchor
  352. $fixed_heading_anchor = 1;
  353. /////////////////////////////////////////////////
  354. // Remove the first spaces from Preformatted text
  355. $preformat_ltrim = 1;
  356. /////////////////////////////////////////////////
  357. // Convert linebreaks into <br />
  358. $line_break = 0;
  359. /////////////////////////////////////////////////
  360. // Use date-time rules (See rules.ini.php)
  361. $usedatetime = 1;
  362. /////////////////////////////////////////////////
  363. // User-Agent settings
  364. //
  365. // If you want to ignore embedded browsers for rich-content-wikisite,
  366. // remove (or comment-out) all 'keitai' settings.
  367. //
  368. // If you want to to ignore desktop-PC browsers for simple wikisite,
  369. // copy keitai.ini.php to default.ini.php and customize it.
  370. $agents = array(
  371. // pattern: A regular-expression that matches device(browser)'s name and version
  372. // profile: A group of browsers
  373. // Embedded browsers (Rich-clients for PukiWiki)
  374. // Windows CE (Microsoft(R) Internet Explorer 5.5 for Windows(R) CE)
  375. // Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC)
  376. array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#', 'profile'=>'default'),
  377. // ACCESS "NetFront" / "Compact NetFront" and thier OEM, expects to be "Mozilla/4.0"
  378. // Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0" (PlayStation BB Navigator, for SONY PlayStation 2)
  379. // Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.19) NetFront/3.0" (SONY Clie series)
  380. // Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (SHARP Zaurus)
  381. array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]+)#', 'profile'=>'default'),
  382. // Embedded browsers (Non-rich)
  383. // Windows CE (the others)
  384. // Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320 )" (GFORT, NTT DoCoMo)
  385. array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keitai'),
  386. // ACCESS "NetFront" / "Compact NetFront" and thier OEM
  387. // Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2)
  388. // Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket: AirH" Phone by JRC)
  389. array('pattern'=>'#\b(NetFront)/([0-9\.]+)#', 'profile'=>'keitai'),
  390. array('pattern'=>'#\b(CNF)/([0-9\.]+)#', 'profile'=>'keitai'),
  391. array('pattern'=>'#\b(AveFront)/([0-9\.]+)#', 'profile'=>'keitai'),
  392. array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#', 'profile'=>'keitai'), // The same?
  393. // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones
  394. // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c以降は可変
  395. // Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()の中は可変
  396. array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#', 'profile'=>'keitai'),
  397. // Vodafone's embedded browser
  398. // Sample: "J-PHONE/2.0/J-T03" // 2.0は"ブラウザの"バージョン
  399. // Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0"
  400. array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#', 'profile'=>'keitai'),
  401. // Openwave(R) Mobile Browser (EZweb, WAP phone, etc)
  402. // Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MMP/2.0"
  403. array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#', 'profile'=>'keitai'),
  404. // Opera, dressing up as other embedded browsers
  405. // Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at 'keitai'-mode)
  406. array('pattern'=>'#\b(?:DDIPOCKET|WILLCOM)\b.+\b(Opera) ([0-9\.]+)\b#', 'profile'=>'keitai'),
  407. // Planetweb http://www.planetweb.com/
  408. // Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2)
  409. array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile'=>'keitai'),
  410. // DreamPassport, Web browser for SEGA DreamCast
  411. // Sample: "Mozilla/3.0 (DreamPassport/3.0)"
  412. array('pattern'=>'#\b(DreamPassport)/([0-9\.]+)#', 'profile'=>'keitai'),
  413. // Palm "Web Pro" http://www.palmone.com/us/support/accessories/webpro/
  414. // Sample: "Mozilla/4.76 [en] (PalmOS; U; WebPro)"
  415. array('pattern'=>'#\b(WebPro)\b#', 'profile'=>'keitai'),
  416. // ilinx "Palmscape" / "Xiino" http://www.ilinx.co.jp/
  417. // Sample: "Xiino/2.1SJ [ja] (v. 4.1; 153x130; c16/d)"
  418. array('pattern'=>'#^(Palmscape)/([0-9\.]+)#', 'profile'=>'keitai'),
  419. array('pattern'=>'#^(Xiino)/([0-9\.]+)#', 'profile'=>'keitai'),
  420. // SHARP PDA Browser (SHARP Zaurus)
  421. // Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
  422. array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#', 'profile'=>'keitai'),
  423. // WebTV
  424. array('pattern'=>'#^(WebTV)/([0-9\.]+)#', 'profile'=>'keitai'),
  425. // Desktop-PC browsers
  426. // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail
  427. // NOTE: Keep this pattern above MSIE and Mozilla
  428. // Sample: "Opera/7.0 (OS; U)" (not disguise)
  429. // Sample: "Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera 6.0" (disguise)
  430. array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#', 'profile'=>'default'),
  431. // MSIE: Microsoft Internet Explorer (or something disguised as MSIE)
  432. // Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
  433. array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#', 'profile'=>'default'),
  434. // Mozilla Firefox
  435. // NOTE: Keep this pattern above Mozilla
  436. // Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
  437. array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#', 'profile'=>'default'),
  438. // Loose default: Including something Mozilla
  439. array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#', 'profile'=>'default'),
  440. array('pattern'=>'#^#', 'profile'=>'default'), // Sentinel
  441. );
  442. ?>