Customizing/Gnuboard

[그누보드] 게시판스킨만들때 주의사항

시야 2008. 5. 15. 05:10

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

아래에 있는 


<?php

    $option = '';

    $option_hidden = '';

    if ($is_notice || $is_html || $is_secret || $is_mail) {

        $option = '';

        if ($is_notice) {

            $option .= "\n".'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'."\n".'<label for="notice">공지</label>';

        }


        if ($is_html) {

            if ($is_dhtml_editor) {

                $option_hidden .= '<input type="hidden" value="html1" name="html">';

            } else {

                $option .= "\n".'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="html">html</label>';

            }

        }


        if ($is_secret) {

            if ($is_admin || $is_secret==1) {

                $option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';

            } else {

                $option_hidden .= '<input type="hidden" name="secret" value="secret">';

            }

        }


        if ($is_mail) {

            $option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</label>';

        }

    }


    echo $option_hidden;

    ?>


소스를 될수 있는한 날리지 말자...

꼭 지워야 하겠다면 아래의 내용을 참고하도록..


$is_html 은 작성완료시 최하단의 스크립트와 연동되어 DB쪽의 wr_option 필드에 html1을 찍어주는 역활을 하므로 필수이다.

이게 없어서 스크립트가 원활히 작동되지 않으면 view page에서 게시물내용에 자동삽입된 태그가 그대로 찍히게 된다.


나머지 변수들은 불필요하다면 하나하나 지워보고 소스길이를 줄이도록 하자.