OSDN Git Service

PukiWiki/1.4/Manual/Plugin/O-R: Correct paint, poular (by Nibun-no-ni)
[pukiwiki/pukiwiki.git] / pukiwiki.ini.php
index 2fc7178..3253cbf 100644 (file)
 <?php
-/////////////////////////////////////////////////
-// PukiWiki - Yet another WikiWikiWeb clone.
-//
-// $Id: pukiwiki.ini.php,v 1.82 2004/09/20 02:04:24 henoheno Exp $
+// PukiWiki - Yet another WikiWikiWeb clone
+// $Id: pukiwiki.ini.php,v 1.107 2005/01/23 03:33:38 henoheno Exp $
 //
 // PukiWiki setting file
 
 /////////////////////////////////////////////////
-// ½é´üÀßÄê (ʸ»ú¥¨¥ó¥³¡¼¥É¡¢¸À¸ì)
+// Functionality settings
+
+// PKWK_READONLY - Prohibit editing (Not work yet)
+if (! defined('PKWK_READONLY'))
+       define('PKWK_READONLY', 0); // 0 or 1
+
+// PKWK_OPTIMISE - Ignore verbose but understandable checking and warning
+//   If you end testing this PukiWiki, set '1'.
+//   If you feel in trouble about this PukiWiki, set '0'.
+if (! defined('PKWK_OPTIMISE'))
+       define('PKWK_OPTIMISE', 0); // 0 or 1
+
+/////////////////////////////////////////////////
+// Security settings
 
-// Internal Language ('en' or 'ja')
-define('LANG', 'ja');  // For internal messages
-if (! defined('SKIN_LANG')) define('SKIN_LANG', 'ja'); // For skin
+// PKWK_SAFE_MODE - prohibits some unsafe(but compatible) functions 
+if (! defined('PKWK_SAFE_MODE'))
+       define('PKWK_SAFE_MODE', 0); // 0 or 1
 
-// Internal content encoding (for mbstring)
-define('SOURCE_ENCODING', 'EUC-JP'); // 'UTF-8' or 'ASCII' or 'EUC-JP'
+// PKWK_QUERY_STRING_MAX
+//   Max length of GET method, prohibits some worm attack ASAP
+//   NOTE: Keep (page-name + attach-file-name) <= PKWK_QUERY_STRING_MAX
+define('PKWK_QUERY_STRING_MAX', 640);
 
-// Internal content encoding = Output content charset (for skin)
-define('CONTENT_CHARSET', 'EUC-JP'); // 'UTF-8' or 'iso-8859-1' or 'EUC-JP'
+/////////////////////////////////////////////////
+// Language / Encoding settings
+
+// LANG - Internal content encoding ('en', 'ja', or ...)
+define('LANG', 'ja');
+
+// UI_LANG - Content Language for buttons, menus,  etc
+define('UI_LANG', LANG); // 'en' for Internationalized wikisite
 
 /////////////////////////////////////////////////
-// ¥Ç¥£¥ì¥¯¥È¥ê»ØÄ꠺Ǹå¤Ë / ¤¬É¬Íנ°À­¤Ï 777
+// Directory settings I (ended with '/', permission '777')
 
-// ¥Ç¡¼¥¿³ÊǼ¥Ç¥£¥ì¥¯¥È¥ê
-define('DATA_DIR',      DATA_HOME . 'wiki/');  // ºÇ¿·¤Î¥Ç¡¼¥¿
-define('DIFF_DIR',      DATA_HOME . 'diff/');  // º¹Ê¬¥Õ¥¡¥¤¥ë
-define('BACKUP_DIR',    DATA_HOME . 'backup/');        // ¥Ð¥Ã¥¯¥¢¥Ã¥×
-define('CACHE_DIR',     DATA_HOME . 'cache/'); // ¥­¥ã¥Ã¥·¥å
-define('UPLOAD_DIR',    DATA_HOME . 'attach/');        // ÅºÉÕ¥Õ¥¡¥¤¥ë
-define('COUNTER_DIR',   DATA_HOME . 'counter/');       // ¥«¥¦¥ó¥¿
-define('TRACKBACK_DIR', DATA_HOME . 'trackback/');     // TrackBack
-define('PLUGIN_DIR',    DATA_HOME . 'plugin/'); // ¥×¥é¥°¥¤¥ó¥Õ¥¡¥¤¥ë
+// You may hide these directories (from web browsers)
+// by setting DATA_HOME at index.php.
+
+define('DATA_DIR',      DATA_HOME . 'wiki/'     ); // Latest wiki texts
+define('DIFF_DIR',      DATA_HOME . 'diff/'     ); // Latest diffs
+define('BACKUP_DIR',    DATA_HOME . 'backup/'   ); // Backups
+define('CACHE_DIR',     DATA_HOME . 'cache/'    ); // Some sort of caches
+define('UPLOAD_DIR',    DATA_HOME . 'attach/'   ); // Attached files and logs
+define('COUNTER_DIR',   DATA_HOME . 'counter/'  ); // Counter plugin's counts
+define('TRACKBACK_DIR', DATA_HOME . 'trackback/'); // TrackBack logs
+define('PLUGIN_DIR',    DATA_HOME . 'plugin/'   ); // Plugin directory
 
 /////////////////////////////////////////////////
