최신글로 게시판 카테고리 목록뽑기..

카테고리의 목록을 뽑는 방법을 찾다가 네잎클로버님의 최신글 스킨을 하나 찾았습니다.
2005년 스킨이라 그런지 적용이안됩니다.
혹시 어디가 잘 못 된건지요??

http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=1744


=================== latest.skin.php 소스 시작 =========================

<?
if (!defined('_GNUBOARD_')) exit;

$icon_h ="<img src='".$latest_skin_path."/icon_head.gif' border=0 align=absmiddle width=20 height=16>";

$cnt = 2;

$row = sql_fetch(" SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ");

$arr = explode("|", $row[bo_category_list]); // 구분자가 , 로 되어 있음

$str = "";

$str .= "<tr>";

for ($i=0; $i<count($arr); $i++)

if (trim($arr[$i])) {

//카테고리별 게시물수 체크

$row1 = sql_fetch(" SELECT count(*) as cat_cnt FROM {$g4[write_prefix]}{$bo_table} WHERE ca_name = '$arr[$i]' and wr_comment >= 0 ");

//새글표시(아이콘뉴) 부분

$sql = " SELECT wr_datetime FROM {$g4[write_prefix]}{$bo_table} WHERE ca_name = '$arr[$i]' order by wr_datetime desc limit 1 ";

$row2 = sql_fetch_array(mysql_query($sql));

if($row2[wr_datetime] >= date("Y-m-d H:i:s", time() - 24 * 3600)) {

$icon_new = "<img src='$latest_skin_path/icon_new2.gif' border=0>";

} else {

$icon_new = "";

}


//출력부분 설정

$str .= "<td style='padding-left:20;'>".$icon_h." <a href='$g4[path]/bbs/board.php?bo_table=$bo_table&page=$page&mode=$mode&sca=$arr[$i]'><b><font color=#0080C0>$arr[$i]</font></b></a><font color=#FF80C0>[".$row1[cat_cnt]."]</font>".$icon_new."</td>";

if ($cnt == 4) { $cnt = 1; $str .= "</tr><tr>"; } //줄바꿈 부분

$cnt++;
}

?>

<table border=0 cellspacing=0 cellpadding=2 width=100% align=center>

<?=$str?><!--실제출력부분-->

</table>
|

댓글 1개

테스트 해봤는데 잘되고 있는데 ;;;;

<?=latest("최신글폴더명" , "출력게시판" , "10" , "30");?>
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
15년 전 조회 1,166
15년 전 조회 2,853
15년 전 조회 1,520
15년 전 조회 1,766
15년 전 조회 1,524
15년 전 조회 1,559
15년 전 조회 1,601
15년 전 조회 1,018
15년 전 조회 807
15년 전 조회 1,573
15년 전 조회 1,518
15년 전 조회 1,001
15년 전 조회 6,016
15년 전 조회 1,515
15년 전 조회 2,026
15년 전 조회 1,018
15년 전 조회 1,486
15년 전 조회 1,776
15년 전 조회 1,534
15년 전 조회 927
🐛 버그신고