cikorea 게시판 view 페이지의 "목록" 버튼에서 list의 page 값을 어떻게 알 수 있나요? (view 페이지의 page 값을 지워도 값이 있던데 신기하네요.)
저도 이 기능을 구현해야 하는데 세션 방식인지 다른 방식이 있는 건지 궁금합니다.
controller > bbs.php > function view() 하단에 보시면
//이동할 페이지를 재계산해서 보내기 $article_total_cnt = $this->bbs_article_model->lists_total_cnt($this->bbs_idx, ' AND BBS_ARTICLE.idx > ' . $req_idx . ' AND BBS_ARTICLE.is_deleted = 0 ' . $view_category['query_where_as']);
$assign['page'] = floor($article_total_cnt / BBS_SETTING_bbs_count_list_article) + 1; $assign['view'] = $this->word_censor(array( 'title', 'contents' ), $assign['view'], $block_string);
와 같이 지금 보고 있는 글이 있는 페이지를 재계산하는 부분이 있습니다.
물론, 그에 따라 db query가 항상 추가발생하긴합니다.
controller > bbs.php > function view() 하단에 보시면
//이동할 페이지를 재계산해서 보내기
$article_total_cnt = $this->bbs_article_model->lists_total_cnt($this->bbs_idx, ' AND BBS_ARTICLE.idx > ' . $req_idx . ' AND BBS_ARTICLE.is_deleted = 0 ' . $view_category['query_where_as']);
$assign['page'] = floor($article_total_cnt / BBS_SETTING_bbs_count_list_article) + 1;
$assign['view'] = $this->word_censor(array(
'title',
'contents'
), $assign['view'], $block_string);
와 같이 지금 보고 있는 글이 있는 페이지를 재계산하는 부분이 있습니다.
물론, 그에 따라 db query가 항상 추가발생하긴합니다.