OSDN Git Service

PukiWiki/1.4/Manual/Plugin/O-R: Correct paint, poular (by Nibun-no-ni)
[pukiwiki/pukiwiki.git] / pukiwiki.ini.php
index d43d8e3..3253cbf 100644 (file)
 <?php
-/////////////////////////////////////////////////
-// PukiWiki - Yet another WikiWikiWeb clone.
-//
-// $Id: pukiwiki.ini.php,v 1.70 2004/07/31 03:09:19 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
 
 /////////////////////////////////////////////////
-// ¥Ç¥£¥ì¥¯¥È¥ê»ØÄ꠺Ǹå¤Ë / ¤¬É¬Íנ°À­¤Ï 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/');
-/////////////////////////////////////////////////
-// TrackBack¥Õ¥¡¥¤¥ë³ÊǼ¥Ç¥£¥ì¥¯¥È¥ê
-define('TRACKBACK_DIR', DATA_HOME . 'trackback/');
+// 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
+
+// PKWK_SAFE_MODE - prohibits some unsafe(but compatible) functions 
+if (! defined('PKWK_SAFE_MODE'))
+       define('PKWK_SAFE_MODE', 0); // 0 or 1
+
+// 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);
+
 /////////////////////////////////////////////////
-// ¥×¥é¥°¥¤¥ó¥Õ¥¡¥¤¥ë³ÊǼÀè¥Ç¥£¥ì¥¯¥È¥ê
-define('PLUGIN_DIR', DATA_HOME . 'plugin/');
+// 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
+
 /////////////////////////////////////////////////
-// ¥¹¥­¥ó/¥¹¥¿¥¤¥ë¥·¡¼¥È¥Õ¥¡¥¤¥ë³ÊǼ¥Ç¥£¥ì¥¯¥È¥ê
-define('SKIN_DIR','skin/');
+// Directory settings I (ended with '/', permission '777')
+
+// 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
+
 /////////////////////////////////////////////////
-// ²èÁü¥Õ¥¡¥¤¥ë³ÊǼ¥Ç¥£¥ì¥¯¥È¥ê
-define('IMAGE_DIR','image/');
+// Directory settings II (ended with '/')
+
+// Skins / Stylesheets
+define('SKIN_DIR', 'skin/');
+// 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/');
+// 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;
+}
+
 /////////////////////////////////////////////////
-// index.php ¤Ê¤É¤ËÊѹ¹¤·¤¿¾ì¹ç¤Î¥¹¥¯¥ê¥×¥È̾¤ÎÀßÄê
+// Title of your Wikisite (Define this)
+// and also RSS feed's channel name
+$page_title = 'PukiWiki';
+
+// ¥¹¥¯¥ê¥×¥È̾¤ÎÀßÄê
 // ¤È¤¯¤ËÀßÄꤷ¤Ê¤¯¤Æ¤âÌäÂê¤Ê¤·
-//$script = 'http://hogehoge/pukiwiki/';
+//$script = 'http://example.com/pukiwiki/';
+
+// $script ¤«¤é¥Õ¥¡¥¤¥ë̾¤ò¥«¥Ã¥È¤¹¤ë (URL¤òû¤¯¤¹¤ë)
+// Web¥µ¡¼¥Ð¡¼Â¦¤ÎÀßÄê¤Ç¡¢¥Ç¥£¥ì¥¯¥È¥ê¤ò»ØÄꤷ¤¿¤È¤­¤Ë
+// É½¼¨¤¹¤ë¥Ç¥Õ¥©¥ë¥È¤Î¥Õ¥¡¥¤¥ë̾¤Î¸õÊä¤Ë¤³¤³¤Ç»ØÄꤹ¤ë
+// ¥Õ¥¡¥¤¥ë̾¤¬´Þ¤Þ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹
+//$script_directory_index = 'index.php';
+
+// ÊÔ½¸¼Ô¤Î̾Á°(½¤Àµ¤·¤Æ¤¯¤À¤µ¤¤)
+$modifier = 'anonymous';
+
+// ÊÔ½¸¼Ô¤Î¥Û¡¼¥à¥Ú¡¼¥¸(½¤Àµ¤·¤Æ¤¯¤À¤µ¤¤)
+$modifierlink = 'http://pukiwiki.example.com/';
+
+// ¥Ç¥Õ¥©¥ë¥È¤Î¥Ú¡¼¥¸Ì¾
+$defaultpage  = 'FrontPage';   // ¥È¥Ã¥×¥Ú¡¼¥¸ (¥Ú¡¼¥¸¤ò»ØÄꤷ¤Ê¤¤¤È¤­)
+$whatsnew     = 'RecentChanges';       // ¹¹¿·ÍúÎò
+$whatsdeleted = 'RecentDeleted';       // ºï½üÍúÎò
+$interwiki    = 'InterWikiName';       // InterWikiName ¤Î°ìÍ÷¤ò½ñ¤¯¥Ú¡¼¥¸
+$menubar      = 'MenuBar';     // ¥á¥Ë¥å¡¼¤È¤·¤Æɽ¼¨¤µ¤»¤ëÆâÍƤò½ñ¤¯¥Ú¡¼¥¸
 
 /////////////////////////////////////////////////
