답글시 일부 원글의 일부 원하는 필드만 출력, 일부는 에디팅 필드로

https://imgur.com/fb0AZOi

 

안녕하세요, 상기 이미지처럼

1. 사용자가 개인정보를 적고

2. 수행보고(textarea)를 적습니다. 수행지도는 적지 못하구요.

 

그후에 관리자가 답변을 달면

1) 이름,소속,법명, 수행보고 여기는 사용자가 입력한 필드의 값이 출력되고

2) 수행지도의 textarea는 에디팅가능 상태로 두어 관리자가 적게하려고 합니다.

 

reply-template.php가 에디터나 도큐멘트랑 같은 구조일줄 알았는데 전혀 아니더라구요.

다른글 참고해서 테마 functions.php에 넣어봤지만 반응이 없어서요.

알려주시면 감사하겠습니다 ㅠㅠ

 

http://sati.institute/%ec%8b%b8%eb%9d%a0%ec%88%98%ed%96%89/%ec%88%98%ed%96%89%ec%a0%90%ea%b2%80/?mod=list&pageid=1

 

editor.php

<div id="soohaeng-board-editor">
	<form class="kboard-form" method="post" action="<?php echo $url->getContentEditorExecute()?>" enctype="multipart/form-data" onsubmit="return kboard_editor_execute(this);">
		<?php $skin->editorHeader($content, $board)?>
		<?php foreach($board->fields()->getSkinFields() as $key=>$field):?>
			<?//php echo $board->fields()->getTemplate($field, $content, $boardBuilder)?>
		<?php endforeach?>
		<div class="kboard-list">
			<!-- 기본정보 -->
			<div class="soohaeng-header">
				<div class="row clear col-1-1">
					<div class="col-1-3">
						<label class="attr-name">이름 :</label>
						<div class="attr-value"><input type="text" id="kboard_option_author" name="kboard_option_author" value="<?php echo $content->option->author; ?>"></div>
					</div>
					<div class="col-1-3">
						<label class="attr-name">소속 :</label>
						<div class="attr-value"><input type="text" id="kboard_option_sosok" name="kboard_option_sosok" value="<?php echo $content->option->sosok; ?>"></div>
					</div>
					<div class="col-1-3">
						<label class="attr-name">법명 :</label>
						<div class="attr-value"><input type="text" id="kboard_option_namebup" name="kboard_option_namebup" value="<?php echo $content->option->namebup; ?>"></div>
					</div>
				</div>
			</div>
			<div class="margin-bottom:55px">제목: <input type="text" id="kboard-input-title" name="title" value="<?php echo $content->title?>" placeholder="<?php echo __('Title', 'kboard')?>..."></div>
			<table id="tablepress-7" class="tablepress tablepress-id-7">
				<tbody>
					<tr class="row-1">
						<td colspan="2" class="column-1">수행점검표</td>
						<td class="column-3">수행보고</td>
						<td class="column-4">수행지도</td>
					</tr>
					<tr class="row-2">
						<td rowspan="2" class="column-1">총 수행시간</td>
						<td class="column-2">① 1일 / 1주일 동안의 총 수행시간</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time"><?=$content->option->time?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_re"><?=$content->option->time_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-3">
						<td class="column-2">② 좌념, 행념, 생활념의 각 수행시간</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_2"><?=$content->option->time_2?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_2_re"><?=$content->option->time_2_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-4">
						<td rowspan="4" class="column-1">좌념보고</td>
						<td class="column-2">① 총 수행시간</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_3"><?=$content->option->time_3?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_3_re"><?=$content->option->time_3_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-5">
						<td class="column-2">② 배 움직임(속도/규칙/폭/무게/이동/기타)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_4"><?=$content->option->time_4?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_4_re"><?=$content->option->time_4_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-6">
						<td class="column-2">③ 생각 움직임(많은지/한 생각/과거/알아차림)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_5"><?=$content->option->time_5?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_6_re"><?=$content->option->time_6_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-7">
						<td class="column-2">④ 몸 움직임(몸이 불편한지/기타)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_6"><?=$content->option->time_6?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_6_re"><?=$content->option->time_6_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-8">
						<td rowspan="5" class="column-1">행념보고</td>
						<td class="column-2">① 총 수행시간</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_7"><?=$content->option->time_7?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_7_re"><?=$content->option->time_7_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-9">
						<td class="column-2">② 행념단계 시간배분(1.3,6단계)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_8"><?=$content->option->time_8?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_8_re"><?=$content->option->time_8_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-10">
						<td class="column-2">③ 6단계 발바닥 움직임(들 때/갈 때/놓을 때의 무게감)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_9"><?=$content->option->time_9?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_9_re"><?=$content->option->time_9_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-11">
						<td class="column-2">④ 생각 움직임(생각이 일어날 때 어떻게 하는지)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_10"><?=$content->option->time_10?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_10_re"><?=$content->option->time_10_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-12">
						<td class="column-2">⑤ 몸 움직임(몸이 불편한지/기타)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_11"><?=$content->option->time_11?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_11_re"><?=$content->option->time_11_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-13">
						<td rowspan="5" class="column-1">생활념보고</td>
						<td class="column-2">① 총 수행시간</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_12"><?=$content->option->time_12?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_12_re"><?=$content->option->time_12_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-14">
						<td class="column-2">② 도량 걸을 때(오른발, 왼발)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_13"><?=$content->option->time_13?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?><d
							iv class="reply_area"><textarea rows="10" name="kboard_option_time_13_re"><?=$content->option->time_13_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-15">
						<td class="column-2">③ 공양할 때(잡음/집음/당김/넣음/씹음/삼킴/놓음)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_14"><?=$content->option->time_14?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_14_re"><?=$content->option->time_14_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-16">
						<td class="column-2">④ 문 여닫을 때(의도넣고 알아차림하는지)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_15"><?=$content->option->time_15?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_15_re"><?=$content->option->time_15_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-17">
						<td class="column-2">⑤ 신 신고 벗을 때(의도넣고 알아차린 하는지)</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_16"><?=$content->option->time_16?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_16_re"><?=$content->option->time_16_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-18">
						<td rowspan="2" class="column-1">질문</td>
						<td class="column-2">궁금한 것 질문하기</td>
						<td class="column-3"><textarea rows="10" name="kboard_option_time_16"><?=$content->option->time_17?></textarea></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_16_re"><?=$content->option->time_17_re?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-19">
						<td class="column-2"></td>
						<td class="column-3">수행지도 총평</td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_16_re"><?=$content->option->time_18_re?></textarea></div>
							<?php endif?></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="kboard-control">
			<div class="left">
				<?php if($content->uid):?>
				<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>" class="soohaeng-board-button-small"><?php echo __('Back', 'kboard')?></a>
				<a href="<?php echo $url->getBoardList()?>" class="soohaeng-board-button-small"><?php echo __('List', 'kboard')?></a>
				<?php else:?>
				<a href="<?php echo $url->getBoardList()?>" class="soohaeng-board-button-small"><?php echo __('Back', 'kboard')?></a>
				<?php endif?>
				<?php if($board->isWriter()):?>
				<button type="submit" class="soohaeng-board-button-small"><?php echo __('Save', 'kboard')?></button>
				<?php endif?>
			</div>
		</div>
	</form>
</div>

<?php wp_enqueue_script('soohaeng-board-script', "{$skin_path}/script.js", array(), KBOARD_VERSION, true)?>

 

document.php

<div id="kboard-document">
	<div id="soohaeng-board-document">
		<div class="kboard-document-wrap" itemscope itemtype="http://schema.org/Article">
			<div class="kboard-title" itemprop="name">
				<h1><?php echo $content->title?></h1>
			</div>
			
			<div class="kboard-detail">
				<?php if($content->category1):?>
				<div class="detail-attr detail-category1">
					<div class="detail-name"><?php echo $content->category1?></div>
				</div>
				<?php endif?>
				<?php if($content->category2):?>
				<div class="detail-attr detail-category2">
					<div class="detail-name"><?php echo $content->category2?></div>
				</div>
				<?php endif?>
				<?php if($content->option->tree_category_1):?>
				<?php for($i=1; $i<=$content->getTreeCategoryDepth(); $i++):?>
				<div class="detail-attr detail-tree-category-<?php echo $i?>">
					<div class="detail-name"><?php echo $content->option->{'tree_category_'.$i}?></div>
				</div>
				<?php endfor?>
				<?php endif?>
				<div class="detail-attr detail-writer">
					<div class="detail-name"><?php echo __('Author', 'kboard')?></div>
					<div class="detail-value"><?php echo $content->getUserDisplay()?></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>
			
			<div class="kboard-content" itemprop="description">
				<div class="content-view">

		<div class="kboard-list">
			<div class="soohaeng-header">
				<div class="row clear col-1-1">
					<div class="col-1-3">
						<label class="attr-name">이름 :</label>
						<div class="attr-value"><?php echo $content->option->author?></div>
					</div>
					<div class="col-1-3">
						<label class="attr-name">소속 :</label>
						<div class="attr-value"><?php echo $content->option->{'sosok'}?></div>
					</div>
					<div class="col-1-3">
						<label class="attr-name">법명 :</label>
						<div class="attr-value"><?php echo $content->option->{'namebup'}?></div>
					</div>
				</div>
			</div>
			<h3 style="margin-bottom:55px">제목: <?php echo $content->title?></h3>
			<!-- 기본정보 -->
			<table id="tablepress-7" class="tablepress tablepress-id-7">
				<tbody>
					<tr class="row-1">
						<td colspan="2" class="column-1">수행점검표</td>
						<td class="column-3">수행보고</td>
						<td class="column-4">수행지도</td>
					</tr>
					<tr class="row-2">
						<td rowspan="2"class="column-1">총 수행시간</td>
						<td class="column-2">① 1일 / 1주일 동안의 총 수행시간</td>
						<td class="column-3"><?php echo $content->option->{'time'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re'}?></div></td>
					</tr>
					<tr class="row-3">
						<td class="column-2">② 좌념, 행념, 생활념의 각 수행시간</td>
						<td class="column-3"><?php echo $content->option->{'time_2'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_2'}?></div></td>
					</tr>
					<tr class="row-4">
						<td rowspan="4" class="column-1">좌념보고</td>
						<td class="column-2">① 총 수행시간</td>
						<td class="column-3"><?php echo $content->option->{'time_3'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_3'}?></div></td>
					</tr>
					<tr class="row-5">
						<td class="column-2">② 배 움직임(속도/규칙/폭/무게/이동/기타)</td>
						<td class="column-3"><?php echo $content->option->{'time_4'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_4'}?></div></td>
					</tr>
					<tr class="row-6">
						<td class="column-2">③ 생각 움직임(많은지/한 생각/과거/알아차림)</td>
						<td class="column-3"><?php echo $content->option->{'time_5'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_5'}?></div></td>
					</tr>
					<tr class="row-7">
						<td class="column-2">④ 몸 움직임(몸이 불편한지/기타)</td>
						<td class="column-3"><?php echo $content->option->{'time_6'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_6'}?></div></td>
					</tr>
					<tr class="row-8">
						<td rowspan="5" class="column-1">행념보고</td>
						<td class="column-2">① 총 수행시간</td>
						<td class="column-3"><?php echo $content->option->{'time_7'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_7'}?></div></td>
					</tr>
					<tr class="row-9">
						<td class="column-2">② 행념단계 시간배분(1.3,6단계)</td>
						<td class="column-3"><?php echo $content->option->{'time_8'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_8'}?></div></td>
					</tr>
					<tr class="row-10">
						<td class="column-2">③ 6단계 발바닥 움직임(들 때/갈 때/놓을 때의 무게감)</td>
						<td class="column-3"><?php echo $content->option->{'time_9'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_9'}?></div></td>
					</tr>
					<tr class="row-11">
						<td class="column-2">④ 생각 움직임(생각이 일어날 때 어떻게 하는지)</td>
						<td class="column-3"><?php echo $content->option->{'time_10'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_10'}?></div></td>
					</tr>
					<tr class="row-12">
						<td class="column-2">⑤ 몸 움직임(몸이 불편한지/기타)</td>
						<td class="column-3"><?php echo $content->option->{'time_11'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_11'}?></div></td>
					</tr>
					<tr class="row-13">
						<td rowspan="5" class="column-1">생활념보고</td>
						<td class="column-2">① 총 수행시간</td>
						<td class="column-3"><?php echo $content->option->{'time_12'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_12'}?></div></td>
					</tr>
					<tr class="row-14">
						<td class="column-2">② 도량 걸을 때(오른발, 왼발)</td>
						<td class="column-3"><?php echo $content->option->{'time_13'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_13'}?></div></td>
					</tr>
					<tr class="row-15">
						<td class="column-2">③ 공양할 때(잡음/집음/당김/넣음/씹음/삼킴/놓음)</td>
						<td class="column-3"><?php echo $content->option->{'time_14'}?></td>
						<td class="column-4"><?php if($board->isAdmin()):?>
								<div class="reply_area"><textarea rows="10" name="kboard_option_time_14_re"><?=$content->option->{'time_14_re'}?></textarea></div>
							<?php endif?></td>
					</tr>
					<tr class="row-16">
						<td class="column-2">④ 문 여닫을 때(의도넣고 알아차림하는지)</td>
						<td class="column-3"><?php echo $content->option->{'time_15'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_15'}?></div></td>
					</tr>
					<tr class="row-17">
						<td class="column-2">⑤ 신 신고 벗을 때(의도넣고 알아차린 하는지)</td>
						<td class="column-3"><?php echo $content->option->{'time_16'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_16'}?></div></td>
					</tr>
					<tr class="row-18">
						<td rowspan="2" class="column-1">질문</td>
						<td class="column-2">궁금한 것 질문하기</td>
						<td class="column-3"><?php echo $content->option->{'time_17'}?></td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_17'}?></div></td>
					</tr>
					<tr class="row-19">
						<td class="column-2"></td>
						<td class="column-3">수행지도 총평</td>
						<td class="column-4"><div class="reply_area"><?php echo $content->option->{'time_re_18'}?></div></td>
					</tr>
				</tbody>
			</table>
		</div>
				</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">
				<?php foreach($content->getAttachmentList() 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)?>" title="<?php echo esc_attr(wp_strip_all_tags($bottom_content->title))?>">
					<span class="navi-arrow">«</span>
					<span class="navi-document-title soohaeng-board-cut-strings"><?php echo wp_strip_all_tags($bottom_content->title)?></span>
				</a>
				<?php endif?>
			</div>
			
			<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)?>" title="<?php echo esc_attr(wp_strip_all_tags($top_content->title))?>">
					<span class="navi-document-title soohaeng-board-cut-strings"><?php echo wp_strip_all_tags($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->getBoardList()?>" class="soohaeng-board-button-small"><?php echo __('List', 'kboard')?></a>
				<?php if($board->isReply() && !$content->notice):?><a href="<?php echo $url->set('parent_uid', $content->uid)->set('mod', 'editor')->toString()?>" class="soohaeng-board-button-small"><?php echo __('Reply', 'kboard')?></a><?php endif?>
			</div>
			<?php if($content->isEditor() || $board->permission_write=='all'):?>
			<div class="right">
				<a href="<?php echo $url->getContentEditor($content->uid)?>" class="soohaeng-board-button-small"><?php echo __('Edit', 'kboard')?></a>
				<a href="<?php echo $url->getContentRemove($content->uid)?>" class="soohaeng-board-button-small" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete', 'kboard')?></a>
			</div>
			<?php endif?>
		</div>
	</div>
</div>

 

좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
  • 안녕하세요~^^

    KBoard 게시판에서 reply-template.php 파일은

    게시글 목록 페이지에 답글을 표시하는 파일입니다.

    editor.php 파일과 document.php 파일을 직접 커스텀하신다면

    아래의 코드를 활용해보세요.

    <?php if($content->parent_uid):?>
    <!-- 답글일 때 실행됩니다. -->
    <?php endif?>
    
    <?php if($board->isAdmin()):?>
    <!-- 관리자일 때 실행됩니다. -->
    <?php endif?>
    
    <?php if($board->isAdmin() && $content->parent_uid):?>
    <!-- 관리자가 답글을 작성하거나 답글을 볼 때 실행됩니다. -->
    <?php endif?>

    상황에 맞게 위의 코드를 활용하시면

    답글일 때 실행하게 하거나 관리자일 때 실행하게 하실 수 있습니다.

    맨 아래 코드를 활용하시면 관리자가 답글을 작성하거나 답글을 볼 때 코드를 실행하게 하실 수 있습니다.

    고맙습니다.

  • editor.php

    <div class="col-1-3">
    	<label class="attr-name">이름 :</label>
    	<div class="attr-value">
    		<input type="text" id="kboard_option_author" name="kboard_option_author" value="<?php echo $content->option->author; ?>">3
    		<?php if($board->isAdmin() && $content->parent_uid):?>
    			<?php echo $content->option->author?>
    		<?php endif?>
    		<?php if($board->isAdmin()):?>
    			<?php echo $content->option->author?>
    		<?php endif?>
    	</div>
    </div>

    안녕하세요, 상기처럼 알려주신대로 코드를 넣어봐도.

    작성자가 쓴 필드의 값이 답글작성시 채워져 있는게 아니라 입력할수 있는 상태로 뜹니다.

    답글작성시 원글의 일부필드는 수정가능한게 아닌 출력상태로 어떻게 해야할가요? ㅠ

  • 올려주신 코드를 기준으로

    답글 작성 시에는 원글의 게시글 정보가 표시되게 하고 수정이 불가능하게 하시려면

    아래 코드를 활용해보시겠어요?

    <div class="col-1-3">
    	<label class="attr-name">이름 :</label>
    	<div class="attr-value">
    		<?php if(!$content->parent_uid):?>
    			<input type="text" id="kboard_option_author" name="kboard_option_author" value="<?php echo $content->option->author?>">
    		<?php else:?>
    			<?php
    			$parent = new KBContent();
    			$parent->initWithUID($content->parent_uid);
    			echo $parent->option->author;
    			?>
    		<?php endif?>
    	</div>
    </div>

    고맙습니다.

좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기