<!-- 검색폼 시작 -->
<div class="kboard-header">
<form id="kboard-search-form" method="get" action="<?php echo $url->set('mod', 'list')->toString()?>">
<?php echo $url->set('category1', '')->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
<?php if($board->use_category == 'yes'):?>
<div class="kboard-category">
<?php if($board->initCategory1()):?>
<select name="category1" onchange="jQuery('#kboard-search-form').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($_GET['category1'] == $board->currentCategory()):?> selected="selected"<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
<?php if($board->initCategory2()):?>
<select name="category2" onchange="jQuery('#kboard-search-form').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($_GET['category2'] == $board->currentCategory()):?> selected="selected"<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
</div>
<?php endif?>
<div class="kboard-search">
<select name="target">
<option value=""><?php echo __('All', 'kboard')?></option>
<option value="title"<?php if($_GET['target'] == 'title'):?> selected="selected"<?php endif?>><?php echo __('Title', 'kboard')?></option>
<option value="content"<?php if($_GET['target'] == 'content'):?> selected="selected"<?php endif?>><?php echo __('Content', 'kboard')?></option>
<option value="member_display"<?php if($_GET['target'] == 'member_display'):?> selected="selected"<?php endif?>><?php echo __('Author', 'kboard')?></option>
</select>
<input type="text" name="keyword" value="<?php echo $_GET['keyword']?>">
<button type="submit" class="kboard-customer-button-small"><?php echo __('Search', 'kboard')?></button>
</div>
</form>
</div>
<!-- 검색폼 끝 -->
list.php 파일에 검색폼이 이렇게되어있는데 어떤식으로 수정을 해줘야 가능 할까요?
이 코드를 그대로 복사한다고 동작하지 않습니다.
왜냐하면 중간중간있는 PHP 코드들도 가져와야 하는데 그럴수 없거든요.
브라우저에서 게시판이 설치된 페이지의 소스보기해서 최종적으로 php코드가 실행이 완료된 html 코드만 가져와주세요.
그리고는 form에 action에 게시판 주소를 써주세요.
<form id="kboard-search-form" method="get" action="게시판주소">