--- ../../../pukiwiki-1.4.6/plugin/comment.inc.php 2005-05-06 13:44:20.000000000 +0900 +++ comment.inc.php 2006-09-03 19:19:57.556125000 +0900 @@ -8,6 +8,15 @@ // // Comment plugin +global $comment_ng_word; +///////////////////////////////////////////////// +// NGワード(正規表現) +$comment_ng_word = array ( + '/^https*\:\/\//', + '/^ *<a *href="https*\:\/\//', +); +///////////////////////////////////////////////// + define('PLUGIN_COMMENT_DIRECTION_DEFAULT', '1'); // 1: above 0: below define('PLUGIN_COMMENT_SIZE_MSG', 70); define('PLUGIN_COMMENT_SIZE_NAME', 15); @@ -22,13 +31,24 @@ { global $script, $vars, $now, $_title_updated, $_no_name; global $_msg_comment_collided, $_title_comment_collided; + global $comment_ng_word; if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing'); if (! isset($vars['msg'])) return array('msg'=>'', 'body'=>''); // Do nothing $vars['msg'] = str_replace("\n", '', $vars['msg']); // Cut LFs - $head = ''; + + foreach($comment_ng_word as $word) + { + if(preg_match($word,$vars['msg'])) + { + // NGワードに一致した場合は書き込めない + return array('msg'=>'', 'body'=>''); + } + } + + $head = ''; $match = array(); if (preg_match('/^(-{1,2})-*\s*(.*)/', $vars['msg'], $match)) { $head = & $match[1];
1.4.6用は、上のを使ってください。
pukiwiki-1.4.4のplugin/comment.inc.phpの差分
ここは制限されていませんので、お試しはご遠慮ください (^^;