1개의 게시판에서 분류를 가로로 출력하려면..

http://dpishop.net/g4/

보시면 윗쪽은 DPI Shop 은 그룹별로 출력한것이고..

밑에 보면 DIY 같은 경우은 한 게시판에서 분류별로 해서 가로로

출력한것인데..어떻게 해야하나요?

팁앤테크에서는 죄다 그루별로 출력한것인지..

제가 못찾은건지..

부탁드릴꼐요~
|

댓글 3개

네잎클로버님의 최신글 스킨을 조금 수정한 소스입니다.
원본 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;
// 보드이름 출력을 위해 bo_subject, 추가
$row = sql_fetch(" SELECT bo_subject, 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_new.gif' border=0>";

} else {

$icon_new = "";

}


//출력부분 설정

$str .= "<td style='padding-left:5;'>".$icon_h."&nbsp;<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 id="r_tb_latest_cat" width="440" height="" border="0" radius="3" rborder="#bbbbbb" rbgcolor="transparent">
<tr>
<td style='padding-left:10; padding-top:5; padding-bottom:0; background:transparent;'>
<a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><b><?=$row[bo_subject]?></b></a>
</td>
</tr>
<tr>
<td valign=top class=>
<table border=0 cellspacing=0 cellpadding=2 width=100% align=center>
<?=$str?><!--실제출력부분-->
</table>
</td>
</tr>
</table>
<script>roundTable("r_tb_latest_cat");</script>
아~ 감사합니다..^^ 잘되네요
스크랩해여~
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
20년 전 조회 1,626
20년 전 조회 1,683
20년 전 조회 1,784
20년 전 조회 1,950
20년 전 조회 1,522
20년 전 조회 1,512
20년 전 조회 1,894
20년 전 조회 1,639
20년 전 조회 1,541
20년 전 조회 1,778
20년 전 조회 1,661
20년 전 조회 1,625
20년 전 조회 1,703
20년 전 조회 1,796
20년 전 조회 1,599
20년 전 조회 1,567
20년 전 조회 1,789
20년 전 조회 2,134
20년 전 조회 1,633
20년 전 조회 1,566
🐛 버그신고