1. 정확한 제품 또는 플러그인 이름
크로스링크 스킨
2. 상세 내용
안녕하세요, 관리자-게시판 관리-입력필드 탭에서 설정이 안되는 것 같아서
여러 커뮤니티 글을 보고
크로스링크 스킨의 editor.php에
<div class="kboard-attr-row">
<label class="attr-name">마감 날짜</label>
<div class="attr-value"><input type="text" name="kboard_option_name" value="<?=$content->option->enddate?>"></div>
</div>
이렇게 추가하여 글쓰기 화면에서 필드를 추가하는 건 진행했습니다..
어차피 게시글로 링크를 걸거라서 document.php 수정은 필요없을거라 생각해서 수정한 부분이 없고,
글 목록에 추가한 필드가 제목 옆에 나왔으면 해서 list.php를 수정해 보았습니다.
<!-- 리스트 시작 -->
<div class="kboard-list">
<table>
<thead>
<tr>
<td class="kboard-list-uid"><div class="right-line"><?php echo __('Number', 'kboard')?></div></td>
<?php if($board->use_category && $board->initCategory1()):?>
<td class="kboard-list-category1">
<div class="right-line"><?php echo __('카테고리1', 'kboard')?></div>
</td>
<?php endif?>
<td class="kboard-list-enddate">마감 날짜</td>
<td class="kboard-list-title"><div class="right-line"><?php echo __('Title', 'kboard')?></div></td>
<?php if($board->use_category && $board->initCategory2()):?>
<td class="kboard-list-category2">
<div class="right-line"><?php echo __('카테고리', 'kboard-cross-link')?></div>
</td>
<?php endif?>
<td class="kboard-list-date"><div class="right-line"><?php echo __('Date', 'kboard-cross-link')?></div></td>
<td class="kboard-list-shortcuts"><?php echo __('Link', 'kboard-cross-link')?></td>
</tr>
</thead>
↑ <td class="kboard-list-enddate">마감 날짜</td>를 추가하였고,
<tbody>
<?php while($content = $list->hasNextNotice()):?>
<tr class="top-fixing<?php if($content->uid == kboard_uid()):?> kboard-list-selected<?php endif?>">
<td class="kboard-list-uid">※</td>
<?php if($board->use_category && $board->initCategory1()):?>
<td class="kboard-list-category1">
<?php if($board->initCategory1() && $content->category1):?>
<a href="<?php echo $url->set('category1', $content->category1)->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>" title="<?php echo $content->category1?>"><div class="category1-wrap"><?php echo $content->category1?></div></a>
<?php endif?>
</td>
<?php endif?>
<td class="kboard-list-enddate"><?php echo $content->option->enddate?></td>
<td class="kboard-list-title">
<?php if($content->option->link):?>
<a href="<?php echo kboard_cross_link_print($content->option->link)?>" onclick="return kboard_cross_link_shortcut(this, '<?php echo $content->uid?>', '<?php echo $content->option->link_target?>')" title="<?php echo $content->title?>">
<div class="kboard-cross-link-cut-strings">
<?php if($content->isNew()):?><span class="kboard-cross-link-new-notify">New</span><?php endif?>
<?php echo $content->title?>
</div>
</a>
<?php else:?>
<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>" title="<?php echo $content->title?>">
<div class="kboard-cross-link-cut-strings">
<?php if($content->isNew()):?><span class="kboard-cross-link-new-notify">New</span><?php endif?>
<?php echo $content->title?>
</div>
</a>
<?php endif?>
<?php if($content->isEditor() || $board->permission_write=='all'):?>
<div class="separator">
<span class="kboard-edit">
<a href="<?php echo $url->getContentEditor($content->uid)?>" title="<?php echo __('Edit Link', 'kboard-cross-link')?>"><?php echo __('Edit Link', 'kboard-cross-link')?></a>
</span>
<span class="kboard-remove">‧</span>
<span class="kboard-remove">
<a href="<?php echo $url->getContentRemove($content->uid)?>" class="" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');" title="<?php echo __('Delete Link', 'kboard-cross-link')?>"><?php echo __('Delete Link', 'kboard-cross-link')?></a>
</span>
</div>
<?php endif?>
<div class="kboard-mobile-contents">
<?php if($content->category2):?>
<span class="contents-item kboard-category2"><a href="<?php echo $url->set('category2', $content->category2)->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>" title="<?php echo $content->category2?>"><?php echo $content->category2?></a></span>
<span class="contents-separator kboard-date">‧</span>
<?php endif?>
<span class="contents-item kboard-date"><?php echo $content->getDate()?></span>
<?php if($content->isEditor() || $board->permission_write=='all'):?>
<span class="contents-separator kboard-edit">‧</span>
<span class="contents-item kboard-edit"><a href="<?php echo $url->getContentEditor($content->uid)?>" title="<?php echo __('Edit Link', 'kboard-cross-link')?>"><?php echo __('Edit Link', 'kboard-cross-link')?></a></span>
<span class="contents-separator kboard-remove">‧</span>
<span class="contents-item kboard-remove"><a href="<?php echo $url->getContentRemove($content->uid)?>" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');" title="<?php echo __('Delete Link', 'kboard-cross-link')?>"><?php echo __('Delete Link', 'kboard-cross-link')?></a></span>
<?php endif?>
</div>
</td>
<?php if($board->use_category && $board->initCategory2()):?>
<td class="kboard-list-category2">
<?php if($board->initCategory2() && $content->category2):?>
<a href="<?php echo $url->set('category2', $content->category2)->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>" title="<?php echo $content->category2?>"><?php echo $content->category2?></a>
<?php endif?>
</td>
<?php endif?>
<td class="kboard-list-date"><?php echo $content->getDate()?></td>
<td class="kboard-list-shortcuts">
<?php if($content->option->link):?>
<a href="<?php echo kboard_cross_link_print($content->option->link)?>" onclick="return kboard_cross_link_shortcut(this, '<?php echo $content->uid?>', '<?php echo $content->option->link_target?>')" title="<?php echo __('Link', 'kboard-cross-link')?>">
<img src="<?php echo $skin_path?>/images/icon-link.png" onmouseover="this.src='<?php echo $skin_path?>/images/icon-link-hover.png'" onmouseout="this.src='<?php echo $skin_path?>/images/icon-link.png'" alt="">
</a>
<?php else:?>
<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>" title="<?php echo __('Link', 'kboard-cross-link')?>">
<img src="<?php echo $skin_path?>/images/icon-link.png" onmouseover="this.src='<?php echo $skin_path?>/images/icon-link-hover.png'" onmouseout="this.src='<?php echo $skin_path?>/images/icon-link.png'" alt="">
</a>
<?php endif?>
</td>
</tr>
<?php endwhile?>
<?php
// 리스트 레이아웃을 불러온다.
if(is_admin()){
include 'list3.php';
}
else{
include 'list2.php';
}
?>
</tbody>
</table>
</div>
<!-- 리스트 끝 -->
↑<td class="kboard-list-enddate"><?php echo $content->option->enddate?></td>를 추가하였습니다.
그런데 리스트에 추가한 필드의 내용이 뜨지 않아서 문의 드려봅니다..
혹시 제가 놓친 부분이 있을까요?? 도움 부탁드리겠습니다..
3. 확인 가능한 상세 페이지 주소
4. 수정한 코드 내역 (있다면)
안녕하세요~^^
editor.php에서 작성하신 코드를 아래 코드로 수정해보시겠어요?
<div class="kboard-attr-row">
<label class="attr-name" for="kboard_option_link"><?php echo __('gkgk', 'kboard-cross-link')?></label>
<div class="attr-value">
<input type="text" id="kboard_option_enddate" name="kboard_option_enddate" value="<?php echo $content->option->enddate?>">
<div class="description">※ 링크를 빈 칸으로 두면 일반 게시글처럼 표시합니다.</div>
</div>
</div>
고맙습니다.