-// ¥È¥Ã¥×¥Ú¡¼¥¸¤Î̾Á°
-$defaultpage = 'FrontPage';
-/////////////////////////////////////////////////
-// ¹¹¿·ÍúÎò¥Ú¡¼¥¸¤Î̾Á°
-$whatsnew = 'RecentChanges';
-/////////////////////////////////////////////////
-// ºï½üÍúÎò¥Ú¡¼¥¸¤Î̾Á°
-$whatsdeleted = 'RecentDeleted';
-/////////////////////////////////////////////////
-// InterWikiName¥Ú¡¼¥¸¤Î̾Á°
-$interwiki = 'InterWikiName';
-/////////////////////////////////////////////////
-// MenuBar¥Ú¡¼¥¸¤Î̾Á°
-$menubar = 'MenuBar';
-/////////////////////////////////////////////////
-// ÊÔ½¸¼Ô¤Î̾Á°(¼«Í³¤ËÊѤ¨¤Æ¤¯¤À¤µ¤¤)
-$modifier = 'me';
-/////////////////////////////////////////////////
-// ÊÔ½¸¼Ô¤Î¥Û¡¼¥à¥Ú¡¼¥¸(¼«Í³¤ËÊѤ¨¤Æ¤¯¤À¤µ¤¤)
-$modifierlink = 'http://change me!/';
+// 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;
 
 /////////////////////////////////////////////////
-// ¥Û¡¼¥à¥Ú¡¼¥¸¤Î¥¿¥¤¥È¥ë(¼«Í³¤ËÊѤ¨¤Æ¤¯¤À¤µ¤¤)
-// RSS ¤Ë½ÐÎϤ¹¤ë¥Á¥ã¥ó¥Í¥ë̾
-$page_title = 'PukiWiki';
+
+// 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;
 
 /////////////////////////////////////////////////
-// WikiName¤ò*̵¸ú¤Ë*¤¹¤ë
+// WikiName¤ò *̵¸ú¤Ë* ¤¹¤ë
 $nowikiname = 0;
 
 /////////////////////////////////////////////////
 // AutoLink¤òÍ­¸ú¤Ë¤¹¤ë¾ì¹ç¤Ï¡¢AutoLinkÂоݤȤʤë
 // ¥Ú¡¼¥¸Ì¾¤ÎºÇû¥Ð¥¤¥È¿ô¤ò»ØÄê
 // AutoLink¤ò̵¸ú¤Ë¤¹¤ë¾ì¹ç¤Ï0
-$autolink = 0;
+$autolink = 8;
 
 /////////////////////////////////////////////////
 // Åà·ëµ¡Ç½¤òÍ­¸ú¤Ë¤¹¤ë
@@ -120,82 +172,92 @@ $adminpass = '1a1dc91c907325c69271ddf0c944bc72';
 //
 // ¤¿¤À¤·¡¢¤³¤ÎÊýË¡¤Ç¤Ï¡¢¤³¤Î¥Õ¥¡¥¤¥ë¤òÇÁ¤­¸«¤ë¤³¤È¤¬¤Ç¤­¤ë
 // (¤Ç¤­¤¿) Ã¯¤«¤Ë¡¢¥Ñ¥¹¥ï¡¼¥É¤½¤Î¤â¤Î¤òÃΤé¤ì¤ë¹â¤¤´í¸±À­¤¬
-// ¤¢¤ê¤Þ¤¹¡£¤³¤Î´í¸±À­¤ò²¼¤²¤ë¤¿¤á¤Ë¡¢MD5´Ø¿ô¤Î·ë²Ì¤À¤±¤ò
+// ¤¢¤ê¤Þ¤¹¡£¤³¤Î´í¸±À­¤ò²¼¤²¤ë¤¿¤á¤Ë¡¢md5()´Ø¿ô¤Î·ë²Ì¤À¤±¤ò
 // µ­½Ò¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
 //
-// MD5´Ø¿ô¤Î·ë²Ì(¥Ï¥Ã¥·¥å)¤Ï0¤«¤é9¤Î¿ô»ú¤È¡¢A¤«¤éF¤Þ¤Ç¤Î±Ñ»ú
-// ¤«¤é¤Ê¤ë32ʸ»ú¤Îʸ»úÎó¤Ç¡¢¤³¤Î¾ðÊó¤À¤±¤Ç¤Ï¸µ¤Îʸ»úÎó¤ò
+// md5()´Ø¿ô¤Î·ë²Ì(MD5¥Ï¥Ã¥·¥å)¤Ï0¤«¤é9¤Î¿ô»ú¤È¡¢A¤«¤éF¤Þ¤Ç
+// ¤Î±Ñ»ú¤«¤é¤Ê¤ë32ʸ»ú¤Îʸ»úÎó¤Ç¡¢¤³¤Î¾ðÊó¤À¤±¤Ç¤Ï¸µ¤Îʸ»úÎó¤ò
 // ¿ä¬¤¹¤ë¤³¤È¤Ïº¤Æñ¤Ç¤¹¡£
 //
