게시판 분류에서 두줄로 보일때 글씨가 중간에 짤림 정보
게시판 분류에서 두줄로 보일때 글씨가 중간에 짤림본문
안녕하세요~
게시판 관리에서 분류에 항목들을 여러개 넣고 ' |'로 구분을 했습니다.
근데 여러줄로 항목이 나타날때 글씨가 중간에 짤리는군요.
예>
항목|더하기|나누기|곱하기|빼기|수학|산수|미
적분|함수|분수
위의 예 처럼 '미적분' 부분이 다음칸으로 내려가면서 중간에 글씨가 짤리네요.
깔끔하게 해결할 방법이 없을까요?
댓글 전체

<? $cnt_bo_1 = 6; // 한줄당 분류 갯수 ?>
<!-- 분류 셀렉트 박스 시작 -->
<?
$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 height=24><img src='{$board_skin_path}/img/ico_folder.gif' width='13' height='11'> <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] </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% cellspacing=1 cellpadding=4 border=0 style=table-layout:fixed>
<col width=100></col>
<col width=20></col>
<col width=></col>
<tr bgcolor=white>
<td width='' align='center'>
<img src='<?=$board_skin_path?>/img/ico_folder.gif' width='13' height='11'> <a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'><b>전체목록</b></a>
</td>
<td nowrap> </td>
<td width='' style='word-break:break-all;'>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<span class="cate"><?=$str?></span>
</table>
</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td height=1 class=line1 style=height:1px><img src=<?=$board_skin_path?>/img/tab.gif border=0 height=1></td></tr></table>
<!-- 분류 셀렉트 박스 끝 -->
이상 위의 파일을 임의의 파일로 저장하여(예:cate.php)스킨폴더에 넣으시고
위의 ico_folder.gif는 적절한 이미지를 skin폴더안의 img폴더에 넣어 주시고요
list.skin.php의 카테고리가 들어갈자리에 아래와 같이 넣으세요..
<? if ($is_category) { ?>
<table width="<?=$width?>" height=50 align=center cellpadding=0 cellspacing=0 style='border:3px solid #E9E9E9;'>
<tr>
<td colspan="2"> <!-- 카테고리 표시 --//-->
<? include cate.php"; ?></td>
</tr>
</table><? } ?>
그러면 다음과 같이 나옵니다
http://www.anygoal.net/test.php
<!-- 분류 셀렉트 박스 시작 -->
<?
$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 height=24><img src='{$board_skin_path}/img/ico_folder.gif' width='13' height='11'> <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] </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% cellspacing=1 cellpadding=4 border=0 style=table-layout:fixed>
<col width=100></col>
<col width=20></col>
<col width=></col>
<tr bgcolor=white>
<td width='' align='center'>
<img src='<?=$board_skin_path?>/img/ico_folder.gif' width='13' height='11'> <a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'><b>전체목록</b></a>
</td>
<td nowrap> </td>
<td width='' style='word-break:break-all;'>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<span class="cate"><?=$str?></span>
</table>
</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td height=1 class=line1 style=height:1px><img src=<?=$board_skin_path?>/img/tab.gif border=0 height=1></td></tr></table>
<!-- 분류 셀렉트 박스 끝 -->
이상 위의 파일을 임의의 파일로 저장하여(예:cate.php)스킨폴더에 넣으시고
위의 ico_folder.gif는 적절한 이미지를 skin폴더안의 img폴더에 넣어 주시고요
list.skin.php의 카테고리가 들어갈자리에 아래와 같이 넣으세요..
<? if ($is_category) { ?>
<table width="<?=$width?>" height=50 align=center cellpadding=0 cellspacing=0 style='border:3px solid #E9E9E9;'>
<tr>
<td colspan="2"> <!-- 카테고리 표시 --//-->
<? include cate.php"; ?></td>
</tr>
</table><? } ?>
그러면 다음과 같이 나옵니다
http://www.anygoal.net/test.php