Index: pcomment.inc.php =================================================================== --- pcomment.inc.php (.../plugin/pcomment.inc.php) (revision 2) +++ pcomment.inc.php (.../pukiwiki/plugin/pcomment.inc.php) (revision 31) @@ -24,8 +24,8 @@ define('PLUGIN_PCOMMENT_NUM_COMMENTS', 10); // Default 'latest N posts' define('PLUGIN_PCOMMENT_DIRECTION_DEFAULT', 1); // 1: above 0: below -define('PLUGIN_PCOMMENT_SIZE_MSG', 70); -define('PLUGIN_PCOMMENT_SIZE_NAME', 15); +define('PLUGIN_PCOMMENT_SIZE_MSG', 44); +define('PLUGIN_PCOMMENT_SIZE_NAME', 8); // Auto log rotation define('PLUGIN_PCOMMENT_AUTO_LOG', 0); // 0:off 1-N:number of comments per page @@ -42,13 +42,20 @@ define('PLUGIN_PCOMMENT_FORMAT_STRING', "\x08" . 'MSG' . "\x08" . ' -- ' . "\x08" . 'NAME' . "\x08" . ' ' . "\x08" . 'DATE' . "\x08"); +define('PLUGIN_COMMENT_KEYWORD', '確認'); +define('PLUGIN_COMMENT_KEYWORD_IMG_ALT', '「かくにん」を漢字で入力して下さい。1文字目が「たしかめる」で2文字目が「みとめる」です。'); +define('PLUGIN_COMMENT_KEYWORD_IMG', IMAGE_DIR.'comment_keyword.png'); + function plugin_pcomment_action() { global $vars; if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing'); - if (! isset($vars['msg']) || $vars['msg'] == '') return array(); + if (! isset($vars['msg']) ) return array('msg'=>'', 'body'=>''); // Do nothing + $keyword_name = '_p_comment_keyword_'.$vars['comment_no']; + if(! isset($vars[$keyword_name]) || $vars[$keyword_name] != PLUGIN_COMMENT_KEYWORD) return array('msg'=>'', 'body'=>''); // Do nothing + $refer = isset($vars['refer']) ? $vars['refer'] : ''; $retval = plugin_pcomment_insert(); @@ -124,7 +131,11 @@ $s_nodate = htmlspecialchars($params['nodate']); $s_count = htmlspecialchars($count); + $comment_keyword = PLUGIN_COMMENT_KEYWORD_IMG; + $comment_keyword_img_alt = PLUGIN_COMMENT_KEYWORD_IMG_ALT; + $form_start = '