케이보드 디폴트로 게시판을 5개 만들었습니다.
모아볼 게시판을 5개 설정을 했는데 제가 원하는건 5개 설정한 게시판이 최신글로 다 나오길 원합니다.
★★★★단 !! 기본게시판레이아웃 그대로 나오고 싶습니다.
최신글을 위에 두개인가 세개밖에 안나오는걸 알고있습니다.
제가 원하는건 list.php처럼 전체가 다 나오길 원합니다.
번호 / 제목 / 작성자 / 작성일 / 조회 까지 전부요
그래서 제가 latest.php를 작업을 했더니 나오긴 잘나옵니다.
그런데 문제가!! 아래 네비게이션 1,2,3,4가 링크가 안됩니다.
(식품이나, 미용&의료등등 게시판들을 전체에 다 모아놨습니다.
다른페이지는 신경쓰지마세요 전체 게시판 아래 숫자 네비게시션이 안되고 있어서 메뉴에서 사라지게 했습니다. )
----------------------------------------- 원본 latest.php 를 --------------------------------------------
<div id="kboard-default-latest">
<table>
<thead>
<tr>
<th class="kboard-latest-title"><?php echo __('Title', 'kboard')?></th>
<th class="kboard-latest-date"><?php echo __('Date', 'kboard')?></th>
</tr>
</thead>
<tbody>
<?php while($content = $list->hasNext()):?>
<tr>
<td class="kboard-latest-title"><div class="cut_strings"><a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toStringWithPath($board_url)?>"><?php echo $content->title?></a> <?php echo $content->getCommentsCount()?></div></td>
<td class="kboard-latest-date"><?php echo date("Y.m.d", strtotime($content->date))?></td>
</tr>
<?php endwhile?>
</tbody>
</table>
</div>
----------------------------------- 수정 latest.php 로 변경하였습니다. -----------------------------------------
<div id="kboard-default-list">
<!-- 검색폼 시작 -->
<div class="kboard-header">
<form id="kboard-search-form" method="get" action="<?php echo $url->set('mod', 'list')->toString()?>">
<?php echo $url->set('category1', '')->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
<?php if($board->use_category == 'yes'):?>
<div class="kboard-category">
<?php if($board->initCategory1()):?>
<select name="category1" onchange="jQuery('#kboard-search-form').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($_GET['category1'] == $board->currentCategory()):?> selected="selected"<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
<?php if($board->initCategory2()):?>
<select name="category2" onchange="jQuery('#kboard-search-form').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($_GET['category2'] == $board->currentCategory()):?> selected="selected"<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
</div>
<?php endif?>
<div class="kboard-search">
<select name="target">
<option value=""><?php echo __('All', 'kboard')?></option>
<option value="title"<?php if($_GET['target'] == 'title'):?> selected="selected"<?php endif?>><?php echo __('Title', 'kboard')?></option>
<option value="content"<?php if($_GET['target'] == 'content'):?> selected="selected"<?php endif?>><?php echo __('Content', 'kboard')?></option>
<option value="member_display"<?php if($_GET['target'] == 'member_display'):?> selected="selected"<?php endif?>><?php echo __('Author', 'kboard')?></option>
</select>
<input type="text" name="keyword" value="<?php echo $_GET['keyword']?>">
<button type="submit" class="kboard-default-button-small"><?php echo __('Search', 'kboard')?></button>
</div>
</form>
</div>
<!-- 검색폼 끝 -->
<!-- 리스트 시작 -->
<div class="kboard-list">
<table>
<thead>
<tr>
<td class="kboard-list-uid"><?php echo __('Number', 'kboard')?></td>
<td class="kboard-list-title"><?php echo __('Title', 'kboard')?></td>
<td class="kboard-list-international">품목별</td>
<td class="kboard-list-user"><?php echo __('Author', 'kboard')?></td>
<td class="kboard-list-date"><?php echo __('Date', 'kboard')?></td>
<td class="kboard-list-view"><?php echo __('Views', 'kboard')?></td>
</tr>
</thead>
<tbody>
<?php while($content = $list->hasNextNotice()):?>
<tr class="kboard-list-notice">
<td class="kboard-list-uid"><?php echo __('Notice', 'kboard')?></td>
<td class="kboard-list-title"><div class="cut_strings">
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>"><?php echo $content->title?></a>
<?php echo $content->getCommentsCount()?>
</div></td>
<td class="kboard-list-international"><?php echo $content->International?></td>
<td class="kboard-list-user"><?php echo $content->member_display?></td>
<td class="kboard-list-date"><?php echo date("Y.m.d", strtotime($content->date))?></td>
<td class="kboard-list-view"><?php echo $content->view?></td>
</tr>
<?php endwhile?>
<?php while($content = $list->hasNext()):?>
<tr>
<td class="kboard-list-uid"><?php echo $list->index()?></td>
<td class="kboard-latest-title"><div class="cut_strings"><a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toStringWithPath($board_url)?>"><?php echo $content->title?></a> <?php echo $content->getCommentsCount()?></div></td>
<td class="kboard-list-international"><?php echo isset($content->option->international)?$content->option->international:''?></td>
<td class="kboard-list-user"><?php echo $content->member_display?></td>
<td class="kboard-list-date"><?php echo date("Y.m.d", strtotime($content->date))?></td>
<td class="kboard-list-view"><?php echo $content->view?></td>
</tr>
<?php $boardBuilder->builderReply($content->uid)?>
<?php endwhile?>
</tbody>
</table>
</div>
<!-- 페이징 시작 -->
<div class="kboard-pagination">
<ul class="kboard-pagination-pages">
<?php echo kboard_pagination($list->page, $list->total, $list->rpp)?>
</ul>
</div>
<!-- 페이징 끝 -->
</div>
--------------------------------------------------------- 문제가 생김 -----------------------------------------------------
출력은 제대로 잘나옵니다.
그런데 문제는 kboard-pagination 에서 문제가 생겼습니다.
아래 번호가 나오긴하는데 1,2,3,4 어떤 숫자를 눓러도 넘어가지지 않습니다.
어떻게 해결해야 할까요??
링크는 아래와 같습니다.
/kboard/class/KBoardBuilder.class.php 파일을 수정해주세요.
public function createLatest(){
ob_start();
$url = new KBUrl();
$list = new KBContentList($this->board_id);
$list->rpp($this->rpp)->getList();
$skin_path = KBOARD_URL_PATH . "/skin/{$this->skin}";
$board = $this->board;
$board_url = $this->url;
$boardBuilder = $this;
include KBOARD_DIR_PATH . "/skin/{$this->skin}/latest.php";
return ob_get_clean();
}
위 코드를 찾아서 아래처럼 수정해서 테스트 해보시겠어요?
public function createLatest(){
ob_start();
$url = new KBUrl();
$list = new KBContentList($this->board_id);
$list->rpp($this->rpp)->page($_GET['pageid'])->getList();
$skin_path = KBOARD_URL_PATH . "/skin/{$this->skin}";
$board = $this->board;
$board_url = $this->url;
$boardBuilder = $this;
include KBOARD_DIR_PATH . "/skin/{$this->skin}/latest.php";
return ob_get_clean();
}
감사합니다.
$list->rpp($this->rpp)->page($_GET['pageid'])->getList();
이거만 입력하면 되는거였군요
잘됩니다.!!!