-// ¥Ç¥£¥ì¥¯¥È¥ê»ØÄ꠺Ǹå¤Ë / ¤¬É¬Í×
-//
-//  PukiWikiËÜÂΤòWeb¥Ö¥é¥¦¥¶¤«¤é¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤
-//  ¾ì½ê¤ËÀßÃÖ¤¹¤ë¤È¤­¤Ï¡¢°Ê²¼¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¢¤ë
-//  ¥Õ¥¡¥¤¥ë¤Î°ìÉô¤ò Web¥Ö¥é¥¦¥¶¤«¤é¥¢¥¯¥»¥¹¤Ç¤­¤ë
-//  ¾ì½ê¤ËÀßÃÖ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
-//  (̵¤¯¤È¤âÆ°ºî¤Ï¤·¤Þ¤¹¤¬¡¢¾¯¡¹Ì£µ¤¤Ê¤¯¤Ê¤ë¤Ç¤·¤ç¤¦)
+// Directory settings II (ended with '/')
 
-// ¥¹¥­¥ó/¥¹¥¿¥¤¥ë¥·¡¼¥È¥Õ¥¡¥¤¥ë³ÊǼ¥Ç¥£¥ì¥¯¥È¥ê
+// Skins / Stylesheets
 define('SKIN_DIR', 'skin/');
-//  ¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê°Ê²¼¤Î¥¹¥­¥ó¥Õ¥¡¥¤¥ë (*.php) ¤Ï
-//  PukiWikiËÜÂΦ(DATA_HOME/SKIN_DIR) ¤ËɬÍפǤ¹¤¬¡¢
-//  CSS¥Õ¥¡¥¤¥ë(*.css) ¤ª¤è¤ÓJavaScript¥Õ¥¡¥¤¥ë( *.js)
-//  ¤ÏWeb¥Ö¥é¥¦¥¶¤«¤é¸«¤¨¤ë¾ì½ê(./SKIN_DIR)¤ËÇÛÃÖ
-//  ¤·¤Æ²¼¤µ¤¤
+// Skin files (SKIN_DIR/*.skin.php) are needed at
+// ./DATAHOME/SKIN_DIR from index.php, but
+// CSSs(*.css) and JavaScripts(*.js) are needed at
+// ./SKIN_DIR from index.php.
 
-// ²èÁü¥Õ¥¡¥¤¥ë³ÊǼ¥Ç¥£¥ì¥¯¥È¥ê
+// Static image files
 define('IMAGE_DIR', 'image/');
-//  ¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê°Ê²¼¤ÎÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ï
-//  Web¥Ö¥é¥¦¥¶¤«¤é¸«¤¨¤ë¾ì½ê(./IMAGE_DIR)¤ËÇÛÃÖ
-//  ¤·¤Æ²¼¤µ¤¤
-
+// Keep this directory shown via web browsers like
+// ./IMAGE_DIR from index.php.
 
 /////////////////////////////////////////////////
-// ¥í¡¼¥«¥ë»þ´Ö
-define('ZONE','JST');
-define('ZONETIME',9 * 3600); // JST = GMT+9
+// Local time setting
+
+switch (LANG) { // or specifiy one
+case 'ja':
+       define('ZONE', 'JST');
+       define('ZONETIME', 9 * 3600); // JST = GMT + 9
+       break;
+default  :
+       define('ZONE', 'GMT');
+       define('ZONETIME', 0);
+       break;
+}
 
 /////////////////////////////////////////////////