-// 'pass' ¤ÎMD5¥Ï¥Ã¥·¥å¤ò»»½Ð¤¹¤ë¤Ë¤Ï¡¢Linux¤äcygwin¤Ç¤¢¤ì¤Ð
+// MD5¥Ï¥Ã¥·¥å¤Ï¡¢Linux¤äcygwin¤Ç¤¢¤ì¤Ð
+//
 //    $ echo -n 'pass' | md5sum
-// ¤ÎÍͤˤ·¤Æ»»½Ð¤¹¤ë»ö¤¬¤Ç¤­¤Þ¤¹¡£('-n' ¥ª¥×¥·¥ç¥ó¤ò˺¤ì¤º¤Ë!)
-// FreeBSD¤Ê¤É¤Ç¤Ïmd5sum¤ÎÂå¤ï¤ê¤Ëmd5¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
 //
-// ¤ª´«¤á¤Ç¤­¤Þ¤»¤ó¤¬¡¢PukiWiki¤Îmd5¥³¥Þ¥ó¥É¤Ç¤â»»½Ð¤¬²Äǽ¤Ç¤¹¡£
-// http://<ÀßÃÖ¤·¤¿¾ì½ê>/pukiwiki.php?md5=pass
-// ¤³¤ÎURL¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤Ç¡¢»»½Ð·ë²Ì¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£¤½¤Î
-// ¤«¤ï¤ê¡¢¤¢¤Ê¤¿¤¬¥¿¥¤¥×¤·¤¿¥Ñ¥¹¥ï¡¼¥É¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¤òή¤ì¡¢
-// Ã¯¤Ë¤Ç¤âÇÁ¤­¸«¤¬¤Ç¤­¡¢Web¥µ¡¼¥Ð¡¼¤Î¥í¥°¤Ë¤â»Ä¤Ã¤Æ¤·¤Þ¤¦¡¢
-// ¤È¤¤¤Ã¤¿ÍÍ¡¹¤Ê¥ê¥¹¥¯¤òÉ餦²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£¤¢¤Ê¤¿¤¬»È¤Ã¤Æ
-// ¤¤¤ë¥³¥ó¥Ô¥å¡¼¥¿¡¢¥µ¡¼¥Ð¡¼¤Þ¤Ç¤Î¥Í¥Ã¥È¥ï¡¼¥¯¡¢¥µ¡¼¥Ð¡¼¤Î
-// ¤É¤³¤«¤¬¿®Íê¤Ç¤­¤Ê¤¤¤Î¤Ç¤¢¤ì¤Ð¡¢¤³¤ÎÊýË¡¤Ï»È¤ï¤Ê¤¤¤Ç²¼¤µ¤¤¡£
+// ¤ÎÍͤˤ·¤Æ·×»»¤µ¤»¤ë»ö¤¬¤Ç¤­¤Þ¤¹¡£('-n' ¥ª¥×¥·¥ç¥ó¤ò˺¤ì¤º¤Ë!)
+// FreeBSD¤Ê¤É¤Ç¤Ï md5sum ¤ÎÂå¤ï¤ê¤Ë md5 ¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
+//
+// ¤ª´«¤á¤Ç¤­¤Þ¤»¤ó¤¬¡¢PukiWiki¤Îmd5¥×¥é¥°¥¤¥ó¤Ç¤â»»½Ð¤¬²Äǽ¤Ç¤¹¡£
+//
+// http://<ÀßÃÖ¤·¤¿¾ì½ê>/index.php?plugin=md5
+//
+// ¤³¤ÎURL¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤È¡¢MD5¥Ï¥Ã¥·¥å¤ò»»½Ð¤¹¤ë¤¿¤á¤Î¥Õ¥©¡¼¥à¤¬
+// É½¼¨¤µ¤ì¡¢¤½¤³¤Ë²¿¤é¤«¤Îʸ»úÎó¤òÆþÎϤ¹¤ë¤È¥Ï¥Ã¥·¥å¤¬É½¼¨¤µ¤ì¤Þ
+// ¤¹¡£¤¿¤À¤·¤³¤Îµ¡Ç½¤ò»È¤Ã¤Æ¥Ñ¥¹¥ï¡¼¥É¤ò·è¤á¤ë¤È¤¤¤¦¤³¤È¤Ï¡¢¥Ñ¥¹
+// ¥ï¡¼¥É(¤Î¸õÊä)¤ä¥Ï¥Ã¥·¥å¤ò¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Ëή¤·¤Æ¤·¤Þ¤¦¤È¤¤¤¦
+// ¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¤«¤é¡¢°­°Õ¤Î¤¢¤ë¼Ô¤Ë¤è¤ëÅðÄ°¤ÎÀ®¸ùΨ¤ò¹â¤á¤¿¤ê¡¢
+// Èà¤é¤Ë¹¶·â¤Î¤¿¤á¤Î¥Ò¥ó¥È¤ò¤è¤ê¿¤¯Í¿¤¨¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£
+// ¥Ñ¥¹¥ï¡¼¥É¤È¥Ï¥Ã¥·¥å¤ÎÁȤ߹ç¤ï¤»¤ò¼ê¤ËÆþ¤ì¤¿¼Ô¤Ë¤È¤Ã¤Æ¤Ï¡¢
+// "$adminpass ¤Ë¥Ï¥Ã¥·¥å¤À¤±½ñ¤¯" ¤È¤¤¤¦Âбþ¤â°ÕÌ£¤¬¤¢¤ê¤Þ¤»¤ó¡£
 
 /////////////////////////////////////////////////
 // ChaSen, KAKASI ¤Ë¤è¤ë¡¢¥Ú¡¼¥¸Ì¾¤ÎÆɤߤμèÆÀ (0:̵¸ú,1:Í­¸ú)
 $pagereading_enable = 0;
