[1] 전체 검색 사용방법
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<!-- <input type="hidden" name="sfl" value="concat(wr_subject,wr_content)"> -->
<input type="hidden" name="sfl" value="wr_subject||wr_content||wr_1||wr_2||wr_3||wr_4||wr_5||wr_6||wr_7||wr_8||wr_9||wr_10">
<input type="hidden" name="sop" value="and">
<input type="hidden" name="happyjung" value="search"><? //검색후 변수확보 ?>
제품검색<br>
<input type="text" name="stx" style="border:solid 1px #BEDFFA; width:100px; height:20px;">
<input type="image" src="./img/btn_search.gif" align="absmiddle" border="0"><br>
(제품모델번호 입력하세요)
</form>
<script language="Javascript">
<!--
function fsearchbox_submit(f) {
if (f.stx.value == '') {
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
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;
}
*/
f.action = "<?=$g4['bbs_path']?>/search.php";
f.submit();
}
//-->
</script>
[2] 특정그룹에서만 검색결과를 사용하고자 할때
그누보드/bbs/search.php 의 19줄
원본>
$sql = " select gr_id, bo_table, bo_read_level from $g4[board_table] where bo_use_search = '1' and bo_list_level <= '$member[mb_level]' ";
1. 그룹하나에서만 검색
수정>
$sql = " select gr_id, bo_table, bo_read_level from $g4[board_table] where bo_use_search = '1' and bo_list_level <= '$member[mb_level]' and gr_id = '그룹ID' ";
2. 그룹2개 이상에서 검색
수정>
$sql = " select gr_id, bo_table, bo_read_level from $g4[board_table] where bo_use_search = '1' and bo_list_level <= '$member[mb_level]' and (gr_id = '그룹ID1' || gr_id = '그룹ID2') ";
댓글 6개
게시글 목록
| 번호 | 제목 |
|---|---|
| 34021 | |
| 33994 | |
| 33922 | |
| 33895 | |
| 33889 | |
| 33882 | |
| 33868 |
최신글
최신글 함수 개량
11
|
| 33863 | |
| 33859 | |
| 33857 | |
| 33849 | |
| 33842 | |
| 33835 | |
| 33830 | |
| 33828 | |
| 33807 | |
| 33797 | |
| 33796 | |
| 33791 | |
| 33786 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기