-// ¥Û¡¼¥à¥Ú¡¼¥¸¤Î¥¿¥¤¥È¥ë(½¤Àµ¤·¤Æ¤¯¤À¤µ¤¤)
-// * RSS ¤Ë½ÐÎϤ¹¤ë¥Á¥ã¥ó¥Í¥ë̾¤ò·ó¤Í¤ë
+// Title of your Wikisite (Define this)
+// and also RSS feed's channel name
 $page_title = 'PukiWiki';
 
-// index.php ¤Ê¤É¤ËÊѹ¹¤·¤¿¾ì¹ç¤Î¥¹¥¯¥ê¥×¥È̾¤ÎÀßÄê
+// ¥¹¥¯¥ê¥×¥È̾¤ÎÀßÄê
 // ¤È¤¯¤ËÀßÄꤷ¤Ê¤¯¤Æ¤âÌäÂê¤Ê¤·
 //$script = 'http://example.com/pukiwiki/';
 
+// $script ¤«¤é¥Õ¥¡¥¤¥ë̾¤ò¥«¥Ã¥È¤¹¤ë (URL¤òû¤¯¤¹¤ë)
+// Web¥µ¡¼¥Ð¡¼Â¦¤ÎÀßÄê¤Ç¡¢¥Ç¥£¥ì¥¯¥È¥ê¤ò»ØÄꤷ¤¿¤È¤­¤Ë
+// É½¼¨¤¹¤ë¥Ç¥Õ¥©¥ë¥È¤Î¥Õ¥¡¥¤¥ë̾¤Î¸õÊä¤Ë¤³¤³¤Ç»ØÄꤹ¤ë
+// ¥Õ¥¡¥¤¥ë̾¤¬´Þ¤Þ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹
+//$script_directory_index = 'index.php';
+
 // ÊÔ½¸¼Ô¤Î̾Á°(½¤Àµ¤·¤Æ¤¯¤À¤µ¤¤)
 $modifier = 'anonymous';
 
@@ -84,9 +111,29 @@ $interwiki    = 'InterWikiName';    // InterWikiName 
 $menubar      = 'MenuBar';     // ¥á¥Ë¥å¡¼¤È¤·¤Æɽ¼¨¤µ¤»¤ëÆâÍƤò½ñ¤¯¥Ú¡¼¥¸
 
 /////////////////////////////////////////////////
+// Default Document Type Definition
+// Web¥Ö¥é¥¦¥¶¤Î¥Ð¥°¤ä¡¢Java applet ¤Ê¤É¤¬Strict¤Ç¤Ê¤¤ÃͤòÍ׵᤹¤ë¤³¤È¤¬¤¢¤ë
+// paint¥×¥é¥°¥¤¥ó¤Ï¼«Æ°Åª¤Ëtransitional¤Ë¤¹¤ë
+//$pkwk_dtd = PKWK_DTD_XHTML_1_1; // Default
+//$pkwk_dtd = PKWK_DTD_XHTML_1_0_STRICT;
+//$pkwk_dtd = PKWK_DTD_XHTML_1_0_TRANSITIONAL;
+//$pkwk_dtd = PKWK_DTD_HTML_4_01_STRICT;
+//$pkwk_dtd = PKWK_DTD_HTML_4_01_TRANSITIONAL;
+
+/////////////////////////////////////////////////
+
+// Allow using JavaScript
+//   JavaScript¤ò»ÈÍѤ¹¤ë¥×¥é¥°¥¤¥ó¤Ê¤É¤Î
+//   µ¡Ç½¤òÍÞÀ©¤·¤Þ¤¹
+define('PKWK_ALLOW_JAVASCRIPT', 0);    // 0 or 1
+
+/////////////////////////////////////////////////
 // TrackBackµ¡Ç½¤ò»ÈÍѤ¹¤ë
 $trackback = 0;
 
+// Show trackbacks with an another window
+$trackback_javascript = 0;
+
 /////////////////////////////////////////////////
 // Refererµ¡Ç½¤ò»ÈÍѤ¹¤ë
 $referer = 0;
@@ -99,7 +146,7 @@ $nowikiname = 0;
 // AutoLink¤òÍ­¸ú¤Ë¤¹¤ë¾ì¹ç¤Ï¡¢AutoLinkÂоݤȤʤë
 // ¥Ú¡¼¥¸Ì¾¤ÎºÇû¥Ð¥¤¥È¿ô¤ò»ØÄê
 // AutoLink¤ò̵¸ú¤Ë¤¹¤ë¾ì¹ç¤Ï0
-$autolink = 0;
+$autolink = 8;
 
 /////////////////////////////////////////////////
 // Åà·ëµ¡Ç½¤òÍ­¸ú¤Ë¤¹¤ë
