안녕하세요. 도움을 요청하고 싶습니다.
관리자 ---> Kboard --> 입력필드 설정 --> 체크박스:"문의분야"를 추가했습니다.
게시판 글쓰기에서 체크박스를 1개 선택 시 리스트에 노출이 되지 않고, 2개 이상을 선택해야 리스트에 노출이 됩니다.
1개 선택 시에도 리스트에 노출되게 하려면 어떻게 해야 되나요?
도움 요청드립니다.
list.php 파일에서는 아래 내용을 수정하였습니다.
<table>
<thead>
<tr>
<td class="kboard-list-uid"><?php echo __('Number', 'kboard')?></td>
<td class="kboard-list-contact_channel">문의분야</td>
<td class="kboard-list-title"><?php echo __('Title', 'kboard')?></td>
<td class="kboard-list-user">글쓴이</td>
<td class="kboard-list-date"><?php echo __('Date', 'kboard')?></td>
<!--td class="kboard-list-vote"><?php echo __('Votes', '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<?php if($content->uid == kboard_uid()):?> kboard-list-selected<?php endif?>">
<td class="kboard-list-uid"><?php echo __('Notice', 'kboard')?></td>
<td class="kboard-list-contact_channel"><?php echo implode(', ', $content->option->{'contact_channel'})?></td>
<td class="kboard-list-title">
<a href="<?php echo esc_url($url->getDocumentURLWithUID($content->uid))?>">
<div class="kboard-default-cut-strings">
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php echo $content->title?>
<span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span>
</div>
</a>
<div class="kboard-mobile-contents">
<span class="contents-item kboard-user"><?php echo $content->getUserDisplay()?></span>
<span class="contents-separator kboard-date">|</span>
<span class="contents-item kboard-date"><?php echo $content->getDate()?></span>
<span class="contents-separator kboard-vote">|</span>
<span class="contents-item kboard-vote"><?php echo __('Votes', 'kboard')?> <?php echo $content->vote?></span>
<span class="contents-separator kboard-view">|</span>
<span class="contents-item kboard-view"><?php echo __('Views', 'kboard')?> <?php echo $content->view?></span>
</div>
</td>
<td class="kboard-list-user"><?php echo $content->getUserDisplay()?></td>
<td class="kboard-list-date"><?php echo $content->getDate()?></td>
<!--td class="kboard-list-vote"><?php echo $content->vote?></td>
<td class="kboard-list-view"><?php echo $content->view?></td-->
</tr>
<?php endwhile?>
<?php while($content = $list->hasNext()):?>
<tr class="<?php if($content->uid == kboard_uid()):?>kboard-list-selected<?php endif?>">
<td class="kboard-list-uid"><?php echo $list->index()?></td>
<td class="kboard-list-contact_channel"><?php echo implode(', ', $content->option->{'contact_channel'})?></td>
<td class="kboard-list-title">
<a href="<?php echo esc_url($url->getDocumentURLWithUID($content->uid))?>">
<div class="kboard-default-cut-strings">
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php echo $content->title?>
<span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span>
</div>
</a>
<div class="kboard-mobile-contents">
<span class="contents-item kboard-user"><?php echo $content->getUserDisplay()?></span>
<span class="contents-separator kboard-date">|</span>
<span class="contents-item kboard-date"><?php echo $content->getDate()?></span>
<!--span class="contents-separator kboard-vote">|</span>
<span class="contents-item kboard-vote"><?php echo __('Votes', 'kboard')?> <?php echo $content->vote?></span>
<span class="contents-separator kboard-view">|</span>
<span class="contents-item kboard-view"><?php echo __('Views', 'kboard')?> <?php echo $content->view?></span-->
</div>
</td>
<td class="kboard-list-user"><?php echo $content->getUserDisplay()?></td>
<td class="kboard-list-date"><?php echo $content->getDate()?></td>
<!--td class="kboard-list-vote"><?php echo $content->vote?></td>
<td class="kboard-list-view"><?php echo $content->view?></td-->
</tr>
<?php $boardBuilder->builderReply($content->uid)?>
<?php endwhile?>
</tbody>
</table>
안녕하세요~^^
이미지 사진은 imgur에 업로드한 뒤 링크 걸어주세요.
스킨 출력 예제 쪽의 코드 대신 아래의 코드로 교체해서 확인해보시겠어요?
<?php if(is_array($content->option->메타키)):?>
<?php echo implode(',', $content->option->메타키)?>
<?php else:?>
<?php echo $content->option->메타키?>
<?php endif?>
위의 코드에서 메타키 부분은 실제 입력 필드의 메타키로 적용해보세요.
고맙습니다.
해결됐습니다. 감사합니다!!