그룹최신글에서 코멘트 제외시킬수있을까요?

그룹최신글보기에서 코멘트도 같이나와서
코멘트는 안나오게 할려면 어떤걸 손봐야할까요 ?
ㅡ.ㅡ
밑에꺼도 질문답에서 겨우찾아서 했는데. 고수님들 답변 부탁드릴게요. 
 
 
 
<?
// 최신글 추출
function latest_group($skin_dir="", $gr_id, $rows=10, $subject_len=40)
{
 global $config;
    global $g4;
  if ($skin_dir)
        $latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
    else
        $latest_skin_path = "$g4[path]/skin/latest/$config[cf_latest_skin]";

$list = array();
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id
            from $g4[board_new_table] a, $g4[board_table] b, $g4[group_table] c
            where a.bo_table = b.bo_table and b.gr_id = c.gr_id and b.gr_id = '$gr_id'
   order by a.bn_id desc limit 0, $rows ";
 
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
    $tmp_write_table = $g4[write_prefix] . $row[bo_table];
    if ($row[wr_id] == $row[wr_parent]) // 원글
    {
        $comment = "";
        $comment_link = "";
        $row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '$row[wr_id]' ");
        $list[$i] = $row2;
        $name = get_sideview($row2[mb_id], cut_str($row2[wr_name], $config[cf_cut_name]), $row2[wr_email], $row2[wr_homepage]);
        // 당일인 경우 시간으로 표시함
        $datetime = substr($row2[wr_datetime],0,10);
        $datetime2 = $row2[wr_datetime];
        if ($datetime == $g4[time_ymd])
            $datetime2 = substr($datetime2,11,5);
        else
            $datetime2 = substr($datetime2,5,5);
    }
    else // 코멘트
    {
    
        $row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '$row[wr_parent]' ");
        $row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from $tmp_write_table where wr_id = '$row[wr_id]' ");
        $list[$i] = $row2;
        $list[$i][mb_id] = $row3[mb_id];
        $list[$i][wr_name] = $row3[wr_name];
        $list[$i][wr_email] = $row3[wr_email];
        $list[$i][wr_homepage] = $row3[wr_homepage];
        $name = get_sideview($row3[mb_id], cut_str($row3[wr_name], $config[cf_cut_name]), $row3[wr_email], $row3[wr_homepage]);
        // 당일인 경우 시간으로 표시함
        $datetime = substr($row3[wr_datetime],0,10);
        $datetime2 = $row3[wr_datetime];
        if ($datetime == $g4[time_ymd])
            $datetime2 = substr($datetime2,11,5);
        else
            $datetime2 = substr($datetime2,5,5);
    }
    $list[$i][gr_id] = $row[gr_id];
    $list[$i][bo_table] = $row[bo_table];
    $list[$i][name] = $name;
    $list[$i][comment] = $comment;
    $list[$i][href] = "./bbs/board.php?bo_table=$row[bo_table]&wr_id=$row2[wr_id]{$comment_link}";
    $list[$i][datetime] = $datetime;
    $list[$i][datetime2] = $datetime2;
    $list[$i][gr_subject] = $row[gr_subject];
    $list[$i][bo_subject] = $row[bo_subject];
    $list[$i][wr_subject] = $row2[wr_subject];
}
 ob_start();
    include "$latest_skin_path/latest.skin.php";
|

댓글 1개

else // 코멘트
{
/*
...
*/
}

주석처리
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
19년 전 조회 1,521
19년 전 조회 1,102
19년 전 조회 1,670
19년 전 조회 1,558
19년 전 조회 1,603
19년 전 조회 5,554
19년 전 조회 1,518
19년 전 조회 1,511
19년 전 조회 1,526
19년 전 조회 1,442
19년 전 조회 1,546
19년 전 조회 1,547
19년 전 조회 1,568
19년 전 조회 1,429
19년 전 조회 1,507
19년 전 조회 1,431
19년 전 조회 1,464
19년 전 조회 1,620
19년 전 조회 1,559
19년 전 조회 1,526
🐛 버그신고