@@ -139,16 +186,18 @@ $adminpass = '1a1dc91c907325c69271ddf0c944bc72';
 // ¤ÎÍͤˤ·¤Æ·×»»¤µ¤»¤ë»ö¤¬¤Ç¤­¤Þ¤¹¡£('-n' ¥ª¥×¥·¥ç¥ó¤ò˺¤ì¤º¤Ë!)
 // FreeBSD¤Ê¤É¤Ç¤Ï md5sum ¤ÎÂå¤ï¤ê¤Ë md5 ¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
 //
-// ¤ª´«¤á¤Ç¤­¤Þ¤»¤ó¤¬¡¢PukiWiki¤Îmd5¥³¥Þ¥ó¥É¤Ç¤â»»½Ð¤¬²Äǽ¤Ç¤¹¡£
+// ¤ª´«¤á¤Ç¤­¤Þ¤»¤ó¤¬¡¢PukiWiki¤Îmd5¥×¥é¥°¥¤¥ó¤Ç¤â»»½Ð¤¬²Äǽ¤Ç¤¹¡£
 //
-// http://<ÀßÃÖ¤·¤¿¾ì½ê>/pukiwiki.php?md5=pass
+// http://<ÀßÃÖ¤·¤¿¾ì½ê>/index.php?plugin=md5
 //
-// ¤³¤ÎURL¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤Ç¡¢»»½Ð·ë²Ì¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£¤½¤Î
-// ¤«¤ï¤ê¡¢¤¢¤Ê¤¿¤¬¥¿¥¤¥×¤·¤¿¥Ñ¥¹¥ï¡¼¥É¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¤òή¤ì¡¢
-// Ã¯¤Ë¤Ç¤âÇÁ¤­¸«¤¬¤Ç¤­¡¢Web¥µ¡¼¥Ð¡¼¤Î¥í¥°¤Ë¤â»Ä¤Ã¤Æ¤·¤Þ¤¦¡¢
-// ¤È¤¤¤Ã¤¿ÍÍ¡¹¤Ê¥ê¥¹¥¯¤òÉ餦²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£¤¢¤Ê¤¿¤¬»È¤Ã¤Æ
-// ¤¤¤ë¥³¥ó¥Ô¥å¡¼¥¿¡¢¥µ¡¼¥Ð¡¼¤Þ¤Ç¤Î¥Í¥Ã¥È¥ï¡¼¥¯¡¢¥µ¡¼¥Ð¡¼¤Î
-// ¤É¤³¤«¤¬¿®Íê¤Ç¤­¤Ê¤¤¤Î¤Ç¤¢¤ì¤Ð¡¢¤³¤ÎÊýË¡¤Ï»È¤ï¤Ê¤¤¤Ç²¼¤µ¤¤¡£
+// ¤³¤ÎURL¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤È¡¢MD5¥Ï¥Ã¥·¥å¤ò»»½Ð¤¹¤ë¤¿¤á¤Î¥Õ¥©¡¼¥à¤¬
+// É½¼¨¤µ¤ì¡¢¤½¤³¤Ë²¿¤é¤«¤Îʸ»úÎó¤òÆþÎϤ¹¤ë¤È¥Ï¥Ã¥·¥å¤¬É½¼¨¤µ¤ì¤Þ
+// ¤¹¡£¤¿¤À¤·¤³¤Îµ¡Ç½¤ò»È¤Ã¤Æ¥Ñ¥¹¥ï¡¼¥É¤ò·è¤á¤ë¤È¤¤¤¦¤³¤È¤Ï¡¢¥Ñ¥¹
+// ¥ï¡¼¥É(¤Î¸õÊä)¤ä¥Ï¥Ã¥·¥å¤ò¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Ëή¤·¤Æ¤·¤Þ¤¦¤È¤¤¤¦
+// ¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¤«¤é¡¢°­°Õ¤Î¤¢¤ë¼Ô¤Ë¤è¤ëÅðÄ°¤ÎÀ®¸ùΨ¤ò¹â¤á¤¿¤ê¡¢
+// Èà¤é¤Ë¹¶·â¤Î¤¿¤á¤Î¥Ò¥ó¥È¤ò¤è¤ê¿¤¯Í¿¤¨¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£
+// ¥Ñ¥¹¥ï¡¼¥É¤È¥Ï¥Ã¥·¥å¤ÎÁȤ߹ç¤ï¤»¤ò¼ê¤ËÆþ¤ì¤¿¼Ô¤Ë¤È¤Ã¤Æ¤Ï¡¢
+// "$adminpass ¤Ë¥Ï¥Ã¥·¥å¤À¤±½ñ¤¯" ¤È¤¤¤¦Âбþ¤â°ÕÌ£¤¬¤¢¤ê¤Þ¤»¤ó¡£
 
 /////////////////////////////////////////////////
 // ChaSen, KAKASI ¤Ë¤è¤ë¡¢¥Ú¡¼¥¸Ì¾¤ÎÆɤߤμèÆÀ (0:̵¸ú,1:Í­¸ú)