-// ChaSen or KAKASI or none
-//$pagereading_kanji2kana_converter = 'chasen';
-//$pagereading_kanji2kana_converter = 'kakasi';
+
+// ChaSen('chasen') or KAKASI('kakasi') or None('none')
 $pagereading_kanji2kana_converter = 'none';
+
 // ChaSen/KAKASI ¤È¤Î¼õ¤±ÅϤ·¤Ë»È¤¦´Á»ú¥³¡¼¥É (UNIX·Ï¤Ï EUC¡¢Win·Ï¤Ï SJIS ¤¬´ðËÜ)
 $pagereading_kanji2kana_encoding = 'EUC';
 //$pagereading_kanji2kana_encoding = 'SJIS';
+
 // ChaSen/KAKASI ¤Î¼Â¹Ô¥Õ¥¡¥¤¥ë (³Æ¼«¤Î´Ä¶­¤Ë¹ç¤ï¤»¤ÆÀßÄê)
 $pagereading_chasen_path = '/usr/local/bin/chasen';
 //$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen.exe';
+
 $pagereading_kakasi_path = '/usr/local/bin/kakasi';
 //$pagereading_kakasi_path = 'c:\kakasi\bin\kakasi.exe';
+
 // ¥Ú¡¼¥¸Ì¾Æɤߤò³ÊǼ¤·¤¿¥Ú¡¼¥¸¤Î̾Á°
 $pagereading_config_page = ':config/PageReading';
-// converter = none ¤Î¾ì¹ç¤ÎÆɤ߲¾Ì¾¼­½ñ
+
+// converter ='none' ¤Î¾ì¹ç¤ÎÆɤ߲¾Ì¾¼­½ñ
 $pagereading_config_dict = ':config/PageReading/dict';
 
 /////////////////////////////////////////////////
 // ¥æ¡¼¥¶ÄêµÁ
 $auth_users = array(
-'foo' => 'foo_passwd',
-'bar' => 'bar_passwd',
-'hoge' => 'hoge_passwd',
+       'foo'   => 'foo_passwd',
+       'bar'   => 'bar_passwd',
+       'hoge'  => 'hoge_passwd',
 );
+
 /////////////////////////////////////////////////
 // Ç§¾ÚÊý¼°¼ïÊÌ
-// pagename : ¥Ú¡¼¥¸Ì¾
-// contents : ¥Ú¡¼¥¸ÆâÍÆ
-$auth_method_type = "contents";
+// 'pagename' : ¥Ú¡¼¥¸Ì¾
+// 'contents' : ¥Ú¡¼¥¸ÆâÍÆ
+$auth_method_type = 'contents';
+
 /////////////////////////////////////////////////
-// ±ÜÍ÷ǧ¾Ú¥Õ¥é¥°
-// 0:ÉÔÍ×
-// 1:ɬÍ×
+// ±ÜÍ÷ǧ¾Ú¥Õ¥é¥° (0:ÉÔÍ× 1:ɬÍ×)
 $read_auth = 0;
-/////////////////////////////////////////////////
+
 // ±ÜÍ÷ǧ¾ÚÂоݥѥ¿¡¼¥óÄêµÁ
 $read_auth_pages = array(
-'/¤Ò¤­¤³¤â¤ë¤Û¤²/' => 'hoge',
-'/(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)/' => 'foo,bar,hoge',
+       '#¤Ò¤­¤³¤â¤ë¤Û¤²#'      => 'hoge',
+       '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo,bar,hoge',
 );
