게시판의 번호를 역순으로 만들 순 없나요? 정보
게시판의 번호를 역순으로 만들 순 없나요?본문
기본이
5
4
3
2
1
이렇게 나오는데 전 반대로 하고 싶습니다.
1
2
3
4
5
이렇게 수정할 수는 없나요?
for ($i=0; $i<count($list); $i++) 이부분을 수정하는거 같은데 어떻게 바꾸면되나요?
5
4
3
2
1
이렇게 나오는데 전 반대로 하고 싶습니다.
1
2
3
4
5
이렇게 수정할 수는 없나요?
for ($i=0; $i<count($list); $i++) 이부분을 수정하는거 같은데 어떻게 바꾸면되나요?
댓글 전체
자체 해결했습니다.
-------------- 해당 게시판 스킨의 list.skin.php 파일 내부의 ----------
<? for ($i=0; $i<count($list); $i++) { ?>
이부분을
----------------------- 요렇게 수정하니 됩니다. 번호 역순출력 ---------------
<? for ($i=count($list)-1; $i>=0; $i--) { ?>
생초보라 구굴에서 해당 문장을 검색하니 나오네요.
-------------- 해당 게시판 스킨의 list.skin.php 파일 내부의 ----------
<? for ($i=0; $i<count($list); $i++) { ?>
이부분을
----------------------- 요렇게 수정하니 됩니다. 번호 역순출력 ---------------
<? for ($i=count($list)-1; $i>=0; $i--) { ?>
생초보라 구굴에서 해당 문장을 검색하니 나오네요.
bbs/list.php에 보면
while ($row = sql_fetch_array($result))
{
// 검색일 경우 wr_id만 얻었으므로 다시 한행을 얻는다
if ($sca || $stx)
$row = sql_fetch(" select * from $write_table where wr_id = '$row[wr_parent]' ");
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
if (strstr($sfl, "subject"))
$list[$i][subject] = search_font($stx, $list[$i][subject]);
$list[$i][is_notice] = false;
//$list[$i][num] = number_format($total_count - ($page - 1) * $board[bo_page_rows] - $k);
$list[$i][num] = $total_count - ($page - 1) * $board[bo_page_rows] - $k;
$i++;
$k++;
}
가 있습니다.
$list[$i][num] = $total_count - ($page - 1) * $board[bo_page_rows] - $k;
를
$list[$i][num] = ($page - 1) * $board[bo_page_rows] + $k;
로 바꾸세요.
while ($row = sql_fetch_array($result))
{
// 검색일 경우 wr_id만 얻었으므로 다시 한행을 얻는다
if ($sca || $stx)
$row = sql_fetch(" select * from $write_table where wr_id = '$row[wr_parent]' ");
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
if (strstr($sfl, "subject"))
$list[$i][subject] = search_font($stx, $list[$i][subject]);
$list[$i][is_notice] = false;
//$list[$i][num] = number_format($total_count - ($page - 1) * $board[bo_page_rows] - $k);
$list[$i][num] = $total_count - ($page - 1) * $board[bo_page_rows] - $k;
$i++;
$k++;
}
가 있습니다.
$list[$i][num] = $total_count - ($page - 1) * $board[bo_page_rows] - $k;
를
$list[$i][num] = ($page - 1) * $board[bo_page_rows] + $k;
로 바꾸세요.
전체 게시판을 수정하는게 아니라 게시판 하나만 이렇게 설정한건데...
꼭 bbs/list.php 파일 수정해야 하는건가요?
꼭 bbs/list.php 파일 수정해야 하는건가요?