@@ -194,8 +243,8 @@ $read_auth = 0;
 
 // ±ÜÍ÷ǧ¾ÚÂоݥѥ¿¡¼¥óÄêµÁ
 $read_auth_pages = array(
-       '/¤Ò¤­¤³¤â¤ë¤Û¤²/'      => 'hoge',
-       '/(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)/' => 'foo,bar,hoge',
+       '#¤Ò¤­¤³¤â¤ë¤Û¤²#'      => 'hoge',
+       '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo,bar,hoge',
 );
 
 /////////////////////////////////////////////////
@@ -204,9 +253,9 @@ $edit_auth = 0;
 
 // ÊÔ½¸Ç§¾ÚÂоݥѥ¿¡¼¥óÄêµÁ
 $edit_auth_pages = array(
-       '/Bar¤Î¸ø³«Æüµ­/'       => 'bar',
-       '/¤Ò¤­¤³¤â¤ë¤Û¤²/'      => 'hoge',
-       '/(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)/' => 'foo',
+       '#Bar¤Î¸ø³«Æüµ­#'       => 'bar',
+       '#¤Ò¤­¤³¤â¤ë¤Û¤²#'      => 'hoge',
+       '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo',
 );
 
 /////////////////////////////////////////////////
@@ -256,7 +305,7 @@ $maxage = 120;      // 
 //          3   x   120   / 24 = 15
 
 // ¥Ð¥Ã¥¯¥¢¥Ã¥×¤ÎÀ¤Âå¤ò¶èÀÚ¤ëʸ»úÎó
-$splitter = ">>>>>>>>>>";
+define('PKWK_SPLITTER', '>>>>>>>>>>');
 
 /////////////////////////////////////////////////
 // ¥Ú¡¼¥¸¤Î¹¹¿·»þ¤Ë¥Ð¥Ã¥¯¥°¥é¥ó¥É¤Ç¼Â¹Ô¤¹¤ë¥³¥Þ¥ó¥É(mknmz¤Ê¤É)
@@ -362,15 +411,34 @@ $line_break = 0;
 // 'profile'=>'keitai' ¤È½¤Àµ¤·¤Æ²¼¤µ¤¤¡£
 
 $agents = array(
-// pattern: ¥Ç¥Ð¥¤¥¹[¥Ö¥é¥¦¥¶]̾¤ª¤è¤Ó¥Ð¡¼¥¸¥ç¥ó¤Î¸¡½Ð¥Ñ¥¿¡¼¥ó  profile: ½ê°¤¹¤ë¥°¥ë¡¼¥×
+// pattern: A regular-expression that matches device(browser)'s name and version
+// profile: A group of browsers
+
+    // Embedded browsers (Rich-clients for PukiWiki)
+
+       // Windows CE (Microsoft(R) Internet Explorer 5.5 for Windows(R) CE)
+       // Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC)
+       array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#', 'profile'=>'default'),
 
-    // ÁȤ߹þ¤ß¥Ö¥é¥¦¥¶ (¥ê¥Ã¥Á¥¯¥é¥¤¥¢¥ó¥È:PukiWiki¤¬¤½¤Î¤Þ¤Þ»È¤¨¤ë¤È¤¤¤¦°ÕÌ£¤Î)
+       // ACCESS "NetFront" / "Compact NetFront" and thier OEM, expects to be "Mozilla/4.0"
+       // Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0" (PlayStation BB Navigator, for SONY PlayStation 2)
+       // Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.19) NetFront/3.0" (SONY Clie series)
+       // Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (SHARP Zaurus)
+       array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]+)#',   'profile'=>'default'),
+
+    // Embedded browsers (Non-rich)
 
-       // "PlayStation BB Navigator" (ACCESS NetFront, for SONY PlayStation 2)
-       // Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0"
-       array('pattern'=>'#\bPlayStation\b.*\b(NetFront)/([0-9\.]+)#',  'profile'=>'default'),
+       // Windows CE (the others)
+       // Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320 )" (GFORT, NTT DoCoMo)
+       array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keitai'),
 
