코멘트에서 비밀글 사용시 글쓴이도 비밀로 하는 방법 질문입니다. 정보
코멘트에서 비밀글 사용시 글쓴이도 비밀로 하는 방법 질문입니다.
본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
if (strstr($list[$i][wr_option], "secret")) echo "<span style='color:#ff6600;'>*</span> ";
$str = $list[$i][content];
if (strstr($list[$i][wr_option], "secret"))
$str = "<span class='small' style='color:#ff6600;'>$str</span>";
코멘트에 비밀글로 답글을 *비밀글 입니다. 라는 문구가 나옵니다
content 부분에 이렇게 출력이 되지요.
저는 글쓴이도 비밀 이라고 나오게 하고 싶습니다.
그러기 위해 /bbs/view_comment.php 부분을
찾아보니
$list[$i][content] = $list[$i][content1]= "비밀글 입니다.";
if (!strstr($row[wr_option], "secret") ||
$is_admin ||
($write[mb_id]==$member[mb_id] && $member[mb_id]) ||
($row[mb_id]==$member[mb_id] && $member[mb_id])) {
$list[$i][content1] = $row[wr_content];
$list[$i][content] = conv_content($row[wr_content], 0, 'wr_content');
$list[$i][content] = search_font($stx, $list[$i][content]);
}
이런식으로 되어있더라구요.
저는 글쓴이가 실명이기 때문에
<?
$row_member = sql_fetch(" select * from $g4[member_table] where mb_id = '{$list[$i][mb_id]}' ");
$row_member[mb_name] = $row_member[mb_name]= "비밀";?>
이런식으로 끌어와서 사용했습니다.
어떻게 해야 글쓴이(실명)을...
비밀글에서 글쓴이에게만 출력 시킬 수 있을까요 ?
오류 주소 :
if (strstr($list[$i][wr_option], "secret")) echo "<span style='color:#ff6600;'>*</span> ";
$str = $list[$i][content];
if (strstr($list[$i][wr_option], "secret"))
$str = "<span class='small' style='color:#ff6600;'>$str</span>";
코멘트에 비밀글로 답글을 *비밀글 입니다. 라는 문구가 나옵니다
content 부분에 이렇게 출력이 되지요.
저는 글쓴이도 비밀 이라고 나오게 하고 싶습니다.
그러기 위해 /bbs/view_comment.php 부분을
찾아보니
$list[$i][content] = $list[$i][content1]= "비밀글 입니다.";
if (!strstr($row[wr_option], "secret") ||
$is_admin ||
($write[mb_id]==$member[mb_id] && $member[mb_id]) ||
($row[mb_id]==$member[mb_id] && $member[mb_id])) {
$list[$i][content1] = $row[wr_content];
$list[$i][content] = conv_content($row[wr_content], 0, 'wr_content');
$list[$i][content] = search_font($stx, $list[$i][content]);
}
이런식으로 되어있더라구요.
저는 글쓴이가 실명이기 때문에
<?
$row_member = sql_fetch(" select * from $g4[member_table] where mb_id = '{$list[$i][mb_id]}' ");
$row_member[mb_name] = $row_member[mb_name]= "비밀";?>
이런식으로 끌어와서 사용했습니다.
어떻게 해야 글쓴이(실명)을...
비밀글에서 글쓴이에게만 출력 시킬 수 있을까요 ?
댓글 전체

$row_member['mb_name'] 부분에
if (strstr($list[$i][wr_option], "secret")) echo "비밀";
else if echo $row_member['mb_name'];
이라고 하면 될 것 같은데 입력해보지 않아서 모르겠네요. ㅎㅎ;;
if (strstr($list[$i][wr_option], "secret")) echo "비밀";
else if echo $row_member['mb_name'];
이라고 하면 될 것 같은데 입력해보지 않아서 모르겠네요. ㅎㅎ;;

저긔 경우 else if를 쓰지 않고 했는데...
한번 테스트 해보겠습니다. 답글 달아주셔서 진심으로 감사합니다.
한번 테스트 해보겠습니다. 답글 달아주셔서 진심으로 감사합니다.

<?
$row_member = sql_fetch(" select * from $g4[member_table] where mb_id = '{$list[$i][mb_id]}' ");
if (strstr($list[$i][wr_option], "secret")) echo "비밀";
else if echo $row_member['mb_name']; ?>
이렇게 해보았지만...코멘트가 아예 출력이되질 않습니다.ㅠ
$row_member = sql_fetch(" select * from $g4[member_table] where mb_id = '{$list[$i][mb_id]}' ");
if (strstr($list[$i][wr_option], "secret")) echo "비밀";
else if echo $row_member['mb_name']; ?>
이렇게 해보았지만...코멘트가 아예 출력이되질 않습니다.ㅠ