1. 질문내용 : 에스크원 게시판에 고객 연락처란을 추가 생성하였습니다.
그러나, 고객의 연락처를 보기 위해 관리자모드에서 고객 연락처가 보이지 않습니다.
코드에서 문제가 있는 것인지 파악 부탁드립니다.
- editor 와 document 소스코드 첨부합니다.
editor.php <제가 추가한 코드는 굵게 표시해뒀습니다.>
<div id="kboard-ask-one-editor">
<form class="kboard-form" method="post" action="<?php echo $url->getContentEditorExecute()?>" enctype="multipart/form-data" onsubmit="return kboard_editor_execute(this);">
<?php wp_nonce_field('kboard-editor-execute', 'kboard-editor-execute-nonce')?>
<input type="hidden" name="action" value="kboard_editor_execute">
<input type="hidden" name="mod" value="editor">
<input type="hidden" name="uid" value="<?php echo $content->uid?>">
<input type="hidden" name="board_id" value="<?php echo $content->board_id?>">
<input type="hidden" name="parent_uid" value="<?php echo $content->parent_uid?>">
<input type="hidden" name="member_uid" value="<?php echo $content->member_uid?>">
<input type="hidden" name="member_display" value="<?php echo $content->member_display?>">
<input type="hidden" name="date" value="<?php echo $content->date?>">
<input type="hidden" name="user_id" value="<?php echo get_current_user_id()?>">
<div class="kboard-attr-wrap">
<div class="kboard-attr-row kboard-attr-title">
<label class="attr-name" for="kboard-input-title"><?php echo __('Title', 'kboard')?></label>
<div class="attr-value"><input type="text" id="kboard-input-title" name="title" value="<?php echo $content->title?>" placeholder="<?php echo __('Title', 'kboard')?>..."></div>
</div>
<div class="kboard-attr-row">
<div class="attr-name"><?php echo __('Options', 'kboard')?></div>
<div class="attr-value">
<label class="attr-value-option"><input type="checkbox" name="secret" value="true" onchange="kboard_toggle_password_field(this)"<?php if($content->secret):?> checked<?php endif?>> <?php echo __('Secret', 'kboard')?></label>
<?php if($board->isAdmin()):?>
<label class="attr-value-option"><input type="checkbox" name="notice" value="true"<?php if($content->notice):?> checked<?php endif?>> <?php echo __('Notice', 'kboard')?></label>
<?php endif?>
</div>
</div>
<?php if($board->use_category):?>
<?php if($board->initCategory1()):?>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-select-category1"><?php echo __('Category', 'kboard')?></label>
<div class="attr-value">
<select id="kboard-select-category1" name="category1">
<option value=""><?php echo __('Category', 'kboard')?> <?php echo __('Select', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($content->category1 == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
</div>
</div>
<?php endif?>
<?php endif?>
<?php if($board->isAdmin()):?>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-select-category2"><?php echo __('Status', 'kboard')?></label>
<div class="attr-value">
<select id="kboard-select-category2" name="category2">
<option value="">상태없음</option>
<option value="답변대기"<?php if($content->category2 == '답변대기'):?> selected<?php endif?>>답변대기</option>
<option value="답변완료"<?php if($content->category2 == '답변완료'):?> selected<?php endif?>>답변완료</option>
</select>
<div class="description">※ 상태는 관리자만 수정할 수 있습니다.</div>
</div>
</div>
<?php else:?>
<input type="hidden" name="category2" value="<?php echo $content->category2?$content->category2:'답변대기'?>">
<?php endif?>
<?php if($board->viewUsernameField()):?>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-member-display"><?php echo __('Author', 'kboard')?></label>
<div class="attr-value"><input type="text" id="kboard-input-member-display" name="member_display" value="<?php echo $content->member_display?>" placeholder="<?php echo __('Author', 'kboard')?>..."></div>
</div>
<!-- 연락처 -->
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-password"><?php echo __('Phone number', 'kboard')?></label>
<div class="attr-value"><input type="number" id="kboard_input_tel" name="tel" value="<?php echo $content->option->tel?>" placeholder="<?php echo __('tel', 'kboard')?>..."></div>
</div>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-password"><?php echo __('Password', 'kboard')?></label>
<div class="attr-value"><input type="password" id="kboard-input-password" name="password" value="<?php echo $content->password?>" placeholder="<?php echo __('Password', 'kboard')?>..."></div>
</div>
<?php else:?>
<input style="display:none" type="text" name="fake-autofill-fields">
<input style="display:none" type="password" name="fake-autofill-fields">
<!-- 비밀글 비밀번호 필드 시작 -->
<div class="kboard-attr-row secret-password-row"<?php if(!$content->secret):?> style="display:none"<?php endif?>>
<label class="attr-name" for="kboard-input-password"><?php echo __('Password', 'kboard')?></label>
<div class="attr-value"><input type="password" id="kboard-input-password" name="password" value="<?php echo $content->password?>" placeholder="<?php echo __('Password', 'kboard')?>..."></div>
</div>
<!-- 비밀글 비밀번호 필드 끝 -->
<?php endif?>
<?php if($board->useCAPTCHA() && !$content->uid):?>
<?php if(kboard_use_recaptcha()):?>
<div class="kboard-attr-row">
<label class="attr-name"></label>
<div class="attr-value"><div class="g-recaptcha" data-sitekey="<?php echo kboard_recaptcha_site_key()?>"></div></div>
</div>
<?php else:?>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-captcha"><img src="<?php echo kboard_captcha()?>" alt=""></label>
<div class="attr-value"><input type="text" id="kboard-input-captcha" name="captcha" value="" placeholder="<?php echo __('CAPTCHA', 'kboard')?>..."></div>
</div>
<?php endif?>
<?php endif?>
</div>
<div class="kboard-content">
<?php if($board->use_editor):?>
<?php wp_editor($content->content, 'kboard_content', array('media_buttons'=>$board->isAdmin(), 'editor_height'=>400))?>
<?php else:?>
<textarea name="kboard_content" id="kboard_content" placeholder="<?php echo __('Content', 'kboard')?>..."><?php echo $content->content?></textarea>
<?php endif?>
</div>
<div class="kboard-attr-wrap">
<div class="kboard-attr-row">
<label class="attr-name"><?php echo __('Photos', 'kboard')?></label>
<div class="attr-value">
<a href="#" onclick="kboard_editor_open_media();return false;"><?php echo __('KBoard Add Media', 'kboard')?></a>
</div>
</div>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-thumbnail"><?php echo __('Thumbnail', 'kboard')?></label>
<div class="attr-value">
<?php if($content->thumbnail_file):?><?php echo $content->thumbnail_name?> - <a href="<?php echo $url->getDeleteURLWithAttach($content->uid);?>" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete file', 'kboard')?></a><?php endif?>
<input type="file" id="kboard-input-thumbnail" name="thumbnail" accept="image/*">
</div>
</div>
<?php if($board->meta->max_attached_count > 0):?>
<!-- 첨부파일 시작 -->
<?php for($attached_index=1; $attached_index<=$board->meta->max_attached_count; $attached_index++):?>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-file<?php echo $attached_index?>"><?php echo __('Attachment', 'kboard')?><?php echo $attached_index?></label>
<div class="attr-value">
<?php if(isset($content->attach->{"file{$attached_index}"})):?><?php echo $content->attach->{"file{$attached_index}"}[1]?> - <a href="<?php echo $url->getDeleteURLWithAttach($content->uid, "file{$attached_index}");?>" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete file', 'kboard')?></a><?php endif?>
<input type="file" id="kboard-input-file<?php echo $attached_index?>" name="kboard_attach_file<?php echo $attached_index?>">
</div>
</div>
<?php endfor?>
<!-- 첨부파일 끝 -->
<?php endif?>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-select-wordpress-search"><?php echo __('WP Search', 'kboard')?></label>
<div class="attr-value">
<select id="kboard-select-wordpress-search" name="wordpress_search">
<option value="1"<?php if($content->search == '1'):?> selected<?php endif?>><?php echo __('Public', 'kboard')?></option>
<option value="2"<?php if($content->search == '2'):?> selected<?php endif?>><?php echo __('Only title (secret document)', 'kboard')?></option>
<option value="3"<?php if($content->search == '3'):?> selected<?php endif?>><?php echo __('Exclusion', 'kboard')?></option>
</select>
</div>
</div>
</div>
<div class="kboard-control">
<div class="left">
<?php if($content->uid):?>
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>" class="kboard-ask-one-button-small"><?php echo __('Back', 'kboard')?></a>
<a href="<?php echo $url->set('mod', 'list')->toString()?>" class="kboard-ask-one-button-small"><?php echo __('List', 'kboard')?></a>
<?php else:?>
<a href="<?php echo $url->set('mod', 'list')->toString()?>" class="kboard-ask-one-button-small"><?php echo __('Back', 'kboard')?></a>
<?php endif?>
</div>
<div class="right">
<?php if($board->isWriter()):?>
<button type="submit" class="kboard-ask-one-button-small"><?php echo __('Save', 'kboard')?></button>
<?php endif?>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="<?php echo $skin_path?>/script.js?<?php echo KBOARD_VERSION?>"></script>
<script>
jQuery(document).ready(function(){
var auto_secret_check = false;
var document_uid = <?php echo intval($content->uid)?>;
if(auto_secret_check && !document_uid){
jQuery('input[name=secret]').prop('checked', true);
kboard_toggle_password_field(jQuery('input[name=secret]'));
}
});
</script>
document.php
<div id="kboard-document">
<div id="kboard-ask-one-document">
<div class="kboard-document-wrap" itemscope itemtype="http://schema.org/Article">
<meta itemprop="name" content="<?php echo kboard_htmlclear(strip_tags($content->title))?>">
<div class="kboard-detail">
<div class="detail-attr detail-title">
<div class="detail-name"><?php echo __('Title', 'kboard')?></div>
<div class="detail-value"><?php echo $content->title?></div>
</div>
<?php if($content->category1):?>
<div class="detail-attr detail-category1">
<div class="detail-name"><?php echo $content->category1?></div>
</div>
<?php endif?>
<div class="detail-attr detail-writer">
<div class="detail-name"><?php echo __('Author', 'kboard')?></div>
<div class="detail-value"><?php echo $content->member_display?></div>
</div>
<div class="detail-attr detail-date">
<div class="detail-name"><?php echo __('Date', 'kboard')?></div>
<div class="detail-value"><?php echo date('Y-m-d H:i', strtotime($content->date))?></div>
</div>
<div class="detail-attr detail-view">
<div class="detail-name"><?php echo __('Views', 'kboard')?></div>
<div class="detail-value"><?php echo $content->view?></div>
</div>
<div class="detail-attr detail-category2">
<div class="detail-name">
<?php if($content->category2 == '답변대기'):?><span class="kboard-ask-one-status-wait">답변대기</span><?php endif?>
<?php if($content->category2 == '답변완료'):?><span class="kboard-ask-one-status-complete">답변완료</span><?php endif?>
</div>
</div>
</div>
<div class="kboard-content" itemprop="description">
<div class="content-view">
<?php echo $content->content?>
</div>
</div>
<div class="kboard-document-action">
<div class="left">
<button type="button" class="kboard-button-action kboard-button-like" onclick="kboard_document_like(this)" data-uid="<?php echo $content->uid?>" title="<?php echo __('Like', 'kboard')?>"><?php echo __('Like', 'kboard')?> <span class="kboard-document-like-count"><?php echo intval($content->like)?></span></button>
<button type="button" class="kboard-button-action kboard-button-unlike" onclick="kboard_document_unlike(this)" data-uid="<?php echo $content->uid?>" title="<?php echo __('Unlike', 'kboard')?>"><?php echo __('Unlike', 'kboard')?> <span class="kboard-document-unlike-count"><?php echo intval($content->unlike)?></span></button>
</div>
<div class="right">
<button type="button" class="kboard-button-action kboard-button-print" onclick="kboard_document_print('<?php echo $url->getDocumentPrint($content->uid)?>')" title="<?php echo __('Print', 'kboard')?>"><?php echo __('Print', 'kboard')?></button>
</div>
</div>
<?php if($content->isAttached()):?>
<div class="kboard-attach">
<div class="kboard-attach-title">첨부파일 <?php echo intval(count((array)$content->attach))?>개</div>
<?php foreach($content->attach as $key=>$attach):?>
<button type="button" class="kboard-button-action kboard-button-download" onclick="window.location.href='<?php echo $url->getDownloadURLWithAttach($content->uid, $key)?>'" title="<?php echo sprintf(__('Download %s', 'kboard'), $attach[1])?>"><?php echo $attach[1]?></button>
<?php endforeach?>
</div>
<?php endif?>
</div>
<?php if($content->visibleComments()):?>
<div class="kboard-comments-area"><?php echo $board->buildComment($content->uid)?></div>
<?php endif?>
<div class="kboard-document-navi">
<div class="kboard-prev-document">
<?php
$bottom_content_uid = $content->getPrevUID();
if($bottom_content_uid):
$bottom_content = new KBContent();
$bottom_content->initWithUID($bottom_content_uid);
?>
<a href="<?php echo $url->getDocumentURLWithUID($bottom_content_uid)?>">
<span class="navi-arrow">«</span>
<span class="navi-document-title kboard-ask-one-cut-strings"><?php echo $bottom_content->title?></span>
</a>
<?php endif?>
</div>
<p>연락처 : <?=$content->option->tel?></p>
<div class="kboard-next-document">
<?php
$top_content_uid = $content->getNextUID();
if($top_content_uid):
$top_content = new KBContent();
$top_content->initWithUID($top_content_uid);
?>
<a href="<?php echo $url->getDocumentURLWithUID($top_content_uid)?>">
<span class="navi-document-title kboard-ask-one-cut-strings"><?php echo $top_content->title?></span>
<span class="navi-arrow">»</span>
</a>
<?php endif?>
</div>
</div>
<div class="kboard-control">
<div class="left">
<a href="<?php echo $url->set('mod', 'list')->toString()?>" class="kboard-ask-one-button-gray"><?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-ask-one-button-gray"><?php echo __('Reply', 'kboard')?></a><?php endif?>
</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-ask-one-button-gray"><?php echo __('Edit', 'kboard')?></a>
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'remove')->toString()?>" class="kboard-ask-one-button-gray" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete', 'kboard')?></a>
</div>
<?php endif?>
</div>
<?php if(!$board->meta->always_view_list):?>
<div class="kboard-ask-one-poweredby">
<a href="http://blog.naver.com/kibanklc" onclick="window.open(this.href);return false;" title="<?php echo __('KBoard is the best community software available for WordPress', 'kboard')?>">한국금융마케팅그룹 공식블로그</a>
</div>
<?php endif?>
</div>
</div>
아마도 위치 때문인 듯합니다.
현재 document.php 파일에 추가하신 코드는 게시글 하단에 이전 다음 글이 나오는 위치입니다.
페이지를 확인해보지 못해서 정확하지는 않지만, 레이어로 가려져서 안보이고 있는 듯합니다.
따라서 위치를 내용 앞 또는 위에 나오도록 하시는게 좋을 듯합니다.
<?php echo $content->content?> 코드가 게시글의 내용을 출력하는 코드입니다.
아래처럼 앞쪽에 추가해보시겠어요?
<div class="kboard-content" itemprop="description">
<div class="content-view">
<p>연락처 : <?php echo $content->option->tel?></p>
<?php echo $content->content?>
</div>
</div>
추가로 말씀드리면,
customer 스킨의 editor.php 파일과 document.php 파일에
이름과 연락처를 출력하는 코드가 그대로 적용되어 있으니 참고하시면 도움이 되실겁니다.
고맙습니다.