비밀 꼬리글에 비밀 꼬리글을 달았을 경우 > 그누4 플러그인

그누4 플러그인

그누보드에는 여러가지 기능 추가가 쉽도록 제작 되었습니다.
플러그인의 저작권은 해당 플러그인 제작자님께 있으며, 그누보드의 저작권과 다를 수 있습니다.
플러그인 다운로드시 좋아요와 감사의 코멘트를 남기시면 제작자에게 큰 힘이됩니다. ^^y

비밀 꼬리글에 비밀 꼬리글을 달았을 경우 정보

비밀 꼬리글에 비밀 꼬리글을 달았을 경우

본문

원래 비밀글 쓴 사람은 자기 글에 달린 비밀 꼬리글을 볼 수 있어야 하지 않나 싶네요.

그래서 고쳐봤습니다.

우선은 /blog/comment.php 를 열어서
26번째줄 정도에 아래와 같이 수정 or 추가합니다.

    // 댓글 고유 주소를 담는다.
    $comment[$index]['permalink'] = get_comment_url($res['post_id'], $res['id']);

 // 여기서부터 추가
 // 댓글의 댓글일 경우 원글의 작성자를 찾는다
 if ($res['comment_re_num']==1) {
  $qry2 = sql_query("select mb_id from {$gb4['comment_table']} c where c.blog_id='{$current['id']}' and c.post_id='{$id}' and c.comment_num={$res['comment_num']} and c.comment_re_num=0 order by c.comment_num");
  $res2 = sql_fetch_array($qry2);
 }
  // 여기까지 추가

    if( !$res['secret'] || ($res['secret'] && $current['mb_id'] == $member['mb_id']) || ($res['secret'] && $member['mb_id'] && $res['mb_id'] == $member['mb_id']) || $res['secret'] && $res2['mb_id'] == $member['mb_id']) {

if 문은 수정합니다. 마지막 부분만 조금 바뀌었습니다.

나머지는 수정 하지 않습니다.


스킨에서 24번째 줄 근처에 아래 부분을 수정해줍니다.
/skin/blog/basic/comment.skin.php


<!-- 댓글 출력 시작 -->
<?
for($i=0; $i<count($comment); $i++) {
    if( $comment[$i]['secret'] && $member['mb_id'] && ($member['mb_id']==$current['mb_id'] || $comment[$i]['mb_id'] == $member['mb_id'] || $res2['mb_id']==$member['mb_id']) )
        $comment[$i]['writer_name'] .= " <font color=red style=font-weight:normal>(비밀댓글)</font>";
?>

이렇게 하면 처음 비밀 꼬리글 달고 그 다음에 운영자가 그 비밀 꼬리글에 비밀로 꼬리글을
하위로 다시 달면 원글 쓴 사람도 그 아래 꼬리글을 읽을 수 있습니다.

추천
0
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로