+
 /////////////////////////////////////////////////
-// ÊÔ½¸Ç§¾Ú¥Õ¥é¥°
-// 0:ÉÔÍ×
-// 1:ɬÍ×
+// ÊÔ½¸Ç§¾Ú¥Õ¥é¥° (0:ÉÔÍ× 1:ɬÍ×)
 $edit_auth = 0;
-/////////////////////////////////////////////////
+
 // ÊÔ½¸Ç§¾ÚÂоݥѥ¿¡¼¥óÄêµÁ
 $edit_auth_pages = array(
-'/Bar¤Î¸ø³«Æüµ­/' => 'bar',
-'/¤Ò¤­¤³¤â¤ë¤Û¤²/' => 'hoge',
-'/(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)/' => 'foo',
+       '#Bar¤Î¸ø³«Æüµ­#'       => 'bar',
+       '#¤Ò¤­¤³¤â¤ë¤Û¤²#'      => 'hoge',
+       '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo',
 );
+
 /////////////////////////////////////////////////
 // ¸¡º÷ǧ¾Ú¥Õ¥é¥°
 // 0: ±ÜÍ÷¤¬µö²Ä¤µ¤ì¤Æ¤¤¤Ê¤¤¥Ú¡¼¥¸ÆâÍƤ⸡º÷ÂоݤȤ¹¤ë
