게시판 검색에서 전체 검색 분류 추가
본문
게시판 검색에서
<?php echo get_board_sfl_select_options($sfl); ?>
검색 옵션에 전체 검색도 추가하고 싶은데 방법이 있을까요?
검색옵션 :
전체
제목
내용
제목+내용
function get_board_sfl_select_options($sfl){
global $is_admin;
$str = '';
$str .= '<option value="wr_subject" '.get_selected($sfl, 'wr_subject', true).'>제목</option>';
$str .= '<option value="wr_content" '.get_selected($sfl, 'wr_content').'>내용</option>';
$str .= '<option value="wr_subject||wr_content" '.get_selected($sfl, 'wr_subject||wr_content').'>제목+내용</option>';
if ( $is_admin ){
$str .= '<option value="mb_id,1" '.get_selected($sfl, 'mb_id,1').'>회원아이디</option>';
$str .= '<option value="mb_id,0" '.get_selected($sfl, 'mb_id,0').'>회원아이디(코멘트)</option>';
}
$str .= '<option value="wr_name,1" '.get_selected($sfl, 'wr_name,1').'>글쓴이</option>';
$str .= '<option value="wr_name,0" '.get_selected($sfl, 'wr_name,0').'>글쓴이(코멘트)</option>';
return run_replace('get_board_sfl_select_options', $str, $sfl);
}
!-->
답변 2
$str = ''; ==> $str = "<option value=''>전체</option>";
저거 배열이 들어간게 아니라서 그냥 $str 필드를 넣어서 수정 하면될것같아요
답변을 작성하시기 전에 로그인 해주세요.