TITLE:commentプラグインの改造 *commentプラグインの改造 [#f0247ed7] 「お名前」がブラケットネームにならないよう、オプションを追加 **使用例 [#g976af0e] #pcomment(nobracket) **変更点 [#zc1e8d2e] --- comment.inc.php.orig Wed Oct 1 16:00:36 2003 +++ comment.inc.php Thu Sep 23 15:04:40 2004 @@ -48,7 +48,7 @@ $_msg = str_replace('$msg',$post['msg'],COMMENT_MSG_FORMAT); $_name = $post['name'] == '' ? $_no_name : $post['name']; - $_name = ($_name == '') ? '' : str_replace('$name',$_name,COMMENT_NAME_FORMAT); + $_name = ($_name == '') ? '' : ($post['nobracket'] == '1') ? $_name : str_replace('$name',$_name,COMMENT_NAME_FORMAT); $_now = ($post['nodate'] == '1') ? '' : str_replace('$now',$now,COMMENT_NOW_FORMAT); $comment = str_replace("\x08MSG\x08", $_msg, COMMENT_FORMAT); @@ -123,6 +123,7 @@ $nodate = in_array('nodate',$options) ? '1' : '0'; $above = in_array('above',$options) ? '1' : (in_array('below',$options) ? '0' : COMMENT_INS); + $nobracket = in_array('nobracket',$options) ? '1' : '0'; $s_page = htmlspecialchars($vars['page']); $comment_cols = COMMENT_COLS; @@ -135,6 +136,7 @@ <input type="hidden" name="plugin" value="comment" /> <input type="hidden" name="nodate" value="$nodate" /> <input type="hidden" name="above" value="$above" /> + <input type="hidden" name="nobracket" value="$nobracket" /> <input type="hidden" name="digest" value="$digest" /> $nametags <input type="text" name="msg" size="$comment_cols" /> #refpre(comment.inc.php.diff); #comment **コメント [#hebf5c70] -あ -- &new{2005-07-08 (金) 11:33:56}; -をしてみます -- [[テスト]] &new{2006-04-03 (月) 15:50:03}; - お試し -- [[テスト]] &new{2006-06-02 (金) 08:21:21}; - aaa -- [[aa]] &new{2006-06-07 (水) 10:50:45}; - テストです。 -- [[xxx]] &new{2006-06-22 (木) 00:45:51}; - あああ -- &new{2007-01-24 (水) 18:12:03}; // #comment(nobracket) |