안녕하세요.
Kboard 게시판 잘 활용하고 있습니다.
이번에 비너스 웹진 게시판 스킨을 추가로 구해하여 사용하는데요.
답글 기능이 없어 불편하네요 ^^
답글 추가 가능한 방법 문의드리겠습니다.
감사합니다.
웹진 스타일이기 때문에 답글 기능이 제외되었습니다.
답글 기능을 추가하는 방법을 설명드리겠습니다^^
비너스 웹진 스킨을 먼저 최신 버전으로 업데이트 해주세요. (파일 덮어쓰기 해주세요.)
http://www.cosmosfarm.com/wpstore/product/kboard-venus-webzine-skin
1. venus-webzine 스킨 폴더 안에 reply-template.php 파일을 생성해주세요. 아래 내용을 그대로 복사해서 입력해주세요.
<?php while($content = $list->hasNextReply()):?>
<div class="kboard-webzine-item">
<div class="kboard-webzine-thumbnail">
<?php
if($content->thumbnail_file){
$resize_img_src = kboard_resize($content->thumbnail_file, 130, 87);
}
else{
$media = new KBContentMedia();
$media->content_uid = $content->uid;
$media->media_group = $content->uid;
$media_list = $media->getList();
$media_item = reset($media_list);
if(isset($media_item->file_path) && $media_item->file_path){
$resize_img_src = kboard_resize($media_item->file_path, 130, 87);
}
else{
$resize_img_src = '';
}
}
?>
<?php if($resize_img_src):?>
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>"><img src="<?php echo $resize_img_src?>" style="width:100%; height:100%;" alt=""></a>
<?php else:?>
<div class="kboard-no-image"><a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>"><i class="icon-picture"></i></a></div>
<?php endif?>
</div>
<div class="kboard-webzine-wrap">
<div class="kboard-webzine-title 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>
<div class="kboard-webzine-content"><a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>"><?php echo strip_tags($content->content)?></a></div>
<div class="kboard-webzine-info">
<span class="kboard-info-name"><?php echo __('Date', 'kboard')?> :</span>
<span class="kboard-info-value"><?php echo date("Y/m/d", strtotime($content->date))?></span>
<span class="kboard-info-separator">|</span>
<span class="kboard-info-name"><?php echo __('Author', 'kboard')?> :</span>
<span class="kboard-info-value"><?php echo $content->member_display?></span>
<span class="kboard-info-separator">|</span>
<span class="kboard-info-name"><?php echo __('Views', 'kboard')?> :</span>
<span class="kboard-info-value"><?php echo $content->view?></span>
</div>
</div>
</div>
<?php $boardBuilder->builderReply($content->uid, $depth+1)?>
<?php endwhile?>
2. 스킨의 list.php 파일에 아래 코드에서 굵게 표시된 부분을 추가해주세요.
<!-- 리스트 시작 -->
<div class="kboard-list">
<?php while($content = $list->hasNext()):?>
<div class="kboard-webzine-item">
<div class="kboard-webzine-thumbnail">
<?php
if($content->thumbnail_file){
$resize_img_src = kboard_resize($content->thumbnail_file, 130, 87);
}
else{
$media = new KBContentMedia();
$media->content_uid = $content->uid;
$media->media_group = $content->uid;
$media_list = $media->getList();
$media_item = reset($media_list);
if(isset($media_item->file_path) && $media_item->file_path){
$resize_img_src = kboard_resize($media_item->file_path, 130, 87);
}
else{
$resize_img_src = '';
}
}
?>
<?php if($resize_img_src):?>
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>"><img src="<?php echo $resize_img_src?>" style="width:100%; height:100%;" alt=""></a>
<?php else:?>
<div class="kboard-no-image"><a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>"><i class="icon-picture"></i></a></div>
<?php endif?>
</div>
<div class="kboard-webzine-wrap">
<div class="kboard-webzine-title 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>
<div class="kboard-webzine-content"><a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>"><?php echo strip_tags($content->content)?></a></div>
<div class="kboard-webzine-info">
<span class="kboard-info-name"><?php echo __('Date', 'kboard')?> :</span>
<span class="kboard-info-value"><?php echo date("Y/m/d", strtotime($content->date))?></span>
<span class="kboard-info-separator">|</span>
<span class="kboard-info-name"><?php echo __('Author', 'kboard')?> :</span>
<span class="kboard-info-value"><?php echo $content->member_display?></span>
<span class="kboard-info-separator">|</span>
<span class="kboard-info-name"><?php echo __('Views', 'kboard')?> :</span>
<span class="kboard-info-value"><?php echo $content->view?></span>
</div>
</div>
</div>
<?php $boardBuilder->builderReply($content->uid)?>
<?php endwhile?>
</div>
<!-- 리스트 끝 -->
3. 스킨의 document.php 파일에 아래 코드에서 굵게 표시된 부분을 추가해주세요.
<div class="kboard-control">
<div class="left">
<a href="<?php echo $url->toString()?>" class="kboard-venus-webzine-button-small"><?php echo __('List', 'kboard')?></a>
<?php if($board->isWriter() && !$content->notice):?><a href="<?php echo $url->set('parent_uid', $content->uid)->set('mod', 'editor')->toString()?>" class="kboard-venus-webzine-button-small"><?php echo __('Reply', 'kboard')?></a><?php endif?>
<a href="<?php echo $url->getDocumentURLWithUID($content->getPrevUID())?>" class="kboard-venus-webzine-button-small"><?php echo __('Prev', 'kboard')?></a>
<a href="<?php echo $url->getDocumentURLWithUID($content->getNextUID())?>" class="kboard-venus-webzine-button-small"><?php echo __('Next', 'kboard')?></a>
</div>
<?php if($board->isEditor($content->member_uid) || $board->permission_write=='all'):?>
<div class="right">
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'editor')->toString()?>" class="kboard-venus-webzine-button-small"><?php echo __('Edit', 'kboard')?></a>
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'remove')->toString()?>" class="kboard-venus-webzine-button-small" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete', 'kboard')?></a>
</div>
<?php endif?>
</div>
감사합니다.
답변주신 내용으로 테스트 해보니깐
잘되네요 ^^