-    // ÁȤ߹þ¤ß¥Ö¥é¥¦¥¶ (¥ê¥Ã¥Á¥¯¥é¥¤¥¢¥ó¥È¤Ç¤Ï¤Ê¤¤¤â¤Î)
+       // ACCESS "NetFront" / "Compact NetFront" and thier OEM
+       // Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2)
+       // Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket: AirH" Phone by JRC)
+       array('pattern'=>'#\b(NetFront)/([0-9\.]+)#',   'profile'=>'keitai'),
+       array('pattern'=>'#\b(CNF)/([0-9\.]+)#',        'profile'=>'keitai'),
+       array('pattern'=>'#\b(AveFront)/([0-9\.]+)#',   'profile'=>'keitai'),
+       array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#',  'profile'=>'keitai'), // The same?
 
        // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones
        // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c°Ê¹ß¤Ï²ÄÊÑ
@@ -386,23 +454,13 @@ $agents = array(
        // Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MMP/2.0"
        array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#',        'profile'=>'keitai'),
 
-       // ACCESS "NetFront" / "Compact NetFront" and thier OEM
-       // Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.19) NetFront/3.0" (SONY Clie series)
-       // Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (Sharp Zaurus)
-       // Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2)
-       // Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket: AirH" Phone by JRC)
-       array('pattern'=>'#\b(NetFront)/([0-9\.]+)#',   'profile'=>'keitai'),
-       array('pattern'=>'#\b(CNF)/([0-9\.]+)#',        'profile'=>'keitai'),
-       array('pattern'=>'#\b(AveFront)/([0-9\.]+)#',   'profile'=>'keitai'),
-       array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#',  'profile'=>'keitai'), // The same?
-
        // Opera, dressing up as other embedded browsers
        // Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at 'keitai'-mode)
        array('pattern'=>'#\bDDIPOCKET\b.+\b(Opera) ([0-9\.]+)\b#',     'profile'=>'keitai'),
 
        // Planetweb http://www.planetweb.com/
        // Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2)
-       array('pattern'=>'#\b(Planet[Ww]eb)/[a-z]?([0-9\.]+)#', 'profile'=>'keitai'),
+       array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile'=>'keitai'),
 
        // DreamPassport, Web browser for SEGA DreamCast
        // Sample: "Mozilla/3.0 (DreamPassport/3.0)"
@@ -417,21 +475,33 @@ $agents = array(
        array('pattern'=>'#^(Palmscape)/([0-9\.]+)#',   'profile'=>'keitai'),
        array('pattern'=>'#^(Xiino)/([0-9\.]+)#',       'profile'=>'keitai'),
 
-       // Sharp PDA Browser (Sharp Zaurus)
+       // SHARP PDA Browser (SHARP Zaurus)
        // Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
        array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#',        'profile'=>'keitai'),
 
-       // Windows CE
-       // Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC)
-       array('pattern'=>'#\b(Windows CE)\b#',  'profile'=>'keitai'),
-
        // WebTV
        array('pattern'=>'#^(WebTV)/([0-9\.]+)#',       'profile'=>'keitai'),
 
-    // ¥Ç¥¹¥¯¥È¥Ã¥×¤¢¤ë¤¤¤Ï¥ê¥Ã¥Á¥¯¥é¥¤¥¢¥ó¥È (¥Ç¥Ð¥¤¥¹¤ò¼±Ê̤¹¤ëɬÍפ¬¤Ê¤¤¤â¤Î)
+    // Desktop-PC browsers
+
+       // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail
+       // NOTE: Keep this pattern above MSIE and Mozilla
+       // Sample: "Opera/7.0 (OS; U)" (not disguise)
+       // Sample: "Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera 6.0" (disguise)
+       array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#', 'profile'=>'default'),
+
+       // MSIE: Microsoft Internet Explorer (or something disguised as MSIE)
+       // Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
+       array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#',     'profile'=>'default'),
+
+       // Mozilla Firefox
+       // NOTE: Keep this pattern above Mozilla
+       // Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
+       array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#',  'profile'=>'default'),
 
-       // ¥Ç¥Õ¥©¥ë¥ÈÀßÄê
-       array('pattern'=>'#^#', 'profile'=>'default'),  // default
+       // Loose default: Including something Mozilla
+       array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#',     'profile'=>'default'),
 
+       array('pattern'=>'#^#', 'profile'=>'default'),  // Sentinel
 );
 ?>