안녕하세요
현재 케이보드를 활용해서 커뮤니티를 구축중에있습니다.
다름이 아니라 제가 대분류 - 1차 카테고리 -2차카테고리 를 나눠서 분류하고싶은데요
예를들면 [대학정보]라는 게시판안에 [경상도] - [안동] 이런식으로 점점더 소분류로 분류하는식으로 할 수 없을까요?
지금 게시판 설치후 테스트해보니 1차카테고리, 2차카테고리의 교집합형식으로만 분류되는거 같더라구요.
위에 저희가 원하는대로 제작하고싶으면 어떻게 수정해야할까요??
수정할수 없다면 어떤방법을 추천해주시는지요??
수고많으십니다.
감사합니다.
스킨을 수정하면 충분히 가능합니다.
게시판이 설치된 페이지 주소도 알려주시겠어요?
코드를 작성해서 올려드릴 수 있을 듯합니다.
많이 기다리렸죠? 답변이 늦었습니다.
FTP로 접속해서 스킨 파일을 수정해주세요.
/wp-content/plugins/kboard/skin/사용중인스킨/list.php 파일입니다.
우선 아래와 같은 코드가 있을겁니다.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
<?php if($board->use_category == 'yes'):?>
<!-- 카테고리 시작 -->
<div class="kboard-category category-mobile">
<form id="kboard-category-form-<?php echo $board->id?>" method="get" action="<?php echo $url->toString()?>">
<?php echo $url->set('pageid', '1')->set('category1', '')->set('category2', '')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
<?php if($board->initCategory1()):?>
<select name="category1" onchange="jQuery('#kboard-category-form-<?php echo $board->id?>').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if(kboard_category1() == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
<?php if($board->initCategory2()):?>
<select name="category2" onchange="jQuery('#kboard-category-form-<?php echo $board->id?>').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if(kboard_category2() == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
</form>
</div>
<div class="kboard-category category-pc">
<?php if($board->initCategory1()):?>
<ul class="kboard-category-list">
<li<?php if(!kboard_category1()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category1', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
<?php while($board->hasNextCategory()):?>
<li<?php if(kboard_category1() == $board->currentCategory()):?> class="kboard-category-selected"<?php endif?>>
<a href="<?php echo $url->set('category1', $board->currentCategory())->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>"><?php echo $board->currentCategory()?></a>
</li>
<?php endwhile?>
</ul>
<?php endif?>
<?php if($board->initCategory2()):?>
<ul class="kboard-category-list">
<li<?php if(!kboard_category2()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
<?php while($board->hasNextCategory()):?>
<li<?php if(kboard_category2() == $board->currentCategory()):?> class="kboard-category-selected"<?php endif?>>
<a href="<?php echo $url->set('category2', $board->currentCategory())->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>"><?php echo $board->currentCategory()?></a>
</li>
<?php endwhile?>
</ul>
<?php endif?>
</div>
<!-- 카테고리 끝 -->
<?php endif?>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
아래의 코드로 교체해보시겠어요?
버그는 있을 수 있는데 우선 교체해서 테스트 해보세요~
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
<?php if($board->use_category == 'yes'):?>
<?php
// 이 부분의 코드를 적절히 수정해주세요.
$category2 = array(
'홍콩생활' => array('홍콩생활1','홍콩생활2'),
'홍콩여행' => array('홍콩여행1','홍콩여행2'),
'업체리스트' => array('업체리스트1','업체리스트2'),
'스토어' => array('스토어1','스토어2'),
);
?>
<!-- 카테고리 시작 -->
<div class="kboard-category category-mobile">
<form id="kboard-category-form-<?php echo $board->id?>" method="get" action="<?php echo $url->toString()?>">
<?php echo $url->set('pageid', '1')->set('category1', '')->set('category2', '')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
<?php if($board->initCategory1()):?>
<select name="category1" onchange="jQuery('#kboard-category-form-<?php echo $board->id?>').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if(kboard_category1() == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
<?php if(kboard_category1() && $category2):?>
<select name="category2" onchange="jQuery('#kboard-category-form-<?php echo $board->id?>').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php foreach($category2[kboard_category1()] as $category2_name):?>
<option value="<?php echo $category2_name?>"<?php if(kboard_category2() == $category2_name):?> selected<?php endif?>><?php echo $category2_name?></option>
<?php endforeach?>
</select>
<?php endif?>
</form>
</div>
<div class="kboard-category category-pc">
<?php if($board->initCategory1()):?>
<ul class="kboard-category-list">
<li<?php if(!kboard_category1()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category1', '')->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
<?php while($board->hasNextCategory()):?>
<li<?php if(kboard_category1() == $board->currentCategory()):?> class="kboard-category-selected"<?php endif?>>
<a href="<?php echo $url->set('category1', $board->currentCategory())->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>"><?php echo $board->currentCategory()?></a>
</li>
<?php endwhile?>
</ul>
<?php endif?>
<?php if(kboard_category1() && $category2):?>
<ul class="kboard-category-list">
<li<?php if(!kboard_category2()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
<?php foreach($category2[kboard_category1()] as $category2_name):?>
<li<?php if(kboard_category2() == $category2_name):?> class="kboard-category-selected"<?php endif?>>
<a href="<?php echo $url->set('category2', $category2_name)->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>"><?php echo $category2_name?></a>
</li>
<?php endforeach?>
</ul>
<?php endif?>
</div>
<!-- 카테고리 끝 -->
<?php endif?>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
감사합니다!!!!!!!!!^^
저희 페이지 주소는 www.hongsasa.com입니다.
[홍콩생활],[홍콩여행],[업체리스트],[스토어]
이렇게 4개의 게시판을 2차 카테고리(대분류-소분류)를 만들고싶습니다.
개발중이라 메인에서 게시판이 안들어질까봐 위에 게시판중에 하나 링크 첨부합니다 http://hongsasa.com/hklife/
정말 감사합니다!!^^
너무 감사드립니다!!!!
테스트해보겠습니다.
좋은 하루되세요!!^^
editor.php 파일 수정에 대한 답변은 아래 링크를 참고해주세요.