안녕하세요! ^^ 도움좀 요청 드릴수 있을가요? 정보
안녕하세요! ^^ 도움좀 요청 드릴수 있을가요?본문
제가 카테고리를 쓰려고 하는데 기본 카테고리는 있구요!
카테고리를 하나 더 만드려구요!
wr_5 의 내용을 카테고리로 만들려고 하는데.. 기존 category.php 파일 올려드릴께요!
어느부분을 수정해야 할까요? 감사합니다!
-----------------------------------------------------------------------------------------------
<style type='text/css'>
/*-- 카테고리명 --*/
.cate {font-family:Tahoma,굴림,arial; color:#666666; font-size:12px;}
a.cate:link, a.b_ca:visited, a.b_ca:active {font-family:Tahoma,굴림,arial; color:#666666; font-size:12px;}
a.cate:hover {font-family:Tahoma,굴림, arial; color:#FF6600; font-size:12px; text-decoration:underline;}
</style>
<? $cnt_bo_1 = 4; // 한줄당 분류 갯수 ?>
<? if (!$wr_id) { ?>
<!-- 분류 셀렉트 박스 시작 -->
<?
$cnt = 1;
$sql = " SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ";
$row = sql_fetch($sql);
$arr = explode("|", $row[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
$str .= "<tr>";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
$sql1 = " SELECT count(*) as cCount FROM $write_table WHERE ca_name = '$arr[$i]' and wr_comment >= 0 ";
$row1 = sql_fetch($sql1);
$str .= "<td><img src='{$board_skin_path}/img/ico_folder.gif'> <a class='cate' href='./board.php?bo_table=$bo_table&sca=$arr[$i]&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'>$arr[$i] ($row1[cCount])</a></td>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "</tr><tr>"; }
$cnt++;
}
$sql2 = " SELECT count(*) as cCount FROM $write_table WHERE wr_comment >= 0 ";
$row2 = sql_fetch($sql2);
$Total_Cat = $row2[cCount]
?>
<table width="100%" border="0" >
<td align="left">
<a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'><b>
전체리스트(<?=number_format($total_count)?>)</b></a>
</td>
</tr>
</table>
<img src="../dot_line.jpg">
<table width="100%" border="0" style="table-layout:fixed">
<td style='word-break:break-all;'>
<span class="cate"><?=$str?></span></td>
</tr>
</table>
<br>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>
카테고리를 하나 더 만드려구요!
wr_5 의 내용을 카테고리로 만들려고 하는데.. 기존 category.php 파일 올려드릴께요!
어느부분을 수정해야 할까요? 감사합니다!
-----------------------------------------------------------------------------------------------
<style type='text/css'>
/*-- 카테고리명 --*/
.cate {font-family:Tahoma,굴림,arial; color:#666666; font-size:12px;}
a.cate:link, a.b_ca:visited, a.b_ca:active {font-family:Tahoma,굴림,arial; color:#666666; font-size:12px;}
a.cate:hover {font-family:Tahoma,굴림, arial; color:#FF6600; font-size:12px; text-decoration:underline;}
</style>
<? $cnt_bo_1 = 4; // 한줄당 분류 갯수 ?>
<? if (!$wr_id) { ?>
<!-- 분류 셀렉트 박스 시작 -->
<?
$cnt = 1;
$sql = " SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ";
$row = sql_fetch($sql);
$arr = explode("|", $row[bo_category_list]); // 구분자가 , 로 되어 있음
$str = "";
$str .= "<tr>";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i])) {
$sql1 = " SELECT count(*) as cCount FROM $write_table WHERE ca_name = '$arr[$i]' and wr_comment >= 0 ";
$row1 = sql_fetch($sql1);
$str .= "<td><img src='{$board_skin_path}/img/ico_folder.gif'> <a class='cate' href='./board.php?bo_table=$bo_table&sca=$arr[$i]&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'>$arr[$i] ($row1[cCount])</a></td>";
if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "</tr><tr>"; }
$cnt++;
}
$sql2 = " SELECT count(*) as cCount FROM $write_table WHERE wr_comment >= 0 ";
$row2 = sql_fetch($sql2);
$Total_Cat = $row2[cCount]
?>
<table width="100%" border="0" >
<td align="left">
<a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'><b>
전체리스트(<?=number_format($total_count)?>)</b></a>
</td>
</tr>
</table>
<img src="../dot_line.jpg">
<table width="100%" border="0" style="table-layout:fixed">
<td style='word-break:break-all;'>
<span class="cate"><?=$str?></span></td>
</tr>
</table>
<br>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>
댓글 전체
wr_5 사용 아닌 bo_5 사용 흐름
위소스에서 bo_category_list 부분 bo_5로 수정
해당 게시판 관리자 수정모드 맨아래 부분 bo_5 값 란에 카테고리1| 카테고리2 형태로 구분 입력
테스트
위소스에서 bo_category_list 부분 bo_5로 수정
해당 게시판 관리자 수정모드 맨아래 부분 bo_5 값 란에 카테고리1| 카테고리2 형태로 구분 입력
테스트