그누보드 검색창 기본형을 좀 바꾸고싶어요

그누보드 검색창 기본형을 좀 바꾸고싶어요

QA

그누보드 검색창 기본형을 좀 바꾸고싶어요

답변 1

본문

그누 기본검색창을 sir 처럼 이쁜걸로 바꾸고싶은데

 

어떻게 해야하나요

 

저런게 힘들다면 색상과 검색창길이만이라도 좀 바꾸고싶어요 ㅜㅜ

이 질문에 댓글 쓰기 :

답변 1

head.php 파일의 42번째줄에서 79번째줄까지의 아래 소스를


        <fieldset id="hd_sch">
        </fieldset>
            <form name="fsearchbox" method="get" action="<?php echo G5_BBS_URL ?>/search.php" onsubmit="return fsearchbox_submit(this);">
            <input type="hidden" name="sfl" value="wr_subject||wr_content">
            <input type="hidden" name="sop" value="and">
            <label for="sch_stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
            <input type="text" name="stx" id="sch_stx" maxlength="20">
            <input type="submit" id="sch_submit" value="검색">
            </form>
            <script>
            function fsearchbox_submit(f)
            {
                if (f.stx.value.length < 2) {
                    alert("검색어는 두글자 이상 입력하십시오.");
                    f.stx.select();
                    f.stx.focus();
                    return false;
                }
                // 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
                var cnt = 0;
                for (var i=0; i<f.stx.value.length; i++) {
                    if (f.stx.value.charAt(i) == ' ')
                        cnt++;
                }
                if (cnt > 1) {
                    alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
                    f.stx.select();
                    f.stx.focus();
                    return false;
                }
                return true;
            }
            </script>
        </fieldset>​

 

아래와 같이 수정 합니다.

 


        <div id="hd_sch">
            <input type="hidden" name="sfl" value="wr_subject||wr_content">
            <input type="hidden" name="sop" value="and">
                 <label for="sch_stc" id="sch_stc_label">검색어<strong class="sound_only"> 필수</strong></label>
                 <input type="text" name="stx" value="" id="sch_stc" required >
                 <button type="submit" id="sch_top" alt="검색"></button>
             </form>
            <script>
            function fsearchbox_submit(f)
            {
                if (f.stx.value.length < 2) {
                    alert("검색어는 두글자 이상 입력하십시오.");
                    f.stx.select();
                    f.stx.focus();
                    return false;
                }
                // 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
                var cnt = 0;
                for (var i=0; i<f.stx.value.length; i++) {
                    if (f.stx.value.charAt(i) == ' ')
                        cnt++;
                }
                if (cnt > 1) {
                    alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
                    f.stx.select();
                    f.stx.focus();
                    return false;
                }
                return true;
            }
            $(function() {
                var $sch = $('#sch_stc');   //검색 input
                var $sch_label = $('#sch_stc_label');    //검색 label
                if ($sch.attr('value') == "") $sch_label.css('visibility','visible');
                else  $sch_label.css('visibility','hidden');
                $sch.focus(function() {
                    $sch_label.css('visibility','hidden');
                });
                $sch.blur(function() {
                    $this = $(this);
                    if ($this.attr('id') == "sch_stc" && $this.attr('value') == "") $sch_label.css('visibility','visible');
                });
            });
            </script>
        </div>
​

 

그리고 default.css 파일을 열어서 42번재줄에서 46번재줄까지의

 


/* 전체 검색 */
#hd_sch #sch_submit {padding:0 5px;height:26px;border:0;background:#e2e6eb;color:#333;cursor:pointer}
#hd_sch legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
#hd_sch #sch_stx {padding-left:5px;width:110px;height:24px;border:0;background:#fff;line-height:1.9em !important;line-height:1.6em}
#hd_sch #sch_submit {padding:0 5px;height:26px;border:0;background:#e2e6eb;color:#333;cursor:pointer}​

 

를 아래와 같이 수정해 줍니다.

 


/* 전체 검색 */
#sch_top{width:38px;height:34px; background:url('../img/src_btn_s.jpg') no-repeat;border:0;float:left;}
#sch_stc{border:3px solid #ff5191;height:28px;width:190px;float:left;border-right:none;padding:0 15px;line-height:28px;color:#8b8b8b;font-size:1em;/*height:42px\9;*/ }
#hd_sch form{position:relative;}
#hd_sch label {position: absolute;top: 10px;left: 17px;color: #839298}
#sch_top{width:38px;height:34px; background:url('../img/src_btn_s.jpg') no-repeat;border:0;float:left;}​

 

그후 아래의 이미지를 다운로드 하셔서 그누보드의 img 폴더에 업로드 해주시면 됩니다.

11ee2ebc25c5912f8205f9948e0559da_1434492645_7203.jpg

 

근데 이미지 저작권에 안걸릴지 모르겠습니다......ㅎㅎ
 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 129,112
© SIRSOFT
현재 페이지 제일 처음으로