전체검색 이미지 썸네일 출력
본문
안녕하세요.
전체검색 이미지 썸네일 출력 문의드립니다
아래 검색소스인데 출력하는방법 있을까요.....?
질답에 검색해도.. 오래된 소스밖께없어서 해결못하고 있네요.
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$search_skin_url.'/style.css">', 0);
?>
<!-- 전체검색 시작 { -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0">검색 결과</h1>
</div><!-- /.col -->
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="<?php echo G5_URL; ?>">Home</a></li>
<li class="breadcrumb-item active">검색 결과</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<!-- 게시물 작성/수정 시작 { -->
<form name="fsearch" onsubmit="return fsearch_submit(this);" method="get">
<input type="hidden" name="srows" value="<?php echo $srows ?>">
<fieldset id="sch_res_detail">
<legend>상세검색</legend>
<?php echo $group_select ?>
<script>document.getElementById("gr_id").value = "<?php echo $gr_id ?>";</script>
<label for="sfl" class="sound_only">검색조건</label>
<select name="sfl" id="sfl">
<option value="wr_subject||wr_content"<?php echo get_selected($sfl, "wr_subject||wr_content") ?>>제목+내용</option>
<option value="wr_subject"<?php echo get_selected($sfl, "wr_subject") ?>>제목</option>
<option value="wr_content"<?php echo get_selected($sfl, "wr_content") ?>>내용</option>
<option value="mb_id"<?php echo get_selected($sfl, "mb_id") ?>>회원아이디</option>
<option value="wr_name"<?php echo get_selected($sfl, "wr_name") ?>>이름</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<span class="sch_wr">
<input type="text" name="stx" value="<?php echo $text_stx ?>" id="stx" required class="frm_input" size="40">
<button type="submit" class="btn_submit"><i class="fa fa-search" aria-hidden="true"></i> 검색</button>
</span>
<script>
function fsearch_submit(f)
{
var stx = f.stx.value.trim();
if (stx.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i = 0; i < stx.length; i++) {
if (stx.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
f.stx.value = stx;
f.action = "";
return true;
}
</script>
<div class="switch_field">
<input type="radio" value="and" <?php echo ($sop == "and") ? "checked" : ""; ?> id="sop_and" name="sop">
<label for="sop_and">AND</label>
<input type="radio" value="or" <?php echo ($sop == "or") ? "checked" : ""; ?> id="sop_or" name="sop" >
<label for="sop_or">OR</label>
</div>
</fieldset>
</form>
<div class="container-fluid">
<div class="row">
<div class="col-12">
<!-- Default box -->
<div class="card">
<div class="card-header">
<?php
if ($stx) {
if ($board_count) {
?>
<h3 class="card-title"><span class="btn btn-outline-primary btn-sm"><?php echo $stx ?></span> 전체검색 결과</h3>
<div class="card-tools">
<span class="btn btn-outline-info btn-sm">
게시판 <?php echo $board_count; ?>개
/ 게시물 <?php echo number_format($total_count); ?>개
- <?php echo number_format($page); ?>/<?php echo number_format($total_page); ?> 페이지 열람 중
</span>
</div>
<?php
}
}
?>
</div>
<div class="card-body">
<?php
if ($stx) {
if ($board_count) { ?>
<ul id="sch_res_board">
<li><a href="?<?php echo $search_query ?>&gr_id=<?php echo $gr_id ?>" <?php echo $sch_all; ?>>전체게시판</a></li>
<?php echo $str_board_list; ?>
</ul>
<?php } else { ?>
<div class="empty_list">검색된 결과가 없습니다.</div>
<?php }
} ?>
<hr>
<?php if ($stx && $board_count) { ?><section class="sch_res_list"><?php } ?>
<?php
$k=0;
for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) {
?>
<div class="search_board_result">
<h2><a href="<?php echo get_pretty_url($search_table[$idx], '', $search_query); ?>"><?php echo $bo_subject[$idx]; ?> 게시판 내 결과</a></h2>
<a href="<?php echo get_pretty_url($search_table[$idx], '', $search_query); ?>" class="sch_more">더보기</a>
<ul>
<?php
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
if ($list[$idx][$i]['wr_is_comment']) {
$comment_def = '<span class="cmt_def"><i class="fa fa-commenting-o" aria-hidden="true"></i><span class="sound_only">댓글</span></span> ';
$comment_href = '#c_'.$list[$idx][$i]['wr_id'];
} else {
$comment_def = '';
$comment_href = '';
}
?>
<li>
<div class="sch_tit">
<a href="<?php echo $list[$idx][$i]['href'] ?><?php echo $comment_href ?>" class="sch_res_title"><?php echo $comment_def ?><?php echo $list[$idx][$i]['subject'] ?></a>
<a href="<?php echo $list[$idx][$i]['href'] ?><?php echo $comment_href ?>" target="_blank" class="pop_a"><i class="fa fa-window-restore" aria-hidden="true"></i><span class="sound_only">새창</span></a>
</div>
<p><?php echo $list[$idx][$i]['content'] ?></p>
<div class="sch_info">
<?php echo $list[$idx][$i]['name'] ?>
<span class="sch_datetime"><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo $list[$idx][$i]['wr_datetime'] ?></span>
</div>
</li>
<?php } ?>
</ul>
</div>
<?php } //end for?>
<?php if ($stx && $board_count) { ?></section><?php } ?>
<?php echo $write_pages ?>
</div>
</div>
<!-- /.card-body -->
<!--div class="card-footer">
</div -->
<!-- /.card-footer-->
</div>
<!-- /.card -->
</div>
<!-- /.col-12 -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</section>
<!-- } 전체검색 끝 -->
답변 1
https://sir.kr/g5_skin/1025?sfl=wr_subject%7C%7Cwr_content&stx=%EC%A0%84%EC%B2%B4%EA%B2%80%EC%83%89
자료실에 전체검색 썸네일 노출 자료가 있으니 해당 스킨 받으셔서 원하시는대로 수정하세요.