editor.php 파일에서 class값, name을 바꿨는데 저장이 안되요

editor.php 파일에서 class값, name을 바꾸고 나서 웹페이지에서 글 저장이 안되요

워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
  • 안녕하세요~^^

    어떤 코드를 바꾸셨는지요?

    editor.php 파일에서 필드의 name 값을 임의로 수정하시면

    게시글 정보가 정상적으로 저장되지 않을 수도 있습니다.

    어떤 식으로 코드를 수정하셨는지 좀 더 구체적으로 설명해주시겠어요?

    고맙습니다.

  • <div id="kboard-ocean-rating-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)?>

            

            <!-- 위치 -->

            <!-- <div class="kboard-attr-row kboard-attr-title">

                <label class="attr-name" for="kboard-input-title"><?php echo __('위치', 'kboard')?></label>

                <div class="attr-value"><input type="text" id="kboard-input-title" name="title" value="<?php echo $content->title?>"></div>

            </div> -->

     

            <div class="kboard-attr-row kboard-attr-gps">

                <label class="attr-name" for="kboard-input-gps"><?php echo __('위치', 'kboard')?></label>

                <span class="Astarica">*</span>

                <span class="attr-value"><input type="search" id="kboard-input-gps" name="gps" placeholder="위치를 입력하세요" value="" ></span>

                <a href="https://ybmperfectenglish.com/juso_new.php" target="_blank">

                <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQBJuJzWt5HVHLEKa4QzePjqMkW7VVaOMq4qA&usqp=CAU" style="width:33px;height:31px;object-fit:cover;object-position:50% 50%" ></a>

                <!-- https://static.wixstatic.com/media/a9aa5c_36978d2e70004a7796e06b1b7589c2c8~mv2.png/v1/fill/w_41,h_39,al_c,q_85,usm_0.66_1.00_0.01/%E2%86%B3Color.webp -->

            </div>

     

            <!-- 제목 -->

            <!-- <div class="kboard-attr-row kboard-attr-title">

                <label class="attr-name" for="kboard-input-title"><?php echo __('제목', 'kboard')?></label>

                <div class="attr-value"><input type="text" id="kboard-input-title" name="title" value="<?php echo $content->title?>"></div>

            </div> -->

            

            <div class="kboard-attr-row kboard-attr-title">

                <label class="attr-name" for="kboard-input-title"><?php echo __('제목', 'kboard')?></label>

                <span class="Astarica">*</span>

                <span class="attr-value"><input type="text" id="kboard-input-title" name="title" placeholder="제목을 입력하세요" value="<?php echo $content->title?>"></span>

            </div>

     

            <!-- 별점 -->

            <div class="kboard-attr-row">

                <label class="attr-name">별점</label>

                <span class="Astarica">*</span>

                <span class="attr-value">

                    <input type="hidden" name="kboard_option_rating" value="<?php echo $content->option->rating?>">

                    <span class="kboard-rating value-<?php echo $content->option->rating?>" title="<?php echo $content->option->rating?>"><img src="<?php echo $skin_path?>/images/blank.png" alt="" usemap="#kboard-rating-map"></span><br/>

                    <span class="letter">별점을 눌러 주세요. 안전도가 높을 수록 높은 별점을 부여합니다.</span>

                    <!-- <span style="font-family:wfont_a9aa5c_c79f5fa03bf94c878fc15c96166b1c81,wf_c79f5fa03bf94c878fc15c961,orig_nanumbarungothic_yethangul">별점을 눌러 주세요. 안전도가 높을 수록 높은 별점을 부여합니다.</span> -->

                </span>

            </div>

     

            <!-- 체크리스트 -->

            <div class="kboard-attr-row kboard-attr-title checked radio ">

                <label class="attr-name" for="kboard-input-title"><?php echo __('체크리스트', 'kboard')?></label>

                <span class="Astarica">*</span><br />

                <!-- <div class="attr-value"><input type="text" id="kboard-input-title" name="title" value="<?php echo $content->title?>"></div> -->

                

     

                <div>

                <span class="checkbox"><input type="checkbox" name="interest[]" value="programming" checked="checked" /> 인적이 많이 다니는가?(10명 이상 왕복)<br /></span>

                <span class="checkbox"><input type="checkbox" name="interest[]" value="design" /> 양방통로의 골목인가?<br /></span>

                <span class="checkbox"><input type="checkbox" name="interest[]" value="planning" /> 스마트 가로등이 설치되어 있는가?<br /></span>

                <span class="checkbox"><input type="checkbox" name="interest[]" value="planning" /> 안심귀갓길 또는 112신고 표지판이 있는가?<br /></span>

                </div>

                <br />

     

                <div>

                <form action="example_receive_single.php" method="POST">

                    <span class="radio">주변의 밝기를 체크해 주세요 <br /></span>

                    <span class="radio"><input type="radio" name="interest[]" value="programming" checked="checked" /> 어둡다<br /></span>

                    <span class="radio"><input type="radio" name="interest[]" value="design" /> 보통이다<br /></span>

                    <span class="radio"><input type="radio" name="interest[]" value="planning" /> 밝다<br /></span>

                    <!-- <input type="submit" /> -->

                </form>

                </div>

            </div>

            

            <!-- 카테고리 -->

            <!-- <?php if($board->use_category):?>

                <?php if($board->isTreeCategoryActive()):?>

                    <div class="kboard-attr-row">

                        <label class="attr-name" for="kboard-tree-category"><?php echo __('Category', 'kboard')?></label>

                        <div class="attr-value">

                            <?php for($i=1; $i<=$content->getTreeCategoryDepth(); $i++):?>

                            <input type="hidden" id="tree-category-check-<?php echo $i?>" value="<?php echo $content->option->{'tree_category_'.$i}?>">

                            <input type="hidden" name="kboard_option_tree_category_<?php echo $i?>" value="">

                            <?php endfor?>

                            <div class="kboard-tree-category-wrap"></div>

                        </div>

                    </div>

                <?php else:?>

                    <?php if($board->initCategory1()):?>

                    <div class="kboard-attr-row">

                        <label class="attr-name" for="kboard-select-category1"><?php echo __('Category', 'kboard')?>1</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 if($board->initCategory2()):?>

                    <div class="kboard-attr-row">

                        <label class="attr-name" for="kboard-select-category2"><?php echo __('Category', 'kboard')?>2</label>

                        <div class="attr-value">

                            <select id="kboard-select-category2" name="category2">

                                <option value=""><?php echo __('Category', 'kboard')?> <?php echo __('Select', 'kboard')?></option>

                                <?php while($board->hasNextCategory()):?>

                                <option value="<?php echo $board->currentCategory()?>"<?php if($content->category2 == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>

                                <?php endwhile?>

                            </select>

                        </div>

                    </div>

                    <?php endif?>

                <?php endif?>

            <?php endif?> -->

            

            <!-- 비밀글 -->

            <!-- <div class="kboard-attr-row">

                <label class="attr-name"><?php echo __('Secret', 'kboard')?></label>

                <div class="attr-value"><input type="checkbox" name="secret" value="true" onchange="kboard_toggle_password_field(this)"<?php if($content->secret):?> checked<?php endif?>></div>

            </div> -->

            

            <!-- ? -->

            <!-- <?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 __('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:?>

            <div style="overflow:hidden;width:0;height:0;">

                <input style="width:0;height:0;background:transparent;color:transparent;border:none;" type="text" name="fake-autofill-fields">

                <input style="width:0;height:0;background:transparent;color:transparent;border:none;" type="password" name="fake-autofill-fields">

            </div> -->

     

            <!-- 비밀글 비밀번호 필드 시작 -->

            <!-- <div class="kboard-attr-row kboard-attr-password secret-password-row"<?php if(!$content->secret):?> style="display:none"<?php endif?>>

                <label class="attr-name" for="kboard-input-password"><?php echo __('Password', 'kboard')?> <span class="attr-required-text">*</span></label>

                <div class="attr-value"><input type="password" id="kboard-input-password" name="password" value="<?php echo esc_attr($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 class="kboard-content kboard-attr-row kboard-attr-title">

                <label class="attr-name" for="kboard-input-title"><?php echo __('내용', 'kboard')?></label>

                <span class="Astarica">*</span>

                <?php

                echo kboard_content_editor(array(

                    'board' => $board,

                    'content' => $content,

                    'required' => false,

                    'placeholder' => '',

                    'editor_height' => '400',

                ));

                ?>

            </div>

            

            <!-- 썸네일>>첨부파일 -->

            <div class="kboard-attr-row">

                <label class="attr-name"><?php echo __('첨부파일', '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" name="thumbnail">

                </div>

            </div>

            

            

            <!-- 사진 -->

            <!-- <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> -->

            

            <!-- ? -->

            <?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 class="kboard-control">

                <div class="left">

                    <?php if($content->uid):?>

                    <a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>" class="kboard-ocean-rating-button-small"><?php echo __('Back', 'kboard')?></a>

                    <a href="<?php echo $url->getBoardList()?>" class="kboard-ocean-rating-button-small"><?php echo __('List', 'kboard')?></a>

                    <?php else:?>

                    <a href="<?php echo $url->getBoardList()?>" class="kboard-ocean-rating-button-small"><?php echo __('Back', 'kboard')?></a>

                    <?php endif?>

                </div>

                <div class="right">

                    <?php if($board->isWriter()):?>

                    <button type="submit" class="kboard-ocean-rating-button-small"><?php echo __('Save', 'kboard')?></button>

                    <?php endif?>

                </div>

            </div>

        </form>

    </div>

     

    <map id="kboard-rating-map" name="kboard-rating-map">

        <area shape="rect" coords="0,0,7,13" href="#" onclick="return false;" onmouseover="kboard_rating_value(1);">

        <area shape="rect" coords="7,0,14,13" href="#" onclick="return false;" onmouseover="kboard_rating_value(2);">

        <area shape="rect" coords="14,0,21,13" href="#" onclick="return false;" onmouseover="kboard_rating_value(3);">

        <area shape="rect" coords="21,0,28,13" href="#" onclick="return false;" onmouseover="kboard_rating_value(4);">

        <area shape="rect" coords="28,0,35,13" href="#" onclick="return false;" onmouseover="kboard_rating_value(5);">

        <area shape="rect" coords="35,0,42,13" href="#" onclick="return false;" onmouseover="kboard_rating_value(6);">

        <area shape="rect" coords="42,0,49,13" href="#" onclick="return false;" onmouseover="kboard_rating_value(7);">

        <area shape="rect" coords="49,0,56,13" href="#" onclick="return false;" onmouseover="kboard_rating_value(8);">

        <area shape="rect" coords="56,0,63,13" href="#" onclick="return false;" onmouseover="kboard_rating_value(9);">

        <area shape="rect" coords="63,0,69,13" href="#" onclick="return false;" onmouseover="kboard_rating_value(10);">

    </map>

     

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

  • <div class="kboard-attr-row kboard-attr-gps">

                <label class="attr-name" for="kboard-input-gps"><?php echo __('위치', 'kboard')?></label>

                <span class="Astarica">*</span>

                <span class="attr-value"><input type="search" id="kboard-input-gps" name="gps" placeholder="위치를 입력하세요" value="" ></span>

                <a href="https://ybmperfectenglish.com/juso_new.php" target="_blank">

                <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQBJuJzWt5HVHLEKa4QzePjqMkW7VVaOMq4qA&usqp=CAU" style="width:33px;height:31px;object-fit:cover;object-position:50% 50%" ></a>

                <!-- https://static.wixstatic.com/media/a9aa5c_36978d2e70004a7796e06b1b7589c2c8~mv2.png/v1/fill/w_41,h_39,al_c,q_85,usm_0.66_1.00_0.01/%E2%86%B3Color.webp -->

            </div>

     

    <div class="kboard-attr-row kboard-attr-title">

                <label class="attr-name" for="kboard-input-title"><?php echo __('제목', 'kboard')?></label>

                <span class="Astarica">*</span>

                <span class="attr-value"><input type="text" id="kboard-input-title" name="title" placeholder="제목을 입력하세요" value="<?php echo $content->title?>"></span>

            </div>

     

     

    <div class="kboard-attr-row">

                <label class="attr-name">별점</label>

                <span class="Astarica">*</span>

                <span class="attr-value">

                    <input type="hidden" name="kboard_option_rating" value="<?php echo $content->option->rating?>">

                    <span class="kboard-rating value-<?php echo $content->option->rating?>" title="<?php echo $content->option->rating?>"><img src="<?php echo $skin_path?>/images/blank.png" alt="" usemap="#kboard-rating-map"></span><br/>

                    <span class="letter">별점을 눌러 주세요. 안전도가 높을 수록 높은 별점을 부여합니다.</span>

                    <!-- <span style="font-family:wfont_a9aa5c_c79f5fa03bf94c878fc15c96166b1c81,wf_c79f5fa03bf94c878fc15c961,orig_nanumbarungothic_yethangul">별점을 눌러 주세요. 안전도가 높을 수록 높은 별점을 부여합니다.</span> -->

                </span>

            </div>

     

     

    <div class="kboard-attr-row kboard-attr-title checked radio ">

                <label class="attr-name" for="kboard-input-title"><?php echo __('체크리스트', 'kboard')?></label>

                <span class="Astarica">*</span><br />

                <!-- <div class="attr-value"><input type="text" id="kboard-input-title" name="title" value="<?php echo $content->title?>"></div> -->

                

     

                <div>

                <span class="checkbox"><input type="checkbox" name="interest[]" value="programming" checked="checked" /> 인적이 많이 다니는가?(10명 이상 왕복)<br /></span>

                <span class="checkbox"><input type="checkbox" name="interest[]" value="design" /> 양방통로의 골목인가?<br /></span>

                <span class="checkbox"><input type="checkbox" name="interest[]" value="planning" /> 스마트 가로등이 설치되어 있는가?<br /></span>

                <span class="checkbox"><input type="checkbox" name="interest[]" value="planning" /> 안심귀갓길 또는 112신고 표지판이 있는가?<br /></span>

                </div>

                <br />

     

                <div>

                <form action="example_receive_single.php" method="POST">

                    <span class="radio">주변의 밝기를 체크해 주세요 <br /></span>

                    <span class="radio"><input type="radio" name="interest[]" value="programming" checked="checked" /> 어둡다<br /></span>

                    <span class="radio"><input type="radio" name="interest[]" value="design" /> 보통이다<br /></span>

                    <span class="radio"><input type="radio" name="interest[]" value="planning" /> 밝다<br /></span>

                    <!-- <input type="submit" /> -->

                </form>

                </div>

            </div>

     

     

    <div class="kboard-content kboard-attr-row kboard-attr-title">

                <label class="attr-name" for="kboard-input-title"><?php echo __('내용', 'kboard')?></label>

                <span class="Astarica">*</span>

                <?php

                echo kboard_content_editor(array(

                    'board' => $board,

                    'content' => $content,

                    'required' => false,

                    'placeholder' => '',

                    'editor_height' => '400',

                ));

                ?>

            </div>

     

     

    <div class="kboard-attr-row">

                <label class="attr-name"><?php echo __('첨부파일', '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" name="thumbnail">

                </div>

            </div>

     

    위의 코드에서 이정도 바꿨는데 원본 파일이랑 비교 해봤는데 js코드는 똑같더라구여

  • 올려주신 코드를 확인해보니 코드를 잘못 수정하신 듯합니다.

    KBoard 플러그인에서 추가하신 입력 필드의 내용을 저장하시려면

    name에 kboard_option_메타키 이런 식으로 설정해주셔야 합니다.

    KBoard 플러그인에서 입력 필드를 추가하는 방법은

    아래 링크를 참고 부탁드립니다.

    워드프레스 게시판 KBoard(케이보드) 새로운 입력 필드 추가 방법 (커스터마이징)

    고맙습니다.

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