답변 3개
$board_notice_count = count($arr_notice); $result = sql_query("select * from {$write_table} where wr_1 != ''"); $k = 0; while ($row = sql_fetch_array($result)) { if (!$row['wr_id']) continue; $notice_array[] = $row['wr_id']; if($k < $from_notice_idx) continue; $list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']); $list[$i]['is_notice'] = true; $i++; $notice_count++; if($notice_count >= $list_page_rows) break; }
댓글을 작성하려면 로그인이 필요합니다.
/bbs/list.php 파일92줄 요렇게 바꾸시면됩니다
$board_notice_count = count($arr_notice);
$result = sql_query("select * from {$write_table} where wr_1 != ''");
$k = 0;
while ($row = sql_fetch_array($result)) {
if (!$row['wr_id']) continue;
$notice_array[] = $row['wr_id'];
if($k < $from_notice_idx) continue;
$list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']); $list[$i]['is_notice'] = true;
$i++; $notice_count++;
if($notice_count >= $list_page_rows) break; }
댓글을 작성하려면 로그인이 필요합니다.
이런 작업을 몇가지 방식으로 처리 해본적이 있는데, 개인적으로는..
공지사항으로 체크해서 저장할때 따로 해당 게시판 wr_1에 구분할수 있는 값을 저장해놓고
정렬순서를 wr_1 기준으로 하는것이 쉽게 접근할수 있었던거 같습니다.
기존에 wr_1에 어떤 값을 넣으시는지 알수없지만 알파벳형태를 이용해서 우선순위를 정할수있습니다.
wr_1 에 항목에 예를들면 b~z 값이 들어간다면 공지사항 체크시 a란 값을 저장시키고
order by wr_1 asc ..
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인