버튼을 누르면 오래된 글부터 뜹니다.;; > 그누4 질문답변

그누4 질문답변

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

버튼을 누르면 오래된 글부터 뜹니다.;; 정보

버튼을 누르면 오래된 글부터 뜹니다.;;

첨부파일

list.skin.php (12.9K) 1회 다운로드 2011-12-05 18:23:54

본문

그냥 그 게시판으로 들어갈 때는 목록에 최신글부터 보이는데 아래 소스의 이미지 버튼 all.gif 만 누르면 (카테고리 분류창의 전체보기 버튼입니다.) 오래된 글부터 뜹니다. 카테고리 스킨 문제인지 리스트 스킨 문제인지 모르겠습니다. 문제가 있다고 생각하는 카테고리 php는 다음과 같습니다.

<td width='' align='center'>
<a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'><img src='<?=$board_skin_path?>/img/all.gif' width='41' height='19' border=0></a><br>(<?=number_format($total_count)?>)
</td>

desc 부분을 wr_num,wr_reply 이런 식으로 무작정 바꿔 보아도 반응이 없는데 이 부분을 바꾸는 게 맞는지 모르겠습니다. 그누보드 게시판 설정으로도 변화가 없습니다.
혹시 몰라서 list.skin.php파일도 첨부하였습니다. ㅜ.ㅜ

댓글 전체

write 스킨, list 스킨 다 찾아봐도 wr_1 값은 없는데 어찌된 일인지 모르겠습니다.
아래 소스에서 뭔가 잘못된 부분이 없을까요?

<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_is_comment = 0 ";
    $row1 = sql_fetch($sql1);       
            $str .= "<td><img src='{$board_skin_path}/img/ico_folder.gif' width='13' height='9'>&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_is_comment = 0 ";
    $row2 = sql_fetch($sql2);
    $total_count = $row2[cCount]
?>
<table width=100% cellspacing=0 cellpadding=0 style="border:1 solid #CCCCCC;">
<tr><td>

<table width=100% cellspacing=1 cellpadding=10 border=0 style="border:5 solid #E7E7E7;table-layout:fixed">
<col width=75></col>
<col width=20></col>
<col width=></col>

<tr bgcolor=white>
<td width='' align='center'>
<a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'><img src='<?=$board_skin_path?>/img/all.gif' width='41' height='19' border=0></a><br>(<?=number_format($total_count)?>)
</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>

</td></tr></table>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>
링크 부분에서
href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$arr[$i]?>&sop=&sst=wr_1&sod=desc

sst=wr_1 <--wr_1 이 정렬 필드가 되게하라
sod=desc 역순으로 정렬 되게하라
이렇게 되어있기는 한데 bbs/list.php 가 원본 그대로이면 저것은 작동하지않습니다
어쨌거나 의심스러운 부분은 저 부분이니까 저 부분을 삭제하고 해보세요
흐미... 균이님, 감사합니다.
sst=wr_1&sod=desc& 요렇게 묶어서 지우니까 해결되네요.
제가 소스를 잘 볼 줄 몰라서 desc랑 wr_1만 삭제를 반복했었는데 한꺼번에 지우는 것이었네요. ^ㅡ^;;
전체 11 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT