안녕하세요, 매번 친절한 답변 감사드립니다.
현재 엘리멘터를 사용중이며, 스킨 커스터마이징해서 사용중인데 글쓰기 화면에서 에러가 나옵니다.
Uncaught SyntaxError: Unexpected token '<'
개발자 도구에서보면, 희안하게 엘리멘터 코드가 삽입되어 지더라구요.
아래 스크린샷과 같습니다.
원인과 해결책을 알수있을까요? ㅠㅠ
소스코드는 다음과 같습니다.
<?php if($content->parent_uid):?><div id="soohaeng-reply" class="reply-one"><?php endif?>
<?php if(!$content->parent_uid):?><div id="soohaeng-reply" class="reply-two"><?php endif?>
<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 id="soohaeng-kboard-list">
<!-- 기본정보 -->
<div class="tit-row"><span class="ib">제목 <em>(*필수)</em> :</span><span class="ib"><input type="text" id="kboard-input-title" name="title" value="<?php echo $content->title?>" placeholder="<?php echo __('Title', 'kboard')?>..."></span></div>
<div class="soohaeng-header">
<div class="row row-user clear col-1-1">
<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>
<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_sosok" name="kboard_option_sosok" value="<?php echo $content->option->sosok?>">
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->sosok;
?>
<?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_namebup" name="kboard_option_namebup" value="<?php echo $content->option->namebup?>">
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->namebup;
?>
<?php endif?>
</div>
</div>
</div>
</div>
<!---->
<div class="row row-options clear col-1-1">
<div class="kboard-attr-row">
<div class="attr-val">
<?php if($board->isAdmin()):?>
<label class="attr-value-option"><input type="checkbox" name="secret" value="true"<?php if($content->secret):?> checked<?php endif?>><?php echo __('Secret', 'kboard')?></label>
<?php else:?>
<label class="attr-value-option"><input type="hidden" name="secret" value="true"></label>
<?php endif?>
<?//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>
</div>
<!---->
<table id="soohaeng-table-output" class="soohaeng-table-output">
<tbody>
<tr class="row-1">
<td colspan="2" class="column-1">수행점검표</td>
<td class="column-3">수행보고<?php if(!$content->parent_uid):?><span style="color:#CD3947">(*수행자 입력)</span><?php endif?></td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">수행지도</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-2">
<td rowspan="2" class="column-1">총 수행시간</td>
<td class="column-2">① 1일 / 1주일 동안의 총 수행시간</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea placeholder="각 항목 최대 500자 까지 입력 가능합니다." name="kboard_option_time"><?=$content->option->time?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_re"><?=$content->option->time_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-3">
<td class="column-2">② 좌념, 행념, 생활념의 각 수행시간</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_2"><?=$content->option->time_2?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_2;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_2_re"><?=$content->option->time_2_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-4">
<td rowspan="4" class="column-1">좌념보고</td>
<td class="column-2">① 총 수행시간</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_3"><?=$content->option->time_3?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_3;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_3_re"><?=$content->option->time_3_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-5">
<td class="column-2">② 배 움직임(속도/규칙/폭/무게/이동/기타)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_4"><?=$content->option->time_4?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_4;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_4_re"><?=$content->option->time_4_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-6">
<td class="column-2">③ 생각 움직임(많은지/한 생각/과거/알아차림)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_5"><?=$content->option->time_5?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_5;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_5_re"><?=$content->option->time_5_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-7">
<td class="column-2">④ 몸 움직임(몸이 불편한지/기타)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_6"><?=$content->option->time_6?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_6;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_6_re"><?=$content->option->time_6_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-8">
<td rowspan="5" class="column-1">행념보고</td>
<td class="column-2">① 총 수행시간</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_7"><?=$content->option->time_7?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_7;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_7_re"><?=$content->option->time_7_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-9">
<td class="column-2">② 행념단계 시간배분(1.3,6단계)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_8"><?=$content->option->time_8?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_8;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_8_re"><?=$content->option->time_8_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-10">
<td class="column-2">③ 6단계 발바닥 움직임(들 때/갈 때/놓을 때의 무게감)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_9"><?=$content->option->time_9?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_9;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_9_re"><?=$content->option->time_9_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-11">
<td class="column-2">④ 생각 움직임(생각이 일어날 때 어떻게 하는지)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_10"><?=$content->option->time_10?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_10;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_10_re"><?=$content->option->time_10_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-12">
<td class="column-2">⑤ 몸 움직임(몸이 불편한지/기타)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_11"><?=$content->option->time_11?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_11;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_11_re"><?=$content->option->time_11_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-13">
<td rowspan="5" class="column-1">생활념보고</td>
<td class="column-2">① 총 수행시간</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_12"><?=$content->option->time_12?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_12;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_12_re"><?=$content->option->time_12_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-14">
<td class="column-2">② 도량 걸을 때(오른발, 왼발)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_13"><?=$content->option->time_13?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_13;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_13_re"><?=$content->option->time_13_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-15">
<td class="column-2">③ 공양할 때(잡음/집음/당김/넣음/씹음/삼킴/놓음)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_14"><?=$content->option->time_14?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_14;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_14_re"><?=$content->option->time_14_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-16">
<td class="column-2">④ 문 여닫을 때(의도넣고 알아차림하는지)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_15"><?=$content->option->time_15?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_15;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_15_re"><?=$content->option->time_15_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-17">
<td class="column-2">⑤ 신 신고 벗을 때(의도넣고 알아차린 하는지)</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_16"><?=$content->option->time_16?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_16;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_16_re"><?=$content->option->time_16_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<tr class="row-18">
<td class="column-1">질문</td>
<td class="column-2">궁금한 것 질문하기</td>
<td class="column-3">
<?php if(!$content->parent_uid):?>
<textarea name="kboard_option_time_17"><?=$content->option->time_17?></textarea>
<?php else:?>
<?php
$parent = new KBContent();
$parent->initWithUID($content->parent_uid);
echo $parent->option->time_17;
?>
<?php endif?>
</td>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_17_re"><?=$content->option->time_17_re?></textarea>
</div>
</td>
<?php endif?><?php endif?>
</tr>
<?php if($board->isAdmin()):?><?php if($content->parent_uid):?>
<tr class="row-19">
<td class="column-1">수행지도 총평</td>
<td class="column-2"></td>
<td class="column-3"></td>
<td class="column-4 td-reply">
<div class="reply_area">
<textarea name="kboard_option_time_18_re"><?=$content->option->time_18_re?></textarea>
</div>
</td>
</tr>
<?php endif?><?php endif?>
</tbody>
</table>
</div>
<div class="kboard-control clear">
<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?>
</div>
<div class="right">
<?php if($board->isWriter()):?>
<button type="submit" class="soohaeng-board-button-small"><?php echo __('Save', 'kboard')?></button>
<?php endif?>
</div>
</div>
</form>
</div>
<script>
<?php if(!$content->uid && $parent->secret):?>
<script>
jQuery(document).ready(function(){
var auto_secret_check = true;
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>
<?php endif?>
<?php wp_enqueue_script('soohaeng-board-script', "{$skin_path}/script.js", array(), KBOARD_VERSION, true)?>
안녕하세요~^^
올려주신 코드를 확인해보니 해당 메시지가 나는 건 코드를 잘못 수정하셨습니다.
올려주신 중 아래의 코드를 찾아서
<script>
<?php if(!$content->uid && $parent->secret):?>
<script>
아래의 코드로 교체해보시겠어요?
<?php if(!$content->uid && $parent->secret):?>
<script>
또, 제일 상단에 추가된 아래의 코드를 닫는 태그가 없는 듯합니다.
<?php if($content->parent_uid):?><div id="soohaeng-reply" class="reply-one"><?php endif?>
<?php if(!$content->parent_uid):?><div id="soohaeng-reply" class="reply-two"><?php endif?>
닫는 태그가 없을 경우 레이아웃이 깨질 수도 있습니다.
적당한 위치에 닫는 태그도 추가해보시겠어요?
고맙습니다.
감사합니다!! 코드가 길어져서 꼬인곳이 있었네요. 단번에 찾아주셔서 잘 해결했습니다^^