최신글에서분류를 나타내고자할때 어떻해야하나요? _ver_3.20 > 그누3질답

그누3질답

최신글에서분류를 나타내고자할때 어떻해야하나요? _ver_3.20 정보

그누보드 최신글에서분류를 나타내고자할때 어떻해야하나요? _ver_3.20

본문

3.10까지는 잘 사용햇는데 요번에 3.20으로 새로 설치하고서는 최신글까지 사용가능한데요.
문제는 최신글 앞에 분류를 붙여주고 싶은데 그게 안나타나네요 ㅠㅠ

[뉴스] 좋은하루되세요.

이런 형태가 되어야하는데요. 앞에 뉴스 란 분류가 나타나질 안아서요.
조언좀 부탁드립니다.
3.10의 latest.lib.php와 3.20의 latest.lib.php이 달라서 3.1의것을 가져다가 써도 에러가나네요 ㅠㅠ 부탁드립니다.
  • 복사

댓글 전체

간신히 정리됬네요 ^^;  다음과 같이 정리하니 되네요 ㅠㅠ. 3.1과 3.2를 잘 비교해서 빠진걸 삽입하면서 했던니 되네요 ^^


$table = "{$cfg[write_table_prefix]}{$bo_table}";  <---추가
if($ca_id > 0) {  <---추가
    $sql = " select *
              from {$cfg[write_table_prefix]}{$bo_table}
              where wr_comment = 0
              and ca_id=$ca_id  <---추가  (이부분을 추가안해서 에러가 났었네요 ㅠㅠ)
              order by wr_id desc limit 0, $rows ";

-->추가
    } else {
  $sql = " select a.*, mb_open
            from {$cfg[write_table_prefix]}{$bo_table} a
            left join $cfg[table_member] b on (b.mb_id = a.mb_id)
            where a.wr_comment = 0
            order by a.wr_id desc limit 0, $rows ";
  }          <---추가끝
    $result = sql_query($sql);
    for ($i=0; $row = mysql_fetch_array($result); $i++) {
        $list[$i] = $row;

        $list[$i][href] = "./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table&wr_id=$row[wr_id]";

        // 코멘트 카운트
        $list[$i][commentcnt] = "";
        if ($row[wr_commentcnt] > 0) {
            $list[$i][commentcnt] = "($row[wr_commentcnt])";
        }

        $list[$i][name] = gblayer($row[mb_id], cut_str($row[wr_name],10), $row[wr_email], $row[wr_homepage]);
        $list[$i][subject] = conv_subject($row[wr_subject], $len,"…");
        $list[$i][content] = get_text($row[wr_content]);
        $list[$i][date] = substr($row[wr_datetime],2,8);
--->추가     
$wr_id = $row[wr_id];

      if ($bo[bo_use_category]) {  //카테고리가 있다면
  $show_category_begin = "";
$show_category_end = "";
} else {      //카테고리가 없다면
$show_category_begin = "<!--";
$show_category_end  = "-->";
}

$list[$i][ca_name] = $wr_id = "";          // 분류를 뽑을 때 사용

        if ($row[wr_id]) {
        $sql1 = " select ca_name from {$table}_cat where ca_id = '$row[ca_id]'";
        $row1 = sql_fetch($sql1);
        if ($row1[ca_name])
        $list[$i][ca_name] = "[$row1[ca_name]]";
        }  <--추가끝

        $list[$i][icon_new] = "";
        if ($row[wr_datetime] >= date("Y-m-d H:i:s", time() - $bo[bo_new] * 3600)) {
            $list[$i][icon_new] = "<img src='$latest_skin/icon_new.gif' align=absmiddle> ";
        }
© SIRSOFT
현재 페이지 제일 처음으로