@@ -203,14 +265,15 @@ $edit_auth_pages = array(
 $search_auth = 0;
 
 /////////////////////////////////////////////////
-// ¹¹¿·ÍúÎò¤òɽ¼¨¤¹¤ë¤È¤­¤ÎºÇÂç·ï¿ô
-$maxshow = 80;
-/////////////////////////////////////////////////
-// ºï½üÍúÎò¤ÎºÇÂç·ï¿ô(0¤Çµ­Ï¿¤·¤Ê¤¤)
-$maxshow_deleted = 0;
+// $whatsnew: ¹¹¿·ÍúÎò¤òɽ¼¨¤¹¤ë¤È¤­¤ÎºÇÂç·ï¿ô
+$maxshow = 60;
+
+// $whatsdeleted: ºï½üÍúÎò¤ÎºÇÂç·ï¿ô(0¤Çµ­Ï¿¤·¤Ê¤¤)
+$maxshow_deleted = 60;
+
 /////////////////////////////////////////////////
 // ÊÔ½¸¤¹¤ë¤³¤È¤Î¤Ç¤­¤Ê¤¤¥Ú¡¼¥¸¤Î̾Á° , ¤Ç¶èÀÚ¤ë
-$cantedit = array( $whatsnew,$whatsdeleted );
+$cantedit = array( $whatsnew, $whatsdeleted );
 
 /////////////////////////////////////////////////
 // Last-Modified ¥Ø¥Ã¥À¤ò½ÐÎϤ¹¤ë
@@ -219,12 +282,9 @@ $lastmod = 0;
 /////////////////////////////////////////////////
 // ÆüÉÕ¥Õ¥©¡¼¥Þ¥Ã¥È
 $date_format = 'Y-m-d';
-/////////////////////////////////////////////////
+
 // »þ¹ï¥Õ¥©¡¼¥Þ¥Ã¥È
 $time_format = 'H:i:s';
-/////////////////////////////////////////////////
-// ÍËÆüÇÛÎó
-$weeklabels = $_msg_week;
 
 /////////////////////////////////////////////////
 // RSS ¤Ë½ÐÎϤ¹¤ë¥Ú¡¼¥¸¿ô
@@ -233,80 +293,87 @@ $rss_max = 15;
 /////////////////////////////////////////////////
 // ¥Ð¥Ã¥¯¥¢¥Ã¥×¤ò¹Ô¤¦
 $do_backup = 1;
-/////////////////////////////////////////////////
+
 // ¥Ú¡¼¥¸¤òºï½ü¤·¤¿ºÝ¤Ë¥Ð¥Ã¥¯¥¢¥Ã¥×¤â¤¹¤Ù¤Æºï½ü¤¹¤ë
 $del_backup = 0;
-/////////////////////////////////////////////////
-// Äê´ü¥Ð¥Ã¥¯¥¢¥Ã¥×¤Î´Ö³Ö¤ò»þ´Ö(hour)¤Ç»ØÄꤷ¤Þ¤¹(0¤Ç¹¹¿·Ëè)
-$cycle = 6;
-/////////////////////////////////////////////////
-// ¥Ð¥Ã¥¯¥¢¥Ã¥×¤ÎºÇÂçÀ¤Âå¿ô
-$maxage = 20;
-/////////////////////////////////////////////////
+
+// ¥Ð¥Ã¥¯¥¢¥Ã¥×´Ö³Ö¤ÈÀ¤Âå¿ô
+$cycle  = 3;   // Ä¾Á°¤Î½¤Àµ¤«¤é²¿»þ´Ö·Ð²á¤·¤Æ¤¤¤¿¤é¥Ð¥Ã¥¯¥¢¥Ã¥×¤¹¤ë¤« (0¤Ç¹¹¿·Ëè)
+$maxage = 120; // À¤Âå¿ô
+
+// NOTE: $cycle x $maxage / 24 = ¥Ç¡¼¥¿¤ò¼º¤¦¤¿¤á¤ËºÇÄã¸ÂɬÍפÊÆü¿ô
+//          3   x   120   / 24 = 15
+
 // ¥Ð¥Ã¥¯¥¢¥Ã¥×¤ÎÀ¤Âå¤ò¶èÀÚ¤ëʸ»úÎó
-// (Ä̾ï¤Ï¤³¤Î¤Þ¤Þ¤ÇÎɤ¤¤¬¡¢Ê¸¾ÏÃæ¤Ç»È¤ï¤ì¤ë²ÄǽÀ­
-// ¤¬¤¢¤ì¤Ð¡¢»È¤ï¤ì¤½¤¦¤Ë¤Ê¤¤Ê¸»ú¤òÀßÄꤹ¤ë)
-$splitter = ">>>>>>>>>>";
+define('PKWK_SPLITTER', '>>>>>>>>>>');
+
 /////////////////////////////////////////////////
-// ¥Ú¡¼¥¸¤Î¹¹¿·»þ¤Ë¥Ð¥Ã¥¯¥°¥é¥ó¥É¤Ç¼Â¹Ô¤µ¤ì¤ë¥³¥Þ¥ó¥É(mknmz¤Ê¤É)
+// ¥Ú¡¼¥¸¤Î¹¹¿·»þ¤Ë¥Ð¥Ã¥¯¥°¥é¥ó¥É¤Ç¼Â¹Ô¤¹¤ë¥³¥Þ¥ó¥É(mknmz¤Ê¤É)
 $update_exec = '';
 //$update_exec = '/usr/bin/mknmz --media-type=text/pukiwiki -O /var/lib/namazu/index/ -L ja -c -K /var/www/wiki/';
 
 /////////////////////////////////////////////////
 // HTTP¥ê¥¯¥¨¥¹¥È¤Ë¥×¥í¥­¥·¥µ¡¼¥Ð¤ò»ÈÍѤ¹¤ë
 $use_proxy = 0;
-// proxy ¥Û¥¹¥È
-$proxy_host = 'proxy.xxx.yyy.zzz';
-// proxy ¥Ý¡¼¥ÈÈÖ¹æ
-$proxy_port = 8080;
-// proxy¤ÎBasicǧ¾Ú¤¬É¬Íפʾì¹ç¤Ë1
+
+$proxy_host = 'proxy.example.com'; // proxy¥µ¡¼¥Ð̾
+$proxy_port = 8080; // ¥Ý¡¼¥ÈÈÖ¹æ
+
+// Basicǧ¾Ú¤ò¹Ô¤¦
 $need_proxy_auth = 0;
-// proxy¤ÎBasicǧ¾ÚÍÑID,PW
-$proxy_auth_user = 'foo';
-$proxy_auth_pass = 'foo_password';
+$proxy_auth_user = 'username'; // ¥æ¡¼¥¶¡¼Ì¾
+$proxy_auth_pass = 'password'; // ¥Ñ¥¹¥ï¡¼¥É
+
 // ¥×¥í¥­¥·¥µ¡¼¥Ð¤ò»ÈÍѤ·¤Ê¤¤¥Û¥¹¥È¤Î¥ê¥¹¥È
 $no_proxy = array(
-'localhost',        // localhost
-'127.0.0.0/8',      // loopback
-// '10.0.0.0/8'     // private class A
-// '172.16.0.0/12'  // private class B
-// '192.168.0.0/16' // private class C
-//'no-proxy.com',
+       'localhost',    // localhost
+       '127.0.0.0/8',  // loopback
+//     '10.0.0.0/8'    // private class A
+//     '172.16.0.0/12' // private class B
+//     '192.168.0.0/16'        // private class C
+//     'no-proxy.com',
 );
 
 ////////////////////////////////////////////////
-// ¥Ú¡¼¥¸¤Î¹¹¿·»þ¤Ë¥á¡¼¥ë¤òÁ÷¿®¤¹¤ë
-$notify = 0;
-// º¹Ê¬¤À¤±¤òÁ÷¿®¤¹¤ë
-$notify_diff_only = 0;
-// To:¡Ê°¸Àè¡Ë
-$notify_to = 'xxx@yyy.zz';
-// From:¡ÊÁ÷¤ê¼ç¡Ë
-$notify_from = 'xxx@yyy.zz';
-// Subject:¡Ê·ï̾¡Ë $page¤Ë¥Ú¡¼¥¸Ì¾¤¬Æþ¤ë
+// ¥á¡¼¥ëÁ÷¿®
+
+$notify = 0;   // (1:¥Ú¡¼¥¸¤Î¹¹¿·»þ¤Ë¥á¡¼¥ë¤òÁ÷¿®¤¹¤ë)
+$notify_diff_only = 0; // (1:º¹Ê¬¤À¤±¤òÁ÷¿®¤¹¤ë)
+
+// SMTP¥µ¡¼¥Ð (Windows ¤Î¤ß, Ä̾ï¤Ï php.ini ¤Ç»ØÄê)
+$smtp_server = 'localhost';
+
+$notify_to   = 'to@example.com';       // To:¡Ê°¸Àè¡Ë
+$notify_from = 'from@example.com';     // From:¡ÊÁ÷¤ê¼ç¡Ë
+
+// Subject:¡Ê·ï̾¡Ë $page¤Ë¥Ú¡¼¥¸Ì¾¤¬Æþ¤ê¤Þ¤¹
 $notify_subject = '[pukiwiki] $page';
-// ÄɲåإåÀ
-$notify_header = "From: $notify_from\r\nX-Mailer: PukiWiki/".S_VERSION." PHP/".phpversion();
-// POP Before SMTP ¤ò¼Â»Ü
+
+// ¥á¡¼¥ë¥Ø¥Ã¥À
+$notify_header = "From: $notify_from\r\n" .
+       'X-Mailer: PukiWiki/' .  S_VERSION . ' PHP/' . phpversion();
+
+/////////////////////////////////////////////////
+// ¥á¡¼¥ëÁ÷¿®: POP / APOP Before SMTP
+
+// ¥á¡¼¥ëÁ÷¿®Á°¤ËPOP¤Þ¤¿¤ÏAPOP¤Ë¤è¤ëǧ¾Ú¤ò¹Ô¤¦
 $smtp_auth = 0;
-// SMTP¥µ¡¼¥Ð̾¤ò»ØÄꤹ¤ë (Windows ¤Î¤ß, Ä̾ï¤Ï php.ini ¤Ç»ØÄê)
-$smtp_server = 'localhost';
-// POP¥µ¡¼¥Ð̾¤ò»ØÄꤹ¤ë
-$pop_server = 'localhost';
-// POP ¤Î¥Ý¡¼¥ÈÈÖ¹æ (Ä̾ï 110)
-$pop_port = 110;
-// Ç§¾Ú¤Ë APOP ¤òÍøÍѤ¹¤ë¤«¤É¤¦¤« (APOP ÍøÍÑ»þ¤Ï 1¡¢°Ê³°¤Ï POP3)
-$pop_auth_use_apop = 0;
-// POP ¥æ¡¼¥¶Ì¾
-$pop_userid = '';
-// POP ¥Ñ¥¹¥ï¡¼¥É
-$pop_passwd = '';
+
+$pop_server = 'localhost';     // POP¥µ¡¼¥Ð
+$pop_port   = 110;     // ¥Ý¡¼¥ÈÈÖ¹æ
+$pop_userid = '';      // POP¥æ¡¼¥¶Ì¾
+$pop_passwd = '';      // POP¥Ñ¥¹¥ï¡¼¥É
+
+// Ç§¾Ú¤Ë APOP ¤òÍøÍѤ¹¤ë¤«¤É¤¦¤« (¢¨¥µ¡¼¥Ð¦¤ÎÂбþ¤¬É¬Í×)
+//   Ì¤ÀßÄê = ¼«Æ° (²Äǽ¤Ç¤¢¤ì¤ÐAPOP¤ò»ÈÍѤ¹¤ë)
+//   1 = APOP¸ÇÄê  (ɬ¤ºAPOP¤ò»ÈÍѤ¹¤ë)
+//   0 = POP¸ÇÄê   (ɬ¤ºPOP¤ò»ÈÍѤ¹¤ë)
+// $pop_auth_use_apop = 1;
 
 /////////////////////////////////////////////////
 // °ìÍ÷¡¦¹¹¿·°ìÍ÷¤Ë´Þ¤á¤Ê¤¤¥Ú¡¼¥¸Ì¾(Àµµ¬É½¸½¤Ç)
 $non_list = '^\:';
 
-/////////////////////////////////////////////////
 // $non_list¤òʸ»úÎ󸡺÷¤ÎÂоݥڡ¼¥¸¤È¤¹¤ë¤«
 // 0¤Ë¤¹¤ë¤È¡¢¾åµ­¥Ú¡¼¥¸Ì¾¤¬Ã±¸ì¸¡º÷¤«¤é¤â½ü³°¤µ¤ì¤Þ¤¹¡£
 $search_non_list = 1;
@@ -315,15 +382,16 @@ $search_non_list = 1;
 // ¥Ú¡¼¥¸Ì¾¤Ë½¾¤Ã¤Æ¼«Æ°¤Ç¡¢¿÷·Á¤È¤¹¤ë¥Ú¡¼¥¸¤ÎÆɤ߹þ¤ß
 $auto_template_func = 1;
 $auto_template_rules = array(
-'((.+)\/([^\/]+))' => '\2/template'
+       '((.+)\/([^\/]+))' => '\2/template'
 );
 
 /////////////////////////////////////////////////
 // ¸«½Ð¤·¹Ô¤Ë¸ÇÍ­¤Î¥¢¥ó¥«¡¼¤ò¼«Æ°ÁÞÆþ¤¹¤ë
-$fixed_heading_anchor = 0;
+$fixed_heading_anchor = 1;
+
 /////////////////////////////////////////////////
 // <pre>¤Î¹ÔƬ¥¹¥Ú¡¼¥¹¤ò¤Ò¤È¤Ä¼è¤ê½ü¤¯
-$preformat_ltrim = 0;
+$preformat_ltrim = 1;
 
 /////////////////////////////////////////////////
 // ²þ¹Ô¤òÈ¿±Ç¤¹¤ë(²þ¹Ô¤ò<br />¤ËÃÖ´¹¤¹¤ë)
@@ -331,16 +399,46 @@ $line_break = 0;
 
 /////////////////////////////////////////////////
 // ¥æ¡¼¥¶¡¼¥¨¡¼¥¸¥§¥ó¥ÈÂбþÀßÄê
+//
+// ¥ê¥Ã¥Á¥¯¥é¥¤¥¢¥ó¥È¤òÁ°Äó¤È¤·¤¿¥µ¥¤¥È¤ò¹½ÃÛ¤¹¤ë
+// ¤¿¤á¤Ë¡¢·ÈÂÓÅÅÏäʤɤ˰տÞŪ¤ËÈóÂбþ¤È¤·¤¿¤¤¾ì¹ç¡¢
+// ºÇ¸å¤Î¥Ç¥Õ¥©¥ë¥ÈÀßÄê°Ê³°¤Î¹Ô¤òÁ´¤Æºï½ü¤¢¤ë¤¤¤Ï
+// ¥³¥á¥ó¥È¥¢¥¦¥È¤·¤Æ²¼¤µ¤¤¡£
+//
+// ¥Ç¥¶¥¤¥ó¤ä¥¹¥¿¥¤¥ë¤ò´ÊÁǤÊkeitai¥×¥í¥Õ¥¡¥¤¥ë¤Ë
+// Åý°ì¤·¤¿¤¤»þ¤Ï¡¢¥Ç¥Õ¥©¥ë¥ÈÀßÄê°Ê³°¤Î¹Ô¤òÁ´¤Æºï½ü
+// ¤¢¤ë¤¤¤Ï¥³¥á¥ó¥È¥¢¥¦¥È¤·¤¿¸å¤Ë¡¢¥Ç¥Õ¥©¥ë¥ÈÀßÄê¤ò
+// 'profile'=>'keitai' ¤È½¤Àµ¤·¤Æ²¼¤µ¤¤¡£
+
+$agents = array(
+// pattern: A regular-expression that matches device(browser)'s name and version
+// profile: A group of browsers
+
+    // Embedded browsers (Rich-clients for PukiWiki)
 
-$agents = array( // pattern: ¥Ç¥Ð¥¤¥¹[¥Ö¥é¥¦¥¶]̾¤ª¤è¤Ó¥Ð¡¼¥¸¥ç¥ó¤Î¸¡½Ð¥Ñ¥¿¡¼¥ó  profile: ½ê°¤¹¤ë¥°¥ë¡¼¥×
+       // 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'),
 
-       // "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'),
+    // Embedded browsers (Non-rich)
 
-    // ÁȤ߹þ¤ß¥Ö¥é¥¦¥¶ (¥ê¥Ã¥Á¥¯¥é¥¤¥¢¥ó¥È¤Ç¤Ï¤Ê¤¤¤â¤Î)
+       // 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°Ê¹ß¤Ï²ÄÊÑ
@@ -356,23 +454,13 @@ $agents = array( // pattern: 
        // 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)"
@@ -387,19 +475,33 @@ $agents = array( // pattern: 
        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'),
 
-    // ¥Ç¥¹¥¯¥È¥Ã¥×¤¢¤ë¤¤¤Ï¥ê¥Ã¥Á¥¯¥é¥¤¥¢¥ó¥È (¥Ç¥Ð¥¤¥¹¤ò¼±Ê̤¹¤ëɬÍפ¬¤Ê¤¤¤â¤Î)
-       array('pattern'=>'#^#', 'profile'=>'default'),  // default
+    // 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'),
+
+       // Loose default: Including something Mozilla
+       array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#',     'profile'=>'default'),
 
+       array('pattern'=>'#^#', 'profile'=>'default'),  // Sentinel
 );
 ?>