답변 1개
채택된 답변
+20 포인트
10년 전
head.php 파일의 42번째줄에서 79번째줄까지의 아래 소스를
</p><p> <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></p><p> <script>
function fsearchbox_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}</p><p> // 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}</p><p> if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}</p><p> return true;
}
</script>
</fieldset></p><p>
아래와 같이 수정 합니다.
</p><p> <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;
}</p><p> // 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}</p><p> if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}</p><p> 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');</p><p> $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>
</p><p>
그리고 default.css 파일을 열어서 42번재줄에서 46번재줄까지의
</p><p>/* 전체 검색 */
#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}</p><p>
를 아래와 같이 수정해 줍니다.
</p><p>/* 전체 검색 */
#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;}</p><p>
그후 아래의 이미지를 다운로드 하셔서 그누보드의 img 폴더에 업로드 해주시면 됩니다.

근데 이미지 저작권에 안걸릴지 모르겠습니다......ㅎㅎ
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
f
fm25
10년 전
걸릴 것 같다... 에 한 표~^^
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인