Season2 // 검색결과에서 이미지 보이기
C:\xampp\htdocs\eeeeeeeeeeeee\skin\search\basic/search.skin.php
#21 Season2 // bbs/search.php 검색 결과를 100개 표시
[code]
if (!$srows) $srows = 110; // 한페이지에 출력하는 검색 행수
[/code]
# 131 Season2 // 검색결과에서 이미지 보이기
[code]
<?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"></span> ';
$comment_href = '#c_'.$list[$idx][$i]['wr_id'];
} else {
$comment_def = '';
$comment_href = '';
}
// 검색결과에서 썸네일 이미지 생성
$thumb_info = get_list_thumbnail($search_table[$idx], $list[$idx][$i]['wr_id'],105,79);
$sch_thumb = $thumb_info['src'];
?>
//이미지 주소 넣을 곳에 아래 코드 삽입
<?=$sch_thumb?>
[/code]
# 170 Season2 // bbs/search.php 코멘트는 검색 안되게
[code]
$sql = " select * from {$tmp_write_table}
where wr_is_comment = 0 and {$sql_search}
order by wr_id desc
limit {$from_record}, {$rows} ";
[/code]
위 코드에서 wr_is_comment = 0 and 삽입
댓글 4개
<?php echo $sch_thumb ?> 시키게 되면 이미지가 http://test.test.com/data/file/gallery/thumb-aab70f5ff94a70e099d2eeff6fc19234_bKr67aZE_c031c0fe92bcfa28f715ffb96588e7920ca76bc1_105x79.jpg test22222222222222222222이런식으로 상대경로 나오는데 이미지로 나오게 하려면 어떻게 해야하죠?
그누보드 원본 갤러리 view.php, list.php 파일에 보면 해당 변수를 이용한 echo 문이 있으니 참고해 보세요.
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4402 | ||
| 24 | 12년 전 | 7368 | ||
| 23 | 12년 전 | 5223 | ||
| 22 |
JMoon
|
12년 전 | 6243 | |
| 21 |
오늘도망했다
|
12년 전 | 13478 | |
| 20 | 12년 전 | 4319 | ||
| 19 | 12년 전 | 8044 | ||
| 18 | 12년 전 | 6510 | ||
| 17 | 12년 전 | 5413 | ||
| 16 | 12년 전 | 6132 | ||
| 15 | 12년 전 | 5612 | ||
| 14 | 12년 전 | 9228 | ||
| 13 | 12년 전 | 8198 | ||
| 12 | 12년 전 | 4948 | ||
| 11 | 12년 전 | 7265 | ||
| 10 |
|
12년 전 | 8958 | |
| 9 | 12년 전 | 7552 | ||
| 8 | 12년 전 | 8128 | ||
| 7 | 12년 전 | 7327 | ||
| 6 | 12년 전 | 7456 | ||
| 5 | 12년 전 | 7373 | ||
| 4 | 12년 전 | 7462 | ||
| 3 | 12년 전 | 6953 | ||
| 2 | 12년 전 | 5801 | ||
| 1 | 12년 전 | 12121 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기