utf-8 에서는 카테고리를 셀렉트형식말고 나열식으로는 사용못하나요? > 그누4 질문답변

그누4 질문답변

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

utf-8 에서는 카테고리를 셀렉트형식말고 나열식으로는 사용못하나요? 정보

utf-8 에서는 카테고리를 셀렉트형식말고 나열식으로는 사용못하나요?

본문

 
위에 FAQ 스킨이나 다른스킨도 마찬가지고 카테고리를 가로로 나열되는식으로 할려니
안 먹히네요 ;;
 
셀렉트형식도 안먹히길래 검색하다 찾아서 해결했습니다.
 
 
위 글처럼요,, 그런데 이걸 나열식으로는 어떤식으로 해야하는지 좀 도와주시면 안될까요?
 
전부 UTF-8 로 바꿔놨는데 다시 돌아갈려니 넘 막막합니다 ㅠㅠ
 
 
FAQ스킨에서 보면 카테고리 부분이 아래처럼 되어있습니다.
 
<?php
    $arr = explode("|", $board[bo_category_list]);
    $arr1   = explode("|", $board[bo_10]);
 $str = "";
    for ($i=0; $i<count($arr); $i++)
        if (trim($arr[$i])){
            if($arr[$i]==$sca){
       $key    = array_search($sca, $arr);
       $cate   = explode("^", $arr1[$key]);
       $subca1 = $cate[0];
    $str .= "
    <td width='3'><img src='$board_skin_path/img/tab_on_left.gif' width='3' height='24'></td>
    <td background='$board_skin_path/img/tab_on_bg.gif' style='padding:4 14 0 14' nowrap>
    <a href='$category_location$arr[$i]&sfl=wr_10&stx=$subca1&nca=$subca1'><b>$arr[$i]</b></a></td>
    <td width='3'><img src='$board_skin_path/img/tab_on_right.gif' width='3' height='24'></td>
    ";
    }else{
       $key    = array_search($arr[$i], $arr);
       $cate   = explode("^", $arr1[$key]);
       $subca1=$cate[0];
    $str .= "
    <td width='3'><img src='$board_skin_path/img/tab_off_left.gif' width='3' height='24'></td>
    <td background='$board_skin_path/img/tab_off_bg.gif' style='padding:4 14 0 14' nowrap>
    <a href='$category_location$arr[$i]&sfl=wr_10&stx=$subca1&nca=$subca1'>$arr[$i]</a></td>
    <td width='3'><img src='$board_skin_path/img/tab_off_right.gif' width='3' height='24'></td>
    ";
    }
   }
 echo $str;
 echo "<td width='100%' height='24' style='background:url($board_skin_path/img/dot_gray.gif) repeat-x bottom'></td>";
?>
 
 
  • 복사

댓글 전체

몽땅 다시 euc-kr 로 바꿨습니다.
utf-8 로 할려니 스킨이나 팁란에 좋은기능들이 안 먹히는게 너무많아 포기했습니다.
html 밖에 모르다보니 어쩔수없네요 ㅡㅡㅋ
기본틀에서의 utf-8 분류사용시
<? if ($is_category) { ?><form name="fcategory" method="get"><td width="50%"><select name=sca onchange="location='<?=$category_location?>'+this.value;"><option value=''>전체</option><?=$category_option?></select></td></form><? } ?>

바꾸기
<? if ($is_category) { ?><form name="fcategory" method="get"><td width="50%"><select name=sca onchange="location='<?=$category_location?>'+encodeURI(this.value);"><option value=''>전체</option><?=$category_option?></select></td></form><? } ?>

--------------------
가로형으로 사용시
나타내고 싶은곳에 인클루드하기
<? include "category.php"; ?>//목진철님 스킨
아래쪽
<script language="JavaScript">
//if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";//주석처리

--------------------
<? include "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 =  5; // 한줄당 분류 갯수 ?>

<? 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' width='13' height='11'>&nbsp;<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% cellspacing=1 cellpadding=4 border=0 style=table-layout:fixed>
<col width=75></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'>&nbsp;<a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'><b>전체&nbsp;(<?=number_format($total_count)?>)</b></a>
</td>
<td nowrap>&nbsp;</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>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>

이렇게하시면 됩니다..
© SIRSOFT
현재 페이지 제일 처음으로