입문한지 얼마 되지 않은 초보 이용자입니다.
latest.php 를 수정하는 것은 이해했으나,
최신글을 보여주려면 어떤 코드를 넣어야하는지 감을 잡지 못하겠습니다.
제목과 같이 최신글 뷰에 작성자 란을 추가하고 싶습니다
list.php 파일을 참고해주세요.
실제로 기능이 동일합니다.
default 스킨을 예로 들겠습니다.
<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>
위 코드를 아래 처럼 수정해주세요.
<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>
<th class="kboard-list-user"><?php echo __('Author', '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>
<td class="kboard-list-user"><?php echo $content->member_display?></td>
</tr>
<?php endwhile?>
</tbody>
</table>
</div>